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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1VAFEOHL1 ;ALB/JLU/CAW;generates the HL7 message to be sent(con't);6/29/93
2 ;;5.3;Registration;**38**;Aug 13, 1993
3 ;
4MSH ;builds the MSH segment
5 N X
6 S VAFEDLCT=VAFEDLCT+1
7 S X=HLMTN_$E(HLECH)_"R01"
8 S VAFEDHL=$$MSH^HLFNC1(X)
9 S $P(VAFEDHL,U,10)=$P(VAFEDHL,U,10)_"-"_HLEVN
10 D LOG^VAFEDOHL
11 Q
12 ;
13PID ;Builds the PID segment fields 2,3,5,7,8,11,19
14 N VAFEDHL
15 S VAFEDLCT=VAFEDLCT+1
16 S $P(VAFEDHL,HLFS,1)="PID"
17 S $P(VAFEDHL,HLFS,3)=$$M11^HLFNC($TR($G(VA("PID")),"-",""))
18 S $P(VAFEDHL,HLFS,4)=$$M11^HLFNC(DFN)
19 S $P(VAFEDHL,HLFS,6)=$$HLNAME^HLFNC(VADM(1))
20 S $P(VAFEDHL,HLFS,8)=$$HLDATE^HLFNC(+VADM(3))
21 S $P(VAFEDHL,HLFS,9)=$P(VADM(5),U)
22 S $P(VAFEDHL,HLFS,12)=$$ADDR^VAFHLFNC(VAPA(1)_U_VAPA(2)_U_VAPA(3)_U_VAPA(4)_U_+VAPA(5)_U_$P(VAPA(11),U,2),+VAPA(7))
23 S $P(VAFEDHL,HLFS,20)=$E($P(VADM(2),U,1),1,9)
24 D LOG^VAFEDOHL
25 Q
26 ;
27ZEL ;sets up the ZEL segment, fields 1,2 with elig of outpatient encounter
28 N VAFEDHL
29 S VAFEDLCT=VAFEDLCT+1
30 I VAFELIG D G LOG
31 .S $P(VAFEDHL,HLFS,1)="ZEL",$P(VAFEDHL,HLFS,13)=""
32 .S $P(VAFEDHL,HLFS,2)=1 ; Sequential number
33 .S $P(VAFEDHL,HLFS,3)=VAFELIG ; Eligibility code
34 S VAFEDHL=$$EN^VAFHLZEL(DFN,"1,2",1)
35LOG D LOG^VAFEDOHL
36QUIT Q
37 ;
38PV1 ;sets up the PV1 segment and the fields 2,3,7,10,19,39
39 N VAFEDHL,PROV
40 S VAFEDLCT=VAFEDLCT+1
41 S $P(VAFEDHL,HLFS,1)="PV1"
42 S $P(VAFEDHL,HLFS,3)="O"
43 S $P(VAFEDHL,HLFS,4)=HLQ
44 S PROV=$P(VAFEDST1,U,4)
45 I PROV]"" DO
46 .S PROV=$P(^VA(200,+PROV,0),U,1)
47 .S $P(VAFEDHL,HLFS,8)=$P(VAFEDST1,U,4)_$E(HLECH)_$$HLNAME^HLFNC(PROV)
48 S $P(VAFEDHL,HLFS,11)=$S(VAFEDT=98:$P(VAFEDST1,U,3),1:HLQ)
49 S $P(VAFEDHL,HLFS,20)=VAFEDD
50 S $P(VAFEDHL,HLFS,40)=$P(VAFEDST1,U,2)
51 D LOG^VAFEDOHL
52 Q
Note: See TracBrowser for help on using the repository browser.