source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7VORM2.m@ 701

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

initial load of WorldVistAEHR

File size: 4.8 KB
Line 
1LA7VORM2 ;DALOI/JMC - LAB ORM (Order) message builder cont'd ; 11-21-986
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**46**;Sep 27, 1994
3 ;
4 ; Observation/Result segment for Lab Results sent with Order Message
5 ; Build OBX segments for orders that have required info to be sent
6 ; with order.
7 ; e.g. patient height/weight, specimen weight
8 ;
9PTHT(LA7VAL,LA764061,LA7953,LA74,LA7OBXSN,LA7HLSN,LA7FS,LA7ECH,LA76249) ; Send patient height
10 ; Call with LA7VAL = patient height
11 ; LA764061 = IEN of units in file #64.061
12 ; LA7953 = LOINC code
13 ; LA74 = performing institution
14 ; LA7OBXSN = sequence id of this OBX segment
15 ; LA7HLSN = segment counter for message (pass by reference)
16 ; LA7FS = HL field separator
17 ; LA7ECH = HL encoding characters
18 ; LA76249 = IEN of entry in #62.49
19 ;
20 N LA7OBX
21 S LA7OBX(2)=$$OBX2^LA7VOBX(62.801,1.11)
22 S LA7OBX(3)=$$OBX3^LA7VOBX("",LA7953,"",LA7FS,LA7ECH) ; LOINC code
23 S LA7OBX(5)=$$OBX5^LA7VOBX(LA7VAL,LA7OBX(2),LA7FS,LA7ECH) ; height value
24 S LA7OBX(6)=$$OBX6^LA7VOBX("",LA764061,LA7FS,LA7ECH) ; unit
25 D GEN
26 Q
27 ;
28PTWT(LA7VAL,LA764061,LA7953,LA74,LA7OBXSN,LA7HLSN,LA7FS,LA7ECH,LA76249) ; Send patient weight
29 ; Call with LA7VAL = patient weight
30 ; LA764061 = IEN of units in file #64.061
31 ; LA7953 = LOINC code
32 ; LA74 = performing institution
33 ; LA7OBXSN = sequence id of this OBX segment
34 ; LA7HLSN = segment counter for message (pass by reference)
35 ; LA7FS = HL field separator
36 ; LA7ECH = HL encoding characters
37 ; LA76249 = IEN of entry in #62.49
38 ;
39 N LA7OBX
40 S LA7OBX(2)=$$OBX2^LA7VOBX(62.801,1.21)
41 S LA7OBX(3)=$$OBX3^LA7VOBX("",LA7953,"",LA7FS,LA7ECH) ; LOINC code
42 S LA7OBX(5)=$$OBX5^LA7VOBX(LA7VAL,LA7OBX(2),LA7FS,LA7ECH) ; weight value
43 S LA7OBX(6)=$$OBX6^LA7VOBX("",LA764061,LA7FS,LA7ECH) ; unit
44 D GEN
45 Q
46 ;
47SPWT(LA7VAL,LA764061,LA7DUR,LA7953,LA74,LA7OBXSN,LA7HLSN,LA7FS,LA7ECH,LA76249) ; Send specimen weight
48 ; Call with LA7VAL = specimen weight
49 ; LA764061 = IEN of units in file #64.061
50 ; LA7DUR = collection duration
51 ; LA7953 = LOINC code
52 ; LA74 = performing institution
53 ; LA7OBXSN = sequence id of this OBX segment (pass by reference)
54 ; LA7HLSN = segment counter for message (pass by reference)
55 ; LA7FS = HL field separator
56 ; LA7ECH = HL encoding characters
57 ; LA76249 = IEN of entry in #62.49
58 ;
59 N LA7LOINC,LA7OBX
60 S LA7OBX(2)=$$OBX2^LA7VOBX(62.801,2.31)
61 S LA7OBX(3)=$$OBX3^LA7VOBX("",LA7953,"",LA7FS,LA7ECH) ; LOINC code
62 S LA7OBX(5)=$$OBX5^LA7VOBX(LA7VAL,LA7OBX(2),LA7FS,LA7ECH) ; weight value
63 S LA7OBX(6)=$$OBX6^LA7VOBX("",LA764061,LA7FS,LA7ECH) ; unit
64 D GEN
65 Q
66 ;
67 ;
68SPCV(LA7VAL,LA764061,LA7953,LA74,LA7OBXSN,LA7HLSN,LA7FS,LA7ECH,LA76249) ; Specimen collection volume
69 ; Call with LA7VAL = collection volume
70 ; LA764061 = IEN of units in file #64.061
71 ; LA7953 = LOINC code
72 ; LA74 = performing institution
73 ; LA7OBXSN = sequence id of this OBX segment
74 ; LA7HLSN = segment counter for message (pass by reference)
75 ; LA7FS = HL field separator
76 ; LA7ECH = HL encoding characters
77 ; LA76249 = IEN of entry in #62.49
78 ;
79 N LA7OBX
80 ;
81 S LA7OBX(2)=$$OBX2^LA7VOBX(62.801,2.11)
82 ; LOINC code
83 S LA7OBX(3)=$$OBX3^LA7VOBX("",LA7953,"",LA7FS,LA7ECH)
84 ; Collection volume
85 S LA7OBX(5)=$$OBX5^LA7VOBX(LA7VAL,LA7OBX(2),LA7FS,LA7ECH)
86 S LA7OBX(6)=$$OBX6^LA7VOBX("",LA764061,LA7FS,LA7ECH) ; unit
87 D GEN
88 Q
89 ;
90 ;
91SPDUR(LA7VAL,LA764061,LA7953,LA74,LA7OBXSN,LA7HLSN,LA7FS,LA7ECH,LA76249) ; Specimen collection duration
92 ; Call with LA7VAL = collection duration
93 ; LA764061 = IEN of units in file #64.061
94 ; LA7953 = LOINC code
95 ; LA74 = performing institution
96 ; LA7OBXSN = sequence id of this OBX segment
97 ; LA7HLSN = segment counter for message (pass by reference)
98 ; LA7FS = HL field separator
99 ; LA7ECH = HL encoding characters
100 ; LA76249 = IEN of entry in #62.49
101 ;
102 N LA7OBX
103 ;
104 S LA7OBX(2)=$$OBX2^LA7VOBX(62.801,2.22)
105 ; LOINC code
106 S LA7OBX(3)=$$OBX3^LA7VOBX("",LA7953,"",LA7FS,LA7ECH)
107 ; Collection duration
108 S LA7OBX(5)=$$OBX5^LA7VOBX(LA7VAL,LA7OBX(2),LA7FS,LA7ECH)
109 S LA7OBX(6)=$$OBX6^LA7VOBX("",LA764061,LA7FS,LA7ECH) ; unit
110 D GEN
111 Q
112 ;
113 ;
114GEN ; Fields common to OBX segment
115 ;
116 N LA7DATA
117 ;
118 S LA7OBX(0)="OBX"
119 ; OBX segment id
120 S LA7OBX(1)=$$OBX1^LA7VOBX(.LA7OBXSN)
121 S LA7OBX(11)="F"
122 ; Facility that performed the testing
123 S LA7OBX(15)=$$OBX15^LA7VOBX(LA74,LA7FS,LA7ECH)
124 ;
125 D BUILDSEG^LA7VHLU(.LA7OBX,.LA7DATA,LA7FS)
126 D FILESEG^LA7VHLU(GBL,.LA7DATA)
127 D FILE6249^LA7VHLU(LA76249,.LA7DATA)
128 Q
Note: See TracBrowser for help on using the repository browser.