source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY14403.m@ 949

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

initial load of WorldVistAEHR

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