Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VAFEOHL1

VAFEOHL1.m

Go to the documentation of this file.
  1. VAFEOHL1 ;ALB/JLU/CAW;generates the HL7 message to be sent(con't);6/29/93
  1. ;;5.3;Registration;**38**;Aug 13, 1993
  1. ;
  1. MSH ;builds the MSH segment
  1. N X
  1. S VAFEDLCT=VAFEDLCT+1
  1. S X=HLMTN_$E(HLECH)_"R01"
  1. S VAFEDHL=$$MSH^HLFNC1(X)
  1. S $P(VAFEDHL,U,10)=$P(VAFEDHL,U,10)_"-"_HLEVN
  1. D LOG^VAFEDOHL
  1. Q
  1. ;
  1. PID ;Builds the PID segment fields 2,3,5,7,8,11,19
  1. N VAFEDHL
  1. S VAFEDLCT=VAFEDLCT+1
  1. S $P(VAFEDHL,HLFS,1)="PID"
  1. S $P(VAFEDHL,HLFS,3)=$$M11^HLFNC($TR($G(VA("PID")),"-",""))
  1. S $P(VAFEDHL,HLFS,4)=$$M11^HLFNC(DFN)
  1. S $P(VAFEDHL,HLFS,6)=$$HLNAME^HLFNC(VADM(1))
  1. S $P(VAFEDHL,HLFS,8)=$$HLDATE^HLFNC(+VADM(3))
  1. S $P(VAFEDHL,HLFS,9)=$P(VADM(5),U)
  1. 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))
  1. S $P(VAFEDHL,HLFS,20)=$E($P(VADM(2),U,1),1,9)
  1. D LOG^VAFEDOHL
  1. Q
  1. ;
  1. ZEL ;sets up the ZEL segment, fields 1,2 with elig of outpatient encounter
  1. N VAFEDHL
  1. S VAFEDLCT=VAFEDLCT+1
  1. I VAFELIG D G LOG
  1. .S $P(VAFEDHL,HLFS,1)="ZEL",$P(VAFEDHL,HLFS,13)=""
  1. .S $P(VAFEDHL,HLFS,2)=1 ; Sequential number
  1. .S $P(VAFEDHL,HLFS,3)=VAFELIG ; Eligibility code
  1. S VAFEDHL=$$EN^VAFHLZEL(DFN,"1,2",1)
  1. LOG D LOG^VAFEDOHL
  1. QUIT Q
  1. ;
  1. PV1 ;sets up the PV1 segment and the fields 2,3,7,10,19,39
  1. N VAFEDHL,PROV
  1. S VAFEDLCT=VAFEDLCT+1
  1. S $P(VAFEDHL,HLFS,1)="PV1"
  1. S $P(VAFEDHL,HLFS,3)="O"
  1. S $P(VAFEDHL,HLFS,4)=HLQ
  1. S PROV=$P(VAFEDST1,U,4)
  1. I PROV]"" DO
  1. .S PROV=$P(^VA(200,+PROV,0),U,1)
  1. .S $P(VAFEDHL,HLFS,8)=$P(VAFEDST1,U,4)_$E(HLECH)_$$HLNAME^HLFNC(PROV)
  1. S $P(VAFEDHL,HLFS,11)=$S(VAFEDT=98:$P(VAFEDST1,U,3),1:HLQ)
  1. S $P(VAFEDHL,HLFS,20)=VAFEDD
  1. S $P(VAFEDHL,HLFS,40)=$P(VAFEDST1,U,2)
  1. D LOG^VAFEDOHL
  1. Q