525. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2018 8:40:01 AM 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.

525.1 Files compared

# Location File Last Modified
1 MHED_APPS_CIF.zip\SM v2.2.5\scheduling-manager-web-2.2.5@30ba13bb3af.zip\scheduling-manager\test\specs\app\modules\booking\calendar\adhoc-video-visit\create-new-video-visit formView-spec.js Sat Apr 7 11:28:42 2018 UTC
2 MHED_APPS_CIF.zip\SM v2.2.5\scheduling-manager-web-2.2.5@30ba13bb3af.zip\scheduling-manager\test\specs\app\modules\booking\calendar\adhoc-video-visit\create-new-video-visit formView-spec.js Thu May 3 13:05:52 2018 UTC

525.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 544
Changed 1 2
Inserted 0 0
Removed 0 0

525.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

525.4 Active regular expressions

No regular expressions were active.

525.5 Comparison detail

  1   /*jslint n ode: true,  nomen: tr ue, unpara m: true */
  2   /*global d efine, des cribe, it,  expect, b eforeEach,  afterEach , spyOn, j asmine */
  3  
  4   'use stric t';
  5  
  6   // Jasmine  Unit Test ing Suite
  7   define(["L ayout", "V ideoVisitA ppt", "Dem ographicsC ollection" , "Appoint mentReques t", "Creat eNewVideoV isitFormVi ew"],
  8           fu nction (La yout, Appt Model, Dem ographicsC ollection,  Appointme ntRequest,  FormView)  {
  9                    desc ribe("adho c-video-vi sit Form V iew", func tion () {
  10  
  11                             // TOD O this sho uld not be  here.
  12                             var vi ew;
  13                             var ap ptsCollect ion = new  Backbone.C ollection( );
  14                             var vi deoVisitFa cilityMode l = new Ba ckbone.Mod el({
  15                                      timezone : 'EST'
  16                             });
  17                             var pa tientIdent ifierModel  = new Bac kbone.Mode l({
  18                                      uniqueId : '1234',
  19                                      assignin gAuthority : 'abc'
  20                             });
  21                             var de mographics Collection  = new Dem ographicsC ollection( {
  22                               "_id " : "59779 40e0cf2367 37a314123" ,
  23                               "pat ientIdenti fier" : {
  24                                 "u niqueId" :  "aaa",
  25                                 "a ssigningAu thority" :  "EDIPI"
  26                               },
  27                               "las tModifiedD ate" : "07 /25/2017 1 7:35:14",
  28                               "ema ilAddress"  : "",
  29                               "add ress" : {  },
  30                               "pho nes" : [ {
  31                                 "n umber" : " 2345678905 ",
  32                                 "t ype" : "Wo rk",
  33                                 "o bject-type " : "Phone Number",
  34                                 "l ink" : [ ]
  35                               } ],
  36                               "obj ect-type"  : "Demogra phic",
  37                               "lin k" : [ {
  38                                 "t itle" : "d emographic -detail",
  39                                  "href" : " https:// IP            /PatientPr ofileServi ces/rest/v 1/patient/ EDIPI/VARP ATIENT25/d emographic s/id/59779 40e0cf2367 37a314123" ,
  40                                 "o bject-type " : "AtomL ink"
  41                               } ]
  42                             }, {pa rse: true} );
  43                             var mo del = new  ApptModel( {
  44                                      dateTime : new Date (2016, 11,  17, 17, 0 , 0),
  45                                      duration : 20,
  46                                      patients : {
  47                                               patient: [ {
  48                                                       na me: {
  49                                 fi rstName: ' Write',
  50                                 la stName: 'U nit-Tests'
  51                             },
  52                             contac tInformati on: {
  53                                                                pref erredEmail : 'abc@123 .com'
  54                             }
  55                                               }]
  56                                      },
  57                                      timeZone : 'EST',
  58                    pati ent: {
  59                         name: {
  60                             firstN ame: 'Writ e',
  61                             lastNa me: 'Unit- Tests'
  62                         }
  63                    },
  64                                      provider s: {
  65                                               provider:  [{
  66                                                       na me: {
  67                                                                firs tName: 'Da ve',
  68                                                                last Name: 'Ros sberg'
  69                                                       },
  70                                                       co ntactInfor mation: {
  71                                                                pref erredEmail : 'provide r@test.com ',
  72                                                                time Zone: 'EST '
  73                                                       },
  74                                                       lo cation: {
  75                                                                faci lity: {
  76                                                                         name:  'WALTER RE ED VAMC',
  77                                                                         timeZo ne: 'EST'
  78                                                                }
  79                                                       }
  80                                               }]
  81                                      }
  82                             });
  83  
  84                             var $v iew;
  85  
  86                             var la yout = new  Layout();
  87  
  88                             descri be("", fun ction () {
  89                                      beforeAl l(function () {
  90                                               Appointmen tRequest.i nstance(). set({
  91                                                       ph oneNumber:  '12345678 90',
  92                                                       em ail: 'pati ent@test.c om'
  93                                               });
  94  
  95                                               view = new  FormView( {
  96                                                       mo del: model ,
  97                                                       ap ptsCollect ion: appts Collection ,
  98                                                       vi deoVisitFa cilityMode l: videoVi sitFacilit yModel,
  99                                                       pa tientIdent ifierModel : patientI dentifierM odel,
  100                                                       de mographics Collection : demograp hicsCollec tion
  101                                               });
  102                                              
  103                                               layout.con tentRegion .show(view );
  104                                               $view = vi ew.$el;
  105                                      });
  106  
  107                                      afterAll (function( ) {
  108                                               view.close ();
  109                                               Appointmen tRequest.i nstance(). clear();
  110                                      });
  111  
  112                                      it("has  a heading" , function () {
  113                                               expect($vi ew.find('h 3').text() ).toEqual( 'Create Vi deo Visit' );
  114                                      });
  115  
  116                                      it("has  a section  for valida tion", fun ction() {
  117                                               expect($vi ew.find('. validation -required- legend').t ext()).toE qual('* Re quired fie lds');
  118  
  119                                               expect($vi ew.find('. error-sect ion:hidden ').length) .toBe(1);
  120                                               expect($vi ew.find('. error-sect ion .error -list-desc ription'). text()).to Equal('The  following  errors we re found:' );
  121                                               expect($vi ew.find('. error-sect ion ul.err or-list'). length).to Be(1);
  122                                      });
  123  
  124                                      it("has  a form fie lds with d efault val ues", func tion() {
  125                                               // Facilit y
  126                                               expect($vi ew.find('[ for="video -visit-fac ility"]'). text()).to Equal('Fac ility');
  127                                               expect($vi ew.find('# video-visi t-facility ').text()) .toEqual(' WALTER REE D VAMC');
  128  
  129                                               // Date, T ime
  130                                               expect($vi ew.find('[ for="video -visit-dat e"]').text ()).toEqua l('*\u00a0 Date');
  131                                               expect($vi ew.find('# video-visi t-date').v al()).toEq ual('12/17 /2016');
  132  
  133                                               expect($vi ew.find('[ for="video -visit-tim e"]').text ()).toEqua l('*\u00a0 Time (EST) ');
  134                                               expect($vi ew.find('# video-visi t-time').v al()).toBe ('17:00');
  135  
  136                                               expect($vi ew.find('[ for="video -visit-dur ation"]'). text()).to Equal('*\u 00a0Durati on');
  137                                               expect($vi ew.find('# video-visi t-duration ').val()). toEqual('2 0');
  138  
  139                                               // Patient  Contact
  140                                               expect($vi ew.find('[ for="video -visit-pat ient-email "]').text( )).toEqual ('*\u00a0P atient Ema il');
  141                                               expect($vi ew.find('# video-visi t-patient- email').va l()).toEqu al('');
  142  
  143                                               expect($vi ew.find('[ for="video -visit-pat ient-phone -type"]'). text()).to Equal('Pho ne Type');
  144                                               expect($vi ew.find('# video-visi t-patient- phone-type ').val()). toEqual('W ork');
  145  
  146                                               expect($vi ew.find('[ for="video -visit-pat ient-phone "]').text( )).toEqual ('Patient  Phone');
  147                                               expect($vi ew.find('# video-visi t-patient- phone').va l()).toEqu al('(234)  567-8905') ;
  148  
  149                                               // Provide r Contact
  150                                               expect($vi ew.find('[ for="video -visit-pro vider-firs t-name"]') .text()).t oEqual('*\ u00a0Provi der First  Name');
  151                                               expect($vi ew.find('# video-visi t-provider -first-nam e').val()) .toEqual(' ');
  152  
  153                                               expect($vi ew.find('[ for="video -visit-pro vider-last -name"]'). text()).to Equal('*\u 00a0Provid er Last Na me');
  154                                               expect($vi ew.find('# video-visi t-provider -last-name ').val()). toEqual('' );
  155  
  156                                               expect($vi ew.find('[ for="video -visit-pro vider-emai l"]').text ()).toEqua l('*\u00a0 Provider E mail');
  157                                               expect($vi ew.find('# video-visi t-provider -email').v al()).toEq ual('');
  158  
  159                                               expect($vi ew.find('[ for="video -visit-pro vider-phon e"]').text ()).toEqua l('*\u00a0 Provider P hone');
  160                                               expect($vi ew.find('# video-visi t-provider -phone').v al()).toEq ual('');
  161  
  162                                               // Comment s, Instruc tions
  163                                               expect($vi ew.find('l abel[for=" video-visi t-provider -comment"] ').text()) .toEqual(' Comments') ;
  164                                               expect($vi ew.find('# video-visi t-provider -comment') .prop('max length')). toBe(250);
  165                                               expect($vi ew.find('. textarea-c ounter[for ="video-vi sit-provid er-comment "]').text( )).toEqual ('250 char acters rem aining');
  166                                               expect($vi ew.find('# video-visi t-provider -comment') .val()).to Equal('');
  167                                      });
  168                             });
  169  
  170                             descri be("when f or an Expr ess Care r equest", f unction ()  {
  171                                      beforeAl l(function () {
  172                                               Appointmen tRequest.i nstance(). set({
  173                                                       un iqueId: '1 234',
  174                                                       ty peOfCareId : 'CR1',
  175                                                       ph oneNumber:  '12345678 90',
  176                                                       em ail: 'pati ent@test.c om'
  177                                               });
  178  
  179                                               view = new  FormView( {
  180                                                       mo del: model ,
  181                                                       ap ptsCollect ion: appts Collection ,
  182                                                       vi deoVisitFa cilityMode l: videoVi sitFacilit yModel,
  183                                                       pa tientIdent ifierModel : patientI dentifierM odel,
  184                                                       de mographics Collection : demograp hicsCollec tion
  185                                               });
  186                                               layout.con tentRegion .show(view );
  187                                               $view = vi ew.$el;
  188                                      });
  189  
  190                                      afterAll (function( ) {
  191                                               view.close ();
  192                                               Appointmen tRequest.i nstance(). clear();
  193                                      });
  194  
  195                                      it("has  the patien t contact' s default  values fro m the requ est", func tion() {
  196                                               // Patient  Contact
  197                                               expect($vi ew.find('[ for="video -visit-pat ient-email "]').text( )).toEqual ('*\u00a0P atient Ema il');
  198                                               expect($vi ew.find('# video-visi t-patient- email').va l()).toEqu al('patien t@test.com ');
  199  
  200                                               expect($vi ew.find('[ for="video -visit-pat ient-phone "]').text( )).toEqual ('Patient  Phone');
  201                                               expect($vi ew.find('# video-visi t-patient- phone').va l()).toEqu al('(123)  456-7890') ;
  202                                      });
  203                             });
  204  
  205                             descri be("when s ubmiting a n Express  Care reque st", funct ion () {
  206                                      beforeAl l(function () {
  207                                               Appointmen tRequest.i nstance(). set({
  208                                                       ty peOfCareId : 'CR1',
  209                                                       ph oneNumber:  '12345678 90',
  210                                                       em ail: 'pati ent@test.c om'
  211                                               });
  212                                               spyOn(Form View.proto type, 'val idateAndSa ve').and.c allThrough ();
  213                                               spyOn(Form View.proto type, 'res etFormVali dation');
  214                                               spyOn(Form View.proto type, 'sav ePatientCo ntact');
  215                                               spyOn(Form View.proto type, 'sav eNewVideoV isit').and .callFake( function()  {
  216                                                       re turn {
  217                                                                done : function (callback)  { return  callback(" done"); }
  218                                                       };
  219                                               });
  220                                               view = new  FormView( {
  221                                                       mo del: model ,
  222                                                       ap ptsCollect ion: appts Collection ,
  223                                                       vi deoVisitFa cilityMode l: videoVi sitFacilit yModel,
  224                                                       pa tientIdent ifierModel : patientI dentifierM odel,
  225                                                       de mographics Collection : demograp hicsCollec tion
  226                                               });
  227                                               layout.con tentRegion .show(view );
  228                                               $view = vi ew.$el;
  229                                      });
  230  
  231                                      afterAll (function( ) {
  232                                               view.close ();
  233                                               Appointmen tRequest.i nstance(). clear();
  234                                      });
  235  
  236                                      it("shou ld call va lidateAndS ave", func tion() {
  237                                               $view.find ('#create- new-video- visit-btn' ).click();
  238                                               expect(vie w.validate AndSave).t oHaveBeenC alled();
  239                                               expect(vie w.resetFor mValidatio n).toHaveB eenCalled( );
  240                                               expect(vie w.savePati entContact ).toHaveBe enCalled() ;
  241                                               expect(vie w.saveNewV ideoVisit) .toHaveBee nCalled();
  242                                      });
  243                             });
  244  
  245                             // bra nching ini tialize
  246  
  247                             // dat epicker, t imepicker  onShow
  248  
  249                             // ini tializeFor mValidatio n
  250  
  251                             // res etFormVali dation
  252  
  253                             // sho wErrorSect ion
  254  
  255                             // hid eErrorSect ion
  256  
  257                             // can celNewVisi tAppt
  258  
  259                             // val idateAndSa ve
  260  
  261                             // sav eNewVideoV isit
  262  
  263                             // sav ePatientCo ntact
  264  
  265                             // sho wConfirmat ionPpopup
  266  
  267                             // rou ndTimeToNe xt15
  268  
  269                             // upd ate model
  270                    });
  271  
  272           }
  273   );