4. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/13/2018 3:11:23 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.

4.1 Files compared

# Location File Last Modified
1 ConsultToolbox_SourceCode-7-12-2018CIF2.zip CCareComments.ahk Thu Jun 28 19:13:34 2018 UTC
2 ConsultToolbox_SourceCode-7-12-2018CIF2.zip CCareComments.ahk Wed Sep 12 17:57:12 2018 UTC

4.2 Comparison summary

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

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

4.4 Active regular expressions

No regular expressions were active.

4.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   Nine (9) i nformation  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
  20       8. Con sult Compl etion 
  21       9. Car e Coordina tion 
  22  
  23   Gui width9 95 - heigh t550
  24  
  25   Rows begin  at column  or positi on 25
  26   */
  27  
  28   NVCC:
  29   { Gui, 1:D estroy
  30     ;isrunni ng := 1
  31     clintria ge := 0
  32     triageti mespent :=  0
  33     screenin gtimespent  := 0
  34     xadmintr iage := 0
  35     xshowpro vider := 0
  36     Selected Prov := ""
  37     CoorLeve l := ""
  38     CCoorLev el := ""
  39     AdmAsses sment := " "
  40     ClinAsse ssment :=  ""
  41     ReadingA uth := 0
  42     CurrentT ab := 1
  43     RecHow : = ""
  44     PriorCar eCoordLeve l := "Not  determined "
  45     PriorTri ageReq :=  "Unknown"
  46     GoSub, S etColorMod e
  47     seocout  := ""
  48     ;dbox=NV CCComments Box
  49     Gui2Prov Active:=0
  50     Gosub, R eadConsult
  51     ;GoSub,  DoneCommen ts
  52     if ((A_N ow - LastC heckedSEOC s) > 12000 ) ; check  for seoc u pdates q3h
  53     {
  54       GoSub,  GetRemote SEOCs
  55       LastCh eckedSEOCs  := A_Now
  56     }
  57  
  58     Gui, 1:d efault
  59     Gui, +Al waysOnTop 
  60     
  61     ;-Minimi zeBox
  62     Gui, +Mi nSize995x6 50
  63     ;------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---All Tab
  64    Gui, font , %Font9%  cDefault,  Verdana
  65    Gui, Add,  Tab3, Alt Submit %Pa rmTheme% g NewCCTab v CCTab2 w99 5 h550 vCC , MSA Elig . Verifica tion
  66       |Consu lt Review
  67       |Autho rization
  68       |DoD
  69       |MSA P t Contacts
  70       |Appt  Tracking
  71       |SAR
  72       |Consu lt Complet ion
  73       |Care  Coordinati on 
  74           
  75     ;------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---Tab 1
  76    Gui, Tab,  1   
  77    Gui, Add,  Checkbox,  x25 y39 v NVAdminEli gVerified,  Administr ative Elig ibility ve rified
  78    Gui, Add,  Checkbox,  yp+21 vNV ChoiceElig Verified,  Basic Choi ce Eligibi lity Verif ied 
  79    Gui, Add,  Checkbox,  yp+21 vNV SpecificCh oiceElig,  Specific C hoice Elig ibility Ve rified:
  80    Gui, Add,  DropDownL ist, vNVSp ecificChoi ce gSelSpe cificChoic e xp+230 y p-4 w240,  %SpecificC hoiceEligi bility%
  81    Gui, Add,  Checkbox,  x25 yp+25  vNVHECAct ionPending , Presumed  eligible,  HEC Updat e Pending
  82    Gui, Add,  Checkbox,  yp+21 vNV UnableToVe rify, Unab le to Veri fy Eligibi lity
  83    Gui, Add,  Edit, yp- 4 xp+190 w 300 vNVUna bletoVerif yText
  84    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
  85    if (ParmD OA = 1) 
  86    {
  87      Gui, Fo nt, %Font9 % %CTBRed% , Verdana  Bold
  88      Gui, Ad d, Text, + TabStop    yp+26, Del egation of  Authority  Medical S ervices Li st Reviewe
  89      Gui, Fo nt, %Font9 % cDefault , Verdana
  90      Gui, Ad d, CheckBo x, yp+22 x p+20 gCkDO ADLC vDOAD LC, Clinic al review  required
  91      Gui, Ad d, CheckBo x, xp+210  gCkDOADLA  vDOADLA, D oes not re quire clin ical revie w
  92    }
  93    Gui, Add,  Text, +Ta bStop  x25  yp+22 
  94    
  95    if (showc ctriage=1)
  96    {
  97      Gui, Ad d, Button,  x25 y225  gShowAdmin Triage, Do cument Adm inistrativ e Screenin g
  98      tstr :=  "Previous  AdminCare  Coordinat ion Level:  " . Prior CareCoordL evel 
  99      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
  100      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vAdminPr iorClinCoo rd, Previo us Clinica l Care Coo rdination  Level: not  done
  101      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vAdminMo stRecent,  Most Recen t Assessme nt: none
  102      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vAdminPr iorTriageR eq, Clinic al Triage:  Need Unde termined
  103      Gui, Ad d, Text, + TabStop  x 25 y+15 w4 01 vNewAdm Text r5, % A_Space%
  104      Gui, Ad d, Text, + TabStop  x p y+6 w450  vNewAdmCo ord, %A_Sp ace%
  105      Gui, Ad d, Text, + TabStop  x p y+6 w450  vNewAdmTr iageReq, % A_Space%
  106      Gui, Ad d, Text, + TabStop  x p y+6 w450  vNewAdmSe ndTo, %A_S pace%
  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    Gui, Font , %Font7%  %CTBGreen% , Verdana
  111    Gui, Add,  text,  x2 5 w600 y+2 5 vAdminDe bug, %A_Sp ace%
  112    
  113   ;--------- ---------T his next s ection pop s the box  up to avoi d delay wh ile the re st of the  tabs paint  
  114   Gui, Font,  %Font9% c Default w4 00, Verdan
  115   Gui, Tab
  116   Gui, Add,  Link, x10  y575, % Li nkText
  117   Gui, Add,  Button, gN VBtnNVCC x 470 yp+25,  OK  
  118  
  119   CCTitle :=  "Communit y Care Com ments - "  . CTBVersi on
  120   Gui, Show,  Center, % CCTitle%
  121    
  122    Gui, Tab,  2    ;--- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -----Tab 2
  123    ;msgbox,  4096, stat e, %parmst ate%
  124     
  125    ApprovalC omment :=  ""   ; res et to no v alue upon  repaint of  dialog
  126    Gui, Font , %Font9%  %CTBRed%,  Verdana Bo ld
  127    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)
  128    Gui, Font , %Font9%  cDefault w Default, V erdana 
  129    Gui, Add,  CheckBox,  yp+24 vNV CCApproved  gNVAProcA pprove, Re quest Appr oved (Sele ct CC Prog ram):
  130    Gui, font , %Font8%  cDefault w Default, V erdana
  131    
  132    if (parms tate == "A K (ALASKA) ")
  133      Gui, Ad d, DropDow nList, x+5  yp-4 w245  vNVCCProg ram gSelPr ogram, % N VCCProgram List . "|T ribal"
  134    else
  135      Gui, Ad d, DropDow nList, x+5  yp-4 w245  vNVCCProg ram gSelPr ogram, % N VCCProgram List
  136    
  137    Gui, Font , %Font9%  cDefault,  Verdana
  138    ;Comment  added for  maintenanc e release
  139    Gui, Add,  Text, +Ta bStop   x+ 6 yp+4, Co mment:
  140    Gui, Add,  Edit, yp- 4 x+4 w350  vApproval Comment 
  141    Gui, Add,  CheckBox,  yp+32 x25  vNVCDenie d gNVAProc Disapprove , Request  Disapprove d (reason) :
  142    Gui, Add,  ComboBox,  vNVDisapp Reason yp- 4 w300 xp+ 220 gSelDe nial, Not  Medically  Necessary
  143        |Dupl icate Cons ult
  144        |Serv ice availa ble at the  VA 
  145        |Othe r VA Provi ding Care
  146        |Not  a Covered  Service
  147    Gui, Add,  Checkbox,  vAltPlanO fCare gCk_ AltPlanOfC are x+68 y p+2, Provi der was co ntacted fo r Alternat e Plan of  Care
  148            
  149    Gui, Add,  Text, +Ta bStop   yp +32 x25, G uideline R eview Meth od:
  150    Gui, Add,  DropDownL ist, x+5 y p-4 vRevie wMethod w2 50, %A_Bla nk%|MCG Gu idelines|I nterQual G uidelines| Chief of S taff appro ved protoc ol|Other:
  151    Gui, Add,  Text, +Ta bStop   x+ 5 yp+4, (C omment/Oth er Method) :
  152    Gui, Add,  Edit, x+5  yp-4 vMet hodComment  w358
  153    Gui, Font , %Font9%  %CTBRed% ,  Verdana B old
  154    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
  155    Gui, Font , %Font9%  cDefault ,  Verdana
  156    Gui, Add,  Checkbox,  vNVOKtoDC  yp+22, Ma y disconti nue if Vet eran cance ls/no-show s
  157    Gui, Add,  Text, +Ta bStop   xp +371, or f ails to re spond to m andated sc heduling e ffort
  158    Gui, Add,  DropDownL ist, xp-65  w60 yp-4  vOnceTwice , twice|on ce
  159    GuiContro l, Choose,  OnceTwice , twice
  160    Gui, Font , %Font9%  %CTBRed% ,  Verdana B old 
  161     ; Gui, A dd, Text,  +TabStop   yp+25, Hig her risk c onsults ma y be marke d for Care  Coordinat ion.
  162    Gui, Font , %Font9%  cDefault ,  Verdana
  163    Gui, Add,  Text, +Ta bStop   x2 5 y+22, Sc heduling t o be perfo rmed by:
  164    
  165    
  166    Gui, Add,  Radio, yp  x+8 vCCSc hed1 gCCSc hedulePerf _SmartButt on1, VA St aff
  167    Gui, Add,  Radio, yp  x+8 vCCSc hed2 gCCSc hedulePerf _SmartButt on2, Healt hNet
  168    Gui, Add,  Radio, yp  x+8 vCCSc hed3 gCCSc hedulePerf _SmartButt on3, Triwe st
  169    
  170  
  171     PrevCCSc hedulePerf Button :=  0
  172    ;SetSched uleBy(CCSc hedBy)
  173    if (showc ctriage=1)
  174    { 
  175      Gui, Ad d, Button,  x25 y+25  gShowClini calTriage,  Document  Clinical T riage
  176      Gui, Ad d, Text, + TabStop  x 25 y+15 w4 50 vClinPr iorCareCoo rd, %tstr%
  177      tstr :=  "Most Rec ent Assess ment: "
  178      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vClinPri orTriageTy pe, %tstr%
  179      tstr :=  "Clinical  Triage: "  . PriorTr iageRequir ed
  180      Gui, Ad d, Text, + TabStop  x 25 y+4 w45 0 vClinPri orTriageRe q, %tstr%
  181  
  182      Gui, Ad d, Text, + TabStop  x p y+8 w600  r5 vNewCl inText, %A _Space%
  183      Gui, Ad d, Text, + TabStop  x p y+10 w45 0 vNewOvrH eader, %A_ Space%
  184      Gui, Ad d, Text, + TabStop  x p+10 y+4 w 600 vNewOv rReason, % A_Space%
  185      Gui, Ad d, Text, + TabStop  x 25 y+8 w60 0 r1 vNewC linCoord,  %A_Space%
  186      Gui, Ad d, Text, + TabStop  x p y+6 w600  r1 vNewCl inTriage,  %A_Space%
  187      Gui, Ad d, Text, + TabStop  x p y+4 w600  r1 vNewCl inSendTo,  %A_Space%
  188    }  
  189    Gui, Font , %Font7%  cDefault,  Verdana
  190    Gui, Add,  text,  x2 5 w600 y+2 5 vClinDeb ug, %A_Spa ce%
  191    
  192    Gui, Tab,  3   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 3 Auth
  193    Gui, Font , %Font7%  cDefault,  Verdana
  194    Gui, Add,  button, x p+395 y31  gClearAuth , Clear Au th
  195    Gui, Font , %Font9%  %CTBRed% ,  Verdana B old
  196    Gui, Add,  Text, +Ta bStop   x2 5 y35, Aut horization  instructi ons to be  included w ith Referr al:
  197    Gui, Font , %Font9%  cDefault,  Verdana
  198     ;Gui, 1: Add, Butto n, xp+75 g ReadAuth,  Read from  CPRS Consu lt
  199    Gui, Font , cDefault , Verdana
  200    Gui, Add,  Checkbox,  vNVSpecia ltyType yp +30 x25, C ategory of  Care:
  201     ;Gui, 1: Add, Radio , vNVSpeci altyType g SelectedSp ecialty yp +30 x25, S pecialty:
  202     ;Gui, 1: Add, Radio , x25 y+18 0, Materni ty Care Re ferrals
  203     ;Gui, 1: Add, Text,  +TabStop   xp+15 yp+ 22 , Mater nity Care:  Specialty , Service,  Care or P rocedures
  204     ;Gui, 1: Add, Text,  +TabStop   yp+22, ar e not requ ired for M aternity C are
  205      
  206    Gui, Add,  DropDownL ist, vNVSp ecialty gN VCheckOffS pecialty x 159 yp-4 w 500, %myca tchoices%
  207    Gui, Add,  Button, x +10 h10 yp -1 vOthSpB tn gSpecBt n, Other:
  208    Gui, Add,  Edit, xp+ 65 yp vOth Specialty  gOtherSpec ialtyEntry  w260
  209    
  210    ;Gui, Add , Button,  x+20 gGetR emoteSEOCs , SEOCs_II
  211    
  212    Gui, Add,  Text, +Ta bStop   yp +28 x42, S ubSpecialt y:
  213    Gui, Add,  Edit, vNV SubSpec yp -4 xp+90 w 200 gNVChe ckOffSpeci alty2
  214  
  215    Gui, Add,  Text, +Ta bStop   yp +3 xp+364,  Service L ine:
  216    Gui, Add,  DropDownL ist, vCOC_ Selection  gChk_COCSe lection x+ 9 yp-3 w41 1, %myServ iceLinecho ices%
  217    
  218    Gui, Add,  Text, +Ta bStop   yp +27 x42, P rocedure:
  219    Gui, Add,  Edit, vNV _Procedure   yp-4 xp+ 70 w330 gN VCheckOffS pecialty2
  220  
  221     ; gSelec t_SEOC
  222    Gui, Add,  Text, +Ta bStop   yp +3 xp+384,  SEOC:
  223    Gui, Add,  DropDownL ist, vSEOC _Selection  xp+44 yp- 3 w455, %a vailSeocs%
  224      
  225    Gui, Add,  Text, +Ta bStop   yp +27 x42, T ype of Ser vice:
  226    Gui, Add,  ComboBox,  vNV_TypeO fService   yp-3 xp+10 5 w314 gNV CheckOffSp ecialty2,  %blank%
  227       |Evalu ation and  Treatment
  228       |Evalu ation and  Recommenda tions
  229       |Treat ment
  230       |Diagn ostic
  231    Gui, Add,  Button, y p x+35 gDi splay_Writ e_SEOC, Di splay SEOC     
  232    ;Gui, Add , Button,  x+35 gGetL istsFromUR L, Test AP I calls
  233    
  234    Gui, Add,  CheckBox,  x42 yp+29  vInclTFR  gNVCheckOf fSpecialty 2 , Timefr ame for ep isode of c are not to  exceed:
  235    Gui, Add,  Edit, yp- 4 xp+306 w 43 vNVMont hsAuth1 gN VCkOffIncl TFR 
  236    Gui, Add,  UpDown, v NVMonthsAu th gNVCkOf fInclTFR r ange0-12,  0
  237    
  238    Gui,Font,  %Font7% c Default, V erdana
  239    Gui, Add,  Button, x p+51 yp w2 0 vM1 gMon ths1, 1
  240    Gui, Add,  Button, x p+22 w20 v M3 gMonths 3, 3
  241    Gui, Add,  Button, x p+22 w20 v M6 gMonths 6, 6
  242    Gui, Add,  Button, x p+22 w30 v M12 gMonth s12, 12
  243    
  244    Gui,Font,  %Font9% c Default, V erdana
  245    Gui, Add,  Text, +Ta bStop   x+ 5 yp+4, mo nths 
  246   ; if (Parm EpisodeSta rt = 1)
  247   ;   Gui, A dd, Text,  +TabStop   xp+25 yp+4 , months p ast first  appointmen t. 
  248   ; else
  249   ;    Gui,  Add, Text,  +TabStop   xp+25 yp+ 4, months.
  250    Gui, Add,  Checkbox,  x42 yp+28  vAuthVisi ts gNVChec kOffSpecia lty2, Auth orize tota l of
  251    Gui, Add,  Edit, yp- 4 xp+135 w 49 gNVChec kOffAuthFu p vNVVisAu th1
  252    Gui, Add,  UpDown, v NVVisAuth  gNVCheckOf fAuthFup r ange0-99,  0
  253    Gui, Add,  Text, +Ta bStop   yp +4 xp+55,  visit(s)
  254    Gui, Add,  Checkbox,  x42 yp+26  vCKComple teBy, Care  must be c ompleted b y:
  255    Gui, Add,  Edit, xp+ 200 yp-3 w 130 vCompl eteByDate
  256    Gui, Add,  Button, x p+140 yp-1  gComplete ByCal vCom pleteByCal 1, Cal
  257    Gui, Font , %Font9%  %CTBRed%,  Verdana Bo ld
  258    Gui, Add,  Text, +Ta bStop   vB undle x40  w600 yp+35 , %A_Space %
  259    Gui, Font , %Font9%  cDefault,  Verdana
  260    Gui, Add,  Checkbox,  x25 y280  vIncludeSt dAuthLangu age, Inclu de Standar d Authoriz ation Lang uage
  261    Gui, Add,  Edit, xp+ 20 yp+22 w 800 r3 vAu thVerbiage  gCheckOff AuthVerbia ge
  262    Gui, Add,  Checkbox,  x25 yp+75  w500 vCKA ddSarVerbi age , Add  the follow ing to aut horization
  263    Gui, Add,  Edit, xp+ 20 yp+23 w 800 r2 vSA RNeededVer biage gCkO ffSarVerbi age, %Init SarNeededV erbiage%
  264    Gui, Add,  CheckBox,  x25 y460  vCkNVManag er, Commun ity Care M anager:
  265    Gui, Add,  Edit, yp- 4 xp+190 w 450 vNVMgr Name, %NVM grName%
  266    Gui, Add,  Text, +Ta bStop   yp +28 x60, F or questio ns, contac t this num ber: 
  267    Gui, Add,  Edit, yp- 4 xp+230 w 350 vNVPho nePOC, %NV PhonePOC%
  268    
  269    ;Gui, Fon t, %Font9%  cDefault,  Verdana B old 
  270    Gui, Add,  Text, +Ta bStop   x2 5 yp+38, U pon comple tion of th is section
  271    Gui, Add,  Checkbox,  x+5 vAuth Ready, Sen d to HSRM  for Referr al
  272    Gui, Font , %Font9%  cDefault,  Verdana
  273    tstr := S howVar("Co nServiceRe q") . ", "
  274    tstr .= S howVar("Co nSpecialty ") . ", "
  275    tstr .= S howVar("Co nProgram")  . ", "
  276    tstr .= S howvar("Co nVisits")  . ", "
  277    tstr .= S howVar("Co nSvcType")
  278    ;msgbox,  4096, ln 1 83 cccomme nts, %tstr %
  279    if (Debug  != "Yes")
  280      tstr :=  A_Space
  281    Gui, Font , %Font7%  %CTBGreen%   
  282    Gui, Add,  text,  x2 5 w800 y+5  vAuthDebu g, %tstr%
  283    Gui, Font , %Font9%  cDefault,  Verdana
  284  
  285    Gui, Tab,  4   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 4 DoD
  286    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  287    Gui, Add,  Text, +Ta bStop  x25  y40, DoD  Urgency
  288  
  289    Gui, Font , %Font9%  cDefault,  Verdana
  290    Gui, Add,  Checkbox,  x25 yp+25  vUrgencyL evel, Urge ncy
  291    Gui, Add,  DropDownL ist, xp+80  yp-2 vUrg encySelect ed gChk_Ur gency w180 , %A_Blank %
  292       |Urgen t - 90 min utes
  293       |Routi ne - 2 bus iness days
  294  
  295    Gui, Add,  Checkbox,  x25 yp+30  vSchedule AnAppointm ent, Dispo sition
  296    Gui, Add,  DropDownL ist, xp+10 0 yp-2 vDi sposition  gChk_Dispo sition w22 0, %A_Blan k%
  297       |DoD A ble to Sch edule
  298       |DoD U nable to S chedule
  299  
  300    Gui, Add,  CheckBox,  x25 yp+32  vNVCDenie d2 gNVAPro cDisapprov e2, Unable  to Schedu le (reason ):
  301    Gui, Add,  DropDownL ist, vNVDi sappReason 2 yp-4 w20 0 xp+200 g SelDenial2 , Not Medi cally Nece ssary
  302        |Dupl icate Cons ult
  303        |Serv ice availa ble at the  VA 
  304        |Othe r VA Provi ding Care
  305        |Not  a Covered  Service
  306    
  307    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  308    Gui, Add,  Text, +Ta bStop  x25  yp+80, Ex ceptions L ist Determ ination
  309     
  310    Gui, Font , %Font9%  cDefault,  Verdana
  311    Gui, Add,  Checkbox,  x25 yp+30  vDoDConsu ltPresent,  DoD Consu lt present
  312    Gui, Add,  DropDownL ist, xp+18 5 yp-2 vDo DConsultPr esentSelec ted gChk_D oDConsultP resent w24 0, %A_Blan k%
  313       |Yes
  314       |No
  315       |Non-D oD consult  present ( prior)
  316    
  317    Gui, Add,  Checkbox,  x25 yp+35  vDOS_Outs ide gChk_D OS_Outside , DOS Outs ide of App roved EOC  timeframe
  318  
  319    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  320    Gui, Add,  Checkbox,  x25 yp+28  vDisposit ionCB , Ex ception Di sposition
  321    Gui, Font , %Font9%  cDefault,  Verdana
  322    Gui, Add,  DropDownL ist, yp-2  xp+185 vDi spositionS elected w1 30 gChk_Di sposition2 , %A_Blank %
  323       |Appro ved
  324       |Not a pproved
  325    
  326    
  327    Gui, Tab,  5  ;----- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 5 contac ts by MSA
  328    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  329    Gui, Add,  Text, +Ta bStop  x25  y40, Unsu ccessful a ttempts to  schedule  Veteran
  330    Gui, Font , %Font9%  cDefault,  Verdana
  331    Gui, Add,  ComboBox,  xp+300 w1 80 yp-3 vN VAttemptTy pe, No ans wer|Left V oice Mail| Left Messa ge with Fa mily
  332    
  333    Gui, Add,  CheckBox,  x25 yp+22  vNVCCall1  gCkCall1,  First Cal l to Veter an
  334    Gui, Add,  CheckBox,  x25 yp+22  vNVCCall2  gCkCall2,  Second Ca ll to Vete ran
  335    Gui, Add,  CheckBox,  x25 yp+22  vNVCCall3  gCkCall3,  Third or  additional  call to V eteran
  336    Gui, Add,  CheckBox,  vNVCLette r gCkNVCLe tter x25 y p+22, Unab le to Cont act Letter  sent to V eteran
  337    Gui, Add,  CheckBox,  xp+20 yp+ 22 vNVCCer tified gCe rtified, L etter Sent  by Certif ied Mail
  338  
  339    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  340    Gui, Add,  Text, +Ta bStop  x25  yp+30, Ad ditional r esults fro m attempt
  341    Gui, Font , %Font9%  cDefault,  Verdana
  342    Gui, Add,  Checkbox,  vNVCBadPh one yp+23,  All liste d phone nu mbers disc onnected o r wrong nu mber 
  343    Gui, Add,  Checkbox,  vNVBadAdd ress yp+23 , Address  bad or no  address on  file, una ble to con tact by le tter
  344    
  345    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  346    Gui, Add,  Text, +Ta bStop  yp+ 30, Vetera n Contacte
  347    Gui, Font , %Font9%  cDefault,  Verdana
  348    Gui, Add,  Checkbox,  yp+22 vVe teranInfor med, Veter an informe d of eligi bility, re ferral and  approval
  349    GUI, Add,  Checkbox,  yp+22 vVe tOKCommCar e, Veteran  agrees to  Community  Care refe rral
  350    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  351    Gui, Add,  Text, +Ta bStop  yp+ 30, Vetera n's Choice  Participa tion Prefe rence
  352    Gui, Font , %Font9%  cDefault,  Verdana
  353    Gui, Add,  Checkbox,  vNVCOptIn  gSelectOp tIn yp+22  xp+15, Opt -In for %P armOptIn% 
  354    Gui, Add,  Checkbox,  vNVCOptOu t gSelectO ptOut x+16 , Opt-Out  for %ParmO ptIn%
  355  
  356   ; Gui, Add , Checkbox , vVetConf irmsIns x2 5 yp+25, V eteran con firms othe r health i nsurance i nformation
  357   ; Gui, Add , Edit, yp +20 xp+20  vConfirmed OHI w425
  358    Gui, Add,  Checkbox,  x25 yp+30  vMailGood , Mailing  Address Co nfirmed
  359    Gui, Add,  Checkbox,  yp+22 vVe rifyContac tNum, Veri fied best  Contact Nu mber: 
  360    Gui, Add,  ComboBox,  yp-4 xp+2 15 vVetCon tactNum w2 30 gCkCont actNum, ho me number  on file
  361       |cell  number on  file
  362       |work  number on  file
  363    Gui, Add,  Checkbox,  x25 yp+26  vMsgOK, O K to leave  appt. det ails on vo ice mail
  364    Gui, Add,  Checkbox,  yp+22 vFa mMsgOK, OK  to leave  appt. deta ils with:
  365    Gui, Add,  ComboBox,  yp-4 w230  xp+215 vL vMsgWith g CkLvMsgWit h, Spouse
  366       |Daugh ter
  367       |Son
  368       |Careg iver
  369       |Famil y  
  370    Gui, Add,  Checkbox,  x25 yp+26  vVetCalle dforinfo,  Veteran co ntacted Co mmunity Ca re office
  371    Gui, Add,  Text, +Ta bStop  x40  yp+22, Co ntact Note s:
  372    Gui, Add,  Edit, xp+ 100 w330 r 2 vVetCont actComment  gVetCalle dCCare
  373    
  374    
  375    ; Right C olumn of T AB 5
  376    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  377    Gui, Add,  Text, +Ta bStop  x52 0 y40, Pro vider Pref erence:
  378    Gui, Font , %Font9%  cDefault,  Verdana
  379    Gui, Add,  Checkbox,  x520 y+10  vCkPrefRP Method, Pr ef. referr al package  Method:
  380    Gui, Add,  DropDownL ist, xp+23 0 vPrefRPM ethod gChk _Method w1 80, %A_Bla nk%
  381        |Fax
  382            | HSRM Porta l
  383        |Mail
  384            | Secure Ema il
  385        |Virt ru Pro
  386    
  387    Gui, Font , %CTBGree n%, Verdan a Bold
  388    Gui, Add,  GroupBox,  x520 y+10  w420 h205 , Veteran' s Preferre d Provider  Informati on       ; <<<<<<<<<< <<<<<<<<<< Groupbox h ere
  389    Gui, Font , cDefault , Verdana
  390    
  391    
  392    Gui, Add,  CheckBox,  xp+24 yp+ 23 gWasChe ckedPrefPr ov vPtNPIP rov, Veter an has a P referred P rovider:
  393     tstring  := "       "
  394    Gui, Add,  Text, +Ta bStop  xp+ 240 vPtNPI ProvText,  %tstring%
  395    ;Gui, Fon t, %CTBRed %, Verdana  Bold
  396    ;Gui, 1:A dd, Text,  +TabStop   x490 y130,  Veteran's  Indicated  Preferred  Provider
  397    
  398    Gui, Font , %Font9%  cDefault,  Verdana
  399     Selected Prov := ""
  400     
  401    if (strle n(ConVetPr efProv) >  1) ; repla ces VET_PR EF_PROV_FO UND
  402       Select edProv :=  ConVetPref Prov 
  403           
  404    Gui, Add,  Edit, r5  xp-240 yp+ 21 h120 w3 70 vPrefPr ov, %Selec tedProv%
  405    Gui, Add,  Text, +Ta bStop  xp  yp+85 , Ve teran OK t o see othe r than Pre f. Provide r
  406    Gui, Add,  CheckBox,  yp xp+290  vOthProvO K gCkOthPr ovOK, Yes
  407    Gui, Add,  CheckBox,  yp xp+45  vOthProvNo tOK gCkOth ProvNotOK,  No
  408    Gui, Add,  CheckBox,  xp-335 yp +22 vCKUpd atePrefPro v, Update  record wit h above in formation
  409    Gui, Add,  Button, y p+19 xp+24  gGetPrefP rov, Looku p a Provid er
  410    Gui, Add,  Button, x p+160 gLau nchFacilit yServiceLo c, Facilit y && Servi ce Locator
  411    
  412    Gui, Add,  Checkbox,  x520 yp+4 5 vApptHas TimePref g ChIfTimePr ef, Vetera n's appt t ime prefer ence: 
  413    Gui, Add,  DropDownL ist, yp-4  xp+230 vAp ptTimePref  gCheckOff TimePref w 180, %A_Bl ank%|Any|M orning|Aft ernoon
  414    ;GuiContr ol, Text,  ApptTimePr ef, Any
  415    Gui, Add,  Checkbox,  x520 yp+2 9 vApptHas DatePref,  Veteran's  day/date p reference:
  416    Gui, Add,  Edit, yp- 4 xp+230 v ApptDatePr ef w180 gC heckOffDat ePref
  417    Gui, Add,  Button, y p-1 xp+190  gGetPrefA pptDate, C al
  418    Gui, Add,  Checkbox,  x520 yp+3 0 vShelfSc hed, Veter an prefers  to self s chedule
  419    Gui, Add,  Checkbox,  x520 yp+2 6 vCkPrefN otificatio n, Pref. a ppt. Notif ication Me thod:
  420    Gui, Add,  DropDownL ist, yp-4  xp+230 vPr efNotifica tion gChec kOffNotifi cation w18 0, Mail
  421        |Phon e
  422        |Both  by phone  and mail
  423        |MHV  Secure Mes sage
  424  
  425            
  426    Gui, Add,  Checkbox,  x520 yp+2 9 vCkVetWi llTravel,  Willing to  travel up  to (miles ):
  427    Gui, Add,  Edit, yp- 4 xp+230 v VetWillTra vel gCkOff WillTravel  w50
  428    Gui, Font , %CTBRed% , Verdana
  429    Gui, Add,  Text, +Ta bStop  x52 0 y445 w46 0, %DefFai led1% %Def Failed2%
  430   ; Gui, Add , Text, +T abStop  yp +20, %DefF ailed2%
  431    Gui, Font , cDefault , Verdana
  432    Gui, Add,  Checkbox,  vNVCRefer  w370 yp+6 0, %DefRP%
  433    
  434  
  435    Gui, Tab,  6             ;----- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------Ta b 6 Appt T racking
  436    Gui, Add,  CheckBox,  x25 y40 v RequiresDo csFirst, P rovider re quires rec ords to re view prior  to schedu ling
  437    Gui, Add,  CheckBox,  x25 yp+20  vCCDocAcc epts, Comm unity Care  Provider  has accept ed referra l
  438    Gui, Add,  Checkbox,  vNVCUploa d yp+20 x2 5, Documen ts Uploade d to TPA P ortal
  439    Gui, Add,  Checkbox,  vNVCFaxed records yp +20 x25, R ecords fax ed/sent to  community  care prov ider
  440    Gui, Add,  Checkbox,  vDoDReqSe nt yp+20 x 25, DoD fa cility con tacted to  request ca re
  441    Gui, Add,  Edit, vDo DFacName g DodFacEnte red yp-3 x +4 w190
  442    Gui, Add,  Checkbox,  vFupCallt oVendor yp +23 x25, F ollow up c all made t o provider /vendor to  check on  status
  443    Gui, Add,  Checkbox,  vTimeSens itive yp+3 0 x25, Tim e sensitiv e appointm ent, NLT:
  444    Gui, Add,  Edit, vNL TDate yp-4  x+5 w100 
  445    Gui, Add,  Button, g GetNLTDate  yp x+5, C al
  446    
  447    Gui, Add,  Checkbox,  x25 yp+25  vNVCCkApp t, Communi ty Care ap pt. has be en
  448    Gui, Add,  Radio, xp +227 yp ch ecked vSch eduledFlag , schedule d
  449    Gui, Add,  Radio, xp +90 yp, re -scheduled
  450    
  451    Gui, Add,  Text, +Ta bStop  yp+ 25 x45, Ap pt. Date:
  452   ;Gui, 1:Ad d, DateTim e, vNVCDtA pptDate xp +90 yp-4 ,  M/d/yyyy  HH:mm
  453    Gui, Add,  Edit, vNV CDtApptDat e xp+80 w1 80 yp-4 
  454    Gui, Add,  Button, g GetApptDat e yp xp+19 0, Cal
  455    Gui, Add,  Text, +Ta bStop  x45  yp+30,Com ment:
  456    Gui, Add,  Edit, vNV ApptProv x p+70 yp-4  w310
  457    Gui, Font , %Font9%  %CTBRed%,  Verdana Bo ld
  458    Gui, Add,  GroupBox,  x25 y+8 w 410 h180,  Actual/App roved Prov ider Infor mation     ;--------- ----Groupb ox
  459     ;Gui, 1: Add, Text,  +TabStop   x490 y130 , Veteran' s Indicate d Preferre d Provider
  460    Gui, Font , %Font9%  cDefault,  Verdana
  461     Selected Prov := ""
  462     ActualPr ovider :=  SelectedPr ov
  463    Gui, Add,  Edit, xp+ 15 yp+24 h 170 w380 r 6 vActualP rov, %Actu alProvider %
  464    Gui, Add,  CheckBox,  xp yp+100  vCKUpdate ActualProv , Update r ecord with  above inf ormation
  465    Gui, Add,  Button, y p+24 xp+28  gGetActua lProv, Loo kup a Prov ider
  466    Gui, Add,  Button, x p+160 gLau nchFacilit yServiceLo c, Facilit y && Servi ce Locator
  467    
  468    Gui, Font , %Font9%  cDefault ,  Verdana
  469    Gui, Add,  Checkbox,  x25 yp+42  vCkVetInf ormed, Vet eran infor med of sch eduled app t by:
  470    Gui, Add,  ComboBox,  xp+270 yp -4 gUpdtVe tInformed  vVetInform edBy w140,  mail
  471        |phon e
  472        |phon e and mail
  473        |MyHe altheVet
  474    Gui, Add,  Checkbox,  x25 yp+22  vPacketMa iled, Refe rral Autho rization P acket Mail ed to Vete ran
  475    Gui, Font , %Font8%  %CTBRed% 
  476    Gui, Add,  Text, +Ta bStop  x25  y+8 w440,  %DefFaile d1% %DefFa iled2%
  477    Gui, Font , %Font9%  cDefault
  478  
  479  
  480    ;Gui, Add , Text, +T abStop  y4 0 x490, Co mmunity Ca re Appoint ment Resul ts. 
  481    Gui, Font , cDefault , Verdana
  482     if (pilo t=1)
  483     {
  484       Gui, A dd,Text, x 490 y40, R eason Cont ractor not  used (Rea son requir ed):
  485       Gui, A dd, DropDo wnList, vR easonForRe turn xp+10  yp+22 w43 0, %Contra ctorBypass Reason%
  486     } else
  487     { 
  488       Gui, 1 :Add, Text , +TabStop   y40 x490 , Returned  from Heal thnet/Triw est (Selec t reason):
  489       Gui, 1 :Add, Text , +TabStop   yp+23  + 0x7 xp w45 0 h22 ; th is just cr eates a bo rder
  490       Gui, 1 :Add, Prog ress, yp+1  xp+1 vPro g1 w448 h2 0 cDDEEFF  , 100  ; t his create s a backgr ound
  491       Gui, 1 :Add, Text , +TabStop   yp+3 xp+ 5 +Backgro undtrans c Default VR easonForRe turn w448  h20
  492       Gui, A dd, TreeVi ew, gTreeA ction AltS ubmit xp-6  yp+25 w45 0 h200
  493       P1 :=  TV_Add(XP1 )
  494       P1C1 : = TV_Add(f ixreturn(X P[1]),P1)
  495       P1C2 : = TV_Add(f ixreturn(X P[2]),P1)
  496       P1C3 : = TV_Add(f ixreturn(X P[3]),P1)
  497       P1C4 : = TV_Add(f ixreturn(X P[4]),P1)
  498       P1C5 : = TV_Add(f ixreturn(X P[5]),P1)
  499       P1C6 : = TV_Add(f ixreturn(X P[6]),P1)
  500       P1C7 : = TV_Add(f ixreturn(X P[7]),P1)
  501       P1C8 : = TV_Add(f ixreturn(X P[8]),P1)
  502  
  503       P2 :=  TV_Add(XP2 )
  504       P2C1 : = TV_Add(f ixreturn(X P[9]),P2)
  505       P2C2 : = TV_Add(f ixreturn(X P[10]),P2)
  506       P2C3 : = TV_Add(f ixreturn(X P[11]),P2)
  507       P2C4 : = TV_Add(f ixreturn(X P[12]),P2)
  508       P2C5 : = TV_Add(f ixreturn(X P[13]),P2)
  509  
  510       P3 :=  TV_Add(XP3 )
  511       P3C1 : = TV_Add(f ixreturn(X P[14]), P3 )
  512       P3C2 : = TV_Add(f ixreturn(X P[15]), P3 )
  513       P3C3 : = TV_Add(f ixreturn(X P[16]), P3 )
  514       P3C4 : = TV_Add(f ixreturn(X P[17]), P3 )
  515       P3C5 : = TV_Add(f ixreturn(X P[18]), P3 )
  516       P3C6 : = TV_Add(f ixreturn(X P[19]), P3 )
  517       P3C7 : = TV_Add(f ixreturn(X P[20]), P3 )
  518  
  519       P4 :=  TV_Add(XP4 )
  520       P4c1 : = TV_Add(f ixreturn(X P[21]), P4 )
  521       P4c2 : = TV_Add(f ixreturn(X P[22]), P4 )
  522       P4c3 : = TV_Add(f ixreturn(X P[23]), P4 )
  523       P4c4 : = TV_Add(f ixreturn(X P[24]), P4 )
  524  
  525       P5 :=  TV_Add(fix return(XP[ 25]))
  526   }
  527    
  528    Gui, Add,  Text, +Ta bStop  x49 0 y+8, Dis position o f returned  referral:  
  529    Gui, Add,  DropDownL ist, vVend orDisposit ion yp+18  w460, %bla nk%
  530      |Schedu led using  Provider A greement.
  531      |In-hou se VA Appo intment ar ranged.
  532      |Forwar ded to in- house serv ice.
  533      |Resubm itted new  referral a uthorizati on to vend or.
  534      |Schedu led using  traditiona l Non-VA C are.
  535    Gui, Add,  Text, +Ta bStop  x49 0 y+8, Mis sed Commun ity Care A ppointment , care sti ll Active/ Pending: 
  536    Gui, Add,  DropDownL ist, vNVCA pptOpen yp +18 w460,  %blank%
  537      |Vetera n was No-S how for co mmunity ca re appoint ment
  538      |Vetera n Cancelle d communit y care app ointment ( Cancel by  veteran)
  539      |Commun ity Care p rovider ca ncelled ap pointment  (Cancel by  clinic)
  540    Gui, Add,  Text, +Ta bStop  y+8 , Communit y Care app ointment o ccurred (W aiting for  records):  
  541    Gui, Add,  ComboBox,  vNVCApptR esults yp+ 18 w460, % blank%
  542      |Per Ve teran, awa iting reco rds/confir mation.
  543      |Per TP A Portal,  awaiting r ecords.
  544      |Per Pr ovider, aw aiting rec ords.  
  545    Gui, Add,  CheckBox,  y+10 vRRe c1, Record s Received
  546    Gui, Add,  DropDownL ist, vRecH ow1 gInpRe cordsHow y p-4 xp+140  w320, %CC RecordsHow
  547  
  548    Gui, Add,  Checkbox,  vNVCPvt x 490 yp+30,  Veteran d eclined/re fused--usi ng alterna te source  of payment
  549    Gui, Add,  Checkbox,  vNVCDecli ne x490 yp +25, Veter an decline d/refused  community  care
  550    Gui, Add,  Checkbox,  vNVSRefDe cline2  x4 90 yp+25 ,  %DefRP%
  551    
  552   ; Gui, Fon t, %CTBRed %
  553   ; Gui, Add , Text, +T abStop  x4 90 y420 w4 01, %DefFa iled1% %De fFailed2%
  554   ; Gui, Fon t, cDefaul t
  555   ; Gui, Add , Checkbox , vNVSRefD ecline2 w3 70 yp+62,  %DefRP%
  556  
  557    Gui, Tab,  7   ;SAR- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----Tab 7  SAR
  558    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  559    Gui, Add,  Text, +Ta bStop x30  y35, Secon dary Autho rization R equest (SA R)
  560    Gui, Font , %Font9%  cDefault,  Verdana
  561  
  562    Gui, Add,  Text, +Ta bStop x30  yp+24 vCkS ARUrgent,  SAR Urgenc y:
  563    Gui, Add,  ComboBox,  xp+90 yp- 4 vSARUrge ncy, Routi ne
  564       |w/in  72 hrs
  565       |w/in  1 wk
  566       |w/in  1 month
  567  
  568    Gui, Font , %Font9%  cDefault,  Verdana Bo ld
  569    Gui, Add,  Text, +Ta bStop  x30  yp+32, Sa me Provide r authoriz ation and/ or Additio nal Servic es or Visi ts Request ed
  570    
  571    Gui, Font , %Font9%  cDefault,  Verdana
  572    Gui, Add,  Checkbox,  yp+22 vNV SARReqTime ,  Extensi on of curr ent episod e of care  timeframe:
  573    Gui, Add,  Edit, yp- 4 xp+325 w 160 vNVSAR ExtDateReq
  574    Gui, Add,  Text, +Ta bStop  yp+ 4 xp+170,  by:
  575    
  576    Gui, font , %Font7%,  Verdana
  577    ;Gui, Add , Button,  xp+20 yp-4  gSARAdd30 , 30
  578    Gui, Add,  Button, x +5 yp-4 gS ARAdd60, 6 0
  579    Gui, Add,  Button, x +5 gSARAdd 90, 90
  580    Gui, Add,  Button, x +5 gSARAdd 180, 180
  581    
  582    Gui, font , %Font9%,  Verdana
  583    Gui, Add,  text, x+5  yp+4, day s.         Until:
  584    Gui, Add,  DateTime,  vNVSARExt DateReq1 g NVSetSarDa te x+8 yp- 4 w100
  585    
  586    Gui, font , %Font7%  %CTBBlue%,  Verdana
  587    Gui, Add,  Text, +Ta bStop  y+2  x48, prov ide the ti meframe fo r episode  of care in cluding en d date.
  588    Gui, Font , %Font9%  cDefault
  589    Gui, Add,  Checkbox,  x30 y+6 v NVSARReqSv c, Additio nal servic es related  to curren t episode  of care
  590    Gui, font , %Font7%  %CTBBlue%,  Verdana
  591    Gui, Add,  Text, +Ta bStop  y+4  x48, clea rly state  type of se rvice requ ested, num ber and fr equency of  visits, d uration, e tc.
  592    Gui, Font , %Font9%  cDefault
  593    Gui, Add,  Checkbox,  y+6 x30 v NVUnrelate dservice,  Services n ot related  to curren t episode  of care 
  594    Gui, font , %Font7%  %CTBBlue%,  Verdana
  595    Gui, Add,  Text, +Ta bStop  y+4  x48, clea rly state  unrelated  service(s)  requested , number a nd frequen cy of visi ts, durati on, etc.
  596     ;Gui, 1: Add, Text,  +TabStop   yp+32, pr ovide the  timeframe  for author ization in cluding en d date and  clearly s tate type  of service   
  597     ;Gui, 1: Add, Text,  +TabStop   yp+12, re quested, n umber and  frequency  of visits,  duration,  etc.
  598    Gui, font , %Font9%  cDefault,  Verdana
  599    Gui, Add,  Text, +Ta bStop  y+8  x30, SAR  Details of  what was  Requested:
  600    Gui, Add,  Edit, vNV SARRequest ed yp+20 x p+10 r2 w6 00 
  601    Gui, font , %Font9%  cDefault,  Verdana Bo ld
  602    Gui, Add,  Text, +Ta bStop  y+6  xp-10, Ac tions Take n
  603    Gui, font , %Font9%  cDefault,  Verdana
  604    Gui, Add,  Radio, y+ 4 vNVSARAp pr1 gNVSAR ApproveBtn , Approved          ; Approve SA R button
  605    Gui, Add,  Radio, yp +68 vNVSAR Appr2 gNVS ARDisAppro veBtn, Dis approved    ;Disappro ve SAR But ton
  606    
  607    ; Smart B uttons ini tialize
  608    PrevNVSAR ApprB := 0
  609  
  610    Gui, Add,  CheckBox,  vNVSARAdd Visits gNV SARApprove  yp-68 xp+ 90, Additi onal Time:
  611    Gui, Add,  Edit, vNV SARExtDate Apr xp+135  yp-5 w150
  612    Gui, Add,  Checkbox,  xp+160 yp +5 vNVSARA ddServices  gNVSARApp rove, Addi tional Ser vices
  613    Gui, Add,  Checkbox,  xp+160 vN VSARAsRequ ested gNVS ARApprove,  Approved  as req. ab ove
  614    Gui, Add,  Text, +Ta bStop  x60  yp+23, De tails:
  615    Gui, Add,  Edit, xp+ 60 yp-2 vN VSARAppDet ails gNVSA RApprove r 2 w600
  616    Gui, Add,  Checkbox,  yp+49 xp+ 56 gNVSARD isApprove  vNVSARCkNo tCovered,  Not a cove red benefi t
  617    Gui, Add,  Checkbox,  yp+21 vNV SARAtVA gN VSARDisApp rove, Serv ice Availa ble at VA
  618    Gui, Add,  Checkbox,  yp-21 xp+ 190 vNVSAR Reassess g NVSARDisAp prove, Rea ssessment  by VA Prov ider Requi red
  619    Gui, Add,  Checkbox,  yp+21 vNV SAROtherDe ny gNVSARD isApprove,  Other rea son
  620    Gui, Add,  Text, +Ta bStop yp+2 4 x60, Den ial Detail s:
  621    Gui, Add,  Edit, yp- 2 xp+100 v NVSARDenyR eason gNVS ARDisAppro ve r2 w550
  622    Gui, Add,  CheckBox,  x30 yp+46  vIncludeS arLanguage , Include  Standard S AR Authori zation Lan guage
  623    Gui, Add,  Edit, xp  yp+22 w800  r3 vSarVe rbiage
  624    
  625    Gui, Tab,  8   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------T ab 8 Compl etion Effo rts
  626    Gui, font , %Font9%  cDefault,  Verdana Bo ld
  627    Gui, Add,  Text, +Ta bStop  x25  y55, Comp letion Eff orts
  628    
  629    Gui, font , %Font9%  cDefault,  Verdana
  630    Gui, Add,  Radio, vN VCRecReq1  gNVCRecReq Button1, F irst attem pt to get  records
  631    Gui, Add,  Radio, vN VCRecReq2  gNVCRecReq Button2, S econd atte mpt to get  records
  632    Gui, Add,  Radio, vN VCRecReq3  gNVCRecReq Button3, 3 rd attempt  to get re cords
  633    Gui, Add,  Radio, vN VCRecReq4  gNVCRecReq Button4 yp +22, Recor ds rec'd,  forwarded  to medical  records
  634    Gui, Add,  Radio, vN VCRecReq5  gNVCRecReq Button5, N o records  after 3 at tempts
  635    Gui, Add,  DropDownL ist, vRecH ow2 gInpRe cordsHow2  yp-24 xp+3 10 w320, % CCRecordsH ow% 
  636    Gui, Add, Checkbox,  yp+50 x25  vRefAdminC omplete, R efer to cl inical rev iewer for  administra tive compl etion
  637    PrevNVCRe cReqButton  := 0 
  638    
  639    Gui, Tab,  9   ;---- ---------- ---------- ---------- ---------- ---------- ---------- ---------T ab 9 Care  Coordinati on
  640    Gui, Add,  Text, +Ta bStop  y45  x25, Time  spent on  care coord ination:
  641    Gui, Add,  DropDownL ist, xp+21 0 yp-4 w14 0 vTimeSpe nt, Not Ap plicable|1 -15 minute s|15-30 mi nutes|30-6 0 minutes
  642    GuiContro l, Choose,  TimeSpent , % "Not A pplicable"
  643    Gui, Add,  Text, +Ta bStop  x25  yp+29, Ca re Coordin ation Nota tion:
  644    Gui, Add,  Edit, vCa reCoordNot e x25 yp+2 5 w900 r12
  645    Gui, Add, Text, x25  yp+240, Pe rformed wa rm handoff  of this c onsult to:
  646    Gui, Add, Edit, xp+2 80 yp-4 w2 50 vWarmHa ndoff
  647    Gui, Add, Text, x25  yp+40, Sen t alert to :
  648    Gui, Add, Edit, xp+9 0 yp-4 w25 0 vColdHan doff
  649      
  650    Gui, Tab
  651    
  652    ; After t he open re cord was r ead, these  four vari ables have  values
  653    ; TIM_PRE F_FOUND
  654    ; TIM_PRE F_PROPERTY
  655    ; VET_PAC KAGE_PREF_ FOUND
  656    ; VET_PAC KAGE_PREF_ PROPERTY
  657    ; if (FOU ND) then s end PROPER TY to appr opriate co ntrols
  658  
  659    ;Msgbox,  4096,, % " TIM_PREF_F OUND`n  "  . TIM_PREF _FOUND . " `n`nTIM_PR EF_PROPERT Y`n  " . T IM_PREF_PR OPERTY
  660   /* if (TIM _PREF_FOUN D)
  661    {
  662      GuiCont rol, Choos eString, A pptTimePre f, %TIM_PR EF_PROPERT Y%
  663      GuiCont rol, , App tHasTimePr ef, % 0
  664    }
  665    
  666     if (VET_ PACKAGE_PR EF_FOUND)
  667    {
  668      GuiCont rol, Choos eString, P refRPMetho d, %VET_PA CKAGE_PREF _PROPERTY%
  669      GuiCont rol, , CkP refRPMetho d, % 0
  670    }
  671    
  672    if (VET_P REF_PROV_F OUND)
  673      {
  674    GuiContro l, , PtNPI Prov, % 1
  675      }
  676    */
  677    
  678    ; After R eadConsult , these 3  have value s, or null  if not fo und
  679    ; ConVetP kgPref 
  680    ; ConVetA pptTimePre
  681    ; ConVetN otifMethod Pref 
  682    
  683   if (strlen (ConVetPkg Pref) > 2)
  684  
  685      GuiCont rol, Choos eString, P refRPMetho d, %ConVet PkgPref%
  686      GuiCont rol, , CkP refRPMetho d, % 0
  687   }
  688  
  689   if (StrLen (ConVetApp tTimePref)  > 2)
  690   {
  691      GuiCont rol, Choos eString, A pptTimePre f, %ConVet ApptTimePr ef%
  692      GuiCont rol, , App tHasTimePr ef, % 0
  693   }
  694  
  695   if (StrLen (ConVetNot ifMethodPr ef) > 2)
  696   {
  697      GuiCont rol, Choos eString, P refNotific ation, %Co nVetNotifM ethodPref%
  698      GuiCont rol, , CkP refNotific ation, % 0
  699   }
  700     
  701     ;MsgBox  262144,deb ug, %ConPr eviousAppr oval%
  702     
  703   if (StrLen (ConPrevio usApproval ) > 2)
  704   {
  705      GuiCont rol, Choos eString, N VCCProgram , %ConPrev iousApprov al%
  706      ;GuiCon trol, , NV CCApproved , % 0
  707  
  708    
  709  
  710    
  711    ;  These  controls a re initial ly HIDDEN  & Triggere d into vis ibility by  other con trol event s
  712    GuiContro l, Hide, A ltPlanOfCa re
  713    GuiContro l, Hide, D isposition CB
  714    GuiContro l, Hide, D isposition Selected
  715    GuiContro l, Hide, N VCDenied2
  716    GuiContro l, Hide, N VDisappRea son2
  717    
  718    
  719    
  720    ;Gui, Add , Link, x2 5 y575 , %  LinkText
  721    ;Gui, Add , Button,  gNVBtnNVCC  x470 yp+2 5, OK  
  722  
  723   ; Gui, Fon t, %Font8%  
  724   ; Gui, Add , Button,  gAboutBox  x920 yp-10  w60, Sett ings
  725   ;Gui, 1:Ad d, Text, + TabStop  v MyDebugMes sage x550  yp, My mes sage for d ebugging h ere
  726    CCTitle : = "Communi ty Care Co mments - "  . CTBVers ion
  727    Gui, Show , Center,  %CCTitle%
  728    gosub, Cl earAuth
  729    ;Gosub, R eadAuth
  730    gosub, Se tSarVerbia ge
  731    LastTriag e := FindC areCoord(C onsultText )
  732    ;msgbox,  LastTriage  %LastTria ge%
  733    ReadingAu th := 0
  734    GuiContro l, , AuthV isits, % 0
  735    GuiContro l, , NVSpe cialtyType , 1 
  736    GuiContro l, , NVSpe cialtyType , 0  
  737  
  738    Gui, Show
  739    if ((Parm TabColor=1 ) and (Cur rentTab=1) )
  740      PostMes sage, 0x13 33, 0 , 1,  SysTabCon trol321, % CCTitle%
  741  
  742      
  743    GuiContro l, ChooseS tring, COC _Selection , All Serv ice Lines
  744    GoSub, Ch k_COCSelec tion
  745    
  746   if ((A_Now  - LastPin g) > 20000 ) ; check  internet s tatus
  747   {  Interne tConn := p ing("8.8.8 .8")
  748      LastPin g := A_Now  
  749  
  750  
  751   Gosub, Che ckUse   ;  Checkuse i s in the A bout modul e, that up dates the  last time  app was us ed.
  752   Return
  753  
  754   InpRecords How:
  755   GuiControl Get, RecHo w1
  756   RecHow :=  Ttrim(RecH ow1)
  757   if (strlen (RecHow) >  0) 
  758     GuiContr ol,,RRec1,  % 1
  759   else
  760     GuiContr ol, ,RRec1 , % 0
  761   Return
  762  
  763   InpRecords How2:
  764   GuiControl Get, RecHo w2
  765   RecHow :=  Ttrim(RecH ow2)
  766   if (strlen (RecHow) >  0) 
  767     GuiContr ol,, NVCRe cReq4, % 1
  768   else
  769     GuiContr ol,, NVCRe cReq4, % 0
  770   Return
  771  
  772   NewCCTab:
  773   gui, 1:Def ault
  774   PostMessag e, 0x1333,  CurrentTa b-1, 0, Sy sTabContro l321, %CCT itle% 
  775   ControlGet , CurrentT ab, Tab, ,  SysTabCon trol321, % CCTitle%
  776   PostMessag e, 0x1333,  CurrentTa b-1 , 1, S ysTabContr ol321, %CC Title%
  777   if (ParmAu dibleTabs  = 1)
  778   { if (Curr entTab=1)
  779       CTBTal k.Speak("E ligibility ",0x1)
  780     if (Curr entTab=2)
  781       CTBTal k.Speak("A pproval",0 x1)
  782     if (Curr entTab=3)
  783       CTBTal k.Speak("A uthorizati on",0x1)
  784     if (Curr entTab=4)
  785       CTBTal k.Speak("D ee Oh Dee" ,0x1)
  786     if (Curr entTab=5)
  787       CTBTal k.Speak("P atient Con tacts",0x1 )
  788     if (Curr entTab=6)
  789       CTBTal k.Speak("A appointmen t Tracking ",0x1)
  790     if (Curr entTab=7)
  791       CTBTal k.Speak("S econdary,  Authorizat ion Reques ts",0x1)
  792     if (Curr entTab=8)
  793       CTBTal k.Speak("C onn sult C ompletion" ,0x1)
  794     if (Curr entTab=9)
  795       CTBTal k.Speak("C are Coordi nation",0x 1)
  796   }
  797   Return
  798  
  799   /*
  800   ReadAuth:     ; popul ates autho rization w ith prior  data
  801     ReadingA uth := 1
  802     ConSpeci alty := tr im(ConSpec ialty)
  803     if (left (Conspecia lty,6) = " Other:")
  804       Conspe cialty :=  trim(subst r(ConSpeci alty,7,99) )
  805     ;msgbox,  ConSpecia lty
  806     if (strl en(ConSpec ialty) > 1 )
  807     {
  808       GuiCon trol, Choo se, NVSpec ialty, % C onSpecialt y
  809       Gui, 1 :Submit
  810       ;msgbo x, nvSpec  = %NVSpeci alty%
  811       if (st rlen(trim( NVSpecialt y)) < 2)
  812         GuiC ontrol, ,  OthSpecial ty, % ConS pecialty
  813       GuiCon trol, , NV SpecialtyT ype, 1
  814     }
  815     ConServi ceReq := t rim(ConSer viceReq)
  816     if (strl en(ConServ iceReq) >  1 )
  817     {
  818       GuiCon trol, , NV _Procedure , % ConSer viceReq
  819       GuiCon trol, , NV CkSpecialt yType, 1
  820     }     
  821     if (strl en(ConSvcT ype) > 1)
  822     { GuiCon trol, Text , NV_TypeO fService,  % ConSvcTy pe
  823       ;GuiCo ntrol, 3:C hooseStrin g, NV_Type OfService,  % ConSvcT ype
  824     }
  825     ConVisit s := trim( ConVisits)
  826     GuiContr ol, , NVVi sAuth, % C onVisits
  827     Gui, 1:S how
  828   Return
  829   */
  830  
  831   CCSchedule Perf_Smart Button1:
  832   SmartButto n(PrevCCSc hedulePerf Button,"CC Sched",1)
  833   Return
  834  
  835   CCSchedule Perf_Smart Button2:
  836   SmartButto n(PrevCCSc hedulePerf Button,"CC Sched",2)
  837   Return
  838     
  839   CCSchedule Perf_Smart Button3:
  840   SmartButto n(PrevCCSc hedulePerf Button,"CC Sched",3)
  841   Return
  842     
  843   GetSchedul eBy:
  844   {
  845     if (CCSc hed1) 
  846     {   CCSc hedBy := 1
  847         CCSc hedByText  := "VA Sta ff"
  848     }
  849     if (CCSc hed2)
  850     { CCSche dBy := 2
  851       CCSche dByText :=  "HealthNe t"
  852     }
  853     if (CCSc hed3)
  854     { CCSche dBy := 3
  855       CCSche dByText :=  "TriWest"
  856     }    
  857     if ((CCS ched3 = 0)  and (CCSc hed2 = 0)  and (CCSch ed1 = 0)) 
  858     { CCSche dBy := 0
  859       CCSche dByText :=  A_Blank
  860     }    
  861     Return
  862   }   
  863  
  864   Chk_DOS_Ou tside:
  865   ;SmartButt on(PrevCri teriaPerfB utton,"Cri teria",1)
  866  
  867   If (DOS_Ou tside)
  868      {
  869      Gui, 1: Submit, No Hide
  870      GuiCont rol, Hide,  Dispositi onCB
  871      GuiCont rol, Hide,  Dispositi onSelected      
  872  
  873      }
  874      Else
  875      {
  876      Gui, 1: Submit, No Hide
  877      GuiCont rol, Show,  Dispositi onCB
  878      GuiCont rol, Show,  Dispositi onSelected     
  879      }
  880   Return
  881  
  882  
  883     
  884  
  885   NVSARAppro veBtn:
  886   if (PrevNV SARApprB =  1)
  887   { PrevNVSA RApprB :=  0
  888     GuiContr ol, ,NVSAR Appr1, % 0
  889     GoSub, C learSarApp roved
  890   }
  891   else
  892   {  PrevNVS ARApprB :=  1
  893      GuiCont rol, ,NVSA RAppr1, %  1
  894      Gosub,  ClearSarDi sApproved
  895   }
  896   GuiControl , , DebugS AR, % Prev NVSARApprB
  897   Return
  898  
  899   NVSarAppro ve:
  900     GuiContr ol, ,NVSAR Appr1, % 1   
  901     PrevNVSA RApprB :=  1
  902     Gosub, C learSarDis Approved
  903   Return  
  904  
  905   NVSarDisAp prove:
  906     GuiContr ol, ,NVSAR Appr2, % 1   
  907     PrevNVSA RApprB :=  2
  908     Gosub, C learSarApp roved
  909   Return
  910  
  911   NVSARDisAp proveBtn:
  912   if (PrevNV SARApprB =  2)
  913   {  PrevNVS ARApprB :=  0
  914      GuiCont rol, ,NVSA RAppr2, %  0
  915      Gosub,  ClearSarDi sApproved
  916   }
  917   else
  918   { PrevNVSA RApprB :=  2
  919     GuiContr ol, ,NVSAR Appr2, % 1
  920     GoSub, C learSarApp roved
  921   }
  922   GuiControl , , DebugS AR, % Prev NVSARApprB
  923   Return
  924  
  925   ClearSarAp proved:  ; This sub c lears all  entries in  SAR appro ved
  926   GuiControl , , NVSARA ddVisits,  % 0      ; Checkbox S AR Add vis its
  927   GuiControl , , NVSARE xtDateApr,  % ""    ; Edit, time  extention  details
  928   GuiControl , , NVSARA ddServices , % 0    ; Checkbox S AR Add Ser vices
  929   GuiControl , , NVSARA sRequested , % 0    ; Checkbox S AR approve  as req
  930   GuiControl , , NVSARA ppDetails,  % ""    ; Edit SAR a pproval de tails (tex t)
  931   Return
  932  
  933   ClearSarDi sApproved:   ;This su b clears a ll entries  in SAR di sapproved
  934     GuiContr ol, , NVSA RCkNotCove red, % 0
  935     GuiContr ol, , NVSA RAtVA, % 0
  936     GuiContr ol, , NVSA RReassess,  % 0
  937     GuiContr ol, , NVSA ROtherDeny , % 0
  938     GuiContr ol, , NVSA RDenyReaso n, % ""
  939   Return
  940  
  941  
  942   NVCRecReqB utton1:
  943   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",1)
  944   Return
  945  
  946   NVCRecReqB utton2:
  947   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",2)
  948   Return
  949     
  950   NVCRecReqB utton3:
  951   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",3)
  952   Return
  953  
  954   NVCRecReqB utton4:
  955   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",4)
  956   Return
  957  
  958   NVCRecReqB utton5:
  959   SmartButto n(PrevNVCR ecReqButto n,"NVCRecR eq",5)
  960   Return
  961  
  962  
  963  
  964   CkOffWillT ravel:
  965   GuiControl Get, VetWi llTravel
  966   if (Strlen (Trim(VetW illTravel) ) > 0)
  967     GuiContr ol, , CkVe tWillTrave l, % 1
  968   else
  969     GuiContr ol, , CkVe tWillTrave l, % 0
  970   Return  
  971  
  972  
  973   Chk_COCSel ection:
  974   GUIcontrol get, COC_S election
  975   availseocs  := ""
  976   SEOCsToSor t := objec t()
  977   found := 0
  978  
  979   ; Build th e availSeo cs control  list usin g COC_Sele ction
  980   Loop, %SEO Cs_Count%
  981   {
  982   Temporary_ SEOCName : = SeocSet2 [A_Index]. seoc.name
  983   Temporary_ CategoryOf Care := Se ocSet2[A_I ndex].seoc .ServiceLi ne
  984  
  985   if (COC_Se lection =  Temporary_ CategoryOf Care)
  986     {
  987       found+ +
  988       SEOCsT oSort[foun d] := Temp orary_SEOC Name
  989       ;avail Seocs .= " |" . Tempo rary_SEOCN ame
  990     }  ; END  if
  991   } ;  END L oop, %SEOC s_Count%
  992  
  993   ; Build av ailSeocs f or All Ava ilable SEO Cs
  994   if (COC_Se lection =  "All Servi ce Lines")
  995   Loop, %SEO Cs_Count%
  996   {
  997     Temporar y_SEOCName  := SeocSe t2[A_Index ].seoc.nam e
  998     found++
  999     SEOCsToS ort[found]  := Tempor ary_SEOCNa me
  1000     ;Tempora ry_Categor yOfCare :=  SeocSet2[ A_Index].s eoc.catego ryOfCare
  1001     ;availSe ocs .= "|"  . Tempora ry_SEOCNam e
  1002   }
  1003  
  1004   ; Store th e variable  found in  NumberOfSE OCsToDispl ay
  1005   NumberOfSE OCsToDispl ay := foun d
  1006    
  1007   ;  BUBBLE  SORT  SEOC sToSort[]
  1008     Loop {
  1009        hasCh anged := 0
  1010        found  := found- 1
  1011        Loop,  %found%
  1012        { ;Ms gBox 26214 4,, Inside  Loop 2
  1013          If  (SEOCsToSo rt[A_Index ] > SEOCsT oSort[A_In dex+1])
  1014          {
  1015                 TempVar  := SEOCsT oSort[A_In dex]
  1016                 SEOCsTo Sort[A_Ind ex] := SEO CsToSort[A _Index+1]
  1017                 SEOCsTo Sort[A_Ind ex+1] := T empVar
  1018                 hasChan ged := 1
  1019           }   ; END If  (SEOCsToSo rt[A_Index ] > SEOCsT oSort[A_In dex+1])
  1020         }  ;  END Loop,  %found%
  1021       } Unti l (hasChan ged = 0)
  1022   Loop, %Num berOfSEOCs ToDisplay%
  1023    { 
  1024      availSe ocs .= "|"  . SEOCsTo Sort[A_Ind ex]
  1025    }
  1026   availSeocs  := tTrim( AvailSeocs )
  1027   ;msgbox 26 2144,, the  list avai lseocs equ als %avail seocs%
  1028   GuiControl , , SEOC_S election,  %availSeoc s% 
  1029   Return
  1030  
  1031  
  1032  
  1033  
  1034   GetRemoteS EOCs:
  1035   Troublesho ot := 0
  1036   flag := 0
  1037   ;SEOC_Url  := "http:/ /localhost :8080/seoc s" ; About Box.ahk, L ine # 215
  1038  
  1039     httpresu lt := 0 
  1040       ;ParmSEOC_ URL2 := "h ttp:// IP                   /v1/seoc"
  1041     HTTPREQU EST_SETCRE DENTIALS_F OR_SERVER  := 0
  1042     HTTPREQU EST_SETCRE DENTIALS_F OR_PROXY : = 1
  1043     try
  1044     {
  1045       whr.Se tTimeouts( 5000,3000, 3000,5000)  ; msec to  resolve,  connect, s end, recei ve http
  1046       temp : = whr.Open ("GET", Pa rmSEOC_Url , false)                    
  1047       whr.Se tAutoLogon Policy(0)
  1048       whr.Se tRequestHe ader("User -Agent", " Mozilla/4. 0 (compati ble; MSIE  6.0; Windo ws NT 5.0) ")
  1049       whr.Se nd() 
  1050       whr.Wa itForRespo nse()
  1051       SEOC_R esponse :=  whr.Respo nseText
  1052           if  (troubles hoot = 1)   ; set tro ubleshoot  in lists.a hk
  1053       { ;Msg Box 262144 ,, Interne t Object O pen return s %temp% 
  1054         ;msg box 262144 ,, Reading  SEOC: %SE OC_respons e%  Tested  works
  1055       }
  1056       SEOC_R esponse :=  trim(SEOC _Response)  
  1057       parsed _SEOC := J SON.Load(S EOC_Respon se) ; pars e the resu lt into an  array
  1058       SEOCSe t2 := pars ed_SEOC.SE OCS
  1059       SEOCs_ Count := S eocSet2.le ngth()
  1060       flag : = 1  ; let 's look an d see if s eocs look  valid
  1061       if (SE OCs_Count  = 0)
  1062         flag  := 0  ; n ot enough  seocs
  1063       if (St rlen(SeocS et2[3].seo c.category OfCare) <  10)
  1064         flag  := 0  ; n o category  of care f ound
  1065       if (st rlen(SeocS et2[5].seo c.serviceL ine) < 2)
  1066         flag  := 0  ; n o service  line found
  1067     }
  1068     catch er r
  1069     {
  1070       flag : = 0  ; we  failed to  load from  web
  1071           if  (troubles hoot = 1)
  1072           {  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 "
  1073         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
  1074              ;msgbox, ,  Unable to  reach SEO C server,  using loca l copy.
  1075           }
  1076       ; this  would be  a good pla ce to gosu b backup f ile   
  1077     }
  1078  
  1079     if (flag =1) ; then  SEOC file  loaded an d appears  valid
  1080       Gosub,  UpdateLoc alSEOCFile  ;Yes, sav e local co py
  1081     else
  1082       Gosub,  LoadLocal SEOCFile ; No, load l ocal copy
  1083  
  1084   ;msgbox %  Found SEOC s_Count SE OCS
  1085   Categories OfCare :=  Object()
  1086   ServiceLin es := Obje ct()
  1087  
  1088   ; Assignin g Array of  ALL Categ ories of C ARE & Serv iceLines
  1089   Loop, %SEO Cs_Count%
  1090     {
  1091     ServiceL ines_Temp  := SeocSet 2[A_Index] .seoc.Serv iceLine
  1092     Temp :=  SeocSet2[A _Index].se oc.categor yOfCare
  1093     Categori esOfCare[A _Index] :=  Temp
  1094     ServiceL ines[A_Ind ex] := Ser viceLines_ Temp
  1095     Index :=  A_Index   ; Index is  just a ba ck-up of C ategoriesO fCare_Coun t
  1096     }
  1097  
  1098   ;  This wo rks  
  1099   Categories OfCare_Cou nt := Cate goriesOfCa re.length( )
  1100     
  1101     
  1102   ; Displayi ng Array o f ALL Cate gories of  CARE
  1103   Loop, %Cat egoriesOfC are_Count%  
  1104     {
  1105     Temp :=  Categories OfCare[A_I ndex]
  1106     if (A_In dex < 0)
  1107       MsgBox  262144,,  Category o f Care %A_ Index% is  %Temp%
  1108     }
  1109     
  1110     
  1111   ;  BUBBLE  SORT  
  1112     Loop {
  1113        ;MsgB ox 262144, , Inside L oop 1
  1114        hasCh anged := 0
  1115        Categ oriesOfCar e_Count :=  Categorie sOfCare_Co unt-1
  1116        Loop,  %Categori esOfCare_C ount%
  1117            {
  1118           ;M sgBox 2621 44,, Insid e Loop 2
  1119           If  (Categori esOfCare[A _Index] >  Categories OfCare[A_I ndex+1])
  1120                      {
  1121                 TempVar  := Catego riesOfCare [A_Index]
  1122                 Categor iesOfCare[ A_Index] : = Categori esOfCare[A _Index+1]
  1123                 Categor iesOfCare[ A_Index+1]  := TempVa r
  1124                 hasChan ged := 1
  1125              }  ; END I f (Categor iesOfCare[ A_Index] >  Categorie sOfCare[A_ Index+1])
  1126         }  ;  END Loop,  Categorie sOfCare_Co unt
  1127     
  1128       } Unti l (hasChan ged = 0)
  1129     
  1130   ServiceLin es_Count : = ServiceL ines.lengt h()
  1131  
  1132   ;  BUBBLE  SORT  
  1133     Loop {
  1134        ;MsgB ox 262144, , Inside L oop 1
  1135        hasCh anged := 0
  1136            S erviceLine s_Count :=  ServiceLi nes_Count- 1
  1137            L oop, %Serv iceLines_C ount%
  1138            {
  1139                ;MsgBox  262144,, I nside Loop  2
  1140                If (Serv iceLines[A _Index] >  ServiceLin es[A_Index +1])
  1141                      {
  1142                          TempVar : = ServiceL ines[A_Ind ex]
  1143                              Servi ceLines[A_ Index] :=  ServiceLin es[A_Index +1]
  1144                              Servi ceLines[A_ Index+1] : = TempVar
  1145                              hasCh anged := 1                    
  1146                      }   ; END If  (ServiceLi nes[A_Inde x] > Servi ceLines[A_ Index+1])
  1147            
  1148            }   ; END Lo op, Servic eLines_Cou nt
  1149     
  1150       } Unti l (hasChan ged = 0)    
  1151     
  1152     
  1153   ; REMOVING  Duplicate s in Array
  1154   testcat :=  ""
  1155   Categories OfCare_Cou nt := Cate goriesOfCa re.length( )
  1156   ;MsgBox 26 2144,Categ ories of C are Count  Before, Ca tegoriesOf Care_Count  = %Catego riesOfCare _Count%
  1157  
  1158   Temporary  := "starti ng"
  1159   mycatchoic es := ""
  1160   Loop, %Cat egoriesOfC are_Count%
  1161     { 
  1162       ;msgbo x, 4096, C ats of Car e %A_Index %, % Categ oriesOfCar e[A_Index] , 1
  1163       if (Ca tegoriesOf Care[A_Ind ex] = Temp orary)
  1164              Categories OfCare.Rem oveAt[A_In dex]
  1165           el se
  1166       { Temp orary := C ategoriesO fCare[A_In dex]
  1167              if (strlen (trim(Temp orary)) >  0)
  1168              mycatchoic es .= "|"  . Temporar y
  1169           }
  1170           if  (A_Index  < 0)
  1171              msgbox % m ycatchoice s
  1172     }
  1173     ;msgbox,  4096, Fin shed Choic es, %mycat choices%
  1174  
  1175   mycatchoic es .= "|OT HER"
  1176     
  1177   ; REMOVING  Duplicate s in Array
  1178   test_sl :=  "testsl"
  1179   ServiceLin es_Count : = ServiceL ines.lengt h()
  1180   myServiceL inechoices  := "All S ervice Lin es"
  1181   ;MsgBox 26 2144,SERVI CE LINES C ount Befor e, Service Lines_Coun t = %Servi ceLines_Co unt%
  1182   Loop, %Ser viceLines_ Count%
  1183     {  
  1184       if (Se rviceLines [A_Index]  = test_sl)
  1185              ServiceLin es.RemoveA t(A_Index)
  1186           el se
  1187       { test _sl := Ser viceLines[ A_Index]
  1188              myServiceL inechoices  .= "|" .  test_sl
  1189             
  1190           }
  1191     }     
  1192     ;msgbox  % myServic eLinechoic es
  1193  
  1194   Return 
  1195  
  1196  
  1197   ; SQA API  Calls
  1198  
  1199   GetListsFr omURL:
  1200  
  1201   ;SL:
  1202   ServiceLin e_URL := " http:// IP                   /v1/lookup /serviceli ne"
  1203    
  1204   ;CoC:
  1205   CategoryOf Care_URL : = "http:// IP                   /v1/lookup /categoryo fcare"
  1206  
  1207      temp :=  whr.Open( "GET", Ser viceLine_U RL, false)                    
  1208       whr.Se tAutoLogon Policy(0)
  1209       whr.Se tRequestHe ader("User -Agent", " Mozilla/4. 0 (compati ble; MSIE  6.0; Windo ws NT 5.0) ")
  1210       whr.Se nd() 
  1211       whr.Wa itForRespo nse()
  1212       API_SL _Response  := whr.Res ponseText
  1213           Ms gBox 26214 4, Return  Values, %A PI_SL_Resp onse%
  1214  
  1215      temp :=  whr.Open( "GET", Cat egoryOfCar e_URL, fal se)                    
  1216       whr.Se tAutoLogon Policy(0)
  1217       whr.Se tRequestHe ader("User -Agent", " Mozilla/4. 0 (compati ble; MSIE  6.0; Windo ws NT 5.0) ")
  1218       whr.Se nd() 
  1219       whr.Wa itForRespo nse()
  1220       API_Co C_Response  := whr.Re sponseText
  1221           Ms gBox 26214 4, Return  Values, %A PI_CoC_Res ponse%         
  1222  
  1223   Return  
  1224  
  1225   LoadLocalS EOCFile:
  1226   SeocFName  := A_AppDa ta . "\Con sultToolbo x\SeocLoca l.seoc"
  1227   troublesho otSEOCFile  := 0
  1228   ;msgbox, t roublshoot ing
  1229   if (troubl eshootSEOC File > 0)
  1230     msgbox,  Local Seoc  file Name : %SeocFNa me%
  1231   FileGetTim e, localfi ledate, %S eocFName%
  1232   fSeoc := f ileopen(Se ocFName,"r ")
  1233   SeocLocalJ son := fSe oc.Read()
  1234   fSeoc.Clos e()
  1235   if ((IsObj ect(fSeoc) ) and (str len(SeocLo calJson) >  100)) ; w e got some thing
  1236   { ;lets to  a little  checking t o make sur e it looks  valid
  1237     ;trouble box("SeocL ocalJson`n " . SeocLo calJson)
  1238     SEOC_Res ponse := t rim(SeocLo calJson) 
  1239     parsed_S EOC := JSO N.Load(SEO C_Response ) ; parse  the result  into an a rray
  1240     tstr :=  "JSON loca l file Rea d, then ex ported`n`n " . json.d ump(parsed _SEOC,,4)
  1241     troubleb ox(tstr)
  1242     SEOCSet2  := parsed _SEOC.SEOC S
  1243     tstr :=  json.dump( SEOCSet2,, 4)
  1244     ;trouble box(tstr)
  1245     SEOCs_Co unt := Seo cSet2.leng th()
  1246     flag :=  1
  1247     if (SEOC s_Count =  0)
  1248       flag : = 0  ; not  enough se ocs
  1249     if (Strl en(SeocSet 2[3].seoc. categoryOf Care) < 10 )
  1250       flag : = 0  ; no  category o f care fou nd
  1251     if (strl en(SeocSet 2[5].seoc. serviceLin e) < 2)
  1252       flag : = 0  ; no  service li ne found
  1253     ;trouble box("Testi ng Local R ead, Flag  = " . flag )     
  1254     if (flag  = 0)
  1255     {
  1256        msgbo x, 4096, N o SEOC's A vailable,  Unable to  load any S EOC Data,  5
  1257        SeocS et2 := []    ; clear  structure
  1258        parse d_SEOC :=  []
  1259     }     
  1260     else
  1261     { 
  1262       if (st rlen(LastC heckedSEOC s < 5)) ;  initializi ng first t ime
  1263       {
  1264         tstr  := "Unabl e to conne ct to SEOC  database,  using loc al copy.`n `n"
  1265         tstr  .= "Loade d " . SEOC s_Count .  " SEOCS`n"
  1266         form attime, lo calfiledat e, %localf iledate%,  M/d/yyyy h :mm 
  1267         tstr  .= "This  SEOC data  was last u pdated: "  . localfil edate . ". "
  1268         ; si nce local  load for 1 st time, i nform user  data is l ocal
  1269         msgb ox, 4096,  SEOC Datab ase Unavai lable, %ts tr%, 3
  1270       }  
  1271     }    
  1272   }
  1273   return
  1274  
  1275   UpdateLoca lSEOCFile:
  1276  
  1277     tstr :=  json.dump( parsed_SEO C,,4)
  1278     ;trouble box("Savin g local Co py`n" . ts tr)
  1279     SeocFNam e := A_App Data . "\C onsultTool box\SeocLo cal.seoc"
  1280  
  1281     ;trouble box(SeocFN ame)
  1282     fSeoc :=  fileopen( SeocFName, "w `n")
  1283     if (isob ject(fseoc ))
  1284     {
  1285       fSeoc. Write(tstr )
  1286       fSeoc. Close()
  1287       troubl ebox("Loca l Copy Sav ed")
  1288     }
  1289     Return
  1290   }