6. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/27/2017 9:44:47 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.

6.1 Files compared

# Location File Last Modified
1 adk\adk\product\production\demo_files\feature_forms F513.js Wed Jun 7 14:02:28 2017 UTC
2 adk\adk\product\production\demo_files\feature_forms F513.js Tue Sep 26 13:01:44 2017 UTC

6.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 866
Changed 2 6
Inserted 0 0
Removed 0 0

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

6.4 Active regular expressions

No regular expressions were active.

6.5 Comparison detail

  1   define([
  2       'backb one',
  3       'mario nette',
  4       'jquer y',
  5       'handl ebars'
  6   ], functio n(Backbone , Marionet te, $, Han dlebars) {
  7  
  8       //==== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =====
  9       // PLE ASE DO NOT  COPY AND  PASTE THIS  FULL FILE . PLEASE J UST USE AS  A REFEREN CE AND COP Y PARTS TH AT ARE NEE DED
  10       // for  more info rmation on  how to la yout this  form for y our applet  please ch eckout the  following  link:
  11         // https:/ / IP          /documenta tion/#/adk /conventio ns#Writeba ck
  12       //
  13       // Add itional Fo rm Documen tation:
  14         //    - List of  Controls a nd Options : https:// IP          /documenta tion/#/adk /form-cont rols
  15         //    - UI Libra ry Compone nts : http s:// IP          /documenta tion/#/adk /ui-librar y#Componen ts
  16       //==== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =====
  17  
  18       var F5 13 = {
  19           //  DO NOT US E CREATE F ORM FUNCTI ON --- THI S IS FOR D EMO PURPOS ES ONLY!!!
  20           cr eateForm:  function()  {
  21                // ***** ********** ********** ********** ********** ** STATIC  PICKLISTS  ********** ********** ********** ********** *
  22                // NOTE:  PICKLIST  IS ONLY FO R THIS DEM O EXAMPLE
  23                var pick ListArray  = [{
  24                    pick List: [{
  25                         value: 'op t1',
  26                         label: 'Op tion 1'
  27                    }, {
  28                         value: 'op t2',
  29                         label: 'Op tion 2'
  30                    }, {
  31                         value: 'op t3',
  32                         label: 'Op tion 3'
  33                    }, {
  34                         value: 'op t4',
  35                         label: 'Op tion 4'
  36                    }, {
  37                         value: 'op t5',
  38                         label: 'Op tion 5'
  39                    }, {
  40                         value: 'op t6',
  41                         label: 'Op tion 6'
  42                    }, {
  43                         value: 'op t7',
  44                         label: 'Op tion 7'
  45                    }, {
  46                         value: 'op t8',
  47                         label: 'Op tion 8'
  48                    }, {
  49                         value: 'op t9',
  50                         label: 'Op tion 9'
  51                    }]
  52                }];
  53                // ***** ********** ********** ********** ********** ** END OF  STATIC PIC KLISTS *** ********** ********** ********** *
  54  
  55                // ***** ********** ********** ********** ********** ** CONTAIN ERS ****** ********** ********** ********** ********** *
  56                // Okay  to copy an d paste th is !!!!!!! !! BUT ENS URE TO REP LACE STATI C OPTIONS/ DATA WITH  REAL DATA  !!!!!!!
  57                var aler tMessageCo ntainer =  {
  58                    cont rol: "cont ainer",
  59                    extr aClasses:  ["row"],
  60                    item s: [{
  61                         control: " alertBanne r",
  62                         name: "ale rtMessage" ,
  63                         extraClass es: ["col- xs-12"],
  64                         dismissibl e: true,
  65                         type: 'war ning'
  66                    }]
  67                };
  68  
  69                var clin icalAppoin tmentsTab  = {
  70                    titl e: "Clinic  Appointme nts",
  71                    item s: [{
  72                         control: " container" ,
  73                         extraClass es: ["row" ],
  74                         items: [{
  75                             contro l: "select ableTable" ,
  76                             name:  "selectTab leModel",
  77                             label:  "Clinic A ppointment s",
  78                             id: "s electableT ableExampl e",
  79                             collec tion: new  Backbone.C ollection( [{
  80                                 da te: "05/09 /2015 - 12 :00",
  81                                 de tails: "Wa s prescrib ed some pa in meds",
  82                                 lo cation: "P rimary Car e"
  83                             }, {
  84                                 da te: "05/09 /2014 - 2: 00",
  85                                 de tails: "Wa s given a  cast for b roken foot ",
  86                                 lo cation: "G eneral Med icine"
  87                             }, {
  88                                 da te: "05/09 /2013 - 1: 00",
  89                                 de tails: "Hu rt neck in  plane cra sh",
  90                                 lo cation: "T herapy"
  91                             }, {
  92                                 da te: "05/09 /2012 - 2: 30",
  93                                 de tails: "Sw allowed a  fork, need  internal  stitches",
  94                                 lo cation: "E NT Surgery "
  95                             }]),
  96                             column s: [{
  97                                 ti tle: "Date ",
  98                                 id : "date"
  99                             }, {
  100                                 ti tle: "Deta ils",
  101                                 id : "details "
  102                             }, {
  103                                 ti tle: "Loca tion",
  104                                 id : "locatio n"
  105                             }],
  106                             extraC lasses: [" special-cl ass"]
  107                         }]
  108                    }]
  109                };
  110                var hosp italAdmiss ionsTab =  {
  111                    titl e: "Hospit al Admissi ons",
  112                    item s: [{
  113                         control: " container" ,
  114                         extraClass es: ["row" ],
  115                         items: [{
  116                             contro l: "contai ner",
  117                             extraC lasses: [" faux-table -container "],
  118                             items:  [{
  119                                 co ntrol: "se lectableTa ble",
  120                                 na me: "selec tTableMode l",
  121                                 id : "selecta bleTableEx ample",
  122                                 la bel: "Hosp ital Admis sions",
  123                                 co llection:  new Backbo ne.Collect ion([{
  124                                      date: "0 5/09/2015  - 12:00",
  125                                      details:  "Was pres cribed som e pain med s",
  126                                      location : "Primary  Care"
  127                                 },  {
  128                                      date: "0 5/09/2014  - 2:00",
  129                                      details:  "Was give n a cast f or broken  foot",
  130                                      location : "General  Medicine"
  131                                 },  {
  132                                      date: "0 5/09/2013  - 1:00",
  133                                      details:  "Hurt nec k in plane  crash",
  134                                      location : "Therapy "
  135                                 },  {
  136                                      date: "0 5/09/2012  - 2:30",
  137                                      details:  "Swallowe d a fork,  need inter nal stitch es",
  138                                      location : "ENT Sur gery"
  139                                 }] ),
  140                                 co lumns: [{
  141                                      title: " Date",
  142                                      id: "dat e"
  143                                 },  {
  144                                      title: " Details",
  145                                      id: "det ails"
  146                                 },  {
  147                                      title: " Location",
  148                                      id: "loc ation"
  149                                 }] ,
  150                                 ex traClasses : ["specia l-class"]
  151                             }]
  152                         }]
  153                    }]
  154                };
  155                var newV isitTab =  {
  156                    titl e: "New Vi sit",
  157                    item s: [{
  158                         control: " container" ,
  159                         extraClass es: ["row" ],
  160                         items: [{
  161                             contro l: "contai ner",
  162                             extraC lasses: [" col-md-6"] ,
  163                             items:  [{
  164                                 co ntrol: "se lect",
  165                                 la bel: "New  Encounter  Location",
  166                                 sr OnlyLabel:  false,
  167                                 na me: "new-e ncounter-l ocation",
  168                                 pi ckList: pi ckListArra y,
  169                                 sh owFilter:  true,
  170                                 gr oupEnabled : true,
  171                                 op tions: {
  172                                      minimumI nputLength : 0
  173                                 }
  174                             }]
  175                         }, {
  176                             contro l: "contai ner",
  177                             extraC lasses: [" col-md-6"] ,
  178                             items:  [{
  179                                 co ntrol: "co ntainer",
  180                                 ex traClasses : ["col-md -6"],
  181                                 it ems: [{
  182                                      control:  "datepick er",
  183                                      name: "n ewVisitDat e",
  184                                      srOnlyLa bel: false ,
  185                                      label: " From"
  186                                 }]
  187                             }, {
  188                                 co ntrol: "co ntainer",
  189                                 ex traClasses : ["col-md -6"],
  190                                 it ems: [{
  191                                      control:  "timepick er",
  192                                      placehol der: "HH:M M",
  193                                      name: "n ewVisitTim e",
  194                                      srOnlyLa bel: false ,
  195                                      label: " Time of Vi sit"
  196                                 }]
  197                             }, {
  198                                 co ntrol: "co ntainer",
  199                                 ex traClasses : ["row"],
  200                                 it ems: [{
  201                                      control:  "containe r",
  202                                      extraCla sses: ["co l-md-12"],
  203                                      items: [ {
  204                                          cont rol: "chec kbox",
  205                                          name : "checkGr eat",
  206                                          labe l: "Histor ical Visit : a visit  that occur red at som e time in  the past o r at some  other loca tion (poss ibly non-V A) but is  not used f or workloa d credit."
  207                                      }]
  208                                 }]
  209                             }]
  210                         }]
  211                    }]
  212                };
  213  
  214                var sele ctEncounte rProviderC ontainer =  {
  215                    cont rol: "cont ainer",
  216                    extr aClasses:  ["row"],
  217                    item s: [{
  218                         control: " container" ,
  219                         extraClass es: ["col- md-6"],
  220                         items: [{
  221                             contro l: "select ",
  222                             label:  "Select E ncounter P rovider",
  223                             srOnly Label: fal se,
  224                             name:  "selectEnc ounterProv ider",
  225                             pickLi st: pickLi stArray,
  226                             showFi lter: true ,
  227                             groupE nabled: tr ue,
  228                             option s: {
  229                                 mi nimumInput Length: 0
  230                             }
  231                         }]
  232                    }]
  233                };
  234  
  235                var sele ctEncounte rProviderL ocation =  {
  236                    cont rol: "cont ainer",
  237                    extr aClasses:  ["row"],
  238                    item s: [{
  239                         control: " container" ,
  240                         extraClass es: ["col- md-12"],
  241                         items: [{
  242                             contro l: "contai ner",
  243                             tagNam e: "h5",
  244                             extraC lasses: [" encounters -sub-headi ng"],
  245                             templa te: "Selec t Location "
  246                         }, {
  247                             contro l: "tabs",
  248                             tabs:  [clinicalA ppointment sTab, hosp italAdmiss ionsTab, n ewVisitTab ]
  249                         }]
  250                    }]
  251                };
  252                // ***** ********** ********** ********** ********** ** END OF  CONTAINERS  ********* ********** ********** ********** *
  253  
  254                // ***** ********** ********** ********** ********** ** FIELDS  ********** ********** ********** ********** ********** *
  255                // Okay  to copy an d paste
  256                var F513 Fields = [ {
  257                    cont rol: "cont ainer",
  258                    extr aClasses:  ["modal-bo dy"],
  259                    item s: [{
  260                         control: " container" ,
  261                         extraClass es: ["cont ainer-flui d"],
  262                         items: [al ertMessage Container,  selectEnc ounterProv iderLocati on, select EncounterP roviderCon tainer]
  263                    }]
  264                }, {
  265                    cont rol: "cont ainer",
  266                    extr aClasses:  ["modal-fo oter"],
  267                    item s: [{
  268                         control: " checkbox",
  269                         extraClass es: ["inli ne-block-d isplay", " right-marg in-sm"],
  270                         label: "Vi ew encount er form af ter settin g",
  271                         name: "vie wEncounter "
  272                    }, {
  273                         control: " button",
  274                         type: "but ton",
  275                         id: "cance l-btn",
  276                         label: "Ca ncel",
  277                         extraClass es: ["btn- default",  "btn-sm"],
  278                         title: "Pr ess enter  to cancel" ,
  279                         name: "can cel"
  280                    }, {
  281                         control: " button",
  282                         id: "set-b tn",
  283                         label: "Se t",
  284                         extraClass es: ["btn- primary",  "btn-sm"],
  285                         title: "Pr ess enter  to set enc ounters",
  286                         name: "set ",
  287                         type: "sub mit"
  288                    }]
  289                }];
  290                // ***** ********** ********** ********** ********** ** END OF  FIELDS *** ********** ********** ********** ********** *
  291  
  292                // ***** ********** ********** ********** ********** ** MODEL * ********** ********** ********** ********** ********** *
  293                // Okay  to copy an d paste -  Please Add  additiona l items to  prepopula te the fie lds
  294                var Form Model = Ba ckbone.Mod el.extend( {
  295                    defa ults: {
  296                         alertMessa ge: '',
  297                         encounterP rovider: ' Not Specif ied',
  298                         encounterL ocation: ' Not Specif ied',
  299                         viewEncoun ter: false
  300                    }
  301                });
  302                // ***** ********** ********** ********** ********** ** END OF  MODEL **** ********** ********** ********** ********** *
  303  
  304                // ***** ********** ********** ********** ********** ** FOOTER  VIEW ***** ********** ********** ********** ********** *
  305                // Okay  to copy an d paste -  WITH 1 EXC EPTION (se e below)
  306                var Foot erView = B ackbone.Ma rionette.I temView.ex tend({
  307                    temp late: Hand lebars.com pile('{{ui -button "C ancel" cla sses="btn- default bt n-sm" titl e="Press e nter to ca ncel"}}{{u i-button " Continue"  classes="b tn-primary  btn-sm" t itle="Pres s enter to  continue" }}'),
  308                    // O NLY USE TH ESE EVENTS  AS REFERE NCE - need  to have c ustom even ts that st atisfy the  requireme nts of the  feature
  309                    even ts: {
  310                         'click .bt n-primary' : function () {
  311                             ADK.UI .Alert.hid e();
  312                             ADK.UI .Workflow. hide();
  313                         },
  314                         'click .bt n-default' : function () {
  315                             ADK.UI .Alert.hid e();
  316                         }
  317                    },
  318                    tagN ame: 'span '
  319                });
  320                // ***** ********** ********** ********** ********** ** END OF  FOOTER VIE W ******** ********** ********** ********** *
  321  
  322                // ***** ********** ********** ********** ********** ** ALERT M ESSAGE VIE WS ******* ********** ********** ********** *
  323                // ONLY  USE AS REF ERENCE - n eed to hav e custom m essages th at statisf y the requ irements o f the feat ure
  324                var Dele teMessageV iew = Back bone.Mario nette.Item View.exten d({
  325                    temp late: Hand lebars.com pile('You  will lose  all work i n progress  if you de lete this  task. Woul d you like  to procee d?'),
  326                    tagN ame: 'p'
  327                });
  328                var Clos eMessageVi ew = Backb one.Marion ette.ItemV iew.extend ({
  329                    temp late: Hand lebars.com pile('You  will lose  all work i n progress  if you cl ose this t ask. Would  you like  to proceed ?'),
  330                    tagN ame: 'p'
  331                });
  332                // ***** ********** ********** ********** ********** ** END OF  ALERT MESS AGE VIEWS  ********** ********** ********** *
  333  
  334                // ***** ********** ********** ********** ********** ** FORM VI EW ******* ********** ********** ********** ********** *
  335                // ONLY  USE AS REF ERENCE - n eed to hav e custom e vents/mode lEvents .. .. that st atisfy the  requireme nts of the  feature
  336                var form View = ADK .UI.Form.e xtend({
  337                    fiel ds: F513Fi elds,
  338                    ui:  {
  339                         "alertMess age": ".al ertMessage ",
  340                    },
  341                    even ts: {
  342                         "submit":  function(e ) {
  343                             e.prev entDefault ();
  344                             if (th is.model.i sValid())  {
  345                                 th is.model.u nset("form Status");
  346                                 va r saveAler tView = ne w ADK.UI.N otificatio n({
  347                                      title: ' Encounter  Submitted' ,
  348                                      icon: 'f a-check',
  349                                      type: 's uccess',
  350                                      message:  'Encounte r successf ully submi tted with  no errors. '
  351                                 }) ;
  352                                 sa veAlertVie w.show();
  353                                 AD K.UI.Workf low.hide() ;
  354  
  355                                 if  (this.mod el.get('vi ewEncounte r')) {
  356                                      //use th ese fields  to show t he Encount er Form (F 413)
  357                                      //this.m odel.get(' encounterP rovider');
  358                                      //this.m odel.get(' encounterL ocation');
  359                                 }
  360                             }
  361                         },
  362                         "click #ca ncel-btn":  function( e) {
  363                             e.prev entDefault ();
  364                             var de leteAlertV iew = new  ADK.UI.Ale rt({
  365                                 ti tle: 'Are  you sure y ou want to  cancel?',
  366                                 ic on: 'icon- cancel',
  367                                 me ssageView:  DeleteMes sageView,
  368                                 fo oterView:  FooterView
  369                             });
  370                             delete AlertView. show();
  371                         }
  372                    },
  373                    mode lEvents: {
  374                         "change:ne wVisitDate ": functio n(model) {
  375                             var pi ckedTime =  this.mode l.get('new VisitTime' );
  376                             var pi ckedDate =  this.mode l.get('new VisitDate' );
  377                             if(mom ent().isSa me(moment( pickedDate ), 'day'))  {
  378                                 if (!moment() .isAfter(m oment(pick edTime, 'H H:mm'), 'm inute')) {
  379                                      this.mod el.set('al ertMessage ', 'You ha ve selecte d a future  date/time ');
  380                                 }  else {
  381                                      this.mod el.unset(' alertMessa ge');
  382                                 }
  383                             } else  if(!momen t().isAfte r(moment(p ickedDate) , 'day'))  {
  384                                 th is.model.s et('alertM essage', ' You have s elected a  future dat e/time');
  385                             } else  {
  386                                 th is.model.u nset('aler tMessage') ;
  387                             }
  388                         },
  389                         "change:ne wVisitTime ": functio n(model) {
  390                             var pi ckedTime =  this.mode l.get('new VisitTime' );
  391                             var pi ckedDate =  this.mode l.get('new VisitDate' );
  392                             if(!_. isUndefine d(pickedDa te) && mom ent().isSa me(moment( pickedDate ), 'day'))  {
  393                                 if (!moment() .isAfter(m oment(pick edTime, 'H H:mm'), 'm inute')) {
  394                                      this.mod el.set('al ertMessage ', 'You ha ve selecte d a future  date/time ');
  395                                 }  else {
  396                                      this.mod el.unset(' alertMessa ge');
  397                                 }
  398                             }
  399                         }
  400                    }
  401                });
  402                // ***** ********** ********** ********** ********** ** END OF  FORM VIEW  ********** ********** ********** ********** *
  403  
  404                // ***** ********** ********** ********** ********** ** MODEL A ND WORKFLO W INSTANCE  ********* ********** ********** *
  405                // Okay  to copy an d paste
  406                var form Model = ne w FormMode l();
  407                var work flowOption s = {
  408                    size : "large",
  409                    titl e: "Provid er & Locat ion for Cu rrent Acti vities",
  410                    show Progress:  false,
  411                    keyb oard: true ,
  412                    head erOptions:  {
  413                         actionItem s: [{
  414                             label:  'Preview' ,
  415                             onClic k: functio n() {
  416                                 //  Preview f unctionali ty to go h ere
  417                             }
  418                         }, {
  419                             label:  'Print',
  420                             onClic k: functio n() {
  421                                 //  Print fun ctionality  to go her e
  422                             }
  423                         }]
  424                    },
  425                    step s: [{
  426                         view: form View,
  427                         viewModel:  formModel
  428                    }]
  429                };
  430                var work flow = new  ADK.UI.Wo rkflow(wor kflowOptio ns);
  431                workflow .show();
  432                // ***** ********** ********** ********** ********** ** END OF  MODEL AND  WORKFLOW I NSTANCE ** ********** ********** *
  433           }
  434       };
  435       return  F513;
  436   });