SDRPSTOP ;ALB/TXH - STOP PAIT HL7 TRANSMISSIONS;07/09/15
;;5.3;Scheduling;**639**;AUG 13, 1993;Build 7
;
; This post-init routine
; - disable the SD-PAIT Logical Link
; - unschedule the PAIT transmission task
; - place PAIT options Out of Order
; - inactivate PAIT related HL7 Application Parameters
;
Q
;
EN ; Entry Point
D BMES^XPDUTL("SD*5.3*639 Post-Init Started...")
D LOGLNK
D DELETE
D OPTOUT
D INACT
D BMES^XPDUTL("SD*5.3*639 Post-Init Finished.")
D MES^XPDUTL(" ")
Q
;
LOGLNK ; Disable the SD-PAIT Logical Link
;
D BMES^XPDUTL("* Disabling SD-PAIT Logical Link...")
N SDLNK,SDMCL,DA,DR
S SDLNK="SD-PAIT"
S SDMCL=$O(^HLCS(870,"B",SDLNK,""))
I SDMCL="" D MES^XPDUTL(" "_SDLNK_" not found. It's okay.") Q
; get AUTOSTART disabled and set SHUTDOWN LLP to YES.
N DIE S DIE="^HLCS(870,",DA=SDMCL,DR="4.5///0;14///1"
D ^DIE
D MES^XPDUTL(" Done.")
Q
;
DELETE ; Remove the PAIT transmission task in Option Schedule
;
; IA #6121 Remove Scheduled options from #19.2
; IA #2051 Database Server API: Lookup Utilities (DIC)
;
D BMES^XPDUTL("* Removing PAIT Transmission Task...")
N SDRPTSK,SDOPT,DA,DIK
S SDRPTSK="SD-PAIT TASKED TRANSMISSION"
S SDOPT=$O(^DIC(19,"B",SDRPTSK,""))
I SDOPT="" D MES^XPDUTL(" "_SDRPTSK_" not found. It's okay.") Q
S DA="" F S DA=$O(^DIC(19.2,"B",SDOPT,DA)) Q:'+DA D
. S ^XTMP("SDRPTSK",$J,0)=$$FMADD^XLFDT(DT+90)_"^"_DT_"^copy of SD-PAIT TASKED TRANSMISSION in #19.2^"_DA
. M ^XTMP("SDRPTSK",$J,"DIC",19.2,DA)=^DIC(19.2,DA)
. S DIK="^DIC(19.2,"
. D ^DIK
D MES^XPDUTL(" Done.")
Q
;
OPTOUT ; Set options out of order
;
; IA #1157 OUT^XPDMENU(OPT,TXT)
;
D BMES^XPDUTL("* Placing the following PAIT options out of order...")
N SDMCN,SDOPT,SDTXT,OPTMSG
S SDTXT="This functionality is now accomplished by CDW/VSSC."
F SDMCN=1:1 S SDOPT=$P($TEXT(OPTLIST+SDMCN),";;",2) Q:SDOPT="$$END"!(SDOPT="") D
. D OUT^XPDMENU(SDOPT,SDTXT) ;Mark option out-of-order
. S OPTMSG=" "_SDOPT
. D MES^XPDUTL(OPTMSG)
D MES^XPDUTL(" Done.")
Q
;
INACT ; Make PAIT related HL7 APPLICATION PARAMETERs inactive
;
D BMES^XPDUTL("* Inactivating PAIT HL7 Application Parameter...")
N SDMCN,SDPARA,SDIEN,INACT,SDMSG1,INACTMG
F SDMCN=1:1 S SDPARA=$P($TEXT(NAME771+SDMCN),";;",2) Q:SDPARA="$$END"!(SDPARA="") D
. S SDIEN=$O(^HL(771,"B",SDPARA,"")) D
. . I SDIEN="" S SDMSG1=" "_SDPARA_" not found. It's okay." D MES^XPDUTL(SDMSG1) Q
. . N DIE S DIE="^HL(771,",DA=SDIEN,DR="2///i"
. . D ^DIE
. . S INACTMG=" "_SDPARA
. . D MES^XPDUTL(INACTMG)
D MES^XPDUTL(" Done.")
Q
;
OPTLIST ; PAIT options
;;SD-PAIT MANUAL BATCH REJECT
;;SD-PAIT MANUAL TRANSMISSION
;;SD-PAIT TASKED TRANSMISSION
;;SD-PAIT REPAIR
;;$$END
;
NAME771 ; HL7 Application Parameter
;;SD-AAC-PAIT
;;SD-SITE-PAIT
;;$$END
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDRPSTOP 2871 printed Nov 22, 2024@18:10:21 Page 2
SDRPSTOP ;ALB/TXH - STOP PAIT HL7 TRANSMISSIONS;07/09/15
+1 ;;5.3;Scheduling;**639**;AUG 13, 1993;Build 7
+2 ;
+3 ; This post-init routine
+4 ; - disable the SD-PAIT Logical Link
+5 ; - unschedule the PAIT transmission task
+6 ; - place PAIT options Out of Order
+7 ; - inactivate PAIT related HL7 Application Parameters
+8 ;
+9 QUIT
+10 ;
EN ; Entry Point
+1 DO BMES^XPDUTL("SD*5.3*639 Post-Init Started...")
+2 DO LOGLNK
+3 DO DELETE
+4 DO OPTOUT
+5 DO INACT
+6 DO BMES^XPDUTL("SD*5.3*639 Post-Init Finished.")
+7 DO MES^XPDUTL(" ")
+8 QUIT
+9 ;
LOGLNK ; Disable the SD-PAIT Logical Link
+1 ;
+2 DO BMES^XPDUTL("* Disabling SD-PAIT Logical Link...")
+3 NEW SDLNK,SDMCL,DA,DR
+4 SET SDLNK="SD-PAIT"
+5 SET SDMCL=$ORDER(^HLCS(870,"B",SDLNK,""))
+6 IF SDMCL=""
DO MES^XPDUTL(" "_SDLNK_" not found. It's okay.")
QUIT
+7 ; get AUTOSTART disabled and set SHUTDOWN LLP to YES.
+8 NEW DIE
SET DIE="^HLCS(870,"
SET DA=SDMCL
SET DR="4.5///0;14///1"
+9 DO ^DIE
+10 DO MES^XPDUTL(" Done.")
+11 QUIT
+12 ;
DELETE ; Remove the PAIT transmission task in Option Schedule
+1 ;
+2 ; IA #6121 Remove Scheduled options from #19.2
+3 ; IA #2051 Database Server API: Lookup Utilities (DIC)
+4 ;
+5 DO BMES^XPDUTL("* Removing PAIT Transmission Task...")
+6 NEW SDRPTSK,SDOPT,DA,DIK
+7 SET SDRPTSK="SD-PAIT TASKED TRANSMISSION"
+8 SET SDOPT=$ORDER(^DIC(19,"B",SDRPTSK,""))
+9 IF SDOPT=""
DO MES^XPDUTL(" "_SDRPTSK_" not found. It's okay.")
QUIT
+10 SET DA=""
FOR
SET DA=$ORDER(^DIC(19.2,"B",SDOPT,DA))
if '+DA
QUIT
Begin DoDot:1
+11 SET ^XTMP("SDRPTSK",$JOB,0)=$$FMADD^XLFDT(DT+90)_"^"_DT_"^copy of SD-PAIT TASKED TRANSMISSION in #19.2^"_DA
+12 MERGE ^XTMP("SDRPTSK",$JOB,"DIC",19.2,DA)=^DIC(19.2,DA)
+13 SET DIK="^DIC(19.2,"
+14 DO ^DIK
End DoDot:1
+15 DO MES^XPDUTL(" Done.")
+16 QUIT
+17 ;
OPTOUT ; Set options out of order
+1 ;
+2 ; IA #1157 OUT^XPDMENU(OPT,TXT)
+3 ;
+4 DO BMES^XPDUTL("* Placing the following PAIT options out of order...")
+5 NEW SDMCN,SDOPT,SDTXT,OPTMSG
+6 SET SDTXT="This functionality is now accomplished by CDW/VSSC."
+7 FOR SDMCN=1:1
SET SDOPT=$PIECE($TEXT(OPTLIST+SDMCN),";;",2)
if SDOPT="$$END"!(SDOPT="")
QUIT
Begin DoDot:1
+8 ;Mark option out-of-order
DO OUT^XPDMENU(SDOPT,SDTXT)
+9 SET OPTMSG=" "_SDOPT
+10 DO MES^XPDUTL(OPTMSG)
End DoDot:1
+11 DO MES^XPDUTL(" Done.")
+12 QUIT
+13 ;
INACT ; Make PAIT related HL7 APPLICATION PARAMETERs inactive
+1 ;
+2 DO BMES^XPDUTL("* Inactivating PAIT HL7 Application Parameter...")
+3 NEW SDMCN,SDPARA,SDIEN,INACT,SDMSG1,INACTMG
+4 FOR SDMCN=1:1
SET SDPARA=$PIECE($TEXT(NAME771+SDMCN),";;",2)
if SDPARA="$$END"!(SDPARA="")
QUIT
Begin DoDot:1
+5 SET SDIEN=$ORDER(^HL(771,"B",SDPARA,""))
Begin DoDot:2
+6 IF SDIEN=""
SET SDMSG1=" "_SDPARA_" not found. It's okay."
DO MES^XPDUTL(SDMSG1)
QUIT
+7 NEW DIE
SET DIE="^HL(771,"
SET DA=SDIEN
SET DR="2///i"
+8 DO ^DIE
+9 SET INACTMG=" "_SDPARA
+10 DO MES^XPDUTL(INACTMG)
End DoDot:2
End DoDot:1
+11 DO MES^XPDUTL(" Done.")
+12 QUIT
+13 ;
OPTLIST ; PAIT options
+1 ;;SD-PAIT MANUAL BATCH REJECT
+2 ;;SD-PAIT MANUAL TRANSMISSION
+3 ;;SD-PAIT TASKED TRANSMISSION
+4 ;;SD-PAIT REPAIR
+5 ;;$$END
+6 ;
NAME771 ; HL7 Application Parameter
+1 ;;SD-AAC-PAIT
+2 ;;SD-SITE-PAIT
+3 ;;$$END