source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/VAFHUTL2.m@ 1696

Last change on this file since 1696 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1VAFHUTL2 ;ALB/CM UTILITIES ROUTINE ;5/1/95
2 ;;5.3;Registration;**91**;Jun 06, 1996
3 ;
4 ;
5EBULL(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 ;
24SET ;
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 ;
33KILL(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
Note: See TracBrowser for help on using the repository browser.