DG53644P ;BPFO/JRC - Home Telehealth Patient POST Install;10 January 2005 ; 4/8/08 10:02am
;;5.3;Registration;**644**;Aug 13, 1993;Build 11
;
EN ;Main entry point
;Init variables
N VIEIP,LINK,DGARRAY,SITE,FLAG,RESPONSE
S DGARRAY="^TMP(""DGHT"",$J,""IPARRAY"")"
S SITE=+$P($$SITE^VASITE(),U,3),(LINK,RESPONSE)=0
;
;Setup ip address array
D ARRAY
;
;Resolve ip address to use
S VIEIP="",VIEIP=$O(@DGARRAY@(SITE,VIEIP))
;
;No ip address resolved, enter manually? if flag = 1 abort
I VIEIP="" D ASKYN I 'RESPONSE D ERRMSG K @DGARRAY Q
;
;If response = 1, enter ip adress manually if flag = 1 abort
I RESPONSE S VIEIP=0 D ASKIP I 'VIEIP D ERRMSG K @DGARRAY Q
;
;Order thru HL Logical Link file and retrieve IEN for 'DGHT' Link
S LINK=$O(^HLCS(870,"B","DG HTH",LINK))
;
;If DG HTH logical link not found display message and quit
I 'LINK K @DGARRAY D ERRMSG Q
;
;Update HL Logical Link file (#870)
D BMES^XPDUTL("DG HTH Logical Link has been found ")
D BMES^XPDUTL("Updating IP Address field (#400.01) ")
I VIEIP D
.;Prepare DIE filer call
.N DGHFDA,DGHERR
.S DGHFDA(870,LINK_",",400.01)=VIEIP
.D FILE^DIE("EK","DGHFDA","DGHERR")
.I $D(DGHERR) D ERRMSG Q
.D BMES^XPDUTL("DG HTH Logical Link ip address updated successfully. ")
D MENUS
Q
;
ARRAY ;Set VIE IP Address Array
;Input : DGARRAY - ip address array
;Output : VIE ip address array
; @DGARRAY@(station,VieIpAddress) = ""
N OFF,TEXT,STATION,IP
F OFF=1:1 S TEXT=$P($T(TABLE+OFF),";;",2) Q:TEXT="END" D
.S STATION=$P(TEXT,"^",1),IP=$P(TEXT,"^",2)
.I STATION=""!(IP="") Q
.S @DGARRAY@(STATION,IP)=""
Q
;
ASKIP ;Prompt user for VIE IP address
N DIR,DIRUT,X,Y
S DIR(0)="F^^K:X'?1.3N1"".""1.3N1"".""1.3N1"".""1.3N X"
S DIR("?",1)="Enter a valid IP address using the following format: nnn.nnn.nnn.nnn"
S DIR("?")="Or '??' for a list of available station numbers & IP addresses."
S DIR("??")="^D VIEHELP^DG53644P"
S DIR("A")="Enter local VIE IP address"
D ^DIR
I $D(DIRUT) Q
S VIEIP=Y
Q
;
VIEHELP ;Help text listing Local VIE address"
N OFF,TEXT,IP
F OFF=1:1 S TEXT=$P($T(TABLE+OFF),";;",2) Q:TEXT="END" D
.S STATION=$P(TEXT,"^",1),IP=$P(TEXT,"^",2)
.I STATION=""!(IP="") Q
.W ?3,STATION,?12,IP,!
Q
ASKYN ;Ask user if they want to enter IP address manually
N DIR,DIRUT,X,Y
S DIR(0)="Y"
S DIR("A",1)="Unable to resolve VIE IP address."
S DIR("A")="Would you like to enter it manually"
D ^DIR
I $D(DIRUT)!('Y) S FLAG=1 Q
S RESPONSE=Y
Q
;
ERRMSG ;Problem encountered updating IP address notify user
D BMES^XPDUTL("DG HTH Logical Link's IP address was not updated. ")
D MES^XPDUTL("See patch description for instructions on how ")
D MES^XPDUTL("to update the IP address at a later time. ")
Q
;
N OPTION,MENU,TEXT
;Delete HTH main menu from registration options.
S OPTION="DGHT HOME TELEHEALTH"
F MENU="DG REGISTRATION MENU","DG SUPERVISOR MENU" D
.D DELETE^XPDMENU(MENU,OPTION)
D BMES^XPDUTL("Implementation of HTH requires OCC coordination/approval; hence the following")
D BMES^XPDUTL("list of HTH menu options have been placed out of order by the installation.")
S OPTION="",TEXT="Activation of option requires OCC approval."
F OPTION="DGHT HOME TELEHEALTH","DGHT PATIENT SIGNUP","DGHT PATIENT INACTIVATION","DGHT SUMMARY REPORT","DGHT TRANSMISSION REPORT" D
.D OUT^XPDMENU(OPTION,TEXT)
.D BMES^XPDUTL("["_OPTION_"]")
Q
TABLE ;VIE IP address array table syntax - station ^ vie ip
;;516^127.0.0.16
;;660^127.0.0.14
;;657^127.0.0.13
;;613^127.0.0.16
;;528^127.0.0.15
;;HEC^127.0.0.13
;;528^127.0.0.19
;;HEC^127.0.0.18
;;688^127.0.0.18
;;518^127.0.0.14
;;523^127.0.0.19
;;650^127.0.0.10
;;689^127.0.0.17
;;580^127.0.0.16
;;517^127.0.0.14
;;608^127.0.0.13
;;561^127.0.0.15
;;503^127.0.0.17
;;558^127.0.0.14
;;402^127.0.0.19
;;620^127.0.0.10
;;529^127.0.0.10
;;589^127.0.0.14
;;526^127.0.0.15
;;512^127.0.0.15
;;637^127.0.0.14
;;540^127.0.0.13
;;542^127.0.0.10
;;674^127.0.0.10
;;671^127.0.0.17
;;504^127.0.0.11
;;630^127.0.0.15
;;405^127.0.0.13
;;562^127.0.0.17
;;659^127.0.0.12
;;632^127.0.0.10
;;595^127.0.0.15
;;460^127.0.0.10
;;565^127.0.0.10
;;658^127.0.0.14
;;646^127.0.0.16
;;590^127.0.0.19
;;509^127.0.0.15
;;521^127.0.0.14
;;534^127.0.0.15
;;631^127.0.0.14
;;693^127.0.0.10
;;652^127.0.0.10
;;544^127.0.0.10
;;557^127.0.0.14
;;673^127.0.0.15
;;642^127.0.0.16
;;619^127.0.0.13
;;679^127.0.0.18
;;573^127.0.0.14
;;672^127.0.0.18
;;546^127.0.0.19
;;581^127.0.0.13
;;596^127.0.0.13
;;614^127.0.0.14
;;757^127.0.0.16
;;548^127.0.0.19
;;603^127.0.0.13
;;626^127.0.0.13
;;538^127.0.0.19
;;621^127.0.0.13
;;539^127.0.0.16
;;583^127.0.0.14
;;541^127.0.0.19
;;610^127.0.0.10
;;552^127.0.0.19
;;550^127.0.0.13
;;506^127.0.0.14
;;695^127.0.0.18
;;515^127.0.0.15
;;537^127.0.0.13
;;676^127.0.0.12
;;553^127.0.0.14
;;578^127.0.0.14
;;556^127.0.0.18
;;607^127.0.0.15
;;655^127.0.0.18
;;502^127.0.0.19
;;598^127.0.0.16
;;586^127.0.0.17
;;585^127.0.0.17
;;520^127.0.0.14
;;564^127.0.0.16
;;623^127.0.0.18
;;629^127.0.0.19
;;635^127.0.0.18
;;667^127.0.0.12
;;519^127.0.0.13
;;501^127.0.0.14
;;644^127.0.0.10
;;442^127.0.0.19
;;756^127.0.0.14
;;649^127.0.0.15
;;554^127.0.0.14
;;436^127.0.0.18
;;678^127.0.0.18
;;575^127.0.0.15
;;654^127.0.0.11
;;640^127.0.0.18
;;459^127.0.0.14
;;612^127.0.0.13
;;666^127.0.0.18
;;531^127.0.0.16
;;648^127.0.0.19
;;663^127.0.0.10
;;653^127.0.0.17
;;668^127.0.0.14
;;463^127.0.0.13
;;687^127.0.0.17
;;692^127.0.0.12
;;358^127.0.0.13
;;570^127.0.0.10
;;662^127.0.0.19
;;605^127.0.0.11
;;593^127.0.0.14
;;618^127.0.0.19
;;ALBANY^127.0.0.10
;;600^127.0.0.14
;;ALBANY CS LAB^127.0.0.15
;;SILVER SPRING^127.0.0.12
;;664^127.0.0.13
;;691^127.0.0.18
;;508^127.0.0.14
;;HDR AAC^127.0.0.13
;;HDR AAC^127.0.0.18
;;AAC^127.0.0.13
;;AAC^127.0.0.13
;;BAY PINES OIFO^127.0.0.18
;;HINES OIFO^127.0.0.13
;;BIRMINGHAM OIFO^127.0.0.15
;;SALT LAKE OIFO^127.0.0.16
;;BAY PINES OIFO IV&V TEST LAB^127.0.0.15
;;HINES OIFO EMC DATA CENTER^127.0.0.18
;;HAC^127.0.0.12
;;HAC^127.0.0.12
;;IE Team - Dev & Test^127.0.0.10
;;EMC Data Center^127.0.0.13
;;IE Team - Dev & Test^127.0.0.10
;;MPI^127.0.0.18
;;CMOP^127.0.0.13
;;CMOP^127.0.0.17
;;CMOP^127.0.0.17
;;CMOP^127.0.0.14
;;636^127.0.0.14
;;CMOP^127.0.0.14
;;CMOP^127.0.0.14
;;CMOP^127.0.0.18
;;549^127.0.0.15
;;ARC^127.0.0.18
;;PLANO TEST SERVER^127.0.0.19
;;541^127.0.0.15
;;END
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG53644P 6724 printed Dec 13, 2024@02:38 Page 2
DG53644P ;BPFO/JRC - Home Telehealth Patient POST Install;10 January 2005 ; 4/8/08 10:02am
+1 ;;5.3;Registration;**644**;Aug 13, 1993;Build 11
+2 ;
EN ;Main entry point
+1 ;Init variables
+2 NEW VIEIP,LINK,DGARRAY,SITE,FLAG,RESPONSE
+3 SET DGARRAY="^TMP(""DGHT"",$J,""IPARRAY"")"
+4 SET SITE=+$PIECE($$SITE^VASITE(),U,3)
SET (LINK,RESPONSE)=0
+5 ;
+6 ;Setup ip address array
+7 DO ARRAY
+8 ;
+9 ;Resolve ip address to use
+10 SET VIEIP=""
SET VIEIP=$ORDER(@DGARRAY@(SITE,VIEIP))
+11 ;
+12 ;No ip address resolved, enter manually? if flag = 1 abort
+13 IF VIEIP=""
DO ASKYN
IF 'RESPONSE
DO ERRMSG
KILL @DGARRAY
QUIT
+14 ;
+15 ;If response = 1, enter ip adress manually if flag = 1 abort
+16 IF RESPONSE
SET VIEIP=0
DO ASKIP
IF 'VIEIP
DO ERRMSG
KILL @DGARRAY
QUIT
+17 ;
+18 ;Order thru HL Logical Link file and retrieve IEN for 'DGHT' Link
+19 SET LINK=$ORDER(^HLCS(870,"B","DG HTH",LINK))
+20 ;
+21 ;If DG HTH logical link not found display message and quit
+22 IF 'LINK
KILL @DGARRAY
DO ERRMSG
QUIT
+23 ;
+24 ;Update HL Logical Link file (#870)
+25 DO BMES^XPDUTL("DG HTH Logical Link has been found ")
+26 DO BMES^XPDUTL("Updating IP Address field (#400.01) ")
+27 IF VIEIP
Begin DoDot:1
+28 ;Prepare DIE filer call
+29 NEW DGHFDA,DGHERR
+30 SET DGHFDA(870,LINK_",",400.01)=VIEIP
+31 DO FILE^DIE("EK","DGHFDA","DGHERR")
+32 IF $DATA(DGHERR)
DO ERRMSG
QUIT
+33 DO BMES^XPDUTL("DG HTH Logical Link ip address updated successfully. ")
End DoDot:1
+34 DO MENUS
+35 QUIT
+36 ;
ARRAY ;Set VIE IP Address Array
+1 ;Input : DGARRAY - ip address array
+2 ;Output : VIE ip address array
+3 ; @DGARRAY@(station,VieIpAddress) = ""
+4 NEW OFF,TEXT,STATION,IP
+5 FOR OFF=1:1
SET TEXT=$PIECE($TEXT(TABLE+OFF),";;",2)
if TEXT="END"
QUIT
Begin DoDot:1
+6 SET STATION=$PIECE(TEXT,"^",1)
SET IP=$PIECE(TEXT,"^",2)
+7 IF STATION=""!(IP="")
QUIT
+8 SET @DGARRAY@(STATION,IP)=""
End DoDot:1
+9 QUIT
+10 ;
ASKIP ;Prompt user for VIE IP address
+1 NEW DIR,DIRUT,X,Y
+2 SET DIR(0)="F^^K:X'?1.3N1"".""1.3N1"".""1.3N1"".""1.3N X"
+3 SET DIR("?",1)="Enter a valid IP address using the following format: nnn.nnn.nnn.nnn"
+4 SET DIR("?")="Or '??' for a list of available station numbers & IP addresses."
+5 SET DIR("??")="^D VIEHELP^DG53644P"
+6 SET DIR("A")="Enter local VIE IP address"
+7 DO ^DIR
+8 IF $DATA(DIRUT)
QUIT
+9 SET VIEIP=Y
+10 QUIT
+11 ;
VIEHELP ;Help text listing Local VIE address"
+1 NEW OFF,TEXT,IP
+2 FOR OFF=1:1
SET TEXT=$PIECE($TEXT(TABLE+OFF),";;",2)
if TEXT="END"
QUIT
Begin DoDot:1
+3 SET STATION=$PIECE(TEXT,"^",1)
SET IP=$PIECE(TEXT,"^",2)
+4 IF STATION=""!(IP="")
QUIT
+5 WRITE ?3,STATION,?12,IP,!
End DoDot:1
+6 QUIT
ASKYN ;Ask user if they want to enter IP address manually
+1 NEW DIR,DIRUT,X,Y
+2 SET DIR(0)="Y"
+3 SET DIR("A",1)="Unable to resolve VIE IP address."
+4 SET DIR("A")="Would you like to enter it manually"
+5 DO ^DIR
+6 IF $DATA(DIRUT)!('Y)
SET FLAG=1
QUIT
+7 SET RESPONSE=Y
+8 QUIT
+9 ;
ERRMSG ;Problem encountered updating IP address notify user
+1 DO BMES^XPDUTL("DG HTH Logical Link's IP address was not updated. ")
+2 DO MES^XPDUTL("See patch description for instructions on how ")
+3 DO MES^XPDUTL("to update the IP address at a later time. ")
+4 QUIT
+5 ;
+1 NEW OPTION,MENU,TEXT
+2 ;Delete HTH main menu from registration options.
+3 SET OPTION="DGHT HOME TELEHEALTH"
+4 FOR MENU="DG REGISTRATION MENU","DG SUPERVISOR MENU"
Begin DoDot:1
+5 DO DELETE^XPDMENU(MENU,OPTION)
End DoDot:1
+6 DO BMES^XPDUTL("Implementation of HTH requires OCC coordination/approval; hence the following")
+7 DO BMES^XPDUTL("list of HTH menu options have been placed out of order by the installation.")
+8 SET OPTION=""
SET TEXT="Activation of option requires OCC approval."
+9 FOR OPTION="DGHT HOME TELEHEALTH","DGHT PATIENT SIGNUP","DGHT PATIENT INACTIVATION","DGHT SUMMARY REPORT","DGHT TRANSMISSION REPORT"
Begin DoDot:1
+10 DO OUT^XPDMENU(OPTION,TEXT)
+11 DO BMES^XPDUTL("["_OPTION_"]")
End DoDot:1
+12 QUIT
TABLE ;VIE IP address array table syntax - station ^ vie ip
+1 ;;516^127.0.0.16
+2 ;;660^127.0.0.14
+3 ;;657^127.0.0.13
+4 ;;613^127.0.0.16
+5 ;;528^127.0.0.15
+6 ;;HEC^127.0.0.13
+7 ;;528^127.0.0.19
+8 ;;HEC^127.0.0.18
+9 ;;688^127.0.0.18
+10 ;;518^127.0.0.14
+11 ;;523^127.0.0.19
+12 ;;650^127.0.0.10
+13 ;;689^127.0.0.17
+14 ;;580^127.0.0.16
+15 ;;517^127.0.0.14
+16 ;;608^127.0.0.13
+17 ;;561^127.0.0.15
+18 ;;503^127.0.0.17
+19 ;;558^127.0.0.14
+20 ;;402^127.0.0.19
+21 ;;620^127.0.0.10
+22 ;;529^127.0.0.10
+23 ;;589^127.0.0.14
+24 ;;526^127.0.0.15
+25 ;;512^127.0.0.15
+26 ;;637^127.0.0.14
+27 ;;540^127.0.0.13
+28 ;;542^127.0.0.10
+29 ;;674^127.0.0.10
+30 ;;671^127.0.0.17
+31 ;;504^127.0.0.11
+32 ;;630^127.0.0.15
+33 ;;405^127.0.0.13
+34 ;;562^127.0.0.17
+35 ;;659^127.0.0.12
+36 ;;632^127.0.0.10
+37 ;;595^127.0.0.15
+38 ;;460^127.0.0.10
+39 ;;565^127.0.0.10
+40 ;;658^127.0.0.14
+41 ;;646^127.0.0.16
+42 ;;590^127.0.0.19
+43 ;;509^127.0.0.15
+44 ;;521^127.0.0.14
+45 ;;534^127.0.0.15
+46 ;;631^127.0.0.14
+47 ;;693^127.0.0.10
+48 ;;652^127.0.0.10
+49 ;;544^127.0.0.10
+50 ;;557^127.0.0.14
+51 ;;673^127.0.0.15
+52 ;;642^127.0.0.16
+53 ;;619^127.0.0.13
+54 ;;679^127.0.0.18
+55 ;;573^127.0.0.14
+56 ;;672^127.0.0.18
+57 ;;546^127.0.0.19
+58 ;;581^127.0.0.13
+59 ;;596^127.0.0.13
+60 ;;614^127.0.0.14
+61 ;;757^127.0.0.16
+62 ;;548^127.0.0.19
+63 ;;603^127.0.0.13
+64 ;;626^127.0.0.13
+65 ;;538^127.0.0.19
+66 ;;621^127.0.0.13
+67 ;;539^127.0.0.16
+68 ;;583^127.0.0.14
+69 ;;541^127.0.0.19
+70 ;;610^127.0.0.10
+71 ;;552^127.0.0.19
+72 ;;550^127.0.0.13
+73 ;;506^127.0.0.14
+74 ;;695^127.0.0.18
+75 ;;515^127.0.0.15
+76 ;;537^127.0.0.13
+77 ;;676^127.0.0.12
+78 ;;553^127.0.0.14
+79 ;;578^127.0.0.14
+80 ;;556^127.0.0.18
+81 ;;607^127.0.0.15
+82 ;;655^127.0.0.18
+83 ;;502^127.0.0.19
+84 ;;598^127.0.0.16
+85 ;;586^127.0.0.17
+86 ;;585^127.0.0.17
+87 ;;520^127.0.0.14
+88 ;;564^127.0.0.16
+89 ;;623^127.0.0.18
+90 ;;629^127.0.0.19
+91 ;;635^127.0.0.18
+92 ;;667^127.0.0.12
+93 ;;519^127.0.0.13
+94 ;;501^127.0.0.14
+95 ;;644^127.0.0.10
+96 ;;442^127.0.0.19
+97 ;;756^127.0.0.14
+98 ;;649^127.0.0.15
+99 ;;554^127.0.0.14
+100 ;;436^127.0.0.18
+101 ;;678^127.0.0.18
+102 ;;575^127.0.0.15
+103 ;;654^127.0.0.11
+104 ;;640^127.0.0.18
+105 ;;459^127.0.0.14
+106 ;;612^127.0.0.13
+107 ;;666^127.0.0.18
+108 ;;531^127.0.0.16
+109 ;;648^127.0.0.19
+110 ;;663^127.0.0.10
+111 ;;653^127.0.0.17
+112 ;;668^127.0.0.14
+113 ;;463^127.0.0.13
+114 ;;687^127.0.0.17
+115 ;;692^127.0.0.12
+116 ;;358^127.0.0.13
+117 ;;570^127.0.0.10
+118 ;;662^127.0.0.19
+119 ;;605^127.0.0.11
+120 ;;593^127.0.0.14
+121 ;;618^127.0.0.19
+122 ;;ALBANY^127.0.0.10
+123 ;;600^127.0.0.14
+124 ;;ALBANY CS LAB^127.0.0.15
+125 ;;SILVER SPRING^127.0.0.12
+126 ;;664^127.0.0.13
+127 ;;691^127.0.0.18
+128 ;;508^127.0.0.14
+129 ;;HDR AAC^127.0.0.13
+130 ;;HDR AAC^127.0.0.18
+131 ;;AAC^127.0.0.13
+132 ;;AAC^127.0.0.13
+133 ;;BAY PINES OIFO^127.0.0.18
+134 ;;HINES OIFO^127.0.0.13
+135 ;;BIRMINGHAM OIFO^127.0.0.15
+136 ;;SALT LAKE OIFO^127.0.0.16
+137 ;;BAY PINES OIFO IV&V TEST LAB^127.0.0.15
+138 ;;HINES OIFO EMC DATA CENTER^127.0.0.18
+139 ;;HAC^127.0.0.12
+140 ;;HAC^127.0.0.12
+141 ;;IE Team - Dev & Test^127.0.0.10
+142 ;;EMC Data Center^127.0.0.13
+143 ;;IE Team - Dev & Test^127.0.0.10
+144 ;;MPI^127.0.0.18
+145 ;;CMOP^127.0.0.13
+146 ;;CMOP^127.0.0.17
+147 ;;CMOP^127.0.0.17
+148 ;;CMOP^127.0.0.14
+149 ;;636^127.0.0.14
+150 ;;CMOP^127.0.0.14
+151 ;;CMOP^127.0.0.14
+152 ;;CMOP^127.0.0.18
+153 ;;549^127.0.0.15
+154 ;;ARC^127.0.0.18
+155 ;;PLANO TEST SERVER^127.0.0.19
+156 ;;541^127.0.0.15
+157 ;;END