GMRC123P ;;MS/PB/MJ - CCRA PRE INSTALL;APR 22, 2019
;;3.0;CONSULT/REQUEST TRACKING;**123**;APR 22, 2019;Build 51
;;Per VA directive 6402, this routine should not be modified.
;Pre install routine for patch GMRC*3.0*123.
;
;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,GMRCERR,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
. D APPERROR^%ZTER("pre-install Q1 after '^' entered on 2nd DIR call")
. 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
K FDA,LIEN,GMRCERR
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","GMRCERR") K FDA
D MES^XPDUTL("")
I $D(GMRCERR) 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 Q
;
QABORT S XPDABORT=1 K DIR Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRC123P 3072 printed Nov 22, 2024@16:54:55 Page 2
GMRC123P ;;MS/PB/MJ - CCRA PRE INSTALL;APR 22, 2019
+1 ;;3.0;CONSULT/REQUEST TRACKING;**123**;APR 22, 2019;Build 51
+2 ;;Per VA directive 6402, this routine should not be modified.
+3 ;Pre install routine for patch GMRC*3.0*123.
+4 ;
+5 ;Checks for the CCRA-NAK logical link, if it exists, it doesn't re-install the link
+6 ;if it doesn't exist, it gets the HealthShare server address and port and installs
+7 ;and configures the link.
+8 QUIT
LINK ; update the TMP_Send Link
+1 NEW LIEN,OPSITE,DOMAIN,VAL,GMRCERR,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 DO APPERROR^%ZTER("pre-install Q1 after '^' entered on 2nd DIR call")
+14 if $GET(STOP)=1
GOTO QABORT
End DoDot:1
+15 ;
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
End DoDot:1
+15 if $GET(STOP)=1
GOTO QABORT
+16 ;
+17 ; file link with IP address and port entered
+18 KILL FDA,LIEN,GMRCERR
+19 SET FDA(870,"+1,",.01)="CCRA-NAK"
+20 ; site station number
SET FDA(870,"+1,",.02)=$$KSP^XUPARAM("INST")
+21 ; TCP/IP
SET FDA(870,"+1,",2)=4
+22 ; auto start
SET FDA(870,"+1,",4.5)=1
+23 ; ip address
SET FDA(870,"+1,",400.01)=$GET(PRE1)
+24 ; hl7 port
SET FDA(870,"+1,",400.02)=$GET(PRE2)
+25 ; Client (Sender) TCP/IP Service Type
SET FDA(870,"+1,",400.03)="C"
+26 ; S FDA(870,"+1,",400.08)=$G(PRE2) ; hlo port
+27 DO UPDATE^DIE(,"FDA","LIEN","GMRCERR")
KILL FDA
+28 DO MES^XPDUTL("")
+29 ; something went wrong
IF $DATA(GMRCERR)
Begin DoDot:1
+30 DO MES^XPDUTL("FileMan error when creating the CCCRA-NAK Link.")
End DoDot:1
QUIT
+31 DO MES^XPDUTL("CCRA-NAK Link has been updated.")
QEND KILL DIR
QUIT
+1 ;
QABORT SET XPDABORT=1
KILL DIR
QUIT