source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY21107.m@ 1774

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

initial load of WorldVistAEHR

File size: 7.3 KB
Line 
1ORY21107 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*211) ;APR 5,2005 at 08:07
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**211**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5S ;
6 ;
7 D DOT^ORY211ES
8 ;
9 ;
10 K REMOTE,LOCAL,OPCODE,REF
11 F LINE=1:1:500 S TEXT=$P($T(DATA+LINE),";",2,999) Q:TEXT I $L(TEXT) D Q:QUIT
12 .S ^TMP("OCXRULE",$J,$O(^TMP("OCXRULE",$J,"A"),-1)+1)=TEXT
13 ;
14 G ^ORY21108
15 ;
16 Q
17 ;
18DATA ;
19 ;
20 ;;R^"860.8:",100,2
21 ;;D^ ; ;SERUM CREATININE within <ORDAYS> in format:
22 ;;R^"860.8:",100,3
23 ;;D^ ; ; test id^result units flag ref range collection d/t
24 ;;R^"860.8:",100,4
25 ;;D^ ; N BDT,CDT,ORY,ORX,ORZ,X,ORI,ORJ,CREARSLT,LABFILE,SPECFILE
26 ;;R^"860.8:",100,5
27 ;;D^ ; Q:'$L($G(ORDFN)) "0^"
28 ;;R^"860.8:",100,6
29 ;;D^ ; Q:'$L($G(ORDAYS)) "0^"
30 ;;R^"860.8:",100,7
31 ;;D^ ; D NOW^%DTC
32 ;;R^"860.8:",100,8
33 ;;D^ ; S BDT=$$FMADD^XLFDT(%,"-"_ORDAYS,"","","")
34 ;;R^"860.8:",100,9
35 ;;D^ ; K %
36 ;;R^"860.8:",100,10
37 ;;D^ ; Q:'$L($G(BDT)) "0^"
38 ;;R^"860.8:",100,11
39 ;;D^ ; S LABFILE=$$TERMLKUP("SERUM CREATININE",.ORY)
40 ;;R^"860.8:",100,12
41 ;;D^ ; Q:$G(LABFILE)'=60 "0^"
42 ;;R^"860.8:",100,13
43 ;;D^ ; Q:+$D(ORY)<1 "0^"
44 ;;R^"860.8:",100,14
45 ;;D^ ; S SPECFILE=$$TERMLKUP("SERUM SPECIMEN",.ORX)
46 ;;R^"860.8:",100,15
47 ;;D^ ; Q:$G(SPECFILE)'=61 "0^"
48 ;;R^"860.8:",100,16
49 ;;D^ ; Q:+$D(ORX)<1 "0^"
50 ;;R^"860.8:",100,17
51 ;;D^ ; S ORI=0 F S ORI=$O(ORY(ORI)) Q:'ORI I +$G(CREARSLT)<1 D
52 ;;R^"860.8:",100,18
53 ;;D^ ; .S ORJ=0 F S ORJ=$O(ORX(ORJ)) Q:'ORJ I +$G(CREARSLT)<1 D
54 ;;R^"860.8:",100,19
55 ;;D^ ; ..S ORZ=$$LOCL^ORQQLR1(ORDFN,ORI,ORJ)
56 ;;R^"860.8:",100,20
57 ;;D^ ; ..Q:'$L($G(ORZ))
58 ;;R^"860.8:",100,21
59 ;;D^ ; ..S CDT=$P(ORZ,U,7)
60 ;;R^"860.8:",100,22
61 ;;D^ ; ..I CDT'<BDT S CREARSLT=1
62 ;;R^"860.8:",100,23
63 ;;D^ ; Q:+$G(CREARSLT)<1 "0^"
64 ;;R^"860.8:",100,24
65 ;;D^ ; Q $P(ORZ,U)_U_$P(ORZ,U,3)_" "_$P(ORZ,U,4)_" "_$P(ORZ,U,5)_" ("_$P(ORZ,U,6)_") "_$$FMTE^XLFDT(CDT,"2P")_U_$P(ORZ,U,3)
66 ;;EOR^
67 ;;KEY^860.8:^RETURN POINTED TO VALUE
68 ;;R^"860.8:",.01,"E"
69 ;;D^RETURN POINTED TO VALUE
70 ;;R^"860.8:",.02,"E"
71 ;;D^POINTER
72 ;;R^"860.8:",1,1
73 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
74 ;;R^"860.8:",1,2
75 ;;D^ ; ; of record D0 in file OCXFILE
76 ;;R^"860.8:",100,1
77 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
78 ;;R^"860.8:",100,2
79 ;;D^ ; ; of record D0 in file OCXFILE
80 ;;R^"860.8:",100,3
81 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
82 ;;R^"860.8:",100,4
83 ;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
84 ;;R^"860.8:",100,5
85 ;;D^ ; N GLREF
86 ;;R^"860.8:",100,6
87 ;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
88 ;;R^"860.8:",100,7
89 ;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
90 ;;R^"860.8:",100,8
91 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
92 ;;R^"860.8:",100,9
93 ;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
94 ;;R^"860.8:",100,10
95 ;;D^ ; ;
96 ;;EOR^
97 ;;KEY^860.8:^STRING CONTAINS ONE OF A LIST OF VALUES
98 ;;R^"860.8:",.01,"E"
99 ;;D^STRING CONTAINS ONE OF A LIST OF VALUES
100 ;;R^"860.8:",.02,"E"
101 ;;D^CLIST
102 ;;R^"860.8:",100,1
103 ;;D^ ;CLIST(DATA,LIST) ; DOES THE DATA FIELD CONTAIN AN ELEMENT IN THE LIST
104 ;;R^"860.8:",100,2
105 ;;D^ ; ;
106 ;;R^"860.8:",100,3
107 ;;D^T+; W:$G(OCXTRACE) !!,"$$CLIST(",DATA,",""",LIST,""")"
108 ;;R^"860.8:",100,4
109 ;;D^ ; N PC F PC=1:1:$L(LIST,","),0 I PC,$L($P(LIST,",",PC)),(DATA[$P(LIST,",",PC)) Q
110 ;;R^"860.8:",100,5
111 ;;D^ ; Q ''PC
112 ;;EOR^
113 ;;EOF^OCXS(860.8)^1
114 ;;SOF^860.6 ORDER CHECK DATA CONTEXT
115 ;;KEY^860.6:^CPRS ORDER PRESCAN
116 ;;R^"860.6:",.01,"E"
117 ;;D^CPRS ORDER PRESCAN
118 ;;R^"860.6:",.02,"E"
119 ;;D^OEPS
120 ;;R^"860.6:",1,"E"
121 ;;D^DATA DRIVEN
122 ;;EOR^
123 ;;KEY^860.6:^CPRS ORDER PROTOCOL
124 ;;R^"860.6:",.01,"E"
125 ;;D^CPRS ORDER PROTOCOL
126 ;;R^"860.6:",.02,"E"
127 ;;D^OERR
128 ;;R^"860.6:",1,"E"
129 ;;D^DATA DRIVEN
130 ;;EOR^
131 ;;KEY^860.6:^DATABASE LOOKUP
132 ;;R^"860.6:",.01,"E"
133 ;;D^DATABASE LOOKUP
134 ;;R^"860.6:",.02,"E"
135 ;;D^DL
136 ;;R^"860.6:",1,"E"
137 ;;D^PACKAGE LOOKUP
138 ;;EOR^
139 ;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
140 ;;R^"860.6:",.01,"E"
141 ;;D^GENERIC HL7 MESSAGE ARRAY
142 ;;R^"860.6:",.02,"E"
143 ;;D^HL7
144 ;;R^"860.6:",1,"E"
145 ;;D^DATA DRIVEN
146 ;;EOR^
147 ;;EOF^OCXS(860.6)^1
148 ;;SOF^860.5 ORDER CHECK DATA SOURCE
149 ;;KEY^860.5:^DATABASE LOOKUP
150 ;;R^"860.5:",.01,"E"
151 ;;D^DATABASE LOOKUP
152 ;;R^"860.5:",.02,"E"
153 ;;D^DATABASE LOOKUP
154 ;;EOR^
155 ;;KEY^860.5:^HL7 COMMON ORDER SEGMENT
156 ;;R^"860.5:",.01,"E"
157 ;;D^HL7 COMMON ORDER SEGMENT
158 ;;R^"860.5:",.02,"E"
159 ;;D^GENERIC HL7 MESSAGE ARRAY
160 ;;EOR^
161 ;;KEY^860.5:^HL7 PATIENT ID SEGMENT
162 ;;R^"860.5:",.01,"E"
163 ;;D^HL7 PATIENT ID SEGMENT
164 ;;R^"860.5:",.02,"E"
165 ;;D^GENERIC HL7 MESSAGE ARRAY
166 ;;EOR^
167 ;;KEY^860.5:^OERR ORDER EVENT FLAG PROTOCOL
168 ;;R^"860.5:",.01,"E"
169 ;;D^OERR ORDER EVENT FLAG PROTOCOL
170 ;;R^"860.5:",.02,"E"
171 ;;D^CPRS ORDER PROTOCOL
172 ;;EOR^
173 ;;KEY^860.5:^ORDER ENTRY ORDER PRESCAN
174 ;;R^"860.5:",.01,"E"
175 ;;D^ORDER ENTRY ORDER PRESCAN
176 ;;R^"860.5:",.02,"E"
177 ;;D^CPRS ORDER PRESCAN
178 ;;EOR^
179 ;;EOF^OCXS(860.5)^1
180 ;;SOF^860.4 ORDER CHECK DATA FIELD
181 ;;KEY^860.4:^ABNORMAL RENAL BIOCHEM RESULTS
182 ;;R^"860.4:",.01,"E"
183 ;;D^ABNORMAL RENAL BIOCHEM RESULTS
184 ;;R^"860.4:",101,"E"
185 ;;D^FREE TEXT
186 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
187 ;;D^DATABASE LOOKUP
188 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
189 ;;D^DATABASE LOOKUP
190 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
191 ;;D^PATIENT.REC_RENAL_ABNORM_RES
192 ;;EOR^
193 ;;KEY^860.4:^CONTRAST MEDIA CODE
194 ;;R^"860.4:",.01,"E"
195 ;;D^CONTRAST MEDIA CODE
196 ;;R^"860.4:",1,"E"
197 ;;D^CMC
198 ;;R^"860.4:",101,"E"
199 ;;D^FREE TEXT
200 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
201 ;;D^DATABASE LOOKUP
202 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
203 ;;D^DATABASE LOOKUP
204 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
205 ;;D^PATIENT.CONTR_MED_CODE
206 ;;EOR^
207 ;;KEY^860.4:^FILLER
208 ;;R^"860.4:",.01,"E"
209 ;;D^FILLER
210 ;;R^"860.4:",1,"E"
211 ;;D^FILL
212 ;;R^"860.4:",101,"E"
213 ;;D^FREE TEXT
214 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",.01,"E"
215 ;;D^CPRS ORDER PRESCAN
216 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",.02,"E"
217 ;;D^ORDER ENTRY ORDER PRESCAN
218 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",1,"E"
219 ;;D^PATIENT.OPS_FILLER
220 ;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",.01,"E"
221 ;;D^GENERIC HL7 MESSAGE ARRAY
222 ;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",.02,"E"
223 ;;D^HL7 COMMON ORDER SEGMENT
224 ;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",1,"E"
225 ;;D^PATIENT.HL7_FILLER
226 ;;EOR^
227 ;;KEY^860.4:^MOST RECENT RENAL TEST ABNORMAL FLAG
228 ;;R^"860.4:",.01,"E"
229 ;;D^MOST RECENT RENAL TEST ABNORMAL FLAG
230 ;;R^"860.4:",101,"E"
231 ;;D^BOOLEAN
232 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
233 ;;D^DATABASE LOOKUP
234 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
235 ;;D^DATABASE LOOKUP
236 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
237 ;;D^PATIENT.REC_RENAL_ABNORM_FLAG
238 ;;EOR^
239 ;;KEY^860.4:^ORDER MODE
240 ;;R^"860.4:",.01,"E"
241 ;;D^ORDER MODE
242 ;;R^"860.4:",101,"E"
243 ;;D^FREE TEXT
244 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",.01,"E"
245 ;;D^CPRS ORDER PRESCAN
246 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",.02,"E"
247 ;;D^ORDER ENTRY ORDER PRESCAN
248 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",1,"E"
249 ;;D^PATIENT.OPS_ORD_MODE
250 ;;EOR^
251 ;;KEY^860.4:^ORDERABLE ITEM IEN
252 ;;R^"860.4:",.01,"E"
253 ;;D^ORDERABLE ITEM IEN
254 ;;R^"860.4:",101,"E"
255 ;;D^NUMERIC
256 ;;R^"860.4:","860.41:CPRS ORDER PRESCAN^860.6",.01,"E"
257 ;1;
258 ;
Note: See TracBrowser for help on using the repository browser.