VAFHUTL2 ;ALB/CM UTILITIES ROUTINE ;5/1/95
;;5.3;Registration;**91**;Jun 06, 1996
;
;
EBULL(DFN,EDATE,PIVOT,XMTEXT) ;
;This routine will generate an error bulletin when a segment and/or
;message was unable to be generated
;
;Input: DFN - Patient file
; EDATE - event date/time in FileMan format
; PIVOT - pivot number
; XMTEXT - global or array root (EX. "^TMP("), location of error message(s)
;
;
S XMB="VAFH ADT/HL7 ERROR"
D NOW^%DTC S XMDT=X K X
S XMB(1)=$S(+DFN:$P($G(^DPT(DFN,0)),"^"),1:"UNKNOWN"),Y=EDATE
D DD^%DT S XMB(2)=Y,XMB(3)=PIVOT K Y
S XMDUZ=$S($D(DUZ):DUZ,1:.5)
D ^XMB
K XMB,XMDT
Q
;
SET ;
;This is the set logic for the AHL7 cross reference on the PRIMARY
;LONG ID (.363) of the PATIENT file (#2)
;
N KILL
I $D(^TMP($J,"VAFHLMRG")) K ^TMP($J,"VAFHLMRG") S KILL="Y"
I '$D(^TMP($J,"VAFHLMRG"))&('$D(KILL)) S ^TMP($J,"VAFHLMRG")=""
Q
;
KILL(DFN,ENTRY) ;
;This is the kill logic for the AHL7 cross reference on the PRIMARY
;LONG ID (.363) of the PATIENT file (#2)
;
I $D(^TMP($J,"VAFHSSN")) K ^TMP($J,"VAFHSSN"),^TMP($J,"VAFHLMRG")
I '$D(^TMP($J,"VAFHLMRG")) D EN^VAFHDD("M",DFN,ENTRY)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAFHUTL2 1202 printed Dec 13, 2024@03:03:52 Page 2
VAFHUTL2 ;ALB/CM UTILITIES ROUTINE ;5/1/95
+1 ;;5.3;Registration;**91**;Jun 06, 1996
+2 ;
+3 ;
EBULL(DFN,EDATE,PIVOT,XMTEXT) ;
+1 ;This routine will generate an error bulletin when a segment and/or
+2 ;message was unable to be generated
+3 ;
+4 ;Input: DFN - Patient file
+5 ; EDATE - event date/time in FileMan format
+6 ; PIVOT - pivot number
+7 ; XMTEXT - global or array root (EX. "^TMP("), location of error message(s)
+8 ;
+9 ;
+10 SET XMB="VAFH ADT/HL7 ERROR"
+11 DO NOW^%DTC
SET XMDT=X
KILL X
+12 SET XMB(1)=$SELECT(+DFN:$PIECE($GET(^DPT(DFN,0)),"^"),1:"UNKNOWN")
SET Y=EDATE
+13 DO DD^%DT
SET XMB(2)=Y
SET XMB(3)=PIVOT
KILL Y
+14 SET XMDUZ=$SELECT($DATA(DUZ):DUZ,1:.5)
+15 DO ^XMB
+16 KILL XMB,XMDT
+17 QUIT
+18 ;
SET ;
+1 ;This is the set logic for the AHL7 cross reference on the PRIMARY
+2 ;LONG ID (.363) of the PATIENT file (#2)
+3 ;
+4 NEW KILL
+5 IF $DATA(^TMP($JOB,"VAFHLMRG"))
KILL ^TMP($JOB,"VAFHLMRG")
SET KILL="Y"
+6 IF '$DATA(^TMP($JOB,"VAFHLMRG"))&('$DATA(KILL))
SET ^TMP($JOB,"VAFHLMRG")=""
+7 QUIT
+8 ;
KILL(DFN,ENTRY) ;
+1 ;This is the kill logic for the AHL7 cross reference on the PRIMARY
+2 ;LONG ID (.363) of the PATIENT file (#2)
+3 ;
+4 IF $DATA(^TMP($JOB,"VAFHSSN"))
KILL ^TMP($JOB,"VAFHSSN"),^TMP($JOB,"VAFHLMRG")
+5 IF '$DATA(^TMP($JOB,"VAFHLMRG"))
DO EN^VAFHDD("M",DFN,ENTRY)
+6 QUIT