778. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/9/2017 12:03:44 PM Eastern 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.

778.1 Files compared

# Location File Last Modified
1 OSCIF_HEC_v1.4_Sprint23_build4_Apr_2017.zip\CRM_solutions\VHACRMWebResources\VHACRMWebResources.zip\WebResources vhacrm_VIAVistaLoginControlScriptLibjs02B67F84-7221-E711-812A-1289A8FDD3DA Sat Apr 22 02:41:48 2017 UTC
2 OSCIF_HEC_v1.4_Sprint23_build4_Apr_2017.zip\CRM_solutions\VHACRMWebResources\VHACRMWebResources.zip\WebResources vhacrm_VIAVistaLoginControlScriptLibjs02B67F84-7221-E711-812A-1289A8FDD3DA Thu May 4 23:11:02 2017 UTC

778.2 Comparison summary

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

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

778.4 Active regular expressions

No regular expressions were active.

778.5 Comparison detail

  1   //VistaLog inControlS criptLib.j s
  2   //Contains  variables  and funct ions used  by the Vis taLoginCon trol.html  page
  3  
  4   //Static V ariables
  5   var vlc_Us erSiteId =  '';
  6   var vlc_Us erSiteNo =  '';
  7   var vlc_Vi aLoginMinu tes;
  8  
  9   function s etAppNameV alue(value ) {
  10       consum ingApp.nam e = value;
  11       via_se tCookie("v iasessiona ppname", v alue, vlc_ ViaLoginMi nutes);
  12   }
  13   function s etAppToken Value(valu e) {
  14       consum ingApp.tok en = value ;
  15       via_se tCookie("v iasessiona pptoken",  value, vlc _ViaLoginM inutes);
  16   }
  17   function s etAppPassV alue(value ) {
  18       consum ingApp.pas sword = va lue;
  19       via_se tCookie("v iasessiona pppass", v alue, vlc_ ViaLoginMi nutes);
  20   }
  21   function s etUrlValue (value) {
  22       consum ingApp.url  = value;
  23       via_se tCookie("v iasessiona ppurl", va lue, vlc_V iaLoginMin utes);
  24   }
  25   function s etNoteTitl eValue(val ue) {
  26       consum ingApp.not etitleid =  value;
  27       via_se tCookie("v iasessionn otetitleid ", value,  vlc_ViaLog inMinutes) ;
  28   }
  29   function s etLoginCoo kies(value ) {
  30       vlc_Vi aLoginMinu tes = valu e;
  31       getKey ValuePair( "via_consu mingapp_na me", setAp pNameValue );
  32       getKey ValuePair( "via_consu mingapp_to ken", setA ppTokenVal ue);
  33       getKey ValuePair( "via_consu mingapp_pa ss", setAp pPassValue );
  34       getKey ValuePair( "via_endpo int", setU rlValue);
  35       getKey ValuePair( "via_ncchv notetitle_ id", setNo teTitleVal ue);
  36   }
  37  
  38   function v lc_formLoa d() {
  39       try {
  40  
  41           // Determine  the status  of the pa rent recor d
  42           if  (parent.X rm.Page.ui .getFormTy pe() > 2)  {  
  43                //The fo rm is disa bled, hide  login sec tion
  44                parent.X rm.Page.ui .tabs.get( "tab_gener al").secti ons.get("t ab_general _section_v istalogin" ).setVisib le(false);
  45                return f alse;
  46           }
  47  
  48           // Get VIA Lo gin URL an d other it ems needed  for login
  49           co nsumingApp  = new App Info();
  50           vl c_ViaLogin Minutes =  230;
  51           co nsumingApp .name = "H RC_CRM";
  52           co nsumingApp .token = " HRC_CRM_ID _5496";
  53           co nsumingApp .password  = "Bf5d2w! rQj";
  54             consumingA pp.url = " https:// URL . DN S        ";
  55           co nsumingApp .notetitle id = 1949;
  56           // getKeyValu ePair("via _login_min utes", set LoginCooki es); 
  57  
  58           va r notetype  = parent. Xrm.Page.g etAttribut e("vhacrm_ notetype_c ode").getV alue(); 
  59           if  (notetype  == null | | notetype  == "71377 0000") {
  60                // CRM N ote Only
  61                return f alse;
  62           }
  63         
  64           if  (via_chec kUserLogIn ()) {
  65                //Hide t he login s ection
  66                parent.X rm.Page.ui .tabs.get( "tab_gener al").secti ons.get("t ab_general _section_v istalogin" ).setVisib le(false);
  67  
  68                //Get Ve teran Id f rom Vista  facility
  69                via_getV eteranId() ;
  70  
  71                //Popula te dropdow ns
  72                via_getL ocations() ;
  73  
  74                return t rue;
  75           }
  76           el se {
  77                //Show t he login s ection
  78                parent.X rm.Page.ui .tabs.get( "tab_gener al").secti ons.get("t ab_general _section_v istalogin" ).setVisib le(true);
  79                //Set fo cus to the  login con trol
  80                parent.X rm.Page.ge tControl(" WebResourc e_VistaLog inControl" ).setFocus ();
  81                return f alse;
  82           }
  83          
  84       }
  85       catch  (err) {
  86           al ert('VistA  Login Con trol Web R esource Fu nction Err or(vlc_for mLoad): '  + err.mess age);
  87       }
  88   }
  89  
  90   function v lc_vistaLo gin() {
  91       try {
  92           // Get Login  Field data
  93           va r vlc_acce ssCode = $ ('#vlc_acc essCode'). val();
  94           va r vlc_veri fyCode = $ ('#vlc_ver ifyCode'). val();
  95           // Verify tha t fields a re not emp ty
  96           if  (vlc_acce ssCode ==  null || vl c_accessCo de == "")  { alert("P lease ente r your Acc ess Code!" ); return  false; }
  97           if  (vlc_veri fyCode ==  null || vl c_verifyCo de == "")  { alert("P lease ente r your Ver ify Code!" ); return  false; }
  98  
  99           // Disable lo gin fields  and butto n
  100           do cument.get ElementByI d('vlc_acc essCode'). disabled =  true;
  101           do cument.get ElementByI d('vlc_ver ifyCode'). disabled =  true;
  102           do cument.get ElementByI d('vlc_log inbuttonid ').disable d = true;
  103  
  104           // Get the Si te ID (Sta tion Suffi x)
  105           va r vlc_User SiteNo = p arent.Xrm. Page.getAt tribute("v hacrm_stat ionsuffix_ text").get Value();
  106           vl c_UserSite Id = vlc_U serSiteNo. toString() ;
  107  
  108           VI AServices. loginVIA(v lc_UserSit eId, vlc_a ccessCode,  vlc_verif yCode, vlc _vistaLogi n_response );
  109  
  110       }
  111       catch  (err) {
  112           al ert('VistA  Login Con trol Web R esource Fu nction Err or(vlc_vis taLogin):  ' + err.me ssage);
  113       }
  114   }
  115  
  116  
  117   function v lc_vistaLo gin_respon se(returnU serTO) {
  118       userTO  = returnU serTO;
  119  
  120       if (us erTO.error  !== "" &&  userTO.er ror !== nu ll) {
  121           // Handle Err ors
  122           al ert(userTO .error + " \n" + user TO.fault);
  123           // Clear logi n fields
  124           do cument.get ElementByI d('vlc_acc essCode'). disabled =  false;
  125           do cument.get ElementByI d('vlc_ver ifyCode'). disabled =  false;
  126           do cument.get ElementByI d('vlc_log inbuttonid ').disable d = false;
  127           re turn false ;
  128  
  129       } else  {
  130           // Success
  131           al ert("Login  Successfu l \n" + us erTO.greet ing);
  132  
  133           // Clear logi n fields a nd hide co ntrol
  134           pa rent.Xrm.P age.ui.cle arFormNoti fication(" VIASERVICE ");
  135           do cument.get ElementByI d('vlc_acc essCode'). disabled =  false;
  136           do cument.get ElementByI d('vlc_ver ifyCode'). disabled =  false;
  137           do cument.get ElementByI d('vlc_log inbuttonid ').disable d = false;
  138           do cument.get ElementByI d('vlc_acc essCode'). value = '' ;
  139           do cument.get ElementByI d('vlc_ver ifyCode'). value = '' ;
  140  
  141           //  Get Vista  Facility  Locations
  142           vi a_getLocat ions(getLo cations_Re sult);
  143  
  144           //  Get Vista  Veteran I d
  145           va r veteranI d = parent .Xrm.Page. getAttribu te("custom erid").get Value();
  146           if  (veteranI d) {
  147                var vist aVeteranId  = parent. Xrm.Page.g etAttribut e("vhacrm_ vistaveter anid_text" ).getValue ();
  148                if (vist aVeteranId  == null)  {
  149                    via_ getVeteran Id(veteran Id, getVet eran_Resul t);
  150                }
  151           }
  152           
  153       }    
  154   }
  155  
  156   function g etVeteran_ Result(ser viceResult ) {
  157       arrayP atientTO =  serviceRe sult;
  158       patien tTO = arra yPatientTO [0];
  159       // Set  Vista Vet eran field s
  160       parent .Xrm.Page. getAttribu te("vhacrm _vistavete ranid_text ").setValu e(patientT O.localpid );
  161       parent .Xrm.Page. getAttribu te("vhacrm _vistavete ranname_te xt").setVa lue(patien tTO.patien tname);
  162   }
  163  
  164   function g etLocation s_Result(s erviceResu lt) {
  165       try {
  166           if  (serviceR esult.leng th > 0) {
  167                var ddLo cations =  parent.Xrm .Page.getc ontrol('We bResource_ VistaWrite NoteContro l').getObj ect().cont entWindow. document.g etElementB yId('ddLoc ation');
  168  
  169                $.each(s erviceResu lt, functi on (index,  item) {
  170                    if ( item.error  !== "" &&  item.erro r !== null ) {
  171                         //Handle E rrors
  172                         alert(item .error + " \n" + item .fault);
  173                    } el se {
  174                         //Success
  175                         //$('#ddLo cation').a ppend($("< option />" ).val(item .id).text( item.name) );
  176                         ddLocation s.add(new  Option(ite m.name, it em.id));
  177                    }
  178                });
  179           }
  180       } catc h (err) {
  181           al ert("getLo cations_Re sult: " +  err.messag e);
  182       }
  183   }
  184  
  185   function s electLocat ion(select Object) {
  186       parent .Xrm.Page. getAttribu te("vhacrm _vistaloca tionid_tex t").setVal ue(selectO bject.valu e);
  187       parent .Xrm.Page. getAttribu te("vhacrm _vistaloca tionname_t ext").setV alue(selec tObject.te xt);
  188   }
  189