- RGP22 ;BIR/PTD-PATCH RG*1*22 PRE & POST INSTALL ROUTINE ;09/14/01
- ;;1.0;CLINICAL INFO RESOURCE NETWORK;**22**;30 Apr 99
- ;Reference to FILE^DICN for ^DIC(4 supported by IA#3453
- ;References to LINK^HLUTIL3 and $$GET1^DIQ(870 supported by IA #3335
- ;Reference to $$FIND1^DIC(870 supported by IA#2525
- ;Reference to DIE call on ^HLCS(870, supported by IA#3454
- ;
- PRE ;PRE INSTALL
- ;Is station #776 in the INSTITUTION (#4) file?
- ;If yes, quit. If not, create it. If can't create, abort install.
- N RGSTN
- S RGSTN=+$$FIND1^DIC(4,"","MX","OFFICE OF INFORMATION SRV CNTR")
- I RGSTN>0 D BMES^XPDUTL(" Station number 776 exists in the INSTITUTION file.") D MES^XPDUTL(" Pre-install routine completed successfully.") G ENDPRE
- I RGSTN=0 D ;Not there, so create station #776
- .K DIC,DR,X,Y
- .S XUMF=1
- .S DIC="^DIC(4,",DIC(0)="",X="OFFICE OF INFORMATION SRV CNTR"
- .S DIC("DR")=".02////OHIO;11////National;13////VAMC;99////776;100////OFFICE OF INFORMATION SERVICE CENTER"
- .K DO,DD D FILE^DICN
- .I +Y<0 D BMES^XPDUTL(" Unable to add station number 776 to the INSTITUTION file.") D MES^XPDUTL(" Contact NVS or log a NOIS for assistance before proceeding.") S XPDABORT=1 Q
- .D BMES^XPDUTL(" Station number 776 has been added to the INSTITUTION file.")
- .D MES^XPDUTL(" Pre-install routine completed successfully.")
- ENDPRE ;Kill variables and quit
- K DD,DIC,DO,DR,RGSTN,X,XUMF,Y
- Q
- ;
- PST ;POST INSTALL
- ;Is VACIO entry in the HL LOGICAL LINK (#870) file?
- ;If yes, set AUTOSTART (#4.5) field to Enabled. If no, quit.
- N RGLLK
- S RGLLK=+$$FIND1^DIC(870,"","MX","VACIO")
- I RGLLK=0 D BMES^XPDUTL(" 'VACIO' logical link failed to come in with this patch.") D MES^XPDUTL(" Contact NVS or log a NOIS for assistance before proceeding.") S XPDABORT=1 G ENDPST ;Abort install.
- L +^HLCS(870,RGLLK):10
- S DIE="^HLCS(870,",DA=RGLLK,DR="4.5///1"
- D ^DIE K DIE,DA,DR
- L -^HLCS(870,RGLLK)
- D BMES^XPDUTL(" The AUTOSTART (#4.5) field for the 'VACIO' entry in") D MES^XPDUTL(" the HL LOGICAL LINK (#870) file has been set to 'Enabled'.")
- ;
- ;If production account, quit - install complete.
- ;If test account, remove TCP/IP ADDRESS (#400.01) and DOMAIN (#.03)
- ;for VACIO entry in the HL LOGICAL LINK (#870) file.
- ;
- ;Determine test or production account (production must have
- ;"MPI-AUSTIN.DOMAIN.EXT" domain for logical link "MPIVA").
- ;Get logical link IEN for "MPIVA".
- ;Get domain for "MPIVA" logical link in HL LOGICAL LINK (#870) file.
- N RGDOMAIN S RGDOMAIN=""
- D LINK^HLUTIL3("200M",.HLL,"I")
- S IEN=$O(HLL(0)) I +IEN>0 S RGDOMAIN=$$GET1^DIQ(870,+IEN_",",.03)
- I RGDOMAIN="MPI-AUSTIN.DOMAIN.EXT" D BMES^XPDUTL(" Post-install routine completed successfully.") G ENDPST ;Production account, so quit.
- I RGDOMAIN'="MPI-AUSTIN.DOMAIN.EXT" D
- .;Test account or can't determine account, continue
- .;Is VACIO entry in the HL LOGICAL LINK (#870) file?
- .N RGLLK
- .S RGLLK=+$$FIND1^DIC(870,"","MX","VACIO")
- .Q:'RGLLK ;VACIO entry not found, so quit.
- .L +^HLCS(870,RGLLK):10
- .S DIE="^HLCS(870,",DA=RGLLK,DR=".03///@;400.01///@"
- .D ^DIE K DIE,DA,DR
- .L -^HLCS(870,RGLLK)
- .D BMES^XPDUTL(" Because this is not a production account, the TCP/IP ADDRESS")
- .D MES^XPDUTL(" and DOMAIN fields were deleted for the 'VACIO' entry in the")
- .D MES^XPDUTL(" HL LOGICAL LINK (#870) file.")
- .D BMES^XPDUTL(" Post-install routine completed successfully.")
- ENDPST ;Kill variables and quit
- K DA,DIE,DR,IEN,HLL,RGDOMAIN,RGLLK
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGP22 3469 printed Feb 18, 2025@23:08:56 Page 2
- RGP22 ;BIR/PTD-PATCH RG*1*22 PRE & POST INSTALL ROUTINE ;09/14/01
- +1 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**22**;30 Apr 99
- +2 ;Reference to FILE^DICN for ^DIC(4 supported by IA#3453
- +3 ;References to LINK^HLUTIL3 and $$GET1^DIQ(870 supported by IA #3335
- +4 ;Reference to $$FIND1^DIC(870 supported by IA#2525
- +5 ;Reference to DIE call on ^HLCS(870, supported by IA#3454
- +6 ;
- PRE ;PRE INSTALL
- +1 ;Is station #776 in the INSTITUTION (#4) file?
- +2 ;If yes, quit. If not, create it. If can't create, abort install.
- +3 NEW RGSTN
- +4 SET RGSTN=+$$FIND1^DIC(4,"","MX","OFFICE OF INFORMATION SRV CNTR")
- +5 IF RGSTN>0
- DO BMES^XPDUTL(" Station number 776 exists in the INSTITUTION file.")
- DO MES^XPDUTL(" Pre-install routine completed successfully.")
- GOTO ENDPRE
- +6 ;Not there, so create station #776
- IF RGSTN=0
- Begin DoDot:1
- +7 KILL DIC,DR,X,Y
- +8 SET XUMF=1
- +9 SET DIC="^DIC(4,"
- SET DIC(0)=""
- SET X="OFFICE OF INFORMATION SRV CNTR"
- +10 SET DIC("DR")=".02////OHIO;11////National;13////VAMC;99////776;100////OFFICE OF INFORMATION SERVICE CENTER"
- +11 KILL DO,DD
- DO FILE^DICN
- +12 IF +Y<0
- DO BMES^XPDUTL(" Unable to add station number 776 to the INSTITUTION file.")
- DO MES^XPDUTL(" Contact NVS or log a NOIS for assistance before proceeding.")
- SET XPDABORT=1
- QUIT
- +13 DO BMES^XPDUTL(" Station number 776 has been added to the INSTITUTION file.")
- +14 DO MES^XPDUTL(" Pre-install routine completed successfully.")
- End DoDot:1
- ENDPRE ;Kill variables and quit
- +1 KILL DD,DIC,DO,DR,RGSTN,X,XUMF,Y
- +2 QUIT
- +3 ;
- PST ;POST INSTALL
- +1 ;Is VACIO entry in the HL LOGICAL LINK (#870) file?
- +2 ;If yes, set AUTOSTART (#4.5) field to Enabled. If no, quit.
- +3 NEW RGLLK
- +4 SET RGLLK=+$$FIND1^DIC(870,"","MX","VACIO")
- +5 ;Abort install.
- IF RGLLK=0
- DO BMES^XPDUTL(" 'VACIO' logical link failed to come in with this patch.")
- DO MES^XPDUTL(" Contact NVS or log a NOIS for assistance before proceeding.")
- SET XPDABORT=1
- GOTO ENDPST
- +6 LOCK +^HLCS(870,RGLLK):10
- +7 SET DIE="^HLCS(870,"
- SET DA=RGLLK
- SET DR="4.5///1"
- +8 DO ^DIE
- KILL DIE,DA,DR
- +9 LOCK -^HLCS(870,RGLLK)
- +10 DO BMES^XPDUTL(" The AUTOSTART (#4.5) field for the 'VACIO' entry in")
- DO MES^XPDUTL(" the HL LOGICAL LINK (#870) file has been set to 'Enabled'.")
- +11 ;
- +12 ;If production account, quit - install complete.
- +13 ;If test account, remove TCP/IP ADDRESS (#400.01) and DOMAIN (#.03)
- +14 ;for VACIO entry in the HL LOGICAL LINK (#870) file.
- +15 ;
- +16 ;Determine test or production account (production must have
- +17 ;"MPI-AUSTIN.DOMAIN.EXT" domain for logical link "MPIVA").
- +18 ;Get logical link IEN for "MPIVA".
- +19 ;Get domain for "MPIVA" logical link in HL LOGICAL LINK (#870) file.
- +20 NEW RGDOMAIN
- SET RGDOMAIN=""
- +21 DO LINK^HLUTIL3("200M",.HLL,"I")
- +22 SET IEN=$ORDER(HLL(0))
- IF +IEN>0
- SET RGDOMAIN=$$GET1^DIQ(870,+IEN_",",.03)
- +23 ;Production account, so quit.
- IF RGDOMAIN="MPI-AUSTIN.DOMAIN.EXT"
- DO BMES^XPDUTL(" Post-install routine completed successfully.")
- GOTO ENDPST
- +24 IF RGDOMAIN'="MPI-AUSTIN.DOMAIN.EXT"
- Begin DoDot:1
- +25 ;Test account or can't determine account, continue
- +26 ;Is VACIO entry in the HL LOGICAL LINK (#870) file?
- +27 NEW RGLLK
- +28 SET RGLLK=+$$FIND1^DIC(870,"","MX","VACIO")
- +29 ;VACIO entry not found, so quit.
- if 'RGLLK
- QUIT
- +30 LOCK +^HLCS(870,RGLLK):10
- +31 SET DIE="^HLCS(870,"
- SET DA=RGLLK
- SET DR=".03///@;400.01///@"
- +32 DO ^DIE
- KILL DIE,DA,DR
- +33 LOCK -^HLCS(870,RGLLK)
- +34 DO BMES^XPDUTL(" Because this is not a production account, the TCP/IP ADDRESS")
- +35 DO MES^XPDUTL(" and DOMAIN fields were deleted for the 'VACIO' entry in the")
- +36 DO MES^XPDUTL(" HL LOGICAL LINK (#870) file.")
- +37 DO BMES^XPDUTL(" Post-install routine completed successfully.")
- End DoDot:1
- ENDPST ;Kill variables and quit
- +1 KILL DA,DIE,DR,IEN,HLL,RGDOMAIN,RGLLK
- +2 QUIT
- +3 ;