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

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

initial load of WorldVistAEHR

File size: 4.0 KB
RevLine 
[613]1VAFCMSG4 ;ALB/JRP-MESSAGE BUILDER UTILITIES ;26-MAR-2003
2 ;;5.3;Registration;**91,209,149,415,484,508**;Jun 06, 1996
3 ;
4SEGMENTS(EVNTTYPE,SEGARRY) ;Build list of HL7 segments for given event type
5 ;
6 ;Input : EVNTTYPE - Event type to build list for (Defaults to A08)
7 ; Currently supported events:
8 ; A04, A08, A28
9 ; SEGARRY - Array to place output in (full global reference)
10 ; (Defaults to ^TMP("VAFC SEGMENTS",$J))
11 ;Output : None
12 ; SEGARRY(Seq,Name) = Fields
13 ; SEGARRY(Name,"BLD") = Executable code to build HL7 segment
14 ; SEGARRY(Name,"CPY") = Executable code to copy HL7 segment
15 ; into HL7 message
16 ; SEGARRY(Name,"DEL") = Executable code to delete variables
17 ; used to build HL7 segment
18 ; Seq - Sequencing number to order the segments as
19 ; they should be placed in the HL7 message
20 ; Name - Name of HL7 segment
21 ; Fields - List of fields used by segment
22 ; VAFSTR would be set to this value
23 ;Notes : MSH segment is not included
24 ; : SEGARRY will be KILLed on entry
25 ;
26 ;Check input
27 S EVNTTYPE=$G(EVNTTYPE)
28 S:(EVNTTYPE="") EVNTTYPE="A08"
29 S SEGARRY=$G(SEGARRY)
30 S:(SEGARRY="") SEGARRY="^TMP(""VAFC SEGMENTS"","_$J_")"
31 K @SEGARRY
32 ;Declare variables
33 N X,OK
34 ;Check for supported event
35 S OK=0
36 F X="A04","A08","A28" I X=EVNTTYPE S OK=1 Q
37 Q:('OK)
38 ;Segments used by A04, A08, A28
39 S @SEGARRY@(1,"EVN")="1,2,4"
40 S @SEGARRY@("EVN","BLD")="D BLDEVN^VAFCMSG3"
41 S @SEGARRY@("EVN","CPY")="D CPYEVN^VAFCMSG3"
42 S @SEGARRY@("EVN","DEL")="D DELEVN^VAFCMSG3"
43 S @SEGARRY@(2,"PID")=$$COMMANUM^VAFCADT2(1,9)_",10B,11PC,"_$$COMMANUM^VAFCADT2(13,21)_",22B,"_$$COMMANUM^VAFCADT2(23,30)
44 S @SEGARRY@("PID","BLD")="D BLDPID^VAFCMSG3"
45 S @SEGARRY@("PID","CPY")="D CPYPID^VAFCMSG3"
46 S @SEGARRY@("PID","DEL")="D DELPID^VAFCMSG3"
47 S @SEGARRY@(3,"PD1")=$$COMMANUM^VAFCADT2(1,12)
48 S @SEGARRY@("PD1","BLD")="D BLDPD1^VAFCMSG3"
49 S @SEGARRY@("PD1","CPY")="D CPYPD1^VAFCMSG3"
50 S @SEGARRY@("PD1","DEL")="D DELPD1^VAFCMSG3"
51 S @SEGARRY@(4,"PV1")="2,3,6,7,10,18,44,45,50"
52 S @SEGARRY@("PV1","BLD")="D BLDPV1^VAFCMSG3"
53 S @SEGARRY@("PV1","CPY")="D CPYPV1^VAFCMSG3"
54 S @SEGARRY@("PV1","DEL")="D DELPV1^VAFCMSG3"
55 S @SEGARRY@(5,"ROL")="1,2,3,4"
56 S @SEGARRY@("ROL","BLD")="D BLDROL^VAFCMSG3"
57 S @SEGARRY@("ROL","CPY")="D CPYROL^VAFCMSG3"
58 S @SEGARRY@("ROL","DEL")="D DELROL^VAFCMSG3"
59 S @SEGARRY@(6,"OBX")=""
60 S @SEGARRY@("OBX","BLD")="D BLDOBX^VAFCMSG3"
61 S @SEGARRY@("OBX","CPY")="D CPYOBX^VAFCMSG3"
62 S @SEGARRY@("OBX","DEL")="D DELOBX^VAFCMSG3"
63 S @SEGARRY@(7,"ZPD")=$$COMMANUM^VAFCADT2(1,21)
64 S @SEGARRY@("ZPD","BLD")="D BLDZPD^VAFCMSG3"
65 S @SEGARRY@("ZPD","CPY")="D CPYZPD^VAFCMSG3"
66 S @SEGARRY@("ZPD","DEL")="D DELZPD^VAFCMSG3"
67 S @SEGARRY@(8,"ZSP")="1,2,3,4,5"
680 S @SEGARRY@("ZSP","BLD")="D BLDZSP^VAFCMSG3"
69 S @SEGARRY@("ZSP","CPY")="D CPYZSP^VAFCMSG3"
70 S @SEGARRY@("ZSP","DEL")="D DELZSP^VAFCMSG3"
71 S @SEGARRY@(9,"ZEL")=$$COMMANUM^VAFCADT2(1,22)
72 S @SEGARRY@("ZEL","BLD")="D BLDZEL^VAFCMSG3"
73 S @SEGARRY@("ZEL","CPY")="D CPYZEL^VAFCMSG3"
74 S @SEGARRY@("ZEL","DEL")="D DELZEL^VAFCMSG3"
75 S @SEGARRY@(10,"ZCT")="1,2,3,4,5,6,7,8,9"
76 S @SEGARRY@("ZCT","BLD")="D BLDZCT^VAFCMSG3"
77 S @SEGARRY@("ZCT","CPY")="D CPYZCT^VAFCMSG3"
78 S @SEGARRY@("ZCT","DEL")="D DELZCT^VAFCMSG3"
79 S @SEGARRY@(11,"ZEM")="1,2,3,4,5,6,7,8"
80 S @SEGARRY@("ZEM","BLD")="D BLDZEM^VAFCMSG3"
81 S @SEGARRY@("ZEM","CPY")="D CPYZEM^VAFCMSG3"
82 S @SEGARRY@("ZEM","DEL")="D DELZEM^VAFCMSG3"
83 S @SEGARRY@(12,"ZFF")=""
84 S @SEGARRY@("ZFF","BLD")="D BLDZFF^VAFCMSG3"
85 S @SEGARRY@("ZFF","CPY")="D CPYZFF^VAFCMSG3"
86 S @SEGARRY@("ZFF","DEL")="D DELZFF^VAFCMSG3"
87 S @SEGARRY@(13,"ZIR")=$$COMMANUM^VAFCADT2(1,13)
88 S @SEGARRY@("ZIR","BLD")="D BLDZIR^VAFCMSG3"
89 S @SEGARRY@("ZIR","CPY")="D CPYZIR^VAFCMSG3"
90 S @SEGARRY@("ZIR","DEL")="D DELZIR^VAFCMSG3"
91 S @SEGARRY@(14,"ZEN")=$$COMMANUM^VAFCADT2(1,10)
92 S @SEGARRY@("ZEN","BLD")="D BLDZEN^VAFCMSG3"
93 S @SEGARRY@("ZEN","CPY")="D CPYZEN^VAFCMSG3"
94 S @SEGARRY@("ZEN","DEL")="D DELZEN^VAFCMSG3"
95 Q
Note: See TracBrowser for help on using the repository browser.