PRCXSTOP ;ALB/TXH - STOP FPDS HL7 TRANSMISSIONS;10/08/20
;;5.1;IFCAP;**220**;AUG 13, 1993;Build 23
;
; This post-init routine will
; - disable the IFCAP_FPDS Logical Link
; - purge outstanding entries in files 773/772 for logical link "IFCAP_FPDS
;
Q
;
EN ; Entry Point
D BMES^XPDUTL("PRC*5.1*220 Post-Init Started...")
D LOGLNK
Q
;
LOGLNK ; Disable the IFCAP_FPDS Logical Link
;
D BMES^XPDUTL(" * Disabling the following Logical Link...")
N PRCLOG,PRCLOGN,PRCLOGLK,DR,PRCLKMSG,PRCLNK,PRCTT,PRCHL7TX,PRCII
S PRCLOG=0,PRCTT=0,U="^"
F PRCLOGN=1:1 S PRCLOGLK=$P($TEXT(LOGLIST+PRCLOGN),";;",2) Q:PRCLOGLK="$$END"!(PRCLOGLK="") D
. S PRCLNK=+$$FIND1^DIC(870,"","BX",PRCLOGLK,"","","")
. I PRCLNK="" D MES^XPDUTL(" "_PRCLOGLK_" not found. It's okay.") Q
. ; Get AUTOSTART disabled and set SHUTDOWN LLP to YES.
. ; Get STATE "SHUTDOWN" and set TIME STOPPED to date/time.
. N DIE S DIE="^HLCS(870,",DA=PRCLNK,DR="4.5///0;14///1"
. D ^DIE
. S PRCLKMSG=" "_PRCLOGLK
. D MES^XPDUTL(PRCLKMSG)
D MES^XPDUTL(" Done.")
PURGHL7 ;purge any pending FPDS HL7 messages from file 773
D BMES^XPDUTL(" * Purging all HL7 pending messages for FPDS Logical Link 'IFCAP_FPDS'...")
F PRCII="I","O" S PRCHL7TX=0 F S PRCHL7TX=$O(^HLMA("AC",PRCII,PRCLNK,PRCHL7TX)) Q:'PRCHL7TX D
. S DA=$P($G(^HLMA(PRCHL7TX,0)),U) I DA S DIK="^HL(772," D ^DIK
. S PRCTT=PRCTT+1
. S DA=PRCHL7TX,DIK="^HLMA(" D ^DIK K ^HLMA("AC",PRCII,PRCLNK,PRCHL7TX)
K DA,DIK
D MES^XPDUTL(" Done. "_PRCTT_" HL7 FPDS ENTRIES PURGED")
Q
;
LOGLIST ; Logical Links
;;IFCAP_FPDS
;;$$END
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCXSTOP 1623 printed Dec 13, 2024@02:20:29 Page 2
PRCXSTOP ;ALB/TXH - STOP FPDS HL7 TRANSMISSIONS;10/08/20
+1 ;;5.1;IFCAP;**220**;AUG 13, 1993;Build 23
+2 ;
+3 ; This post-init routine will
+4 ; - disable the IFCAP_FPDS Logical Link
+5 ; - purge outstanding entries in files 773/772 for logical link "IFCAP_FPDS
+6 ;
+7 QUIT
+8 ;
EN ; Entry Point
+1 DO BMES^XPDUTL("PRC*5.1*220 Post-Init Started...")
+2 DO LOGLNK
+3 QUIT
+4 ;
LOGLNK ; Disable the IFCAP_FPDS Logical Link
+1 ;
+2 DO BMES^XPDUTL(" * Disabling the following Logical Link...")
+3 NEW PRCLOG,PRCLOGN,PRCLOGLK,DR,PRCLKMSG,PRCLNK,PRCTT,PRCHL7TX,PRCII
+4 SET PRCLOG=0
SET PRCTT=0
SET U="^"
+5 FOR PRCLOGN=1:1
SET PRCLOGLK=$PIECE($TEXT(LOGLIST+PRCLOGN),";;",2)
if PRCLOGLK="$$END"!(PRCLOGLK="")
QUIT
Begin DoDot:1
+6 SET PRCLNK=+$$FIND1^DIC(870,"","BX",PRCLOGLK,"","","")
+7 IF PRCLNK=""
DO MES^XPDUTL(" "_PRCLOGLK_" not found. It's okay.")
QUIT
+8 ; Get AUTOSTART disabled and set SHUTDOWN LLP to YES.
+9 ; Get STATE "SHUTDOWN" and set TIME STOPPED to date/time.
+10 NEW DIE
SET DIE="^HLCS(870,"
SET DA=PRCLNK
SET DR="4.5///0;14///1"
+11 DO ^DIE
+12 SET PRCLKMSG=" "_PRCLOGLK
+13 DO MES^XPDUTL(PRCLKMSG)
End DoDot:1
+14 DO MES^XPDUTL(" Done.")
PURGHL7 ;purge any pending FPDS HL7 messages from file 773
+1 DO BMES^XPDUTL(" * Purging all HL7 pending messages for FPDS Logical Link 'IFCAP_FPDS'...")
+2 FOR PRCII="I","O"
SET PRCHL7TX=0
FOR
SET PRCHL7TX=$ORDER(^HLMA("AC",PRCII,PRCLNK,PRCHL7TX))
if 'PRCHL7TX
QUIT
Begin DoDot:1
+3 SET DA=$PIECE($GET(^HLMA(PRCHL7TX,0)),U)
IF DA
SET DIK="^HL(772,"
DO ^DIK
+4 SET PRCTT=PRCTT+1
+5 SET DA=PRCHL7TX
SET DIK="^HLMA("
DO ^DIK
KILL ^HLMA("AC",PRCII,PRCLNK,PRCHL7TX)
End DoDot:1
+6 KILL DA,DIK
+7 DO MES^XPDUTL(" Done. "_PRCTT_" HL7 FPDS ENTRIES PURGED")
+8 QUIT
+9 ;
LOGLIST ; Logical Links
+1 ;;IFCAP_FPDS
+2 ;;$$END
+3 ;