VAFHLA08 ;ALB/CM HL7 A08 MESSAGE BUILDING ;05/01/95
;;5.3;Registration;**91**;Jun 06, 1996
;
;This routine will build an HL7 A08 Message for an inpatient or
;outpatient event depending on the entry point used.
;Use IN for inpatient
;Use OUT for outpatient
;
IN ;
Q
;
OUT(DFN,EVENT,EVDT,VPTR,PISTR,ZSTR,PSTR,XSTR,PDNUM,ZNUM,PNUM,XNUM) ;
;DFN - Patient file DFN
;EVENT - Event number from pivot file
;EVDT - event date/time FileMan format
;VPTR - variable pointer
;PISTR - fields to be included in PID (null - required fields,
;or string of fields seperated by commas)
;ZSTR - fields to be included in ZPD (null - required fields,
;or string of fields seperated by commas)
;PSTR - fields to be included in OPV1
;(if null - required fields, if "A" - supported
;fields, or string of fields seperated by commas")
;XSTR - fields to be included in ODG1
;(if null - required fields, if "A" - supported
;fields, or string of fields seperated by commas")
;PDNUM - ID # for PID (optional)
;ZNUM - ID # for ZPD (optional)
;PNUM - ID # for OPV1 (optional)
;XNUM - ID # for ODG1 (optional)
;
I '$D(PDNUM) S PDNUM=1
I '$D(ZNUM) S ZNUM=1
I '$D(PNUM) S PNUM=1
I '$D(XNUM) S XNUM=1
S ERR=$$OA08^VAFHCA08($G(DFN),$G(EVENT),$G(EVDT),$G(VPTR),$G(PISTR),$G(ZSTR),$G(PSTR),$G(XSTR),PDNUM,ZNUM,PNUM,XNUM)
Q ERR
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAFHLA08 1358 printed Sep 02, 2024@19:48:09 Page 2
VAFHLA08 ;ALB/CM HL7 A08 MESSAGE BUILDING ;05/01/95
+1 ;;5.3;Registration;**91**;Jun 06, 1996
+2 ;
+3 ;This routine will build an HL7 A08 Message for an inpatient or
+4 ;outpatient event depending on the entry point used.
+5 ;Use IN for inpatient
+6 ;Use OUT for outpatient
+7 ;
IN ;
+1 QUIT
+2 ;
OUT(DFN,EVENT,EVDT,VPTR,PISTR,ZSTR,PSTR,XSTR,PDNUM,ZNUM,PNUM,XNUM) ;
+1 ;DFN - Patient file DFN
+2 ;EVENT - Event number from pivot file
+3 ;EVDT - event date/time FileMan format
+4 ;VPTR - variable pointer
+5 ;PISTR - fields to be included in PID (null - required fields,
+6 ;or string of fields seperated by commas)
+7 ;ZSTR - fields to be included in ZPD (null - required fields,
+8 ;or string of fields seperated by commas)
+9 ;PSTR - fields to be included in OPV1
+10 ;(if null - required fields, if "A" - supported
+11 ;fields, or string of fields seperated by commas")
+12 ;XSTR - fields to be included in ODG1
+13 ;(if null - required fields, if "A" - supported
+14 ;fields, or string of fields seperated by commas")
+15 ;PDNUM - ID # for PID (optional)
+16 ;ZNUM - ID # for ZPD (optional)
+17 ;PNUM - ID # for OPV1 (optional)
+18 ;XNUM - ID # for ODG1 (optional)
+19 ;
+20 IF '$DATA(PDNUM)
SET PDNUM=1
+21 IF '$DATA(ZNUM)
SET ZNUM=1
+22 IF '$DATA(PNUM)
SET PNUM=1
+23 IF '$DATA(XNUM)
SET XNUM=1
+24 SET ERR=$$OA08^VAFHCA08($GET(DFN),$GET(EVENT),$GET(EVDT),$GET(VPTR),$GET(PISTR),$GET(ZSTR),$GET(PSTR),$GET(XSTR),PDNUM,ZNUM,PNUM,XNUM)
+25 QUIT ERR