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

3.1 Files compared

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

3.2 Comparison summary

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

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

3.4 Active regular expressions

No regular expressions were active.

3.5 Comparison detail

  1   /*
  2  
  3                                                        C CareCommen ts.ahk
  4  
  5   This Auto  Hotkey mod ule functi ons to:
  6    
  7   To Display  the Consu lt Toolbox  "Communit y Care Add  Comments"  dialog
  8        Right -Click on  "Add Comme nt to Cons ult.TXT" f ile OR "Re ceive Cons ult.TXT" f ile
  9        Selec t "Communi ty Care Fu nctions"
  10  
  11   To Access  and update  the Consu lt Toolbox  "Communit y Care Add  Comments"  dialog 
  12   Eight (8)  informatio n Tabs
  13       1. MSA  Elig. Ver ification
  14       2. Con sult Revie w
  15       3. Aut horization
  16       4. DoD
  17       5. MSA  Pt Contac ts
  18       6. App t Tracking
  19       7. SAR /RFS
  20       8. Con sult Compl etion 
  21  
  22   Gui width9 95 - heigh t550
  23  
  24   Rows begin  at column  or positi on 25
  25   */
  26  
  27   NVCC:
  28   { Gui, 1:D estroy
  29     ;isrunni ng := 1
  30     clintria ge := 0
  31     triageti mespent :=  0
  32     screenin gtimespent  := 0
  33     xadmintr iage := 0
  34     xshowpro vider := 0
  35     Selected Prov := ""
  36     CoorLeve l := ""
  37     CCoorLev el := ""
  38     AdmAsses sment := " "
  39     ClinAsse ssment :=  ""
  40     ReadingA uth := 0
  41     CurrentT ab := 1
  42     RecHow : = ""
  43     PriorCar eCoordLeve l := "Not  determined "
  44     PriorTri ageReq :=  "Unknown"
  45     GoSub, S etColorMod e
  46     seocout  := ""
  47     ;dbox=NV CCComments Box
  48     Gui2Prov Active:=0
  49     Gosub, R eadConsult
  50  
  51     if ((A_N ow - LastC heckedSEOC s) > 12000 ) ; check  for seoc u pdates q3h
  52     {
  53       GoSub,  GetRemote SEOCs
  54       LastCh eckedSEOCs  := A_Now
  55     }
  56  
  57     Gui, 1:d efault
  58     Gui, +Al waysOnTop 
  59     
  60     ;-Minimi zeBox
  61     Gui, +Mi nSize995x6 50
  62     ;------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---All Tab
  63    Gui, font , %Font9%  cDefault,  Verdana
  64    Gui, Add,  Tab3, Alt Submit %Pa rmTheme% g NewCCTab v CCTab2 w99 5 h550, MS A Elig. Ve rification
  65       |Consu lt Review
  66       |Autho rization
  67       |DoD
  68       |MSA P t Contacts
  69       |Appt  Tracking
  70       |SAR/R FS
  71       |Consu lt Complet ion
  72   ;    |Care  Coordinat ion 
  73           
  74     ;------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---Tab 1
  75    Gui, Tab,  1   
  76    Gui, Add,  Checkbox,  x25 y45 v NVSpecific ChoiceElig , Specific  Eligibili ty Verifie d:
  77    AddCustom Control("g SelSpecifi cChoice x+ 5 yp-4 ",  "SpecificC hoiceEligi bility")
  78    ;Gui, Add , DropDown List, vNVS pecificCho ice gSelSp ecificChoi ce xp+230  yp-4 w240,  %Specific ChoiceElig ibility%
  79    Gui, Add,  Checkbox,  x25 yp+25  vNVHECAct ionPending , Presumed  eligible,  HEC Updat e Pending
  80    Gui, Add,  Checkbox,  yp+21 vNV UnableToVe rify, Unab le to Veri fy Eligibi lity
  81    Gui, Add,  Edit, yp- 3 x+7 w305  vNVUnable toVerifyTe xt
  82    Gui, Add,  Text, +Ta bStop   x2 5 yp+26, S taff must  contact lo cal enroll ment and e ligibility  office be fore proce eding
  83  
  84    if (ParmD OA = 1) 
  85    {
  86      Gui, Fo nt, %Font9 % %CTBRed% , Verdana  Bold
  87      Gui, Ad d, Text, + TabStop    yp+26, Del egation of  Authority  Medical S ervices Li st Reviewe
  88      Gui, Fo nt, %Font9 % cDefault , Verdana
  89      Gui, Ad d, CheckBo x, yp+22 x p+20 gCkDO ADLC vDOAD LC, Clinic al review  required
  90      Gui, Ad d, CheckBo x, xp+210  gCkDOADLA  vDOADLA, D oes not re quire clin ical revie w
  91    }
  92    
  93    
  94    if (showc ctriage=1)
  95    {
  96      Gui, Ad d, Button,  x25 y225  gShowAdmin Triage, Do cument Adm inistrativ e Screenin g
  97      tstr :=  "Previous  AdminCare  Coordinat ion Level:  " . Prior CareCoordL evel 
  98      Gui, Ad d, Text, + TabStop  x 25 y+15 w4 50 vAdminP riorCareCo ord, Previ ous Admin  Care Coord ination Le vel: not d one
  99      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vAdminPr iorClinCoo rd, Previo us Clinica l Care Coo rdination  Level: not  done
  100      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vAdminMo stRecent,  Most Recen t Assessme nt: none
  101      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vAdminPr iorTriageR eq, Clinic al Triage:  Need Unde termined
  102      Gui, Ad d, Text, + TabStop  x 25 y+15 w5 50 vNewAdm Text r5, % A_Space%
  103      Gui, Ad d, Text, + TabStop  x p y+4 w550  vNewAdmCo ord, %A_Sp ace%
  104      Gui, Ad d, Text, + TabStop  x p y+4 w550  vNewAdmTr iageReq, % A_Space%
  105      Gui, Ad d, Text, + TabStop  x p y+4 w550  vNewAdmSe ndTo, %A_S pace%
  106      
  107      Gui, Fo nt, Verdan a Bold
  108      Gui, Ad d, Text, + TabStop  x p y+14 w45 0 vSchedul ing, %A_Sp ace%
  109    }  
  110  
  111    Gui, Font , %Font7%  %CTBGreen% , Verdana
  112    ;Gui, Add , text,  x 25 w600 y+ 25 vAdminD ebug, %A_S pace%
  113  
  114    
  115   ;--------- ---------T his next s ection pop s the box  up to avoi d delay wh ile the re st of the  tabs paint  
  116   Gui, Font,  %Font9% c Default w4 00, Verdan
  117   Gui, Tab
  118   Gui, Add,  Link, x10  y575, % Li nkText
  119   Gui, Add,  Button, gN VBtnNVCC x 470 yp+25,  OK  
  120  
  121   CCTitle :=  "Communit y Care Com ments - "  . CTBVersi on
  122   Gui, Show,  Center, % CCTitle%
  123    
  124    Gui, Tab,  2    ;--- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -----Tab 2
  125    ;msgbox,  4096, stat e, %parmst ate%
  126     
  127    ApprovalC omment :=  ""   ; res et to no v alue upon  repaint of  dialog
  128    Gui, Font , %Font9%  %CTBRed%,  Verdana Bo ld
  129    Gui, Add,  Text,+Tab Stop x25 y 45, Commun ity Care C linical Re view (for  use by com munity car e staff on ly)
  130    Gui, Font , %Font9%  cDefault w Default, V erdana 
  131    Gui, Add,  CheckBox,  yp+24 vNV CCApproved  gNVAProcA pprove, Re quest Appr oved (Sele ct CC Prog ram):
  132    Gui, font , %Font8%  cDefault w Default, V erdana
  133    AddCustom Control("x +3 yp-4 ",  "Approved CCProgram" )
  134   /*
  135    if (parms tate == "A K (ALASKA) ")
  136    {  tstr : = "|"
  137       tstr . = Sp_Appro vedCCProgr am_Choices  . "|Triba l"
  138       GuiCon trol, , Sp _ApprovedC CProgram,  %tstr% ; i f Alaska,  reset list  to add Tr ibal optio n
  139           ;m sgbox, 409 6, "Alaska  Choices"  , % tstr
  140      ;Gui, A dd, DropDo wnList, x+ 5 yp-4 w24 5 vNVCCPro gram gSelP rogram, %  NVCCProgra mList . "| Tribal"
  141    }  
  142    ;else
  143      ;tstr : = Sp_Appro vedCCProgr am_Choices
  144      ;Gui, A dd, DropDo wnList, x+ 5 yp-4 w24 5 vNVCCPro gram gSelP rogram, %  NVCCProgra mList
  145   */
  146  
  147    Gui, Font , %Font9%  cDefault,  Verdana
  148    ;Comment  added for  maintenanc e release
  149    Gui, Add,  Text, +Ta bStop   x+ 5 yp+3, Co mment:
  150    Gui, Add,  Edit, yp- 3 x+5 w218  vApproval Comment
  151    Gui, Add,  CheckBox,  yp+32 x25  vNVCDenie d gNVAProc Disapprove , Request  Disapprove d (reason) :
  152    
  153    AddCustom Control("y p-4 x+10", "NVDisappR eason")
  154  
  155    Gui, Add,  Checkbox,  vAltPlanO fCare gCk_ AltPlanOfC are x+20 y p+4, Provi der was co ntacted fo r Alternat e Plan of  Care
  156            
  157    AddCustom Control("y p+32 x25", "Guideline ReviewMeth od")
  158    /*
  159    Gui, Add,  Text, +Ta bStop   x+ 5 yp+4, (C omment/Oth er Method) :
  160    Gui, Add,  Edit, x+5  yp-4 vMet hodComment  w358
  161    */
  162    
  163    Gui, Font , %Font9%  %CTBRed% ,  Verdana B old
  164    Gui, Add,  Text,+Tab Stop yp+38  x25, Prov ider may a uthorize d iscontinua tion after  failure o f mandated  schedulin g effort w ithout fur ther clini cal review
  165    Gui, Font , %Font9%  cDefault ,  Verdana
  166    Gui, Add,  Checkbox,  vNVOKtoDC  yp+22, Ma y disconti nue if Vet eran cance ls/no-show s
  167  
  168    AddCustom Control("x +7 yp-4"," OnceTwice" )
  169    GuiContro l, Choose,  Sp_OnceTw ice, twice
  170  
  171    Gui, Add,  Text, +Ta bStop  x+7  yp+4, or  fails to r espond to  mandated s cheduling  effort
  172    
  173    Gui, Font , %Font9%  %CTBRed% ,  Verdana B old 
  174     ; Gui, A dd, Text,  +TabStop   yp+25, Hig her risk c onsults ma y be marke d for Care  Coordinat ion.
  175    Gui, Font , %Font9%  cDefault ,  Verdana
  176    AddCustom Control("x 25 y+22"," Scheduling By")
  177    
  178  
  179     PrevCCSc hedulePerf Button :=  0
  180    ;SetSched uleBy(CCSc hedBy)
  181    if (showc ctriage=1)
  182    { 
  183      Gui, Ad d, Button,  x25 y+25  gShowClini calTriage,  Document  Clinical T riage
  184      Gui, Ad d, Text, + TabStop  x 25 y+15 w4 50 vClinPr iorCareCoo rd, %tstr%
  185      tstr :=  "Most Rec ent Assess ment: "
  186      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vClinPri orTriageTy pe, %tstr%
  187      tstr :=  "Clinical  Triage: "  . PriorTr iageRequir ed
  188      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vClinPri orTriageRe q, %tstr%
  189  
  190      Gui, Ad d, Text, + TabStop  x p y+8 w600  r3 vNewCl inText, %A _Space%
  191      
  192      Gui, Ad d, Text, + TabStop  x p y+10 w45 0 vNewOvrH eader, %A_ Space%
  193      
  194      Gui, Ad d, Text, + TabStop  x p+10 y+4 w 600 vNewOv rReason, % A_Space%
  195      
  196      Gui, Ad d, Text, + TabStop  x 25 y+8 w60 0 r1 vNewC linCoord,  %A_Space%
  197      
  198      Gui, Ad d, Text, + TabStop  x p y+6 w600  r1 vNewCl inTriage,  %A_Space%
  199      
  200      Gui, Ad d, Text, + TabStop  x p y+4 w600  r1 vNewCl inSendTo,  %A_Space%
  201    }  
  202    
  203      Gui, Fo nt, %Font7 % cDefault , Verdana
  204      ;if (st rlen(ClinD ebug) > 0)  
  205      ;Gui, A dd, text,   x25 w600  y+25 vClin Debug, %A_ Space%
  206    
  207    Gui, Tab,  3   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 3 Auth
  208  
  209    Gui, Font , %Font9%  cDefault,  Verdana
  210    Gui, Add,  Text, +Ta bStop x25  y45, Servi ce Line:
  211    Gui, Add,  DropDownL ist, vCOC_ Selection  gChk_COCSe lection x+ 9 yp-3 w43 2, %myServ iceLinecho ices%
  212    
  213  
  214    Gui, Add,  Text, +Ta bStop x25   y+10, SEO C:
  215    Gui, Add,  DropDownL ist, vSEOC _Selection  xp+44 yp- 3 w475, %a vailSeocs%
  216      
  217    Gui, Add,  Button, x +25  yp-3  gDisplay_W rite_SEOC,  Display S EOC 
  218    ;Gui, Add , Button,  x+35 gGetL istsFromUR L, Test AP I calls
  219    
  220    Gui, Add,  CheckBox,  x25 yp+43  vCkNVMana ger, Commu nity Care  Manager:
  221    Gui, Add,  Edit, yp- 4 xp+190 w 430 vNVMgr Name, %NVM grName%
  222    Gui, Add,  Text, +Ta bStop   yp +30 x55, F or questio ns, contac t this num ber: 
  223    Gui, Add,  Edit, yp- 4 xp+230 w 358 vNVPho nePOC, %NV PhonePOC%
  224    
  225     if (strl en(ConInit iateCCRefe ral) > 0)
  226    {
  227      Gui, Fo nt, %Font9 % %CTBRed%  , Verdana  Bold
  228      Gui, Ad d, Text, + TabStop x2 5 yp+44, P reviously  referred t o HSRM
  229    }
  230    else
  231    {
  232      Gui, Fo nt, %Font9 % %CTBRed%  , Verdana  Bold
  233      Gui, Ad d, Text, + TabStop    x25 yp+44,  Upon comp letion of  this secti on: 
  234      Gui, Fo nt, %Font9 % cDefault  , Verdana
  235      Gui, Ad d, Checkbo x, x+5 vAu thReady, S end to HSR M for Refe rral
  236    }
  237    ;Gui, Fon t, %Font9%  cDefault,  Verdana 
  238    
  239    Gui, Font , %Font9%  cDefault,  Verdana
  240    tstr := S howVar("Co nServiceRe q") . ", "
  241    tstr .= S howVar("Co nSpecialty ") . ", "
  242    tstr .= S howVar("Co nProgram")  . ", "
  243    tstr .= S howvar("Co nVisits")  . ", "
  244    tstr .= S howVar("Co nSvcType")
  245    ;msgbox,  4096, ln 1 83 cccomme nts, %tstr %
  246    if (Debug  != "Yes")
  247      tstr :=  A_Space
  248    Gui, Font , %Font7%  %CTBGreen%   
  249    ;Gui, Add , text,  x 25 w800 y+ 5 vAuthDeb ug, %tstr%
  250    Gui, Font , %Font9%  cDefault,  Verdana
  251  
  252    
  253    Gui, Tab,  4   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 4 DoD
  254    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  255    Gui, Add,  Text, +Ta bStop  x25  y45, DoD  Urgency:
  256  
  257    Gui, Font , %Font9%  cDefault,  Verdana
  258    Gui, Add,  Checkbox,  x25 yp+25  vUrgencyL evel, Urge ncy:
  259    AddCustom Control("x +6 yp-3"," UrgencySel ected")
  260    
  261    Gui, Add,  Checkbox,  vDoDReqSe nt y+20 x2 5, DoD fac ility cont acted to r equest car e
  262    Gui, Add,  Edit, vDo DFacName g DodFacEnte red yp-3 x +4 w190
  263    
  264    
  265    
  266    Gui, Tab,  5  ;----- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 5 contac ts by MSA
  267    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  268  
  269    AddCustom Control("x 23 y45","N VAttemptTy pe")
  270    
  271    Gui, Font , %Font9%  cDefault,  Verdana
  272    Gui, Add,  CheckBox,  x25 yp+26  vNVCCall1  gCkCall1,  First Cal l to Veter an
  273    Gui, Add,  CheckBox,  x25 yp+22  vNVCCall2  gCkCall2,  Second Ca ll to Vete ran
  274    Gui, Add,  CheckBox,  x25 yp+22  vNVCCall3  gCkCall3,  Third or  additional  call to V eteran
  275    Gui, Add,  CheckBox,  vNVCLette r gCkNVCLe tter x25 y p+22, Unab le to Cont act Letter  sent to V eteran
  276    Gui, Add,  CheckBox,  xp+20 yp+ 22 vNVCCer tified gCe rtified, L etter Sent  by Certif ied Mail
  277  
  278    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  279    Gui, Add,  Text, +Ta bStop  x25  yp+30, Ad ditional r esults fro m attempt
  280    
  281    Gui, Font , %Font9%  cDefault,  Verdana
  282    Gui, Add,  Checkbox,  vNVCBadPh one yp+23,  All liste d phone nu mbers disc onnected o r wrong nu mber 
  283    Gui, Add,  Checkbox,  vNVBadAdd ress yp+23 , Address  bad or no  address on  file, una ble to con tact by le tter
  284    
  285    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  286    Gui, Add,  Text, +Ta bStop  yp+ 35, Vetera n Contacte
  287    
  288    Gui, Font , %Font9%  cDefault,  Verdana
  289    Gui, Add,  Checkbox,  yp+22 vVe teranInfor med, Veter an informe d of eligi bility, re ferral and  approval
  290    ;GUI, Add , Checkbox , yp+22 vD isposition Selected w 130 gChk_D isposition 2, Veteran  agrees to  Community  Care refe rral
  291    
  292    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  293    Gui, Add,  Text, +Ta bStop  yp+ 35, Vetera n's Partic ipation Pr eference
  294    
  295    Gui, Font , %Font9%  cDefault,  Verdana
  296    Gui, Add,  Checkbox,  vNVCOptIn  gSelectOp tIn yp+22  xp+15, Opt -In for %P armOptIn% 
  297    Gui, Add,  Checkbox,  vNVCOptOu t gSelectO ptOut x+16 , Opt-Out  for %ParmO ptIn%
  298   ; Gui, Add , Checkbox , vVetConf irmsIns x2 5 yp+25, V eteran con firms othe r health i nsurance i nformation
  299   ; Gui, Add , Edit, yp +20 xp+20  vConfirmed OHI w425
  300    Gui, Add,  Checkbox,  x25 yp+30  vMailGood , Mailing  Address Co nfirmed
  301    Gui, Add,  Checkbox,  yp+22 vVe rifyContac tNum, Veri fied best  Contact Nu mber: 
  302    AddCustom Control("y p-4 x+1",  "VetContac tNum")
  303   /* Gui, Ad d, ComboBo x, yp-4 xp +215 vVetC ontactNum  w230 gCkCo ntactNum,  home numbe r on file
  304       |cell  number on  file
  305       |work  number on  file
  306           */
  307    Gui, Add,  Checkbox,  x25 yp+26  vMsgOK, O K to leave  appt. det ails on vo ice mail
  308    Gui, Add,  Checkbox,  yp+22 vFa mMsgOK, OK  to leave  appt. deta ils with:
  309    AddCustom Control("y p-4 x+10", "LvMsgWith ")
  310  
  311    Gui, Add,  Checkbox,  x25 yp+36  vVetCalle dforinfo,  Veteran co ntacted Co mmunity Ca re office
  312    Gui, Add,  Text, +Ta bStop  x40  yp+22, Co ntact Note s:
  313    Gui, Add,  Edit, xp+ 100 w330 r 2 vVetCont actComment  gVetCalle dCCare
  314    
  315    
  316    ; Right C olumn of T AB 5
  317    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  318    Gui, Add,  Text, +Ta bStop  x52 0 y40, Pro vider Pref erence:
  319    Gui, Font , %Font9%  cDefault,  Verdana
  320    Gui, Add,  Checkbox,  x520 y+10  vCkPrefRP Method, Pr ef. referr al package  Method:
  321    AddCustom Control("x +8 yp-3"," PrefRPMeth od")
  322  
  323    Gui, Font , %CTBGree n%, Verdan a Bold
  324    Gui, Add,  GroupBox,  +TabStop  x520 y+10  w420 h205,  Veteran's  Preferred  Provider  Informatio n       ;< <<<<<<<<<< <<<<<<<<<G roupbox he re
  325    
  326    Gui, Font , cDefault , Verdana
  327    Gui, Add,  CheckBox,  xp+24 yp+ 23 gWasChe ckedPrefPr ov vPtNPIP rov, Veter an has a P referred P rovider:
  328    
  329  
  330    Gui, Font , %Font9%  cDefault,  Verdana
  331    SelectedP rov := ""
  332     
  333    if (strle n(ConVetPr efProv) >  1) ; repla ces VET_PR EF_PROV_FO UND
  334       Select edProv :=  ConVetPref Prov 
  335           
  336    Gui, Add,  Edit, r5  xp yp+21 h 120 w370 v PrefProv,  %SelectedP rov%
  337    Gui, Add,  CheckBox,  xp yp+85  vCKUpdateP refProv, U pdate reco rd with ab ove inform ation
  338    Gui, Add,  Text, +Ta bStop  xp  yp+22 , Ve teran OK t o see othe r than Pre f. Provide r
  339    Gui, Add,  CheckBox,  yp xp+290  vOthProvO K gCkOthPr ovOK, Yes
  340    Gui, Add,  CheckBox,  yp xp+45  vOthProvNo tOK gCkOth ProvNotOK,  No
  341    Gui, Add,  Button, y p+19 xp-31 0 gGetPref Prov, Look up a Provi der
  342    Gui, Add,  Button, x p+160 gLau nchFacilit yServiceLo c, Facilit y && Servi ce Locator
  343    Gui, Add,  Checkbox,  x520 yp+4 5 vApptHas TimePref g ChIfTimePr ef, Vetera n's appt t ime prefer ence: 
  344    
  345    AddCustom Control("x p+230 yp-4 ", "ApptTi mePref")
  346    
  347    ;Gui, Add , DropDown List, yp-4  xp+230 vA pptTimePre f gCheckOf fTimePref  w180, %A_B lank%|Any| Morning|Af ternoon
  348     ;GuiCont rol, Text,  ApptTimeP ref, Any
  349     
  350    Gui, Add,  Checkbox,  x520 yp+2 9 vApptHas DatePref,  Veteran's  day/date p reference:
  351    Gui, Add,  Edit, yp- 4 xp+230 v ApptDatePr ef w180 gC heckOffDat ePref
  352    Gui, Add,  Button, y p-1 xp+190  gGetPrefA pptDate, C al
  353    Gui, Add,  Checkbox,  x520 yp+3 0 vShelfSc hed, Veter an prefers  to self s chedule
  354    Gui, Add,  Checkbox,  x520 yp+2 6 vCkPrefN otificatio n, Pref. a ppt. Notif ication Me thod:
  355    
  356    AddCustom Control("x p+230 yp-4 ","PrefNot ification" )
  357  
  358            
  359    Gui, Add,  Checkbox,  x520 yp+2 9 vCkVetWi llTravel,  Willing to  travel up  to (miles ):
  360    Gui, Add,  Edit, yp- 4 xp+230 v VetWillTra vel gCkOff WillTravel  w50
  361    
  362    Gui, Font , %CTBRed% , Verdana
  363    Gui, Add,  Text, +Ta bStop  x52 0 y445 w46 0, %DefFai led1% %Def Failed2%
  364   ; Gui, Add , Text, +T abStop  yp +20, %DefF ailed2%
  365    
  366    Gui, Font , cDefault , Verdana
  367    Gui, Add,  Checkbox,  vNVCRefer  w370 yp+6 0, %DefRP%
  368    
  369  
  370    Gui, Tab,  6             ;----- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 6 Appt T racking
  371    Gui, Add,  CheckBox,  x25 y45 v RequiresDo csFirst, P rovider re quires rec ords to re view prior  to schedu ling
  372    ;Gui, Add , CheckBox , x25 yp+2 0 vCCDocAc cepts, Com munity Car e Provider  has accep ted referr al
  373    Gui, Add,  Checkbox,  vNVCUploa d yp+22 x2 5, Documen ts Uploade d to TPA P ortal
  374    ;Gui, Add , Checkbox , vNVCFaxe drecords y p+20 x25,  Records fa xed/sent t o communit y care pro vider
  375  
  376    Gui, Add,  Checkbox,  vFupCallt oVendor yp +22 x25, F ollow up c all made t o provider /vendor to  check on  status
  377    Gui, Add,  Checkbox,  vTimeSens itive yp+2 2 x25, Tim e sensitiv e appointm ent, NLT:
  378    Gui, Add,  Edit, vNL TDate yp-3  x+5 w100 
  379    Gui, Add,  Button, g GetNLTDate  yp x+5, C al
  380    
  381    Gui, Add,  Checkbox,  x25 yp+25  vNVCCkApp t, Communi ty Care ap pt. has be en
  382    Gui, Add,  Radio, xp +227 yp ch ecked vSch eduledFlag , schedule d
  383    Gui, Add,  Radio, xp +90 yp, re -scheduled
  384    
  385    Gui, Add,  Text, +Ta bStop  yp+ 25 x45, Ap pt. Date:
  386   ;Gui, 1:Ad d, DateTim e, vNVCDtA pptDate xp +90 yp-4 ,  M/d/yyyy  HH:mm
  387    Gui, Add,  Edit, vNV CDtApptDat e xp+80 w1 80 yp-4 
  388    Gui, Add,  Button, g GetApptDat e yp xp+19 0, Cal
  389    Gui, Add,  Text, +Ta bStop  x45  yp+30,Com ment:
  390    Gui, Add,  Edit, vNV ApptProv x p+70 yp-4  w310
  391    
  392    Gui, Font , %Font9%  %CTBRed%,  Verdana Bo ld
  393    Gui, Add,  GroupBox,  x25 y+8 w 410 h180,  Actual/App roved Prov ider Infor mation     ;--------- ----Groupb ox
  394    ;Gui, 1:A dd, Text,  +TabStop   x490 y130,  Veteran's  Indicated  Preferred  Provider
  395    
  396    Gui, Font , %Font9%  cDefault,  Verdana
  397    SelectedP rov := ""
  398    ActualPro vider := S electedPro v
  399    Gui, Add,  Edit, xp+ 15 yp+24 h 170 w380 r 6 vActualP rov, %Actu alProvider %
  400    Gui, Add,  CheckBox,  xp yp+100  vCKUpdate ActualProv , Update r ecord with  above inf ormation
  401    ;Gui, Add , Button,  yp+24 xp+2 8 gGetActu alProv, Lo okup a Pro vider
  402    Gui, Add,  Button, x p+28 yp+24  gLaunchFa cilityServ iceLoc, Av ailable Co mmunity Ca re Facilit y && Provi der Locato r
  403    
  404    Gui, Font , %Font9%  cDefault ,  Verdana
  405    Gui, Add,  Checkbox,  x25 yp+52  vCkVetInf ormed, Vet eran infor med of sch eduled app t by:
  406  
  407    AddCustom Control("x +4 yp-4",  "VetInform edBy")
  408    Gui, Add,  Checkbox,  x25 yp+28  vPacketMa iled, Refe rral Autho rization P acket Mail ed to Vete ran
  409    Gui, Font , %Font8%  %CTBRed% 
  410    Gui, Add,  Text, +Ta bStop  x25  y+16 w440 , %DefFail ed1% %DefF ailed2%
  411    Gui, Font , %Font9%  cDefault,  Verdana
  412  
  413  
  414       Gui, F ont, %Font 9% %CTBRed %, Verdana  Bold
  415       Gui, 1 :Add, Text , +TabStop   y38 x490 , Returned  from Comm unity Care  Provider:
  416           Gu i, Font, % Font9% cDe fault, Ver dana
  417       Gui, 1 :Add, Text , +TabStop   yp+23  + 0x7 xp w50 0 h22 ; th is just cr eates a bo rder
  418       Gui, 1 :Add, Prog ress, yp+1  xp+1 vPro g1 w498 h2 0 cDDEEFF  , 100  ; t his create s a backgr ound
  419       Gui, 1 :Add, Text , +TabStop   yp+3 xp+ 5 +Backgro undtrans c Default VR easonForRe turn w538  h20
  420       Gui, A dd, TreeVi ew, gTreeA ction AltS ubmit xp-6  yp+25 w50 0 h260
  421       P1 :=  TV_Add(XP1 )
  422       P1C1 : = TV_Add(f ixreturn(X P[1]),P1)
  423       P1C2 : = TV_Add(f ixreturn(X P[2]),P1)
  424       P1C3 : = TV_Add(f ixreturn(X P[3]),P1)
  425       P1C4 : = TV_Add(f ixreturn(X P[4]),P1)
  426       P1C5 : = TV_Add(f ixreturn(X P[5]),P1)
  427       P1C6 : = TV_Add(f ixreturn(X P[6]),P1)
  428       P1C7 : = TV_Add(f ixreturn(X P[7]),P1)
  429       P1C8 : = TV_Add(f ixreturn(X P[8]),P1)
  430  
  431       P2 :=  TV_Add(XP2 )
  432       P2C1 : = TV_Add(f ixreturn(X P[9]),P2)
  433       P2C2 : = TV_Add(f ixreturn(X P[10]),P2)
  434       P2C3 : = TV_Add(f ixreturn(X P[11]),P2)
  435       P2C4 : = TV_Add(f ixreturn(X P[12]),P2)
  436       P2C5 : = TV_Add(f ixreturn(X P[13]),P2)
  437  
  438       P3 :=  TV_Add(XP3 )
  439       P3C1 : = TV_Add(f ixreturn(X P[14]), P3 )
  440       P3C2 : = TV_Add(f ixreturn(X P[15]), P3 )
  441       P3C3 : = TV_Add(f ixreturn(X P[16]), P3 )
  442       P3C4 : = TV_Add(f ixreturn(X P[17]), P3 )
  443       P3C5 : = TV_Add(f ixreturn(X P[18]), P3 )
  444   ;   P3C6 : = TV_Add(f ixreturn(X P[19]), P3 )  Removed  Duplicate  entry 12- 06-2018
  445   ;   P3C7 : = TV_Add(f ixreturn(X P[20]), P3 )  Removed  Duplicate  entry 10- 03-2018
  446  
  447       P4 :=  TV_Add(XP4 )
  448       P4c1 : = TV_Add(f ixreturn(X P[21]), P4 )
  449       P4c2 : = TV_Add(f ixreturn(X P[22]), P4 )
  450       P4c3 : = TV_Add(f ixreturn(X P[23]), P4 )
  451       P4c4 : = TV_Add(f ixreturn(X P[24]), P4 )
  452  
  453       P5 :=  TV_Add(XP5 )
  454           P5 c1 := TV_A dd(fixRetu rn(XP[25]) , P5)
  455           P5 c2 := TV_A dd(fixRetu rn(XP[26]) , P5)
  456           P5 c3 := TV_A dd(fixRetu rn(XP[27]) , P5)
  457           P5 c4 := TV_A dd(fixRetu rn(XP[28]) , P5)
  458           P5 c5 := TV_A dd(fixRetu rn(XP[29]) , P5)
  459           P5 c6 := TV_A dd(fixRetu rn(XP[30]) , P5)
  460           P5 c7 := TV_A dd(fixRetu rn(XP[31]) , P5)
  461           P5 c8 := TV_A dd(fixRetu rn(XP[32]) , P5)   
  462           
  463           P6  := TV_Add (fixReturn (XP[33]))
  464  
  465           
  466    AddCustom Control("x 490 y+8 ", "VendorDis position")
  467  
  468    AddCustom Control("x 490 y+5",  "CCOpenApp ointment")
  469  
  470    Gui, Add,  Checkbox,  vNVCPvt x 490 yp+30,  Veteran d eclined/re fused--usi ng alterna te source  of payment
  471    Gui, Add,  Checkbox,  vNVCDecli ne x490 yp +25, Veter an decline d/refused  community  care
  472    Gui, Add,  Checkbox,  vNVSRefDe cline2  x4 90 yp+25 ,  %DefRP%
  473    
  474  
  475    Gui, Tab,  7   ;SAR- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----Tab 7  SAR/RFS
  476    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  477    Gui, Add,  Text, +Ta bStop x30  y45, Secon dary Autho rization R equest (SA R)/Request  For Servi ce (RFS)
  478    Gui, Font , %Font9%  cDefault,  Verdana
  479  
  480    AddCustom Control("x 30 yp+24", "SARUrgenc y")
  481    Gui, Add,  Text, +Ta bStop x30  yp+34, SAR /RFS was e ntered int o VistA Im aging
  482    AddCustom Control("x +8 yp-3"," RequestToV istAImagin g")
  483  
  484    Gui, font , %Font9%  cDefault,  Verdana
  485    Gui, Add,  Text, +Ta bStop  y+1 2 x30, SAR /RFS Detai ls of what  was Reque sted:
  486    Gui, Add,  Edit, vNV SARRequest ed yp+20 x p+10 r2 w6 00 
  487    
  488    Gui, font , %Font9%  cDefault,  Verdana Bo ld
  489    Gui, Add,  Text, +Ta bStop  y+6  xp-10, Ac tions Take n
  490    
  491    Gui, font , %Font9%  cDefault,  Verdana
  492    Gui, Add,  Radio, y+ 4 vNVSARAp pr1 gNVSAR ApproveBtn , Request  is Clinica lly Approp riate          ; SAR  button App rove
  493    Gui, Add,  Radio, yp +89 vNVSAR Appr2 gNVS ARDisAppro veBtn +Tab Stop, Requ est is not  Clinicall y Appropri ate   ; SA R Button D isapprove
  494     ; Smart  Buttons in itialize
  495    PrevNVSAR ApprB := 0
  496    Gui, Add,  CheckBox,  vNVSARAdd Visits gNV SARApprove  yp-89 xp+ 260, Addit ional Time :
  497    Gui, Add,  Edit, vNV SARExtDate Apr xp+120  yp-5 w150
  498    Gui, Add,  Checkbox,  xp+160 yp +5 vNVSARA ddServices  gNVSARApp rove, Addi tional Ser vices
  499    Gui, Add,  Checkbox,  xp+140 vN VSARAsRequ ested gNVS ARApprove,  Approved  as req. ab ove
  500    
  501    Gui, Add,  CHeckbox,  x290 yp+2 1 vNVSARAt VA gNVSARA pprove, Se rvice Avai lable at V A
  502    Gui, Add,  Text, +Ta bStop  x60  yp+23, De tails:
  503    Gui, Add,  Edit, xp+ 60 yp-2 vN VSARAppDet ails gNVSA RApprove r 2 w600
  504    
  505    Gui, Add,  Checkbox,  yp+47 x29 0 gNVSARDi sApprove v NVSARCkNot Covered, N ot a cover ed benefit
  506    Gui, Add,  Checkbox,  xp+180 vN VSARMissin gDocs gNVS ARDisAppro ve, Missin g Document ation
  507    Gui, Add,  Checkbox,  xp+180 vN VSARReasse ss gNVSARD isApprove,  Reassessm ent by VA  Provider R equired
  508    Gui, Add,  Checkbox,  yp+21 x29 0 vNVSAROt herDeny gN VSARDisApp rove, Othe r reason
  509    Gui, Add,  Checkbox,  xp+180 vN VSAR_IsNOT Clinically App gNVSAR DisApprove , Not Clin ically App ropriate
  510  
  511    Gui, Add,  Text, +Ta bStop yp+2 3 x60 w50  r2 , Denia l Details:
  512    Gui, Add,  Edit, yp- 2 xp+60 vN VSARDenyRe ason gNVSA RDisApprov e r2 w600
  513    ;Gui, Add , CheckBox , x30 yp+4 6 vInclude SarLanguag e, Include  Standard  SAR Author ization La nguage
  514    ;Gui, Add , Edit, xp  yp+22 w80 0 r3 vSarV erbiage
  515    
  516    Gui, Tab  ,8   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------T ab 8 Compl etion Effo rts
  517    Gui, font , %Font9%  cDefault,  Verdana Bo ld
  518    Gui, Add,  Text, +Ta bStop  x25  y40, Comp letion Eff orts
  519    
  520    Gui, font , %Font9%  cDefault,  Verdana
  521    Gui, Add,  Radio, vN VCRecReq1  gNVCRecReq Button1, ( 1st) First  attempt t o get reco rds
  522    Gui, Add,  Radio, +T abStop vNV CRecReq2 g NVCRecReqB utton2,  ( 2nd) Secon d attempt  to get rec ords
  523    Gui, Add,  Radio, +T abStop vNV CRecReq3 g NVCRecReqB utton3,  ( 3rd) Third  attempt t o get reco rds
  524    Gui, Add,  Radio, +T abStop vNV CRecReq4 g NVCRecReqB utton4, Re cords Rece ived 
  525    AddCustom Control("y p-3 x+7"," RecordsHow 2")
  526    Gui, Add,  Radio, +T abStop vNV CRecReq5 g NVCRecReqB utton5 x25  yp+25, No  records a fter 3 att empts
  527  
  528    AddCustom Control("x 25 yp+34", "NVCApptRe sults")   
  529  
  530    ;Gui, Add , DropDown List, vRec How2 gInpR ecordsHow2  yp-24 xp+ 310 w320,  %CCRecords How% 
  531    Gui, Add, Checkbox,  yp+35 x25  vRefAdminC omplete, R efer to Cl inical Car e Coordina tor 
  532    PrevNVCRe cReqButton  := 0 
  533    
  534    
  535    
  536    Gui, Tab,  9   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------T ab 9 Care  Coordinati on
  537    Gui, Add,  Text, +Ta bStop  y45  x25, Time  spent on  care coord ination:
  538    
  539    AddCustom Control("x p+210 yp-4 ","TimeSpe nt")
  540    
  541    ;Gui, Add , DropDown List, xp+2 10 yp-4 w1 40 vTimeSp ent, Not A pplicable| 1-15 minut es|15-30 m inutes|30- 60 minutes
  542    
  543    GuiContro l, Choose,  Sp_TimeSp ent, % "No t Applicab le"
  544    Gui, Add,  Text, +Ta bStop  x25  yp+29, Ca re Coordin ation Nota tion:
  545    Gui, Add,  Edit, vCa reCoordNot e x25 yp+2 5 w900 r12
  546    Gui, Add, Text, +Tab Stop x25 y p+240, Per formed war m hand-off  of this c onsult to:
  547    Gui, Add, Edit, xp+2 80 yp-4 w2 50 vWarmHa ndoff
  548    Gui, Add, Text, +Tab Stop x25 y p+40, Sent  alert to:
  549    Gui, Add, Edit, xp+9 0 yp-4 w25 0 vColdHan doff
  550    
  551    ;Gui, Add , Button,  x20 yp+48  gReadDataF romWebPage , Read Web  Page Data
  552      
  553    Gui, Tab
  554  
  555    ;Gui, Sho w, Center,  %CCTitle%
  556  
  557    ; After R eadConsult , these 3  have value s, or null  if not fo und
  558    ; ConProv PkgPref 
  559    ; ConVetA pptTimePre
  560    ; ConVetN otifMethod Pref 
  561  
  562  
  563   if (strlen (ConProvPk gPref) > 2 )
  564  
  565      GuiCont rol, Choos eString, s p_PrefRPMe thod, %Con ProvPkgPre f%
  566      GuiCont rol, , CkP refRPMetho d, % 0
  567   }
  568  
  569   if (StrLen (ConVetApp tTimePref)  > 2)
  570   {
  571      GuiCont rol, Choos eString, S p_ApptTime Pref, %Con VetApptTim ePref%
  572      GuiCont rol, , App tHasTimePr ef, % 0
  573   }
  574  
  575   if (StrLen (ConVetNot ifMethodPr ef) > 2)
  576   {
  577      GuiCont rol, Choos eString, S p_PrefNoti fication,  %ConVetNot ifMethodPr ef%
  578      GuiCont rol, , CkP refNotific ation, % 0
  579   }
  580     
  581     ;MsgBox  262144,deb ug, %ConPr eviousAppr oval%
  582     
  583   if (StrLen (ConPrevio usApproval ) > 2)
  584   {
  585      GuiCont rol, Choos eString, S p_Approved CCProgram,  %ConPrevi ousApprova l%
  586      ;GuiCon trol, , NV CCApproved , % 0
  587  
  588    /*
  589   if (strlen (ConInitia teCCRefera l) > 0) ;  replaces A uthReady
  590       {
  591           ;M sgBox 2621 44, ConIni tiateCCRef eral, %Con InitiateCC Referal%
  592           Gu iControl,   , AuthRea dy, % 1
  593       }
  594    */
  595    
  596    ;  These  controls a re initial ly HIDDEN  & Triggere d into vis ibility by  other con trol event s
  597    GuiContro l, Hide, A ltPlanOfCa re
  598    GuiContro l, Hide, D isposition CB
  599    GuiContro l, Hide, D isposition Selected
  600    GuiContro l, Hide, N VCDenied2
  601    GuiContro l, Hide, S p_NVDisapp Reason2
  602    
  603    
  604    
  605    ;Gui, Add , Link, x2 5 y575 , %  LinkText
  606    ;Gui, Add , Button,  gNVBtnNVCC  x470 yp+2 5, OK  
  607  
  608   ; Gui, Fon t, %Font8%  
  609   ; Gui, Add , Button,  gAboutBox  x920 yp-10  w60, Sett ings
  610   ;Gui, 1:Ad d, Text, + TabStop  v MyDebugMes sage x550  yp, My mes sage for d ebugging h ere
  611    CCTitle : = "Communi ty Care Co mments - "  . CTBVers ion
  612    ;Gui, Sho w, Center,  %CCTitle%
  613    isrunning  := 0 
  614    
  615    ;gosub, C learAuth
  616    ;Gosub, R eadAuth
  617    gosub, Se tSarVerbia ge
  618    LastTriag e := FindC areCoord(C onsultText )
  619    ;msgbox,  LastTriage  %LastTria ge%
  620    ReadingAu th := 0
  621    GuiContro l, , AuthV isits, % 0
  622    GuiContro l, , NVSpe cialtyType , 1 
  623    GuiContro l, , NVSpe cialtyType , 0  
  624  
  625    ; Gui, Sh ow
  626    if ((Parm TabColor=1 ) and (Cur rentTab=1) )
  627      PostMes sage, 0x13 33, 0 , 1,  SysTabCon trol321, % CCTitle%
  628  
  629      
  630    GuiContro l, ChooseS tring, COC _Selection , All Serv ice Lines
  631    GoSub, Ch k_COCSelec tion
  632    
  633   if ((A_Now  - LastPin g) > 20000 ) ; check  internet s tatus
  634   {  Interne tConn := p ing("8.8.8 .8")
  635      LastPin g := A_Now  
  636  
  637  
  638   Gosub, Che ckUse   ;  Checkuse i s in the A bout modul e, that up dates the  last time  app was us ed.
  639   Return
  640  
  641   InpRecords How:
  642   GuiControl Get, Sp_Re cordsHow
  643   RecHow :=  Ttrim(Sp_R ecordsHow)
  644   if (strlen (RecHow) >  0) 
  645     GuiContr ol,,RRec1,  % 1
  646   else
  647     GuiContr ol, ,RRec1 , % 0
  648   Return
  649  
  650   InpRecords How2:
  651   GuiControl Get, Sp_Re cordsHow2
  652   RecHow :=  Ttrim(Sp_R ecordsHow2 )
  653   if (strlen (RecHow) >  0) 
  654     GuiContr ol,, NVCRe cReq4, % 1
  655   else
  656     GuiContr ol,, NVCRe cReq4, % 0
  657   Return
  658  
  659   NewCCTab:
  660   gui, 1:Def ault
  661   PostMessag e, 0x1333,  CurrentTa b-1, 0, Sy sTabContro l321, %CCT itle% 
  662   ControlGet , CurrentT ab, Tab, ,  SysTabCon trol321, % CCTitle%
  663   PostMessag e, 0x1333,  CurrentTa b-1 , 1, S ysTabContr ol321, %CC Title%
  664   if (ParmAu dibleTabs  = 1)
  665   { if (Curr entTab=1)
  666       CTBTal k.Speak("E ligibility ",0x1)
  667     if (Curr entTab=2)
  668       CTBTal k.Speak("A pproval",0 x1)
  669     if (Curr entTab=3)
  670       CTBTal k.Speak("A uthorizati on",0x1)
  671     if (Curr entTab=4)
  672       CTBTal k.Speak("D ee Oh Dee" ,0x1)
  673     if (Curr entTab=5)
  674       CTBTal k.Speak("P atient Con tacts",0x1 )
  675     if (Curr entTab=6)
  676       CTBTal k.Speak("A appointmen t Tracking ",0x1)
  677     if (Curr entTab=7)
  678       CTBTal k.Speak("S econdary,  Authorizat ion Reques ts - Reque st For Ser vice",0x1)
  679     if (Curr entTab=8)
  680       CTBTal k.Speak("C onn sult C ompletion" ,0x1)
  681   }
  682   Return
  683  
  684  
  685   NVSARAppro veBtn:
  686   if (PrevNV SARApprB =  1)
  687   { PrevNVSA RApprB :=  0
  688     GuiContr ol, ,NVSAR Appr1, % 0
  689     GoSub, C learSarApp roved
  690   }
  691   else
  692   {  PrevNVS ARApprB :=  1
  693      GuiCont rol, ,NVSA RAppr1, %  1
  694      Gosub,  ClearSarDi sApproved
  695   }
  696   GuiControl , , DebugS AR, % Prev NVSARApprB
  697   Return
  698  
  699   NVSarAppro ve:
  700     GuiContr ol, ,NVSAR Appr1, % 1   
  701     PrevNVSA RApprB :=  1
  702     Gosub, C learSarDis Approved
  703   Return  
  704  
  705   NVSarDisAp prove:
  706     GuiContr ol, ,NVSAR Appr2, % 1   
  707     PrevNVSA RApprB :=  2
  708     Gosub, C learSarApp roved
  709   Return
  710  
  711   NVSARDisAp proveBtn:
  712   if (PrevNV SARApprB =  2)
  713   {  PrevNVS ARApprB :=  0
  714      GuiCont rol, ,NVSA RAppr2, %  0
  715      Gosub,  ClearSarDi sApproved
  716   }
  717   else
  718   { PrevNVSA RApprB :=  2
  719     GuiContr ol, ,NVSAR Appr2, % 1
  720     GoSub, C learSarApp roved
  721   }
  722   GuiControl , , DebugS AR, % Prev NVSARApprB
  723   Return
  724  
  725   ClearSarAp proved:  ; This sub c lears all  entries in  SAR appro ved
  726   GuiControl , , NVSARA ddVisits,  % 0      ; Checkbox S AR Add vis its
  727   GuiControl , , NVSARE xtDateApr,  % ""    ; Edit, time  extension  details
  728   GuiControl , , NVSARA ddServices , % 0    ; Checkbox S AR Add Ser vices
  729   GuiControl , , NVSARA sRequested , % 0    ; Checkbox S AR approve  as req
  730   GuiControl , , NVSARA tVA, % 0
  731   GuiControl , , NVSAR_ IsClinical lyApp, % 0  ;Checkbox  SAR is CL inically A ppropriate
  732   GuiControl , , NVSARA ppDetails,  % ""    ; Edit SAR a pproval de tails (tex t)
  733   Return
  734  
  735   ClearSarDi sApproved:   ;This su b clears a ll entries  in SAR di sapproved
  736     GuiContr ol, , NVSA RCkNotCove red, % 0
  737     GuiContr ol, , NVSA R_IsClinic allyApp, %  0 ;Checkb ox SAR is  CLinically  Appropria te
  738     GuiContr ol, , NVSA RReassess,  % 0
  739     GuiContr ol, , NVSA ROtherDeny , % 0
  740     GuiContr ol, , NVSA RMissingDo cs, % 0
  741     GuiContr ol, , NVSA RDenyReaso n, % ""
  742   Return
  743  
  744  
  745   NVCRecReqB utton1:
  746   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",1)
  747   Return
  748  
  749   NVCRecReqB utton2:
  750   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",2)
  751   Return
  752     
  753   NVCRecReqB utton3:
  754   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",3)
  755   Return
  756  
  757   NVCRecReqB utton4:
  758   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",4)
  759   Return
  760  
  761   NVCRecReqB utton5:
  762   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",5)
  763   Return
  764  
  765  
  766   CkOffWillT ravel:
  767   GuiControl Get, VetWi llTravel
  768   if (Strlen (Trim(VetW illTravel) ) > 0)
  769     GuiContr ol, , CkVe tWillTrave l, % 1
  770   else
  771     GuiContr ol, , CkVe tWillTrave l, % 0
  772   Return  
  773  
  774  
  775   Chk_COCSel ection:
  776   GUIcontrol get, COC_S election
  777   availseocs  := ""
  778   SEOCsToSor t := objec t()
  779   found := 0
  780  
  781   ; Build th e availSeo cs control  list usin g COC_Sele ction
  782   Loop, %SEO Cs_Count%
  783   {
  784   Temporary_ SEOCName : = SeocSet2 [A_Index]. seoc.name
  785   Temporary_ CategoryOf Care := Se ocSet2[A_I ndex].seoc .ServiceLi ne
  786  
  787   if (COC_Se lection =  Temporary_ CategoryOf Care)
  788     {
  789       found+ +
  790       SEOCsT oSort[foun d] := Temp orary_SEOC Name
  791       ;avail Seocs .= " |" . Tempo rary_SEOCN ame
  792     }  ; END  if
  793   } ;  END L oop, %SEOC s_Count%
  794  
  795   ; Build av ailSeocs f or All Ava ilable SEO Cs
  796   if (COC_Se lection =  "All Servi ce Lines")
  797   Loop, %SEO Cs_Count%
  798   {
  799     Temporar y_SEOCName  := SeocSe t2[A_Index ].seoc.nam e
  800     found++
  801     SEOCsToS ort[found]  := Tempor ary_SEOCNa me
  802     ;Tempora ry_Categor yOfCare :=  SeocSet2[ A_Index].s eoc.catego ryOfCare
  803     ;availSe ocs .= "|"  . Tempora ry_SEOCNam e
  804   }
  805  
  806   ; Store th e variable  found in  NumberOfSE OCsToDispl ay
  807   NumberOfSE OCsToDispl ay := foun d
  808    
  809   ;  BUBBLE  SORT  SEOC sToSort[]
  810     Loop {
  811        hasCh anged := 0
  812        found  := found- 1
  813        Loop,  %found%
  814        { ;Ms gBox 26214 4,, Inside  Loop 2
  815          If  (SEOCsToSo rt[A_Index ] > SEOCsT oSort[A_In dex+1])
  816          {
  817                 TempVar  := SEOCsT oSort[A_In dex]
  818                 SEOCsTo Sort[A_Ind ex] := SEO CsToSort[A _Index+1]
  819                 SEOCsTo Sort[A_Ind ex+1] := T empVar
  820                 hasChan ged := 1
  821           }   ; END If  (SEOCsToSo rt[A_Index ] > SEOCsT oSort[A_In dex+1])
  822         }  ;  END Loop,  %found%
  823       } Unti l (hasChan ged = 0)
  824   Loop, %Num berOfSEOCs ToDisplay%
  825    { 
  826      availSe ocs .= "|"  . SEOCsTo Sort[A_Ind ex]
  827    }
  828   availSeocs  := tTrim( AvailSeocs )
  829   ;msgbox 26 2144,, the  list avai lseocs equ als %avail seocs%
  830   GuiControl , , SEOC_S election,  %availSeoc s% 
  831   Return
  832  
  833  
  834   GetRemoteS EOCs:
  835   Troublesho ot := 0
  836   flag := 0
  837   ;SEOC_Url  := "http:/ /localhost :8080/seoc s" ; About Box.ahk, L ine # 215
  838  
  839     httpresu lt := 0 
  840       ;ParmSEOC_ URL2 := "h ttp:// IP                   /v1/seoc"
  841     HTTPREQU EST_SETCRE DENTIALS_F OR_SERVER  := 0
  842     HTTPREQU EST_SETCRE DENTIALS_F OR_PROXY : = 1
  843     try
  844     {
  845       whr.Se tTimeouts( 5000,3000, 3000,5000)  ; msec to  resolve,  connect, s end, recei ve http
  846       temp : = whr.Open ("GET", Pa rmSEOC_Url , false)                    
  847       whr.Se tAutoLogon Policy(0)
  848       whr.Se tRequestHe ader("User -Agent", " Mozilla/4. 0 (compati ble; MSIE  6.0; Windo ws NT 5.0) ")
  849       whr.Se nd() 
  850       whr.Wa itForRespo nse()
  851       SEOC_R esponse :=  whr.Respo nseText
  852           if  (troubles hoot = 1)   ; set tro ubleshoot  in lists.a hk
  853       { ;Msg Box 262144 ,, Interne t Object O pen return s %temp% 
  854         ;msg box 262144 ,, Reading  SEOC: %SE OC_respons e%  Tested  works
  855       }
  856       SEOC_R esponse :=  trim(SEOC _Response)  
  857       parsed _SEOC := J SON.Load(S EOC_Respon se) ; pars e the resu lt into an  array
  858       SEOCSe t2 := pars ed_SEOC.SE OCS
  859       SEOCs_ Count := S eocSet2.le ngth()
  860       flag : = 1  ; let 's look an d see if s eocs look  valid
  861       if (SE OCs_Count  = 0)
  862         flag  := 0  ; n ot enough  seocs
  863       if (St rlen(SeocS et2[3].seo c.category OfCare) <  10)
  864         flag  := 0  ; n o category  of care f ound
  865       if (st rlen(SeocS et2[5].seo c.serviceL ine) < 2)
  866         flag  := 0  ; n o service  line found
  867     }
  868     catch er r
  869     {
  870       flag : = 0  ; we  failed to  load from  web
  871           if  (troubles hoot = 1)
  872           {  tstr := "A n error oc curred whi le fetchin g from Int ernet Data , local or  backup da ta being u sed instea d`n`nSpeci fically:`n "
  873         Msgb ox, , Inte rnet Non-C ritical Er ror, % tst r "Msg: "  err.Messag e "`nWhat:  " err.Wha t "`nExtra : " err.Ex tra "`nFil e: " err.F ile "`nLin e: " err.l ine
  874              ;msgbox, ,  Unable to  reach SEO C server,  using loca l copy.
  875           }
  876       ; this  would be  a good pla ce to gosu b backup f ile   
  877     }
  878  
  879     if (flag =1) ; then  SEOC file  loaded an d appears  valid
  880       Gosub,  UpdateLoc alSEOCFile  ;Yes, sav e local co py
  881     else
  882       Gosub,  LoadLocal SEOCFile ; No, load l ocal copy
  883  
  884   ;msgbox %  Found SEOC s_Count SE OCS
  885   Categories OfCare :=  Object()
  886   ServiceLin es := Obje ct()
  887  
  888   ; Assignin g Array of  ALL Categ ories of C ARE & Serv iceLines
  889   Loop, %SEO Cs_Count%
  890     {
  891     ServiceL ines_Temp  := SeocSet 2[A_Index] .seoc.Serv iceLine
  892     Temp :=  SeocSet2[A _Index].se oc.categor yOfCare
  893     Categori esOfCare[A _Index] :=  Temp
  894     ServiceL ines[A_Ind ex] := Ser viceLines_ Temp
  895     Index :=  A_Index   ; Index is  just a ba ck-up of C ategoriesO fCare_Coun t
  896     }
  897  
  898   ;  This wo rks  
  899   Categories OfCare_Cou nt := Cate goriesOfCa re.length( )
  900     
  901     
  902  
  903     
  904     
  905   ;  BUBBLE  SORT  
  906     Loop {
  907        ;MsgB ox 262144, , Inside L oop 1
  908        hasCh anged := 0
  909        Categ oriesOfCar e_Count :=  Categorie sOfCare_Co unt-1
  910        Loop,  %Categori esOfCare_C ount%
  911            {
  912           ;M sgBox 2621 44,, Insid e Loop 2
  913           If  (Categori esOfCare[A _Index] >  Categories OfCare[A_I ndex+1])
  914                      {
  915                 TempVar  := Catego riesOfCare [A_Index]
  916                 Categor iesOfCare[ A_Index] : = Categori esOfCare[A _Index+1]
  917                 Categor iesOfCare[ A_Index+1]  := TempVa r
  918                 hasChan ged := 1
  919              }  ; END I f (Categor iesOfCare[ A_Index] >  Categorie sOfCare[A_ Index+1])
  920         }  ;  END Loop,  Categorie sOfCare_Co unt
  921     
  922       } Unti l (hasChan ged = 0)
  923     
  924   ServiceLin es_Count : = ServiceL ines.lengt h()
  925  
  926   ;  BUBBLE  SORT  
  927     Loop {
  928        ;MsgB ox 262144, , Inside L oop 1
  929        hasCh anged := 0
  930            S erviceLine s_Count :=  ServiceLi nes_Count- 1
  931            L oop, %Serv iceLines_C ount%
  932            {
  933                ;MsgBox  262144,, I nside Loop  2
  934                If (Serv iceLines[A _Index] >  ServiceLin es[A_Index +1])
  935                      {
  936                          TempVar : = ServiceL ines[A_Ind ex]
  937                              Servi ceLines[A_ Index] :=  ServiceLin es[A_Index +1]
  938                              Servi ceLines[A_ Index+1] : = TempVar
  939                              hasCh anged := 1                    
  940                      }   ; END If  (ServiceLi nes[A_Inde x] > Servi ceLines[A_ Index+1])
  941            
  942            }   ; END Lo op, Servic eLines_Cou nt
  943     
  944       } Unti l (hasChan ged = 0)    
  945     
  946     
  947   ; REMOVING  Duplicate s in Array
  948   testcat :=  ""
  949   Categories OfCare_Cou nt := Cate goriesOfCa re.length( )
  950   ;MsgBox 26 2144,Categ ories of C are Count  Before, Ca tegoriesOf Care_Count  = %Catego riesOfCare _Count%
  951  
  952   Temporary  := "starti ng"
  953   Categories OfCare_Lis t := ""
  954   Loop, %Cat egoriesOfC are_Count%
  955     { 
  956       ;msgbo x, 4096, C ats of Car e %A_Index %, % Categ oriesOfCar e[A_Index] , 1
  957       if (Ca tegoriesOf Care[A_Ind ex] = Temp orary)
  958              Categories OfCare.Rem oveAt[A_In dex]
  959           el se
  960       { Temp orary := C ategoriesO fCare[A_In dex]
  961              if (strlen (trim(Temp orary)) >  0)
  962              Categories OfCare_Lis t .= "|" .  Temporary
  963           }
  964           if  (A_Index  < 0)
  965              msgbox % C ategoriesO fCare_List
  966     }
  967     ;msgbox,  4096, Fin shed Choic es, %Categ oriesOfCar e_List%
  968  
  969   Categories OfCare_Lis t .= "|OTH ER"
  970     
  971   ; REMOVING  Duplicate s in Array
  972   test_sl :=  "testsl"
  973   ServiceLin es_Count : = ServiceL ines.lengt h()
  974   myServiceL inechoices  := "All S ervice Lin es"
  975   ;MsgBox 26 2144,SERVI CE LINES C ount Befor e, SEOC_Co unt = %Ser viceLines_ Count%
  976  
  977   TrimmedArr ay := trim Array(Serv iceLines)
  978   temporary_ ServiceLin es_Count : = TrimmedA rray.lengt h()
  979  
  980   Loop, %tem porary_Ser viceLines_ Count%
  981     {  
  982              myServiceL inechoices  .= "|" .  TrimmedArr ay[A_Index ]
  983     } 
  984  
  985  
  986     
  987   Return 
  988  
  989   trimArray( arr)  {
  990     hash :=  {}
  991     newArr : = []
  992     
  993     for e, v  in arr  
  994       if (!h ash.Haskey (v))
  995               hash[(v)]  := 1, new Arr.push(v )
  996               
  997      return  newArr
  998   }
  999  
  1000  
  1001   ; SQA API  Calls
  1002   GetListsFr omURL:
  1003  
  1004   ;SL:
  1005   ServiceLin e_URL := " http:// IP                   /v1/lookup /serviceli ne"
  1006    
  1007   ;CoC:
  1008   CategoryOf Care_URL : = "http:// IP                   /v1/lookup /categoryo fcare"
  1009  
  1010      temp :=  whr.Open( "GET", Ser viceLine_U RL, false)                    
  1011       whr.Se tAutoLogon Policy(0)
  1012       whr.Se tRequestHe ader("User -Agent", " Mozilla/4. 0 (compati ble; MSIE  6.0; Windo ws NT 5.0) ")
  1013       whr.Se nd() 
  1014       whr.Wa itForRespo nse()
  1015       API_SL _Response  := whr.Res ponseText
  1016           Ms gBox 26214 4, Return  Values, %A PI_SL_Resp onse%
  1017  
  1018      temp :=  whr.Open( "GET", Cat egoryOfCar e_URL, fal se)                    
  1019       whr.Se tAutoLogon Policy(0)
  1020       whr.Se tRequestHe ader("User -Agent", " Mozilla/4. 0 (compati ble; MSIE  6.0; Windo ws NT 5.0) ")
  1021       whr.Se nd() 
  1022       whr.Wa itForRespo nse()
  1023       API_Co C_Response  := whr.Re sponseText
  1024           Ms gBox 26214 4, Return  Values, %A PI_CoC_Res ponse%         
  1025  
  1026   Return  
  1027  
  1028   LoadLocalS EOCFile:
  1029   SeocFName  := A_AppDa ta . "\Con sultToolbo x\SeocLoca l.seoc"
  1030   troublesho otSEOCFile  := 0
  1031   ;msgbox, t roubleshoo ting
  1032   if (troubl eshootSEOC File > 0)
  1033     msgbox,  64, Local  Seoc file  Name: %Seo cFName%
  1034   FileGetTim e, localfi ledate, %S eocFName%
  1035   fSeoc := f ileopen(Se ocFName,"r ")
  1036   SeocLocalJ son := fSe oc.Read()
  1037   fSeoc.Clos e()
  1038   if ((IsObj ect(fSeoc) ) and (str len(SeocLo calJson) >  100)) ; w e got some thing
  1039   { ;lets to  a little  checking t o make sur e it looks  valid
  1040     ;trouble box("SeocL ocalJson`n " . SeocLo calJson)
  1041     SEOC_Res ponse := t rim(SeocLo calJson) 
  1042     parsed_S EOC := JSO N.Load(SEO C_Response ) ; parse  the result  into an a rray
  1043     tstr :=  "JSON loca l file Rea d, then ex ported`n`n " . json.d ump(parsed _SEOC,,4)
  1044     troubleb ox(tstr)
  1045     SEOCSet2  := parsed _SEOC.SEOC S
  1046     tstr :=  json.dump( SEOCSet2,, 4)
  1047     ;trouble box(tstr)
  1048     SEOCs_Co unt := Seo cSet2.leng th()
  1049     flag :=  1
  1050     if (SEOC s_Count =  0)
  1051       flag : = 0  ; not  enough se ocs
  1052     if (Strl en(SeocSet 2[3].seoc. categoryOf Care) < 10 )
  1053       flag : = 0  ; no  category o f care fou nd
  1054     if (strl en(SeocSet 2[5].seoc. serviceLin e) < 2)
  1055       flag : = 0  ; no  service li ne found
  1056     ;trouble box("Testi ng Local R ead, Flag  = " . flag )     
  1057     if (flag  = 0)
  1058     {
  1059        msgbo x, 4096, N o SEOC's A vailable,  Unable to  load any S EOC Data,  5
  1060        SeocS et2 := []    ; clear  structure
  1061        parse d_SEOC :=  []
  1062     }     
  1063     else
  1064     { 
  1065       if (st rlen(LastC heckedSEOC s < 5)) ;  initializi ng first t ime
  1066       {
  1067         tstr  := "Unabl e to conne ct to SEOC  database,  using loc al copy.`n `n"
  1068         tstr  .= "Loade d " . SEOC s_Count .  " SEOCS`n"
  1069         form attime, lo calfiledat e, %localf iledate%,  M/d/yyyy h :mm 
  1070         tstr  .= "This  SEOC data  was last u pdated: "  . localfil edate . ". "
  1071         ; si nce local  load for 1 st time, i nform user  data is l ocal
  1072         ; ms gbox, 4096 , SEOC Dat abase Unav ailable, % tstr%, 3
  1073         Last SeocUpdate  := localf iledate
  1074       }  
  1075     }    
  1076   }
  1077   return
  1078  
  1079  
  1080   UpdateLoca lSEOCFile:
  1081  
  1082     tstr :=  json.dump( parsed_SEO C,,4)
  1083     ;trouble box("Savin g local Co py`n" . ts tr)
  1084     SeocFNam e := A_App Data . "\C onsultTool box\SeocLo cal.seoc"
  1085     LastSeoc Update :=  A_Now
  1086     ;trouble box(SeocFN ame)
  1087     fSeoc :=  fileopen( SeocFName, "w `n")
  1088     if (isob ject(fseoc ))
  1089     {
  1090       fSeoc. Write(tstr )
  1091       fSeoc. Close()
  1092       troubl ebox("Loca l Copy Sav ed")
  1093     }
  1094     
  1095     /*
  1096   SEOC_Manif est_File : = A_AppDat a . "\Cons ultToolbox \SEOC_Mani fest.txt"
  1097  
  1098   Temp := A_ Now
  1099   Year := Su bStr(Temp,  1, 4)
  1100   Month := S ubStr(Temp , 5, 2)
  1101   Day := Sub Str(Temp,  7, 2)
  1102   Hour := Su bStr(Temp,  9, 2)
  1103   Minute :=  SubStr(Tem p, 11, 2)
  1104   Second :=  SubStr(Tem p, 13, 2)
  1105  
  1106   The_Time_I s := Month  . "/" . D ay . "/" .  Year . "  - " . Hour  . ":" . M inute . ": " . Second
  1107   FileAppend , Standard  Episodes  Of Care (S EOCs) Save d at: %The _Time_Is%` n,%SEOC_Ma nifest_Fil e% 
  1108  
  1109   Path_to_SE OCs := A_A ppData . " \ConsultTo olbox\SEOC Local.seoc "
  1110   FileAppend , SEOC Pat h = %Path_ to_SEOCs%` n,%SEOC_Ma nifest_Fil e%
  1111  
  1112   FileGetTim e, SEOCFil eTimeMod,  %Path_to_S EOCs%
  1113   ModYear :=  SubStr(SE OCFileTime Mod, 1, 4)
  1114   ModMonth : = SubStr(S EOCFileTim eMod, 5, 2 )
  1115   ModDay :=  SubStr(SEO CFileTimeM od, 7, 2)
  1116   ModHour :=  SubStr(SE OCFileTime Mod, 9, 2)
  1117   ModMinute  := SubStr( SEOCFileTi meMod, 11,  2)
  1118   ModSecond  := SubStr( SEOCFileTi meMod, 13,  2)
  1119   The_Modifi ed_Time_Is  := ModMon th . "/" .  ModDay .  "/" . ModY ear . " -  " . ModHou r . ":" .  ModMinute  . ":" . Mo dSecond
  1120  
  1121   FileGetSiz e, SEOCFil eSize, %Pa th_to_SEOC s%
  1122  
  1123   FileAppend , Last SEO C Modify T ime = %The _Modified_ Time_Is%`n ,%SEOC_Man ifest_File %
  1124   FileAppend , SEOC Fil e size (by tes) = %SE OCFileSize %`n`n,%SEO C_Manifest _File%
  1125     
  1126     */
  1127     Return
  1128   }  
  1129  
  1130