- SD53P210 ;BP/CMF - Patch SD*5.3*210 utility routine; 02/17/2000
- ;;5.3;Scheduling;**210**;AUG 13, 1993
- ;
- ;
- ENV ;Main entry point for Environment check point.
- ;
- S XPDABORT=""
- D PROGCHK(.XPDABORT) ;checks programmer variables
- D PARMCHK(.XPDABORT) ;checks param file ien exists
- I XPDABORT="" K XPDABORT
- ;
- Q
- ;
- ;
- PRE ;Main entry point for Pre-init
- ;
- D PRE1 ;Delete PCMM HL7 ID file
- D PRE2 ;Set HL7 Application name to PCMM
- ;
- Q
- ;
- ;
- POST ;Main entry point for Post-init
- ;
- D POST1 ;Update c/s files
- D POST2 ;Stuff 7 days into HL7 AUTO RETRANSMIT PERIOD field of the
- ; PCMM PARAMETER file
- D POST3 ;Change HL7 Application Name
- ;
- Q
- ;
- ;
- ;
- PROGCHK(XPDABORT) ;checks for necessary programmer variables
- ;
- I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") DO
- .D BMES^XPDUTL("*****")
- .D MES^XPDUTL("Your programming variables are not set up properly.")
- .D MES^XPDUTL("Installation aborted.")
- .D MES^XPDUTL("*****")
- .S XPDABORT=2
- .Q
- Q
- ;
- PARMCHK(XPDABORT) ;checks for proper param file ien
- ;
- I '$D(^SCTM(404.44,1)) D
- .D BMES^XPDUTL("*****")
- .D MES^XPDUTL("Parameter file (#404.44) does not have proper IEN (1).")
- .D MES^XPDUTL("Installation aborted.")
- .D MES^XPDUTL("*****")
- .S XPDABORT=2
- .Q
- Q
- ;
- PRE1 ;Delete PCMM HL7 ID (#404.49) file, including data.
- ;rpm/alb - Added check for application version. If 210 has been loaded
- ; once then we don't want to initialize 404.49 with each TEST
- ; version install.
- NEW DIU
- I $$PATCH^XPDUTL("SD*5.3*210") D Q
- . D BMES^XPDUTL("SD*5.3*210 previously installed. PCMM HL7 ID file not re-initialized.")
- S DIU="^SCPT(404.49,"
- S DIU(0)="DT"
- D EN^DIU2
- Q
- ;
- PRE2 ;Set HL7 application name to PCMM
- ;rpm/alb A re-install of SD*5.3*210 resulted in the HL7 application name
- ; being blank in the PCMM SEND SERVER Protocol if the HL7
- ; application name was previously PCMM-210.
- NEW DIC,DIE,DA,DR,X,Y
- S DIC="^HL(771,"
- S X="PCMM"
- D ^DIC
- I (Y<0) D Q
- . D BMES^XPDUTL(" PCMM application not found")
- I $$PATCH^XPDUTL("SD*5.3*210") D Q
- . D BMES^XPDUTL("SD*5.3*210 previously installed. Setting HL7 application name to PCMM")
- . S DIE=DIC
- . S DA=+Y
- . S DR=".01///PCMM"
- . D ^DIE
- . D MES^XPDUTL(" HL7 application name successfully changed to PCMM.")
- Q
- ;
- POST1 I $$UPCLNLST^SCMCUT("SD*5.3*210^NullClient^1^0^0") D Q
- . D MES^XPDUTL("Client/Server files updated.")
- . Q
- D MES^XPDUTL("Client/Server files NOT updated.")
- Q
- ;
- POST2 ;Stuff 7 days into HL7 AUTO RETRANSMIT PERIOD field of the
- ;PCMM PARAMETER file
- NEW SCERR,SCFDA
- S SCFDA(404.44,"1,",16)=7
- D FILE^DIE(,"SCFDA","SCERR")
- Q
- ;
- POST3 ;Change HL7 application name from PCMM to PCMM-210 in HL7 APPLICATION PARAMETER file. DBIA #3068: Approval from HL7 Package for this change.
- ;rpm/alb - removed eXact match since test sites may overlap 210 and 212.
- ; Application name needs to match the version installed.
- N DIE,DIC,DA,DR,X,Y
- D BMES^XPDUTL("Changing HL7 Application name from PCMM to PCMM-210")
- S DIC="^HL(771,"
- S X="PCMM"
- D ^DIC
- I (Y<0) D Q
- .D BMES^XPDUTL(" PCMM application not found.")
- I $P(Y,"^",2)="PCMM-210" D Q
- .D MES^XPDUTL(" HL7 application name is PCMM-210. No change needed.")
- S DIE=DIC
- S DA=+Y
- S DR=".01///PCMM-210"
- D ^DIE
- D MES^XPDUTL(" HL7 application name successfully changed to PCMM-210.")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53P210 3446 printed Mar 13, 2025@21:50:59 Page 2
- SD53P210 ;BP/CMF - Patch SD*5.3*210 utility routine; 02/17/2000
- +1 ;;5.3;Scheduling;**210**;AUG 13, 1993
- +2 ;
- +3 ;
- ENV ;Main entry point for Environment check point.
- +1 ;
- +2 SET XPDABORT=""
- +3 ;checks programmer variables
- DO PROGCHK(.XPDABORT)
- +4 ;checks param file ien exists
- DO PARMCHK(.XPDABORT)
- +5 IF XPDABORT=""
- KILL XPDABORT
- +6 ;
- +7 QUIT
- +8 ;
- +9 ;
- PRE ;Main entry point for Pre-init
- +1 ;
- +2 ;Delete PCMM HL7 ID file
- DO PRE1
- +3 ;Set HL7 Application name to PCMM
- DO PRE2
- +4 ;
- +5 QUIT
- +6 ;
- +7 ;
- POST ;Main entry point for Post-init
- +1 ;
- +2 ;Update c/s files
- DO POST1
- +3 ;Stuff 7 days into HL7 AUTO RETRANSMIT PERIOD field of the
- DO POST2
- +4 ; PCMM PARAMETER file
- +5 ;Change HL7 Application Name
- DO POST3
- +6 ;
- +7 QUIT
- +8 ;
- +9 ;
- +10 ;
- PROGCHK(XPDABORT) ;checks for necessary programmer variables
- +1 ;
- +2 IF '$GET(DUZ)!($GET(DUZ(0))'="@")!('$GET(DT))!($GET(U)'="^")
- Begin DoDot:1
- +3 DO BMES^XPDUTL("*****")
- +4 DO MES^XPDUTL("Your programming variables are not set up properly.")
- +5 DO MES^XPDUTL("Installation aborted.")
- +6 DO MES^XPDUTL("*****")
- +7 SET XPDABORT=2
- +8 QUIT
- End DoDot:1
- +9 QUIT
- +10 ;
- PARMCHK(XPDABORT) ;checks for proper param file ien
- +1 ;
- +2 IF '$DATA(^SCTM(404.44,1))
- Begin DoDot:1
- +3 DO BMES^XPDUTL("*****")
- +4 DO MES^XPDUTL("Parameter file (#404.44) does not have proper IEN (1).")
- +5 DO MES^XPDUTL("Installation aborted.")
- +6 DO MES^XPDUTL("*****")
- +7 SET XPDABORT=2
- +8 QUIT
- End DoDot:1
- +9 QUIT
- +10 ;
- PRE1 ;Delete PCMM HL7 ID (#404.49) file, including data.
- +1 ;rpm/alb - Added check for application version. If 210 has been loaded
- +2 ; once then we don't want to initialize 404.49 with each TEST
- +3 ; version install.
- +4 NEW DIU
- +5 IF $$PATCH^XPDUTL("SD*5.3*210")
- Begin DoDot:1
- +6 DO BMES^XPDUTL("SD*5.3*210 previously installed. PCMM HL7 ID file not re-initialized.")
- End DoDot:1
- QUIT
- +7 SET DIU="^SCPT(404.49,"
- +8 SET DIU(0)="DT"
- +9 DO EN^DIU2
- +10 QUIT
- +11 ;
- PRE2 ;Set HL7 application name to PCMM
- +1 ;rpm/alb A re-install of SD*5.3*210 resulted in the HL7 application name
- +2 ; being blank in the PCMM SEND SERVER Protocol if the HL7
- +3 ; application name was previously PCMM-210.
- +4 NEW DIC,DIE,DA,DR,X,Y
- +5 SET DIC="^HL(771,"
- +6 SET X="PCMM"
- +7 DO ^DIC
- +8 IF (Y<0)
- Begin DoDot:1
- +9 DO BMES^XPDUTL(" PCMM application not found")
- End DoDot:1
- QUIT
- +10 IF $$PATCH^XPDUTL("SD*5.3*210")
- Begin DoDot:1
- +11 DO BMES^XPDUTL("SD*5.3*210 previously installed. Setting HL7 application name to PCMM")
- +12 SET DIE=DIC
- +13 SET DA=+Y
- +14 SET DR=".01///PCMM"
- +15 DO ^DIE
- +16 DO MES^XPDUTL(" HL7 application name successfully changed to PCMM.")
- End DoDot:1
- QUIT
- +17 QUIT
- +18 ;
- POST1 IF $$UPCLNLST^SCMCUT("SD*5.3*210^NullClient^1^0^0")
- Begin DoDot:1
- +1 DO MES^XPDUTL("Client/Server files updated.")
- +2 QUIT
- End DoDot:1
- QUIT
- +3 DO MES^XPDUTL("Client/Server files NOT updated.")
- +4 QUIT
- +5 ;
- POST2 ;Stuff 7 days into HL7 AUTO RETRANSMIT PERIOD field of the
- +1 ;PCMM PARAMETER file
- +2 NEW SCERR,SCFDA
- +3 SET SCFDA(404.44,"1,",16)=7
- +4 DO FILE^DIE(,"SCFDA","SCERR")
- +5 QUIT
- +6 ;
- POST3 ;Change HL7 application name from PCMM to PCMM-210 in HL7 APPLICATION PARAMETER file. DBIA #3068: Approval from HL7 Package for this change.
- +1 ;rpm/alb - removed eXact match since test sites may overlap 210 and 212.
- +2 ; Application name needs to match the version installed.
- +3 NEW DIE,DIC,DA,DR,X,Y
- +4 DO BMES^XPDUTL("Changing HL7 Application name from PCMM to PCMM-210")
- +5 SET DIC="^HL(771,"
- +6 SET X="PCMM"
- +7 DO ^DIC
- +8 IF (Y<0)
- Begin DoDot:1
- +9 DO BMES^XPDUTL(" PCMM application not found.")
- End DoDot:1
- QUIT
- +10 IF $PIECE(Y,"^",2)="PCMM-210"
- Begin DoDot:1
- +11 DO MES^XPDUTL(" HL7 application name is PCMM-210. No change needed.")
- End DoDot:1
- QUIT
- +12 SET DIE=DIC
- +13 SET DA=+Y
- +14 SET DR=".01///PCMM-210"
- +15 DO ^DIE
- +16 DO MES^XPDUTL(" HL7 application name successfully changed to PCMM-210.")
- +17 QUIT