SDPRE707 ;;MS/PB/MJ - CCRA PRE INSTALL;APR 22, 2019
;;5.3;Scheduling;**707**;APR 4, 2019;Build 57
;;Per VA directive 6402, this routine should not be modified.
;Pre install routine for patch SD*5.3*707.
;Checks for the CCRA-NAK logical link, if it exists, it doesn't re-install the link
;if it doesn't exist, it gets the HealthShare server address and port and installs
;and configures the link.
Q
LINK ; update the TMP_Send Link
N LIEN,OPSITE,DOMAIN,VAL,SDERR,FDA,PRE1,PRE2,X,STOP
D MES^XPDUTL("Checking VistA system for CCRA-NAK logical link setup...")
S VAL="CCRA-NAK",STOP=0
S LIEN=$$FIND1^DIC(870,,"B",.VAL)
I LIEN D MES^XPDUTL("Link already exists, no new setup needed") Q
D MES^XPDUTL("")
D MES^XPDUTL("")
D MES^XPDUTL("")
D MES^XPDUTL("CCRA-NAK logical link being set up now. We'll need some information from you.")
D MES^XPDUTL("Please have the HealthConnect server IP address and Port number ready.")
D MES^XPDUTL("")
D MES^XPDUTL("")
D MES^XPDUTL("")
;
Q1 ; QUESTION 1 - IP ADDRESS - PRE 1
S DIR("A")="PLEASE ENTER THE HEALTHCONNECT SERVER IP ADDRESS"
S DIR(0)="F"
D ^DIR S PRE1=X
I $G(PRE1)="^"!($G(PRE1)="") D
. N X,Y,DIR,DTOUT,DUOUT,DIRUT
. S DIR(0)="Y"
. S DIR("A",1)="Quitting out will result in the CCRA-NAK logical link not being installed."
. S DIR("A",2)="The CCRA-NAK logical link is required and must be configured for this patch to work properly."
. S DIR("A")="Are you sure you want to exit out of the PRE-install process?"
. D ^DIR
. S:$G(Y)'=0 STOP=1
. G:$G(Y)=0 Q1
. G:$G(STOP)=1 QABORT
;
Q2 ; QUESTION 2 - PORT NUMBER - PRE 2
G:$G(STOP)=1 QABORT
N X,Y,DIR,DTOUT,DUOUT,DIRUT
S DIR("A")="PLEASE ENTER THE HEALTHCONNECT SERVER PORT NUMBER"
S DIR(0)="F"
D ^DIR S PRE2=X
I $G(PRE2)="^"!($G(PRE2)="") D
. N X,Y,DIR,DTOUT,DUOUT,DIRUT
. S DIR(0)="Y"
. S DIR("A",1)="Quitting out will result in the CCRA-NAK logical link not being installed."
. S DIR("A",2)="The CCRA-NAK logical link is required and must be configured for this patch to work properly."
. S DIR("A")="Are you sure you want to exit out of the PRE-install process?"
. D ^DIR
. S:$G(Y)'=0 STOP=1
. G:$G(Y)=0 Q2
. G:$G(STOP)=1 QABORT
;
; file link with IP address and port entered
G:$G(STOP)=1 QABORT
K FDA,LIEN,SDERR
S FDA(870,"+1,",.01)="CCRA-NAK"
S FDA(870,"+1,",.02)=$$KSP^XUPARAM("INST") ; site station number
S FDA(870,"+1,",2)=4 ; TCP/IP
S FDA(870,"+1,",4.5)=1 ; auto start
S FDA(870,"+1,",400.01)=$G(PRE1) ; ip address
S FDA(870,"+1,",400.02)=$G(PRE2) ; hl7 port
S FDA(870,"+1,",400.03)="C" ; Client (Sender) TCP/IP Service Type
; S FDA(870,"+1,",400.08)=$G(PRE2) ; hlo port
D UPDATE^DIE(,"FDA","LIEN","SDERR") K FDA
D MES^XPDUTL("")
I $D(SDERR) D Q ; something went wrong
.D MES^XPDUTL("FileMan error when creating the CCCRA-NAK Link.")
D MES^XPDUTL("CCRA-NAK Link has been updated.")
QEND K DIR,SDERR Q
QABORT S XPDABORT=1 K DIR,SDERR Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDPRE707 3002 printed Dec 13, 2024@02:59:52 Page 2
SDPRE707 ;;MS/PB/MJ - CCRA PRE INSTALL;APR 22, 2019
+1 ;;5.3;Scheduling;**707**;APR 4, 2019;Build 57
+2 ;;Per VA directive 6402, this routine should not be modified.
+3 ;Pre install routine for patch SD*5.3*707.
+4 ;Checks for the CCRA-NAK logical link, if it exists, it doesn't re-install the link
+5 ;if it doesn't exist, it gets the HealthShare server address and port and installs
+6 ;and configures the link.
+7 QUIT
LINK ; update the TMP_Send Link
+1 NEW LIEN,OPSITE,DOMAIN,VAL,SDERR,FDA,PRE1,PRE2,X,STOP
+2 DO MES^XPDUTL("Checking VistA system for CCRA-NAK logical link setup...")
+3 SET VAL="CCRA-NAK"
SET STOP=0
+4 SET LIEN=$$FIND1^DIC(870,,"B",.VAL)
+5 IF LIEN
DO MES^XPDUTL("Link already exists, no new setup needed")
QUIT
+6 DO MES^XPDUTL("")
+7 DO MES^XPDUTL("")
+8 DO MES^XPDUTL("")
+9 DO MES^XPDUTL("CCRA-NAK logical link being set up now. We'll need some information from you.")
+10 DO MES^XPDUTL("Please have the HealthConnect server IP address and Port number ready.")
+11 DO MES^XPDUTL("")
+12 DO MES^XPDUTL("")
+13 DO MES^XPDUTL("")
+14 ;
Q1 ; QUESTION 1 - IP ADDRESS - PRE 1
+1 SET DIR("A")="PLEASE ENTER THE HEALTHCONNECT SERVER IP ADDRESS"
+2 SET DIR(0)="F"
+3 DO ^DIR
SET PRE1=X
+4 IF $GET(PRE1)="^"!($GET(PRE1)="")
Begin DoDot:1
+5 NEW X,Y,DIR,DTOUT,DUOUT,DIRUT
+6 SET DIR(0)="Y"
+7 SET DIR("A",1)="Quitting out will result in the CCRA-NAK logical link not being installed."
+8 SET DIR("A",2)="The CCRA-NAK logical link is required and must be configured for this patch to work properly."
+9 SET DIR("A")="Are you sure you want to exit out of the PRE-install process?"
+10 DO ^DIR
+11 if $GET(Y)'=0
SET STOP=1
+12 if $GET(Y)=0
GOTO Q1
+13 if $GET(STOP)=1
GOTO QABORT
End DoDot:1
+14 ;
Q2 ; QUESTION 2 - PORT NUMBER - PRE 2
+1 if $GET(STOP)=1
GOTO QABORT
+2 NEW X,Y,DIR,DTOUT,DUOUT,DIRUT
+3 SET DIR("A")="PLEASE ENTER THE HEALTHCONNECT SERVER PORT NUMBER"
+4 SET DIR(0)="F"
+5 DO ^DIR
SET PRE2=X
+6 IF $GET(PRE2)="^"!($GET(PRE2)="")
Begin DoDot:1
+7 NEW X,Y,DIR,DTOUT,DUOUT,DIRUT
+8 SET DIR(0)="Y"
+9 SET DIR("A",1)="Quitting out will result in the CCRA-NAK logical link not being installed."
+10 SET DIR("A",2)="The CCRA-NAK logical link is required and must be configured for this patch to work properly."
+11 SET DIR("A")="Are you sure you want to exit out of the PRE-install process?"
+12 DO ^DIR
+13 if $GET(Y)'=0
SET STOP=1
+14 if $GET(Y)=0
GOTO Q2
+15 if $GET(STOP)=1
GOTO QABORT
End DoDot:1
+16 ;
+17 ; file link with IP address and port entered
+18 if $GET(STOP)=1
GOTO QABORT
+19 KILL FDA,LIEN,SDERR
+20 SET FDA(870,"+1,",.01)="CCRA-NAK"
+21 ; site station number
SET FDA(870,"+1,",.02)=$$KSP^XUPARAM("INST")
+22 ; TCP/IP
SET FDA(870,"+1,",2)=4
+23 ; auto start
SET FDA(870,"+1,",4.5)=1
+24 ; ip address
SET FDA(870,"+1,",400.01)=$GET(PRE1)
+25 ; hl7 port
SET FDA(870,"+1,",400.02)=$GET(PRE2)
+26 ; Client (Sender) TCP/IP Service Type
SET FDA(870,"+1,",400.03)="C"
+27 ; S FDA(870,"+1,",400.08)=$G(PRE2) ; hlo port
+28 DO UPDATE^DIE(,"FDA","LIEN","SDERR")
KILL FDA
+29 DO MES^XPDUTL("")
+30 ; something went wrong
IF $DATA(SDERR)
Begin DoDot:1
+31 DO MES^XPDUTL("FileMan error when creating the CCCRA-NAK Link.")
End DoDot:1
QUIT
+32 DO MES^XPDUTL("CCRA-NAK Link has been updated.")
QEND KILL DIR,SDERR
QUIT
QABORT SET XPDABORT=1
KILL DIR,SDERR
QUIT