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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1VAFHLA34 ;ALB/JLU;creates the A34 message.
2 ;;5.3;Registration;**91**;Jun 06, 1996
3 ;
4EN(DFN,GBL,CTR,APL,BEF,STAT,PID,ZPD,ID) ;builds the actual A34 message content. INIT OF
5 ;HLTRANS and all of the HL7 varaiables most have been set up.
6 ;
7 ;DFN - The DFN of the Patient
8 ;GBL - The GLOBAL to store message
9 ;CTR - the counter to start at
10 ;APL - The HL7 application or HLMTN
11 ;BEF - This is the before value of the PID
12 ;STAT - The status of this event (old or new)
13 ;PID - The fields to be returned from the PID call
14 ;ZPD - The fields to be returned from the ZPD call
15 ;ID - Contains the set ID field for HL7 (OPTIONAL)
16 ;
17 N VAR
18 DO
19 .I $S('$D(DFN):1,DFN="":1,1:0) S VAR="Patient not identified" Q
20 .I $S('$D(GBL):1,GBL="":1,1:0) S VAR="Storage global not identified" Q
21 .I $S('$D(CTR):1,CTR="":1,1:0) S VAR="Counter to start at not identified" Q
22 .I $S('$D(APL):1,APL="":1,1:0) S VAR="Calling application not identified" Q
23 .I $S('$D(BEF):1,BEF="":1,1:0) S VAR="Before value of PID not identified" Q
24 .I $S('$D(STAT):1,STAT="":1,1:0) S VAR="Status of event not identified" Q
25 .I $S('$D(PID):1,PID="":1,1:0) S VAR="Fields for PID not identified" Q
26 .I $S('$D(ZPD):1,ZPD="":1,1:0) S VAR="Fields for ZPD not identified" Q
27 .Q
28 I $D(VAR) G ERR
29 S @GBL@(CTR)=$$EVN^VAFHLEVN("A34",STAT) ;creates the EVN segment
30 S CTR=CTR+1
31 S @GBL@(CTR)=$$EN^VAFHLPID(DFN,PID) ;creates the PID segment
32 S CTR=CTR+1
33 S @GBL@(CTR)=$$EN^VAFHLZPD(DFN,ZPD) ;creates the ZPD segment
34 S CTR=CTR+1
35 S @GBL@(CTR)=$$EN^VAFHLMRG(DFN,BEF) ;creates the MRG segment
36 Q 1_U_CTR
37ERR Q -1_U_VAR
Note: See TracBrowser for help on using the repository browser.