[613] | 1 | VAFHUTL2 ;ALB/CM UTILITIES ROUTINE ;5/1/95
|
---|
| 2 | ;;5.3;Registration;**91**;Jun 06, 1996
|
---|
| 3 | ;
|
---|
| 4 | ;
|
---|
| 5 | EBULL(DFN,EDATE,PIVOT,XMTEXT) ;
|
---|
| 6 | ;This routine will generate an error bulletin when a segment and/or
|
---|
| 7 | ;message was unable to be generated
|
---|
| 8 | ;
|
---|
| 9 | ;Input: DFN - Patient file
|
---|
| 10 | ; EDATE - event date/time in FileMan format
|
---|
| 11 | ; PIVOT - pivot number
|
---|
| 12 | ; XMTEXT - global or array root (EX. "^TMP("), location of error message(s)
|
---|
| 13 | ;
|
---|
| 14 | ;
|
---|
| 15 | S XMB="VAFH ADT/HL7 ERROR"
|
---|
| 16 | D NOW^%DTC S XMDT=X K X
|
---|
| 17 | S XMB(1)=$S(+DFN:$P($G(^DPT(DFN,0)),"^"),1:"UNKNOWN"),Y=EDATE
|
---|
| 18 | D DD^%DT S XMB(2)=Y,XMB(3)=PIVOT K Y
|
---|
| 19 | S XMDUZ=$S($D(DUZ):DUZ,1:.5)
|
---|
| 20 | D ^XMB
|
---|
| 21 | K XMB,XMDT
|
---|
| 22 | Q
|
---|
| 23 | ;
|
---|
| 24 | SET ;
|
---|
| 25 | ;This is the set logic for the AHL7 cross reference on the PRIMARY
|
---|
| 26 | ;LONG ID (.363) of the PATIENT file (#2)
|
---|
| 27 | ;
|
---|
| 28 | N KILL
|
---|
| 29 | I $D(^TMP($J,"VAFHLMRG")) K ^TMP($J,"VAFHLMRG") S KILL="Y"
|
---|
| 30 | I '$D(^TMP($J,"VAFHLMRG"))&('$D(KILL)) S ^TMP($J,"VAFHLMRG")=""
|
---|
| 31 | Q
|
---|
| 32 | ;
|
---|
| 33 | KILL(DFN,ENTRY) ;
|
---|
| 34 | ;This is the kill logic for the AHL7 cross reference on the PRIMARY
|
---|
| 35 | ;LONG ID (.363) of the PATIENT file (#2)
|
---|
| 36 | ;
|
---|
| 37 | I $D(^TMP($J,"VAFHSSN")) K ^TMP($J,"VAFHSSN"),^TMP($J,"VAFHLMRG")
|
---|
| 38 | I '$D(^TMP($J,"VAFHLMRG")) D EN^VAFHDD("M",DFN,ENTRY)
|
---|
| 39 | Q
|
---|