source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY22106.m@ 841

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

initial load of WorldVistAEHR

File size: 7.3 KB
Line 
1ORY22106 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*221) ;AUG 30,2005 at 11:41
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**221**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5S ;
6 ;
7 D DOT^ORY221ES
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 ^ORY22107
15 ;
16 Q
17 ;
18DATA ;
19 ;
20 ;;R^"863.3:","863.32:2",1,"E"
21 ;;D^0
22 ;;EOR^
23 ;;KEY^863.3:^PATIENT.REN_LAB_RES
24 ;;R^"863.3:",.01,"E"
25 ;;D^PATIENT.REN_LAB_RES
26 ;;R^"863.3:",.02,"E"
27 ;;D^PATIENT
28 ;;R^"863.3:",.05,"E"
29 ;;D^LAB RESULTS
30 ;;R^"863.3:",.06,"E"
31 ;;D^99
32 ;;R^"863.3:","863.32:1",.01,"E"
33 ;;D^OCXO EXTERNAL FUNCTION CALL
34 ;;R^"863.3:","863.32:1",1,"E"
35 ;;D^FLAB(|PATIENT IEN|,"SERUM CREATININE^SERUM UREA NITROGEN","SERUM SPECIMEN")
36 ;;EOR^
37 ;;KEY^863.3:^PATIENT.TAKING_GLUCOPHAGE
38 ;;R^"863.3:",.01,"E"
39 ;;D^PATIENT.TAKING_GLUCOPHAGE
40 ;;R^"863.3:",.02,"E"
41 ;;D^PATIENT
42 ;;R^"863.3:",.05,"E"
43 ;;D^CURRENT GLUCOPHAGE FLAG
44 ;;R^"863.3:",.06,"E"
45 ;;D^999
46 ;;R^"863.3:","863.32:1",.01,"E"
47 ;;D^OCXO EXTERNAL FUNCTION CALL
48 ;;R^"863.3:","863.32:1",1,"E"
49 ;;D^TAKEMED^ORKPS(|PATIENT IEN|,"^GLUCOPHAGE^METFORMIN^AVANDAMET^METAGLIP")
50 ;;R^"863.3:","863.32:2",.01,"E"
51 ;;D^OCXO UP-ARROW PIECE NUMBER
52 ;;R^"863.3:","863.32:2",1,"E"
53 ;;D^1
54 ;;EOR^
55 ;;EOF^OCXS(863.3)^1
56 ;;SOF^860.9 ORDER CHECK NATIONAL TERM
57 ;;KEY^860.9:^ANGIOGRAM (PERIPHERAL)
58 ;;R^"860.9:",.01,"E"
59 ;;D^ANGIOGRAM (PERIPHERAL)
60 ;;R^"860.9:",.02,"E"
61 ;;D^101.43
62 ;;EOR^
63 ;;KEY^860.9:^BLOOD SPECIMEN
64 ;;R^"860.9:",.01,"E"
65 ;;D^BLOOD SPECIMEN
66 ;;R^"860.9:",.02,"E"
67 ;;D^61
68 ;;EOR^
69 ;;KEY^860.9:^DANGEROUS MEDS FOR PTS > 64
70 ;;R^"860.9:",.01,"E"
71 ;;D^DANGEROUS MEDS FOR PTS > 64
72 ;;R^"860.9:",.02,"E"
73 ;;D^101.43
74 ;;R^"860.9:",2,"E"
75 ;;D^I $P($G(^ORD(100.98,$P($G(^ORD(101.43,+Y,0)),U,5),0)),U)="PHARMACY"
76 ;;EOR^
77 ;;KEY^860.9:^DNR
78 ;;R^"860.9:",.01,"E"
79 ;;D^DNR
80 ;;R^"860.9:",.02,"E"
81 ;;D^101.43
82 ;;EOR^
83 ;;KEY^860.9:^EGFR
84 ;;R^"860.9:",.01,"E"
85 ;;D^EGFR
86 ;;R^"860.9:",.02,"E"
87 ;;D^60
88 ;;EOR^
89 ;;KEY^860.9:^FOOD-DRUG INTERACTION MED
90 ;;R^"860.9:",.01,"E"
91 ;;D^FOOD-DRUG INTERACTION MED
92 ;;R^"860.9:",.02,"E"
93 ;;D^101.43
94 ;;R^"860.9:",2,"E"
95 ;;D^I $P($G(^ORD(100.98,$P($G(^ORD(101.43,+Y,0)),U,5),0)),U)="PHARMACY"
96 ;;EOR^
97 ;;KEY^860.9:^NPO
98 ;;R^"860.9:",.01,"E"
99 ;;D^NPO
100 ;;R^"860.9:",.02,"E"
101 ;;D^101.43
102 ;;EOR^
103 ;;KEY^860.9:^ONE TIME MED
104 ;;R^"860.9:",.01,"E"
105 ;;D^ONE TIME MED
106 ;;R^"860.9:",.02,"E"
107 ;;D^51.1
108 ;;R^"860.9:",2,"E"
109 ;;D^I $E($P(^(0),U,4),1,2)="PS"
110 ;;EOR^
111 ;;KEY^860.9:^PARTIAL THROMBOPLASTIN TIME
112 ;;R^"860.9:",.01,"E"
113 ;;D^PARTIAL THROMBOPLASTIN TIME
114 ;;R^"860.9:",.02,"E"
115 ;;D^101.43
116 ;;EOR^
117 ;;KEY^860.9:^PROTHROMBIN TIME
118 ;;R^"860.9:",.01,"E"
119 ;;D^PROTHROMBIN TIME
120 ;;R^"860.9:",.02,"E"
121 ;;D^101.43
122 ;;EOR^
123 ;;KEY^860.9:^SERUM CREATININE
124 ;;R^"860.9:",.01,"E"
125 ;;D^SERUM CREATININE
126 ;;R^"860.9:",.02,"E"
127 ;;D^60
128 ;;EOR^
129 ;;KEY^860.9:^SERUM SPECIMEN
130 ;;R^"860.9:",.01,"E"
131 ;;D^SERUM SPECIMEN
132 ;;R^"860.9:",.02,"E"
133 ;;D^61
134 ;;EOR^
135 ;;KEY^860.9:^SERUM UREA NITROGEN
136 ;;R^"860.9:",.01,"E"
137 ;;D^SERUM UREA NITROGEN
138 ;;R^"860.9:",.02,"E"
139 ;;D^60
140 ;;EOR^
141 ;;KEY^860.9:^WBC
142 ;;R^"860.9:",.01,"E"
143 ;;D^WBC
144 ;;R^"860.9:",.02,"E"
145 ;;D^60
146 ;;EOR^
147 ;;EOF^OCXS(860.9)^1
148 ;;SOF^860.8 ORDER CHECK COMPILER FUNCTIONS
149 ;;KEY^860.8:^CONVERT DATE FROM FILEMAN FORMAT TO OCX FORMAT
150 ;;R^"860.8:",.01,"E"
151 ;;D^CONVERT DATE FROM FILEMAN FORMAT TO OCX FORMAT
152 ;;R^"860.8:",.02,"E"
153 ;;D^DT2INT
154 ;;R^"860.8:",1,1
155 ;;D^ ;DT2INT(OCXDT) ; This Local Extrinsic Function converts a date into an integer
156 ;;R^"860.8:",1,2
157 ;;D^ ; ; By taking the Years, Months, Days, Hours and Minutes converting
158 ;;R^"860.8:",1,3
159 ;;D^ ; ; Them into Seconds and then adding them all together into one big integer
160 ;;R^"860.8:",100,1
161 ;;D^ ;DT2INT(OCXDT) ; This Local Extrinsic Function converts a date into an integer
162 ;;R^"860.8:",100,2
163 ;;D^ ; ; By taking the Years, Months, Days, Hours and Minutes converting
164 ;;R^"860.8:",100,3
165 ;;D^ ; ; Them into Seconds and then adding them all together into one big integer
166 ;;R^"860.8:",100,4
167 ;;D^ ; ;
168 ;;R^"860.8:",100,5
169 ;;D^ ; Q:'$L($G(OCXDT)) ""
170 ;;R^"860.8:",100,6
171 ;;D^ ; N OCXDIFF,OCXVAL S (OCXDIFF,OCXVAL)=0
172 ;;R^"860.8:",100,7
173 ;;D^ ; ;
174 ;;R^"860.8:",100,8
175 ;;D^ ; I $L(OCXDT),'OCXDT,(OCXDT[" at ") D ; EXTERNAL EXPERT SYSTEM FORMAT 1 TO EXTERNAL FORMAT
176 ;;R^"860.8:",100,9
177 ;;D^ ; .N OCXHR,OCXMIN,OCXTIME
178 ;;R^"860.8:",100,10
179 ;;D^ ; .S OCXTIME=$P($P(OCXDT," at ",2),".",1),OCXHR=$P(OCXTIME,":",1),OCXMIN=$P(OCXTIME,":",2)
180 ;;R^"860.8:",100,11
181 ;;D^ ; .S:(OCXDT["Midnight") OCXHR=00
182 ;;R^"860.8:",100,12
183 ;;D^ ; .S:(OCXDT["PM") OCXHR=OCXHR+12
184 ;;R^"860.8:",100,13
185 ;;D^ ; .S OCXDT=$P(OCXDT," at ")_"@"_$E(OCXHR+100,2,3)_$E(OCXMIN+100,2,3)
186 ;;R^"860.8:",100,14
187 ;;D^ ; ;
188 ;;R^"860.8:",100,15
189 ;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 2 TO EXTERNAL FORMAT
190 ;;R^"860.8:",100,16
191 ;;D^ ; .N OCXMON
192 ;;R^"860.8:",100,17
193 ;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
194 ;;R^"860.8:",100,18
195 ;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_"@"_$TR($P(OCXDT," ",2),":","")
196 ;;R^"860.8:",100,19
197 ;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)
198 ;;R^"860.8:",100,20
199 ;;D^ ; ;
200 ;;R^"860.8:",100,21
201 ;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 3 TO EXTERNAL FORMAT
202 ;;R^"860.8:",100,22
203 ;;D^ ; .N OCXMON
204 ;;R^"860.8:",100,23
205 ;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
206 ;;R^"860.8:",100,24
207 ;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_","_$P($P(OCXDT," ",1),"/",3)_"@"_$TR($P(OCXDT," ",2),":","")
208 ;;R^"860.8:",100,25
209 ;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_", "_$P($P(OCXDT," ",1),"/",3)
210 ;;R^"860.8:",100,26
211 ;;D^ ; ;
212 ;;R^"860.8:",100,27
213 ;;D^ ; I $L(OCXDT),'OCXDT D ; EXTERNAL FORMAT TO INTERNAL FILEMAN FORMAT
214 ;;R^"860.8:",100,28
215 ;;D^ ; .I (OCXDT["@0000") S OCXDT=$P(OCXDT,"@",1),OCXDIFF=1
216 ;;R^"860.8:",100,29
217 ;;D^ ; .N %DT,X,Y S X=OCXDT,%DT="" S:(OCXDT["@")!(OCXDT="N") %DT="T" D ^%DT S OCXDT=+Y
218 ;;R^"860.8:",100,30
219 ;;D^ ; ;
220 ;;R^"860.8:",100,31
221 ;;D^ ; I ($L(OCXDT\1)>7) S OCXDT=$$HL7TFM^XLFDT(OCXDT) ; HL7 FORMAT TO INTERNAL FILEMAN FORMAT
222 ;;R^"860.8:",100,32
223 ;;D^ ; ;
224 ;;R^"860.8:",100,33
225 ;;D^ ; I ($L(OCXDT\1)=7) S OCXDT=$$FMTH^XLFDT(+OCXDT) ; INTERNAL FILEMAN FORMAT TO $H FORMAT
226 ;;R^"860.8:",100,34
227 ;;D^ ; ;
228 ;;R^"860.8:",100,35
229 ;;D^ ; I (OCXDT?5N1","1.5N) S OCXVAL=(OCXDT*86400)+$P(OCXDT,",",2) ; $H FORMAT TO EXPERT SYSTEM INTERNAL FORMAT
230 ;;R^"860.8:",100,36
231 ;;D^ ; ;
232 ;;R^"860.8:",100,37
233 ;;D^ ; Q OCXVAL
234 ;;R^"860.8:",100,38
235 ;;D^ ; ;
236 ;;EOR^
237 ;;KEY^860.8:^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
238 ;;R^"860.8:",.01,"E"
239 ;;D^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
240 ;;R^"860.8:",.02,"E"
241 ;;D^INT2DT
242 ;;R^"860.8:",1,1
243 ;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
244 ;;R^"860.8:",1,2
245 ;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
246 ;;R^"860.8:",1,3
247 ;;D^ ; ;
248 ;;R^"860.8:",100,1
249 ;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
250 ;1;
251 ;
Note: See TracBrowser for help on using the repository browser.