2. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/27/2019 12:18:29 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.

2.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un CCAdminTriage.ahk Sat Feb 23 00:33:40 2019 UTC
2 C:\AraxisMergeCompare\Pri_re CCAdminTriage.ahk Mon Mar 25 17:54:45 2019 UTC

2.2 Comparison summary

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

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

2.4 Active regular expressions

No regular expressions were active.

2.5 Comparison detail

  1   /*
  2  
  3                                                        C CAdminTria ge.ahk
  4  
  5   This Auto  Hotkey mod ule functi ons to:
  6    
  7   To Display  the Consu lt Toolbox 's "Docume nt Adminis trative Sc reening" d ialog
  8       From t he Communi ty Care Ad d Comments  panel, Ta b 1 MSA El ig. Verifi cation
  9       Click  the "Docum ent Admini strative S creening"  button
  10           
  11       The "C lear" butt on resets  most contr ols
  12           Th e "OK" but ton send d ata to the  CCareComm ents dialo g, tab 1
  13           
  14           Th e CAN scor e data is  collected  by reading  the CPRS  open recor d and 
  15           se nding the  social sec urity numb er to 
  16           th e VA's SQA  CAN score  server da tabase
  17           
  18       Gui, 6 :
  19       Rows b egin at co lumn or po sition 20   
  20  
  21   */
  22  
  23   ShowAdminT riage:
  24   AdmStart : = A_TickCo unt
  25  
  26   if ((Prior TriageReq  = "Complet e") or (Pr iorTriageR eq = "Not  Required")  or (Prior Admin = "Y es"))
  27   {
  28     tstr :=  "Administr ative scre ening is n ot require d or has a lready bee n done on  this consu lt.`n`nDo  you want t o perform  Administra tive Scree ning anywa y?"
  29     MsgBox,  4148, Tria ge is not  required,  %tstr%
  30     ifMsgBox , No
  31     { Return
  32     }     
  33   }
  34  
  35   if (xadmin triage=0)
  36     Sp_CoorO vride := " "
  37   Gui, 1:-Al waysOnTop
  38   Gui, 6:Des troy
  39   Gui, 7:Des troy
  40  
  41   if (ConAdm TriageScor e > 0)  ;  admin scre ening alre ady perfor med, we ne ed to make  sure the  user wants  to redo i t  
  42  
  43       MsgBox , 36, Admi nistrative  Screening  Already D one, Do yo u want to  repeat it? `nAnswer Y ES to do o ver, NO to  keep curr ent result s
  44       ifMsgB ox No
  45       { Gui,  1:+Always OnTop
  46              Gui, 1:Def ault
  47         Gui,  1:Show
  48         Retu rn
  49       } 
  50    }
  51  
  52   Gui, 6:Def ault 
  53   Gui, 6:-Mi nimizeBox
  54   xadmintria ge := 1
  55   ;msgbox, 4 096, Admin  Screen ,  gettingSSN , 2  ;NOW  WE ARE REA DING THE C PRS DATA
  56  
  57   GoSub, Get PatientSSN
  58   CANPkg :=  ""  ; clea r any prev ious CAN s core
  59   ;msgbox, 4 096, Admin  Screen ,  starting,  2
  60   if (strlen (PatientIn foSSN) = 9 )
  61     GoSub, G etCANScore FromServer
  62   Else if (s trlen(Pati entInfoSSN ) <> 9)
  63      {
  64      MsgBox  262160, In valid Soci al Securit y Number E RROR, ERRO R`n`CPRS S ocial Secu rity Numbe r NOT vali d`n`nExiti ng...
  65      Return
  66      }
  67      
  68      
  69   if (NO_CAN _Response  = 1)
  70     {
  71     
  72      MsgBox  262160, CA N server r esponse ER ROR, ERROR `n`nCannot  reach CAN  server`n` nNow enabl ing CAN Sc ore contro ls...
  73      ;Return
  74     }
  75     
  76   ;  THIS SE CTION WAS  USED TO DE TECT A VET ERAN W/O A  CAN SCORE  VALUE
  77   if (NO_SSN _Response  = 1)
  78      {
  79      MsgBox  262160, No  SSN exist s ERROR, E RROR`n`nNo  Social Se curity Num ber found` n`nNow ena bling CAN  Score cont rols...
  80      ;Return
  81      }
  82  
  83  
  84   Gui, 6:fon t, %CTBRed % %Font10% , Verdana  Bold
  85   Gui, 6:Add , Text, +T abStop  x2 0 y15, Adm inistrativ e Screenin g for Care  Coordinat ion and Ca se Managem ent
  86   Gui, 6:fon t, %Font7% , Verdana
  87   ;Gui, 6:Ad d, Button,  x+20 yp-4  gClearAdm inEntries,  Clear
  88  
  89   Gui, 6:fon t, %CTBRed % %Font10% , Verdana  Bold
  90   Gui, 6:Add , Text, +T abStop  x1 8 y+5, Not e, this is  not for a uthorizati on.
  91  
  92   Gui, 6:Fon t, %Font10 % cDefault , Verdana
  93   ;tstr := " Previous C are Coordi nation Lev el: " . Pr iorCareCoo rdLevel 
  94   Gui, 6:Add , Text, +T abStop  x2 0 yp+25 w4 50 vAdminS howCareCoo rd, Previo us Care Co ordination  Level: %P riorCareCo ordLevel%
  95  
  96   tstr := Co orStatus.N otDone 
  97   ;Gui, 6:Ad d, Text, + TabStop  y p x400 yp+ 4 w200 vSc rStatus, % tstr%
  98   Gui, 6:Fon t, %Font10 % cDefault , Verdana  Bold
  99   Gui, 6:Add , Text, +T abStop  x2 0 yp+25, A re you a c linical st aff member :
  100  
  101   Gui, 6:Fon t, %Font10 % cDefault , Verdana
  102   Gui, 6:Add , Radio, x +10 yp vAr eYouClinic alNo gStaf fClinVsAdm in, No
  103   Gui, 6:Add , Radio, x +10 yp vAr eYouClinic alYes gSta ffClinVsAd min, Yes 
  104  
  105   Gui, 6:Fon t, %Font10 % cDefault , Verdana  Bold
  106   Gui, 6:Add , Text, +T abStop  x2 0 yp+25, U rgency: is  appointme nt needed  within 48  hours: 
  107  
  108   Gui, 6:Fon t, %Font10 % cDefault , Verdana
  109   Gui, 6:Add , Radio, v GLUrgencyY es x+10 gC alcAdminSc ore, Yes
  110   Gui, 6:Add , Radio, v GLUrgencyN o x+10 gCa lcAdminSco re, No
  111  
  112   Gui, 6:Fon t, %Font10 % %CTBRed% , Verdana
  113    Gui, 6:Ad d, Text, + TabStop  y +5 x20, If  within 48  hrs, spec ify CAN sc ore and fo rward for  clinical t riage.
  114  
  115   Gui, 6:Fon t, %Font10 % cDefault , Verdana
  116   Gui, 6:Add , Text, +T abStop  yp +45 gCalcA dminScore,  Does the  consult sp ecify any  of the fol lowing com plex condi tions or s ervices? 
  117  
  118   AddCustomC ontrol("xp  y+8","Com plexSvc")
  119  
  120   tstr := "N one of the  above"
  121   /*
  122   Gui, 6:Add , DropDown List, vCom plexSvc xp  w401 y+8  gSelComple x, New Can cer Diagno sis
  123       |Outpa tient Surg ery
  124           |C oronary Ar tery Bypas s (CABG)
  125       |Chron ic Heart F ailure
  126       |Chron ic Obstruc tive Pulmo nary Disea se/ Pneumo nia
  127       |Inpat ient Hospi talization  (any caus e)
  128       |%tstr %
  129   */
  130           
  131           
  132   GuiControl , Choose,  Sp_Complex Svc, None  of the abo ve
  133   ;Gui, 6:fo nt, %Font1 0% %CTBRed %, Verdana
  134   Gui, 6:fon t, %Font10 % cDefault , Verdana
  135   Gui, 6:Add , Text, +T abStop  y+ 8 x20,Does  the consu lt specify  any of th e followin g basic se rvices? 
  136  
  137   AddCustomC ontrol("x2 0 y+8", "B asicSvc")
  138   /*
  139   Gui, 6:Add , DropDown List, x20  y+8 w550 v BasicSvc g SelBasic,  Routine Fo llow-Up Th erapeutics  (Pre-sche duled serv ices Dialy sis, OT, P T, RT)
  140     |Routine  Mammograp hy
  141     |Cervica l Ca Scree ning (PAP  Test)
  142     |Direct  Scheduling
  143     |Routine  Screening  Colonosco py
  144     |%tstr%
  145   */
  146     
  147     
  148   GuiControl , Choose,  Sp_BasicSv c, None of  the above   
  149  
  150   Gui, 6:Add , Text, +T abStop  y+ 10 x20, CA N Score:
  151   Gui, 6:fon t, %Font10 % cDefault , Verdana
  152      
  153   Gui, 6:Add , Radio, x p+90 vGLCA N1  gCalcA dminScore,  0 to 74 
  154   Gui, 6:Add , Radio, x p+100 vGLC AN2 gCalcA dminScore,  No CAN Sc ore Availa ble
  155   Gui, 6:Add , Radio, y p+22 xp-10 0 vGLCAN3  gCalcAdmin Score, 75  to 90
  156   Gui, 6:Add , Radio, x p+100 vGLC AN4 gCalcA dminScore,  Over 90
  157  
  158  
  159   If  ((CANP kg.CanScor e.cEvent_1 y > -1) AN D (CANPkg. CanScore.c Event_1y <  75))
  160      {
  161      GuiCont rol, 6:, G LCAN1, % 1
  162      }
  163   Else If  ( (CANPkg.Ca nScore.cEv ent_1y > 7 5) AND (CA NPkg.CanSc ore.cEvent _1y < 91))
  164      {
  165      GuiCont rol, 6:, G LCAN3, % 1
  166      }
  167   Else If  ( (CANPkg.Ca nScore.cEv ent_1y > 9 0) AND (CA NPkg.CanSc ore.cEvent _1y < 100) )
  168      {
  169      GuiCont rol, 6:, G LCAN4, % 1
  170      }
  171   Else
  172      {
  173      GuiCont rol, 6:, G LCAN2, % 1
  174      }
  175      
  176      
  177   if (CAN_St atus = 200 )
  178   {
  179   GuiControl , 6: Disab le, GLCAN1
  180   GuiControl , 6: Disab le, GLCAN2
  181   GuiControl , 6: Disab le, GLCAN3
  182   GuiControl , 6: Disab le, GLCAN4
  183      } Else
  184      {
  185   GuiControl , 6: Enabl e, GLCAN1
  186   GuiControl , 6: Enabl e, GLCAN2
  187   GuiControl , 6: Enabl e, GLCAN3
  188   GuiControl , 6: Enabl e, GLCAN4
  189      }
  190      
  191  
  192   /*
  193   GetPatient SSN
  194       Values  read from  CPRS
  195   PatientInf oName
  196   PatientInf oSSN
  197   PatientInf oDOB
  198           
  199           
  200   GetCANScor eFromServe r   
  201           Va lues read  from JSON  CAN 
  202   CANPkg.Can Score.pati entICN
  203   CANPkg.Can Score.firs tName
  204   CANPkg.Can Score.last Name
  205   CANPkg.Can Score.ssn
  206   CANPkg.Can Score.birt hDate
  207   CANPkg.Can Score.cEve nt_1y
  208   CANPkg.Can Score.risk Date
  209   CANPkg.Can Score.exec uteDate
  210  
  211   */
  212  
  213   ;Indented  Can Score  Informatio n
  214   Can_Displa y_Text_1 : = "CAN Sco re for: "  . PatientI nfoName .  "  DOB:  "  . Patient InfoDOB .  "  XXX-XX- " . substr (PatientIn foSSN,6,4)
  215   Gui, 6:Add , Text, +T abStop y+1 0 x20, %Ca n_Display_ Text_1%
  216  
  217   if (strlen (trim(CANP kg.CanScor e.cEvent_1 y)) > 0)
  218     Can_Disp lay_Text_2  := "CAN S core: " .  CANPkg.Can Score.cEve nt_1y . "   Risk Asse ssment Dat e: " . CAN Pkg.CanSco re.riskDat e
  219   else
  220     Can_Disp lay_Text_2  := "CAN S core: Not  found    R isk Assess ment Date:  unavailab le"
  221     
  222   Gui, 6:Add , Text, +T abStop  y+ 10 x20, %C an_Display _Text_2%
  223   if (Patien tInfoInpat ient)
  224   {
  225     Gui, 6:F ont, %CTBR ed%, Verda na Bold 
  226     Gui, 6:A dd, Text,  +TabStop y p x+15, IN PATIENT NO W
  227     Gui, 6:F ont, c, Ve rdana
  228   }
  229  
  230   ;Gui, 6:fo nt, s10 w4 00 %CTBRed %  
  231   ;Gui, 6:Ad d, Text, + TabStop  x 20 yp+20,  If CAN sco re is 90 o r higher,  skip remai ning quest ions and v eteran wil l be assig ned to com plex/chron ic care co ordination  level.
  232  
  233   Gui, 6:Fon t, %Font10 %, Verdana
  234   Gui, 6:Add , Text, +T abStop  x2 0 y+8 w600  vCurrentC areCoord,  Current Ca re Coord L evel Asses sment: Inc omplete
  235   Gui, 6:Fon t, %Font10 %, Verdana  Bold
  236   ;Gui, 6:Fo nt, s10 w7 00
  237   Gui, 6:Add , Text, +T abStop  y+ 10 w450 vS cheduling
  238  
  239   Gui, 6:Fon t, %Font10 % cDefault , Verdana
  240   Gui, 6:Add , Text, +T abStop  y+ 10 x20 w50 0 vCalcTri ageNeeded,  Clinical  Triage:
  241   Gui, 6:Add , Text, +T abStop  y+ 20 x20 w50 0 vSentToH eader, Sen d to: 
  242   if (AdminR emember =  0)
  243     AdminNot ified := " "
  244   Gui, 6:Add , edit, xp  yp+23 w23 0 gCalcAdm inScore vA dminNotifi ed, %Admin Notified%
  245   Gui, 6:Fon t, %Font8%
  246   Gui, 6:Add , Text, +T abStop  yp +4 x+12 vA Warning, ( you must r emember to  send CPRS  alert to  indicated  staff)
  247  
  248   Gui, 6:Fon t, %Font10 %
  249   Gui, 6:Add , Checkbox , x20 y+18  vAdminRem ember, Rem ember staf f person f or next re ferral
  250   GuiControl , 6:, Admi nRemember,  %AdminRem ember%
  251   Gui, 6:+Al waysOnTop
  252   if (ParmCl inical=1)
  253     GuiContr ol, , AreY ouClinical Yes, % 1 
  254   else
  255     GuiContr ol, , AreY ouClinical No, % 1
  256   gosub, Sta ffClinVsAd min
  257   Gui, Add,  Text, +Tab Stop  x20  y+15 vStat usShow r1  w500, %A_B lank%
  258   Gui, Add,  Button, gA dmTriage x 290 yp+25,  OK
  259   Guicontrol , , GLUrge ncyNo, % 1
  260   ATitle :=  "Administr ative Scre ening (for  use by co mmunity ca re staff o nly)"
  261   Gui, 6:Sho w, Center,  %ATitle%
  262   GuiControl , 1:, NewC linText, % A_Space%
  263   GuiControl , 1:, NewC linCoord,  %A_Space%
  264   GuiControl , 1:, NewC linSendTo,  %A_Space%
  265   GuiControl , 1:, NewC linTriage,  %A_Space%
  266   GuiControl , 1:, NewO vrHeader,  %A_Space%
  267   GuiControl , 1:, NewO vrReason,  %A_Space%
  268   Return
  269  
  270   AdmTriage:
  271   GuiControl Get, Admin Remember
  272   if ((GLCAN 1 = 0) and  (GLCAN2 =  0) and (G LCAN3 = 0)  and (GLCA N4 = 0))
  273   { Msgbox,  4096, Scre ening Inco mplete, Pl ease compl ete screen ing includ ing CAN Sc ore questi on to comp lete evalu ation.
  274     Return
  275   }
  276   if (CoorLe vel = "Inc omplete")
  277   {
  278      Msgbox,  4100, Scr eening is  not comple te, Please  complete  screening  process.`n `nDo you w ant to abo rt?
  279      ifMsgBo x no
  280        retur
  281      else 
  282        goto,  6GuiClose     
  283   }
  284   AdminNotif ied := Ttr im(AdminNo tified)
  285  
  286   if (StrLen (AdminNoti fied) < 2)
  287  
  288     
  289     if (Parm Clinical =  1)
  290       tstr : = "You hav en't desig nated the  name of th e schedule r "
  291     else
  292       tstr : = "You hav en't desig nated the  name of th e clinical  staff mem ber  "
  293     HideShow AdminActio n := trim( HideShowAd minAction)
  294     if (Hide ShowAdminA ction = "S how")
  295     { msgbox , 4132, Sc heduling A lert, %tst r% who you  will aler t. Do you  want to pr oceed? `n` nAnswer ye s to proce ed, no to  return and  document  staff.
  296       ifMsgB ox No 
  297         retu rn
  298       ; Othe rwise we p roceed   
  299      } 
  300   }       
  301  
  302   if (CoorLe vel != "In complete")
  303  
  304     GuiContr ol, 1:, Cl inPriorTri ageType, N ew Admin A ssessment
  305     GuiContr ol, 1:, Cl inPriorTri ageReq, %C alcTriageN eeded%         
  306   }
  307   GuiControl , 1:, NewA dmTriageRe q, %CalcTr iageNeeded %
  308   PriorTriag eReq := tr im(Substr( CalcTriage Needed, 17 ))
  309   ;msgbox,40 96, triage status, Pr iorTriageR eq = %Prio rTriageReq %
  310   PriorAdmin  := "Yes"
  311   goto, Fini shGui6
  312   6GuiEscape :
  313   6GuiClose:
  314   GuiControl , 1:, NewA dmText, %A _Space% 
  315   GuiControl , 1:, NewA dmCoord, % A_Space%
  316   GuiControl , 1:, NewA dmTriageRe q, %A_Spac e%
  317   GuiControl , 1:, NewA dmSendTo,  %A_Space%
  318   FinishGui6 :
  319   Gui, 6:Des troy
  320   Gui, 1:+Al waysOnTop
  321   Gui, 1:Sho w
  322   ScreeningT imeSpent : = (A_TickC ount - Adm Start)/100 0
  323   Gosub, Get CCTextFiel ds
  324   return
  325  
  326   StaffClinV sAdmin:
  327   Gui, 6:sub mit, nohid e
  328   if (AreYou ClinicalYe s = 1 and  ParmClinic al = 0)  ;  clinical  param has  just been  set, we ne ed to save  it
  329   { ParmClin ical = 1
  330     Gosub, P utsettings
  331   }
  332   if (AreYou ClinicalNo  = 1 and P armClinica l = 1) ; c linical pa ram has ju st been ch anged from  yes to no
  333   { ParmClin ical = 0
  334     Gosub, P utsettings
  335   }
  336   if (ParmCl inical = 1 )
  337     tstr :=  "Schedulin g staff me mber you w ill alert:  "
  338   else
  339     tstr :=  "Clinical  staff memb er you wil l alert: "
  340   Guicontrol , , SentTo Header, %  tstr
  341   GuiControl , Move, Se ntToHeader , w300
  342   SentToHead er := tstr  
  343   Gosub, Cal cAdminScor e
  344   Return
  345  
  346  
  347  
  348   CalcAdminS core:
  349   ;msgbox, B asicSvc: > %BasicSvc% <
  350   ;msgbox, C omplexSvc:  >%Complex Svc%<
  351  
  352   Gui, 6:sub mit, nohid e
  353   CoorLevel  := "Incomp lete"
  354   AssessStat us :=0  ;  0 = incomp lete, 1 =  complete,  2 = comple te, needs  clinical
  355   NewAdmText  := ""
  356   NeedsClinR evFlag :=  0   ;deter mines if s end to rev iew is nee ded.
  357  
  358   if ((GLCAN 2 = 1) or  (GLCAN3 =  1))
  359   {  AssessS tatus := 2
  360      CoorLev el := "Mod erate"
  361   }
  362   if (GLCAN4  = 1)
  363   {  AssessS tatus := 2
  364      CoorLev el := "Com plex"
  365   }
  366   if ((GLCAN 1 = 1) and  (AssessSt atus <> 1) )
  367   {  AssessS tatus := 1
  368      CoorLev el := "Bas ic"
  369   }  
  370   Sp_Complex Svc := tri m(Sp_Compl exSvc)
  371   if (Sp_Com plexSvc <>  "None of  the above" )
  372   {  ;msgbox , we have  complexsvc
  373      AssessS tatus := 2
  374      CoorLev el := "Com plex"
  375   }
  376   Sp_BasicSv c := trim( Sp_BasicSv c)
  377   if (BasicS vc <> "Non e of the a bove")
  378   {  ;msgbox , we match ed basic s vc
  379      AssessS tatus := 1
  380      CoorLev el := "Bas ic"
  381   }
  382   if (GLUrge ncyYes=1)
  383   {  CoorLev el := "Urg ent"
  384      AssessS tatus := 2
  385   }
  386  
  387   If (CoorLe vel = "Bas ic")
  388     CalcTria geNeeded : = "Clinica l Triage:  Not Requir ed"
  389   else if (C oorLevel =  "Incomple te")
  390     CalcTria geNeeded : = "Clinica l Triage:  undetermin ed if need ed"
  391   else
  392     CalcTria geNeeded : = "Clinica l Triage:  Required"
  393   ;if (AreYo uClinicalY es = 1)
  394   ;    GuiCo ntrol, 6:,  CalcTriag eNeeded, % A_Space%
  395   ;else   
  396   GuiControl , 6:, Calc TriageNeed ed, %CalcT riageNeede d%
  397   GuiControl , 1:, NewA dmTriageRe q, %CalcTr iageNeeded %
  398           
  399     
  400   HideshowAd minAction  := "Hide"
  401   GuiControl , , Curren tCareCoord , Current  Coord Leve l Assessme nt: %CoorL evel%
  402   if (Assess Status > 0 )
  403      GuiCont rol, , Sch eduling, P roceed to  Scheduling
  404   if (Assess Status = 0 )
  405     GuiContr ol, , Sche duling, %A _Space% 
  406   else
  407   { if (Parm Clinical =  1) 
  408     { 
  409       if (As sessStatus  = 2)
  410        GuiCo ntrol, , S cheduling,  Clinical  Triage Req uired
  411           el se
  412       { GuiC ontrol, ,  Scheduling , Send for  Schedulin g
  413              HideShowAd minAction  := "Show" 
  414           }   
  415     }
  416     else
  417     { if (As sessStatus  = 1)
  418         GuiC ontrol, ,  Scheduling , Proceed  with sched uling
  419           el se
  420       { GuiC ontrol, ,  Scheduling , Proceed  with sched uling and  notify cli nical staf f
  421         Hide ShowAdminA ction := " Show"  
  422       }
  423     }
  424   }  
  425  
  426   ;GuiContro l, 6:, Sta tusShow, D ebugging I nfo: CoorL evel: %Coo rLevel% Hi deShow: %H ideshowAdm inAction%  AssessStat us: %Asses sStatus% P armClinica l: %ParmCl inical%
  427   ;GuiContro l, 6:Move,  StatusSho w, w500
  428   GuiControl , 6:%Hides howAdminAc tion%, Sen tToHeader
  429   GuiControl , 6:%Hides howAdminAc tion%, Adm inNotified
  430   GuiControl , 6:%Hides howAdminAc tion%, AWa rning
  431   GuiControl , 6:%Hides howAdminAc tion%, Adm inRemember
  432  
  433   GuiControl Get, GLUrg encyNo
  434  
  435   if (GLUrge ncyNo = 1)
  436     NewText  := "  Urge ncy: not w ithin 48 h rs" . CRLF
  437   else if (G LUrgencyYe s = 1)
  438     NewText  := "  Urge ncy: withi n 48 hrs"  . CRLF
  439  
  440     ;NewText  .= CRLF  
  441     
  442   if ((Sp_Ba sicSvc <>  "None of t he above")  AND (StrL en(Sp_Basi cSvc) > 2) )
  443     NewText  .= "  Basi c Service  Selected:  " . Sp_Bas icSvc . CR LF
  444   if ((Sp_Co mplexSvc < > "None of  the above ") AND (St rLen(Sp_Co mplexSvc)  > 2))
  445     NewText  .= "  Comp lex Servic e Selected : " . Sp_C omplexSvc  . CRLF
  446     
  447   ;NewText . = CRLF
  448  
  449   if (GLCAN1  = 1)
  450     NewText  .= "  CAN  Score: les s than 75"
  451   if (GLCAN2  = 1 AND N OT (instr( NewText,"N o CAN scor e availabl e")) )
  452     NewText  .= "  CAN  Score: No  CAN score  available"
  453   if (GLCAN3  = 1)
  454     NewText  .= "  CAN  Score: 75  to 90"
  455   if (GLCAN4  = 1)
  456     NewText  .= "  CAN  Score: Ove r 90"  
  457   tstr := Ne wText
  458   GuiControl , 1:, NewA dmText, %N ewText% 
  459  
  460   tstr := "A dmin Scree ning Care  Coordinati on: " . Co orLevel 
  461   GuiControl , 1:, NewA dmCoord, % tstr%
  462   if (Hidesh owAdminAct ion = "Hid e")
  463  
  464     GuiContr ol, 1:, Ne wAdmSendTo , %A_Space %
  465  
  466   else
  467   { if (strl en(trim(Ad minNotifie d)) < 2)
  468     {
  469       GuiCon trol, 1:,  NewAdmSend To, %A_Spa ce% 
  470     }
  471     else
  472     { if (Pa rmClinical  = 1)
  473         tstr  := "Admin  Staff ale rt, sendin g to: " .  AdminNotif ied . "."
  474       else
  475         tstr  := "Clini cal Staff  alert, sen ding to: "  . AdminNo tified . " ." 
  476       GuiCon trol, 1:,  NewAdmSend To, %tstr%
  477       
  478     }  
  479  
  480   GuiControl , 1:Move,  NewAdmSend To, w401  
  481   GuiControl , 1:, Prio rTriageReq uired, %Ca lcTriageNe eded%
  482   ;msgbox, 4 096, send  to, %Admin Notified%
  483   Return
  484  
  485   SelBasic:
  486   ;GuiContro lGet, tstr , , BasicS vc
  487   GuiControl , ChooseSt ring, Sp_C omplexSvc,  % "None"
  488   ;Gui, 6:sh ow
  489   Gosub, Cal cAdminScor e
  490   Return
  491  
  492   SelComplex :
  493   ;GuiContro lGet, tstr , , BasicS vc
  494   GuiControl , ChooseSt ring, Sp_B asicSvc, %  "None"
  495   ;Gui, 6:sh ow
  496   Gosub, Cal cAdminScor e
  497   Return
  498  
  499   ClearAdmin Entries:
  500   GuiControl , 6:, GLUr gencyYes,  % 0
  501   GuiControl , 6:, GLUr gencyNo, %  1
  502   GuiControl , 6:, GLCA N1, % 0
  503   GuiControl , 6:, GLCA N2, % 0
  504   GuiControl , 6:, GLCA N3, % 0
  505   GuiControl , 6:, GLCA N4, % 0
  506   GuiControl , ChooseSt ring, Sp_C omplexSvc,  None
  507   GuiControl , ChooseSt ring, Sp_B asicSvc, N one
  508   GuiControl , , Curren tCareCoord , Current  Coord Leve l Assessme nt: Incomp lete
  509   GuiControl , , Schedu ling, %A_S pace% 
  510  
  511   gosub, Cal cAdminScor e
  512   GuiControl , 6:, ScrS tatus, %Ad mStatus%    
  513   Return
  514  
  515  
  516  
  517   GetCANScor eFromServe r:
  518  
  519   ; Installi ng a PFX C ertificate  with CERT UTIL.exe
  520   ;RunWait,  %A_WinDir% \System32\ CertUtil.e xe, -impor tpfx -p ja ixy2010 -f  "%Program Files%\Con sultToolbo x\toolbox. pfx"
  521  
  522   ; Initiali ze NO_CAN_ Response   -  A varia ble that s ignifies a  faulty UR L or no co nnection
  523   No_CAN_Res ponse := 0
  524   NO_SSN_Res ponse := 0
  525   Global HTT P_Object : = ComObjCr eate("WinH ttp.WinHtt pRequest.5 .1")
  526   CAN_Reques t_JSON :=  "{  ""ssn" ":""" . Pa tientInfoS SN . """,   ""vauserI d"":""" .  A_UserName  . """}"
  527  
  528   ; A hard-c oded CAN_R equest_JSO
  529   ;CAN_Reque st_JSON :=  "{  ""ssn "":""" . P atientInfo SSN . """,   ""vauser Id"":""mac har""}"
  530  
  531  
  532   ; URL for  a NON-http s web addr ess
  533   ;ReturnVal ue := HTTP _Object.Op en("GET",  "http:// DNS                   DOMAIN . EXT : PORT /v1/cansco re", false  
  534  
  535  
  536   ; This is  the string  sent to t he CAN ser ver
  537   ;msgbox, 2 62208, Sen ding JSON  Request SS N with Cli ent Certif icate to A pache, INF ORMATION`n `nCAN Scor e Server U RL = %Parm CAN_URL%`n JSON Reque st string  = %CAN_Req uest_JSON% `nClient C ertificate  = %ParmCl ient_Cert%
  538   /*
  539   Found a si te with th e valid st ore names  which are:
  540   ca -> Spec ifies cert ificates i n the Inte rmediate C ertificati on Authori ties store
  541   my -> Spec ifies cert ificates i ssued to t he current  user
  542   root -> Sp ecifies ce rtificates  in the Tr usted Root  Certifica tion Autho rities sto re
  543   spc -> Spe cifies sof tware publ isher cert ificates
  544   user_creat ed_store - > Specifie s the name  of a user -created c ertificate  store
  545   */
  546  
  547  
  548   ;HTTP_Obje ct.SetClie ntCertific ate("LOCAL _MACHINE\P ersonal\DE V.toolbox. DOMAIN . EXT ")
  549   ;HTTP_Obje ct.SetClie ntCertific ate("LOCAL _MACHINE\P ersonal\SQ A.toolbox. DOMAIN . EXT ")
  550  
  551   HTTP_Objec t.SetClien tCertifica te(ParmCli ent_Cert)
  552  
  553   ReturnValu e := HTTP_ Object.Ope n("GET", P armCAN_URL , false)
  554   HTTP_Objec t.SetReque stHeader(" Content-Ty pe", "appl ication/js on")
  555  
  556   ;MsgBox 26 2144, Retu rned CAN S erver, Ret urn Value  equals %Re turnValue%
  557   Try
  558   HTTP_Objec t.Send(CAN _Request_J SON) 
  559   Catch e
  560      {
  561      ; CANNO T FIND THE  CAN SERVE R
  562      ; This  NEVER HAPP ENS
  563      ;MsgBox  262160, S END Reques t to CAN S core Serve r ERROR, E RROR`n`nEr ror sendin g the Requ est to the  CAN Score  Server.`n `n%CAN_Req uest_JSON%
  564      NO_CAN_ Response : = 1
  565      Return
  566      }   
  567      
  568  
  569   CAN_Status  := HTTP_O bject.Stat us
  570   ;CAN_Error  := HTTP_O bject.erro r
  571  
  572   if (CAN_St atus > 399 )
  573      {
  574      ; CANNO T FIND THE  CAN SERVE R
  575      ;MsgBox  262160, S END Reques t to CAN S core Serve r ERROR, E RROR`n`nEr ror sendin g the Requ est to the  CAN Score  Server.`n `n%CAN_Req uest_JSON%
  576      NO_CAN_ Response : = 1
  577      Return
  578      } 
  579  
  580   ;MsgBox 26 2144, Retu rned CAN S erver, CAN _Status eq uals %CAN_ Status%
  581  
  582   if (strlen (HTTP_Obje ct.Respons eText) < 1 )
  583      {
  584      NO_SSN_ Response : = 1
  585      Return
  586      }
  587  
  588   ; STore th e Response Text into  a local va riable - C AN_Respons e
  589   CAN_Respon se := HTTP _Object.Re sponseText
  590   CANPkg :=  json.load( CAN_Respon se)
  591  
  592   msgbox 262 208, %temp Str0%, Res ponses fro m CAN serv er`n`n%tem pStr1%`n%t empStr2%`n %tempStr3% `n%tempStr 4%`n%tempS tr5%`n%tem pStr6%`n%t empStr7%`n %tempStr8% `n`n%tempS tr9%`n`n
  593  
  594  
  595   if (CAN_St atus > 399 )
  596      {
  597      NO_CAN_ Response : = 1
  598      Return
  599      }
  600  
  601   /*  THIS S ECTION WAS  USED TO D ETECT NO C AN SCORE F OUND IN RE CORD
  602   No_CAN_Sco re := 0
  603   if (strlen (trim(CANP kg.CanScor e.cEvent_1 y)) < 1)
  604      {
  605      NO_CAN_ Score := 1
  606      ;MsgBox  262160, I nvalid CAN  Score ERR OR, ERROR` n`nNo CAN  score foun d
  607      Return
  608      }   
  609   */
  610  
  611  
  612   ;  Assign  temp strin gs to demo nstrate al l CAN Serv er return  values
  613   tempStr0 : = "CAN Sco re Status  value " .  CAN_Status
  614   tempStr1 : = "Patient  ICN = " .  CANPkg.Ca nScore.pat ientICN
  615   tempStr2 : = "Name =  " . CANPkg .CanScore. firstName  .  A_Space  . CANPkg. CanScore.l astName
  616   tempStr3 : = "SSNum =  " . CANPk g.CanScore .ssn
  617   tempStr4 : = "Birthda y = " . CA NPkg.CanSc ore.birthD ate
  618   tempStr5 : = "CAN Sco re (Value  1) = " . C ANPkg.CanS core.cEven t_1y
  619   tempStr6 : = "Risk Da te =  " .  CANPkg.Can Score.risk Date
  620   tempStr7 : = "Execute  Date =" .  CANPkg.Ca nScore.exe cuteDate
  621   tempStr8 : = "CAN Sco re (Value  2)= " . CA NPkg.CanSc ore.cEvent _1y
  622   tempStr9 : = "CAN res ponse = "  . CAN_Resp onse
  623  
  624   ; Echo all  the CAN S erver retu rn values
  625   msgbox 262 208, %temp Str0%, Res ponses fro m CAN serv er`n`n%tem pStr1%`n%t empStr2%`n %tempStr3% `n%tempStr 4%`n%tempS tr5%`n%tem pStr6%`n%t empStr7%`n %tempStr8% `n`n%tempS tr9%`n`n
  626  
  627  
  628   Return