Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RGP22

RGP22.m

Go to the documentation of this file.
  1. 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
  1. ;Reference to FILE^DICN for ^DIC(4 supported by IA#3453
  1. ;References to LINK^HLUTIL3 and $$GET1^DIQ(870 supported by IA #3335
  1. ;Reference to $$FIND1^DIC(870 supported by IA#2525
  1. ;Reference to DIE call on ^HLCS(870, supported by IA#3454
  1. ;
  1. PRE ;PRE INSTALL
  1. ;Is station #776 in the INSTITUTION (#4) file?
  1. ;If yes, quit. If not, create it. If can't create, abort install.
  1. N RGSTN
  1. S RGSTN=+$$FIND1^DIC(4,"","MX","OFFICE OF INFORMATION SRV CNTR")
  1. I RGSTN>0 D BMES^XPDUTL(" Station number 776 exists in the INSTITUTION file.") D MES^XPDUTL(" Pre-install routine completed successfully.") G ENDPRE
  1. I RGSTN=0 D ;Not there, so create station #776
  1. .K DIC,DR,X,Y
  1. .S XUMF=1
  1. .S DIC="^DIC(4,",DIC(0)="",X="OFFICE OF INFORMATION SRV CNTR"
  1. .S DIC("DR")=".02////OHIO;11////National;13////VAMC;99////776;100////OFFICE OF INFORMATION SERVICE CENTER"
  1. .K DO,DD D FILE^DICN
  1. .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
  1. .D BMES^XPDUTL(" Station number 776 has been added to the INSTITUTION file.")
  1. .D MES^XPDUTL(" Pre-install routine completed successfully.")
  1. ENDPRE ;Kill variables and quit
  1. K DD,DIC,DO,DR,RGSTN,X,XUMF,Y
  1. Q
  1. ;
  1. PST ;POST INSTALL
  1. ;Is VACIO entry in the HL LOGICAL LINK (#870) file?
  1. ;If yes, set AUTOSTART (#4.5) field to Enabled. If no, quit.
  1. N RGLLK
  1. S RGLLK=+$$FIND1^DIC(870,"","MX","VACIO")
  1. 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.
  1. L +^HLCS(870,RGLLK):10
  1. S DIE="^HLCS(870,",DA=RGLLK,DR="4.5///1"
  1. D ^DIE K DIE,DA,DR
  1. L -^HLCS(870,RGLLK)
  1. 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'.")
  1. ;
  1. ;If production account, quit - install complete.
  1. ;If test account, remove TCP/IP ADDRESS (#400.01) and DOMAIN (#.03)
  1. ;for VACIO entry in the HL LOGICAL LINK (#870) file.
  1. ;
  1. ;Determine test or production account (production must have
  1. ;"MPI-AUSTIN.DOMAIN.EXT" domain for logical link "MPIVA").
  1. ;Get logical link IEN for "MPIVA".
  1. ;Get domain for "MPIVA" logical link in HL LOGICAL LINK (#870) file.
  1. N RGDOMAIN S RGDOMAIN=""
  1. D LINK^HLUTIL3("200M",.HLL,"I")
  1. S IEN=$O(HLL(0)) I +IEN>0 S RGDOMAIN=$$GET1^DIQ(870,+IEN_",",.03)
  1. I RGDOMAIN="MPI-AUSTIN.DOMAIN.EXT" D BMES^XPDUTL(" Post-install routine completed successfully.") G ENDPST ;Production account, so quit.
  1. I RGDOMAIN'="MPI-AUSTIN.DOMAIN.EXT" D
  1. .;Test account or can't determine account, continue
  1. .;Is VACIO entry in the HL LOGICAL LINK (#870) file?
  1. .N RGLLK
  1. .S RGLLK=+$$FIND1^DIC(870,"","MX","VACIO")
  1. .Q:'RGLLK ;VACIO entry not found, so quit.
  1. .L +^HLCS(870,RGLLK):10
  1. .S DIE="^HLCS(870,",DA=RGLLK,DR=".03///@;400.01///@"
  1. .D ^DIE K DIE,DA,DR
  1. .L -^HLCS(870,RGLLK)
  1. .D BMES^XPDUTL(" Because this is not a production account, the TCP/IP ADDRESS")
  1. .D MES^XPDUTL(" and DOMAIN fields were deleted for the 'VACIO' entry in the")
  1. .D MES^XPDUTL(" HL LOGICAL LINK (#870) file.")
  1. .D BMES^XPDUTL(" Post-install routine completed successfully.")
  1. ENDPST ;Kill variables and quit
  1. K DA,DIE,DR,IEN,HLL,RGDOMAIN,RGLLK
  1. Q
  1. ;