24. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/25/2018 3:40:57 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

24.1 Files compared

# Location File Last Modified
1 Pain_Coach_v3.0_Jun_2018.zip\vpc-patient-web.zip\vpc-patient-web\app\veteran\js\model pgdSubMonthlyAssessment.js Fri Jun 1 14:27:14 2018 UTC
2 Pain_Coach_v3.0_Jun_2018.zip\vpc-patient-web.zip\vpc-patient-web\app\veteran\js\model pgdSubMonthlyAssessment.js Wed Jul 25 14:04:57 2018 UTC

24.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 8 398
Changed 7 14
Inserted 0 0
Removed 0 0

24.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

24.4 Active regular expressions

No regular expressions were active.

24.5 Comparison detail

  1   VPC.Model. PgdMonthly Assessment  = VPC.Mod el.PgdQues tionnaireR esponse.ex tend({
  2       save:  function ( questionna ireIdentif ier) {
  3           va r deferred  = $.Defer red(),
  4                self = t his,
  5                options  = {
  6                    url:  App_Resou rces.GetVP CResourceP ath("pgd-f hir-questi onnaireRes ponse"),
  7                    toSa ve: {
  8                         "meta": {
  9                             "tag":  [
  10                                 Ap p_Resource s.GetPGDRe sourceValu e("pgd-met adata-tag" )
  11                             ]
  12                         },
  13                         "resourceT ype": "Que stionnaire Response",
  14                         "source":  {
  15                             "refer ence": "Pa tient/" +  PGD_FHIR_U tils.getPa tientFhirI dentifier( )
  16                         },
  17                         "questionn aire": {
  18                             "refer ence": "Qu estionnair e/" + ques tionnaireI dentifier
  19                         },
  20                         "status":  "completed ",
  21                         "authored" : moment() .toISOStri ng(),
  22                         "group": {
  23                             "title ": "Monthl y Check-In ",
  24                             "quest ion": [
  25                                 {
  26                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "painI ntensity") .linkId,
  27                                      "text":  "painInten sity",
  28                                      "answer" : [{
  29                                          "val ueCoding":  {
  30                                               "code": th is.getAnsw er("monthl yAssessmen t", "painI ntensity") .code,
  31                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  32                                               "display":  this.getA nswer("mon thlyAssess ment", "pa inIntensit y").displa y
  33                                          }
  34                                      }]
  35                                 },
  36                                 {
  37                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "painI nterferenc eGeneral") .linkId,
  38                                      "text":  "painInter ferenceGen eral",
  39                                      "answer" : [{
  40                                          "val ueCoding":  {
  41                                               "code": th is.getAnsw er("monthl yAssessmen t", "painI nterferenc eGeneral") .code,
  42                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  43                                               "display":  this.getA nswer("mon thlyAssess ment", "pa inInterfer enceGenera l").displa y
  44                                          }
  45                                      }]
  46                                 },
  47                                 {
  48                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "painI nterferenc eLife").li nkId,
  49                                      "text":  "painInter ferenceLif e",
  50                                      "answer" : [{
  51                                          "val ueCoding":  {
  52                                               "code": th is.getAnsw er("monthl yAssessmen t", "painI nterferenc eLife").co de,
  53                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  54                                               "display":  this.getA nswer("mon thlyAssess ment", "pa inInterfer enceLife") .display
  55                                          }
  56                                      }]
  57                                 },
  58                                 {
  59                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "sleep Quality"). linkId,
  60                                      "text":  "sleepQual ity",
  61                                      "answer" : [{
  62                                          "val ueCoding":  {
  63                                               "code": th is.getAnsw er("monthl yAssessmen t", "sleep Quality"). code,
  64                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  65                                               "display":  this.getA nswer("mon thlyAssess ment", "sl eepQuality ").display
  66                                          }
  67                                      }]
  68                                 },
  69                                 {
  70                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "pleas ureLevel") .linkId,
  71                                      "text":  "pleasureL evel",
  72                                      "answer" : [{
  73                                          "val ueCoding":  {
  74                                               "code": th is.getAnsw er("monthl yAssessmen t", "pleas ureLevel") .code,
  75                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  76                                               "display":  this.getA nswer("mon thlyAssess ment", "pl easureLeve l").displa y
  77                                          }
  78                                      }]
  79                                 },
  80                                 {
  81                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "depre ssion").li nkId,
  82                                      "text":  "depressio n",
  83                                      "answer" : [{
  84                                          "val ueCoding":  {
  85                                               "code": th is.getAnsw er("monthl yAssessmen t", "depre ssion").co de,
  86                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  87                                               "display":  this.getA nswer("mon thlyAssess ment", "de pression") .display
  88                                          }
  89                                      }]
  90                                 },
  91                                 {
  92                                      "linkId" : App_Reso urces.GetP GDModelVal ue("monthl yAssessmen t", "overa llStatus") .linkId,
  93                                      "text":  "overallSt atus",
  94                                      "answer" : [{
  95                                          "val ueCoding":  {
  96                                               "code": th is.getAnsw er("monthl yAssessmen t", "overa llStatus") .code,
  97                                                "system":  "https:// URL /display/P GDMS/Clien t+Provenan ce+Mapping ",
  98                                               "display":  this.getA nswer("mon thlyAssess ment", "ov erallStatu s").displa y
  99                                          }
  100                                      }]
  101                                 }
  102                             ]
  103                         }
  104                    }
  105                };
  106           
  107           if  (this.get UniqueIden tifier())  {
  108                options. toSave.id  = this.get UniqueIden tifier();
  109                options. url = this .get('full Url');
  110                options. type = 'PU T';
  111           }
  112  
  113           th is.saveBas e(options) .done(func tion (pgdR esponse) {
  114                self.cle ar({silent : true}).s et({
  115                    "res ource": pg dResponse,
  116                    "ful lUrl": App _Resources .GetVPCRes ourcePath( "pgd-fhir- questionna ireRespons e") + "/"  + pgdRespo nse.id
  117                });
  118                deferred .resolve() ;
  119           }) .fail(func tion (jqXH R, textSta tus, error Thrown) {
  120                deferred .reject(jq XHR, textS tatus, err orThrown);
  121           }) ;
  122  
  123           re turn defer red.promis e();
  124       },
  125       fetch:  function  (questionn aireIdenti fier) {
  126           va r deferred  = $.Defer red(),
  127                model =  this;
  128  
  129           va r options  = {
  130                "url": A pp_Resourc es.GetVPCR esourcePat h("pgd-fhi r-question naireRespo nse"),
  131                "data":  {
  132                    "_fo rmat": "js on",
  133                    "que stionnaire ": questio nnaireIden tifier,
  134                    "sou rce": PGD_ FHIR_Utils .getPatien tFhirIdent ifier()
  135                }
  136           };
  137  
  138           th is.fetchBa se(options ).done(fun ction (mon thlyRespon se) {
  139                model.cl ear({silen t: true}). set(monthl yResponse. entry[0]);
  140                deferred .resolve() ;
  141           }) .fail(func tion (jqXH R, textSta tus, error Thrown) {
  142                deferred .reject(jq XHR, textS tatus, err orThrown);
  143           }) ;
  144  
  145           re turn defer red.promis e();
  146       },
  147       destro y: functio n () {
  148           va r deferred  = $.Defer red(),
  149                model =  this;
  150  
  151           va r options  = {
  152                "url": t his.get('f ullUrl')
  153           };
  154  
  155           th is.destroy Base(optio ns).done(f unction ()  {
  156                model.cl ear();
  157                deferred .resolve() ;
  158           }) .fail(func tion (jqXH R, textSta tus, error Thrown) {
  159                deferred .reject(jq XHR, textS tatus, err orThrown);
  160           }) ;
  161  
  162           re turn defer red.promis e();
  163       },
  164       painIn terference : function  () {
  165           if  (this.get ('resource ') &&
  166                this.get ('resource ').group & &
  167                this.get ('resource ').group.q uestion &&
  168                this.get ('resource ').group.q uestion.le ngth > 1 & &
  169                this.get ('resource ').group.q uestion[1]  &&
  170                this.get ('resource ').group.q uestion[1] .answer &&
  171                this.get ('resource ').group.q uestion[1] .answer.le ngth &&
  172                this.get ('resource ').group.q uestion[1] .answer[0]  &&
  173                this.get ('resource ').group.q uestion[1] .answer[0] .valueCodi ng) {
  174                return ( parseInt(t his.get('r esource'). group.ques tion[1].an swer[0].va lueCoding. code) + pa rseInt(thi s.get('res ource').gr oup.questi on[2].answ er[0].valu eCoding.co de)) / 2;
  175           }  else {
  176                return n ull;
  177           }
  178       },
  179       depres sionScore:  function( ) {
  180           if  (this.get ('resource ') &&
  181                this.get ('resource ').group & &
  182                this.get ('resource ').group.q uestion &&
  183                this.get ('resource ').group.q uestion.le ngth > 4 & &
  184                this.get ('resource ').group.q uestion[4]  &&
  185                this.get ('resource ').group.q uestion[4] .answer &&
  186                this.get ('resource ').group.q uestion[4] .answer.le ngth &&
  187                this.get ('resource ').group.q uestion[4] .answer[0]  &&
  188                this.get ('resource ').group.q uestion[4] .answer[0] .valueCodi ng) {
  189                return ( parseInt(t his.get('r esource'). group.ques tion[4].an swer[0].va lueCoding. code) + pa rseInt(thi s.get('res ource').gr oup.questi on[5].answ er[0].valu eCoding.co de));
  190           }  else {
  191                return n ull;
  192           }
  193       },
  194       report Date: func tion() {
  195           if  (this.get ('resource ') &&
  196                this.get ('resource ').authore d) {
  197                var subD ate = this .get('reso urce').aut hored.subs tring(0,10 );
  198                var date  = subDate .split('-' );
  199                if (date .length >  1) {
  200                    // o utput is M M/DD/YYYY
  201                    retu rn date[1]  + '/' + d ate[2] + ' /' + date[ 0];
  202                }
  203           }
  204           re turn null;
  205       }
  206   });