source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY26704.m@ 789

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

initial load of WorldVistAEHR

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