source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY22109.m@ 996

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

initial load of FOIAVistA 6/30/08 version

File size: 7.2 KB
Line 
1ORY22109 ;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 ^ORY2210A
15 ;
16 Q
17 ;
18DATA ;
19 ;
20 ;;R^"860.8:",100,7
21 ;;D^ ; S OCXORD=+$G(OCXORD),OCXDFN=+OCXDFN
22 ;;R^"860.8:",100,8
23 ;;D^ ; ;
24 ;;R^"860.8:",100,9
25 ;;D^ ; N OCXNDX,OCXDATA,OCXDFI,OCXELE,OCXGR,OCXTIME,OCXCKSUM,OCXTSP,OCXTSPL
26 ;;R^"860.8:",100,10
27 ;;D^ ; ;
28 ;;R^"860.8:",100,11
29 ;;D^ ; S OCXTIME=(+$H)
30 ;;R^"860.8:",100,12
31 ;;D^ ; S OCXCKSUM=$$CKSUM(OCXMESS)
32 ;;R^"860.8:",100,13
33 ;;D^ ; ;
34 ;;R^"860.8:",100,14
35 ;;D^ ; S OCXTSP=($H*86400)+$P($H,",",2)
36 ;;R^"860.8:",100,15
37 ;;D^ ; S OCXTSPL=($G(^OCXD(860.7,"AT",OCXTIME,OCXDFN,OCXRUL,+OCXORD,OCXCKSUM))+$G(OCXTSPI,300))
38 ;;R^"860.8:",100,16
39 ;;D^ ; ;
40 ;;R^"860.8:",100,17
41 ;;D^ ; Q:(OCXTSPL>OCXTSP) 0
42 ;;R^"860.8:",100,18
43 ;;D^ ; ;
44 ;;R^"860.8:",100,19
45 ;;D^ ; K OCXDATA
46 ;;R^"860.8:",100,20
47 ;;D^ ; S OCXDATA(OCXDFN,0)=OCXDFN
48 ;;R^"860.8:",100,21
49 ;;D^ ; S OCXDATA("B",OCXDFN,OCXDFN)=""
50 ;;R^"860.8:",100,22
51 ;;D^ ; S OCXDATA("AT",OCXTIME,OCXDFN,OCXRUL,+OCXORD,OCXCKSUM)=OCXTSP
52 ;;R^"860.8:",100,23
53 ;;D^ ; ;
54 ;;R^"860.8:",100,24
55 ;;D^ ; S OCXGR="^OCXD(860.7"
56 ;;R^"860.8:",100,25
57 ;;D^T+; D SETAP(OCXGR_")",0,"Patient",$P($G(^DPT(OCXDFN,0)),U,1),.OCXDATA,OCXDFN)
58 ;;R^"860.8:",100,26
59 ;;D^T-; D SETAP(OCXGR_")",0,.OCXDATA,OCXDFN)
60 ;;R^"860.8:",100,27
61 ;;D^ ; ;
62 ;;R^"860.8:",100,28
63 ;;D^ ; K OCXDATA
64 ;;R^"860.8:",100,29
65 ;;D^ ; S OCXDATA(OCXRUL,0)=OCXRUL_U_(OCXTIME)_U_(+OCXORD)
66 ;;R^"860.8:",100,30
67 ;;D^ ; S OCXDATA(OCXRUL,"M")=OCXMESS
68 ;;R^"860.8:",100,31
69 ;;D^ ; S OCXDATA("B",OCXRUL,OCXRUL)=""
70 ;;R^"860.8:",100,32
71 ;;D^ ; S OCXGR=OCXGR_","_OCXDFN_",1"
72 ;;R^"860.8:",100,33
73 ;;D^T+; D SETAP(OCXGR_")","860.71P","Rule",$P($G(^OCXS(860.2,OCXRUL,0)),U,1),.OCXDATA,OCXRUL)
74 ;;R^"860.8:",100,34
75 ;;D^T-; D SETAP(OCXGR_")","860.71P",.OCXDATA,OCXRUL)
76 ;;R^"860.8:",100,35
77 ;;D^ ; ;
78 ;;R^"860.8:",100,36
79 ;;D^ ; K OCXDATA
80 ;;R^"860.8:",100,37
81 ;;D^ ; S OCXDATA(OCXREL,0)=OCXREL
82 ;;R^"860.8:",100,38
83 ;;D^ ; S OCXDATA("B",OCXREL,OCXREL)=""
84 ;;R^"860.8:",100,39
85 ;;D^ ; S OCXGR=OCXGR_","_OCXRUL_",1"
86 ;;R^"860.8:",100,40
87 ;;D^T+; D SETAP(OCXGR_")","860.712","Relation",OCXREL,.OCXDATA,OCXREL)
88 ;;R^"860.8:",100,41
89 ;;D^T-; D SETAP(OCXGR_")","860.712",.OCXDATA,OCXREL)
90 ;;R^"860.8:",100,42
91 ;;D^ ; ;
92 ;;R^"860.8:",100,43
93 ;;D^ ; S OCXELE=0 F S OCXELE=$O(^OCXS(860.2,OCXRUL,"C","C",OCXELE)) Q:'OCXELE D
94 ;;R^"860.8:",100,44
95 ;;D^ ; .;
96 ;;R^"860.8:",100,45
97 ;;D^ ; .N OCXGR1
98 ;;R^"860.8:",100,46
99 ;;D^ ; .S OCXGR1=OCXGR_","_OCXREL_",1"
100 ;;R^"860.8:",100,47
101 ;;D^ ; .K OCXDATA
102 ;;R^"860.8:",100,48
103 ;;D^ ; .S OCXDATA(OCXELE,0)=OCXELE
104 ;;R^"860.8:",100,49
105 ;;D^ ; .S OCXDATA(OCXELE,"TIME")=OCXTIME
106 ;;R^"860.8:",100,50
107 ;;D^ ; .S OCXDATA(OCXELE,"LOG")=$G(OCXOLOG)
108 ;;R^"860.8:",100,51
109 ;;D^ ; .S OCXDATA("B",OCXELE,OCXELE)=""
110 ;;R^"860.8:",100,52
111 ;;D^ ; .K ^OCXD(860.7,OCXDFN,1,OCXRUL,1,OCXREL,1,OCXELE)
112 ;;R^"860.8:",100,53
113 ;;D^T+; .D SETAP(OCXGR1_")","860.7122P","Element",$P($G(^OCXS(860.3,OCXELE,0)),U,1),.OCXDATA,OCXELE)
114 ;;R^"860.8:",100,54
115 ;;D^T-; .D SETAP(OCXGR1_")","860.7122P",.OCXDATA,OCXELE)
116 ;;R^"860.8:",100,55
117 ;;D^ ; .;
118 ;;R^"860.8:",100,56
119 ;;D^ ; .S OCXDFI=0 F S OCXDFI=$O(^TMP("OCXCHK",$J,OCXDFN,OCXELE,OCXDFI)) Q:'OCXDFI D
120 ;;R^"860.8:",100,57
121 ;;D^ ; ..N OCXGR2
122 ;;R^"860.8:",100,58
123 ;;D^ ; ..S OCXGR2=OCXGR1_","_OCXELE_",1"
124 ;;R^"860.8:",100,59
125 ;;D^ ; ..K OCXDATA
126 ;;R^"860.8:",100,60
127 ;;D^ ; ..S OCXDATA(OCXDFI,0)=OCXDFI
128 ;;R^"860.8:",100,61
129 ;;D^ ; ..S OCXDATA(OCXDFI,"VAL")=^TMP("OCXCHK",$J,OCXDFN,OCXELE,OCXDFI)
130 ;;R^"860.8:",100,62
131 ;;D^ ; ..S OCXDATA("B",OCXDFI,OCXDFI)=""
132 ;;R^"860.8:",100,63
133 ;;D^T+; ..D SETAP(OCXGR2_")","860.71223P","Data Field",$P($G(^OCXS(860.4,OCXDFI,0)),U,1),.OCXDATA,OCXDFI)
134 ;;R^"860.8:",100,64
135 ;;D^T-; ..D SETAP(OCXGR2_")","860.71223P",.OCXDATA,OCXDFI)
136 ;;R^"860.8:",100,65
137 ;;D^ ; ;
138 ;;R^"860.8:",100,66
139 ;;D^ ; Q 1
140 ;;R^"860.8:",100,67
141 ;;D^ ; ;
142 ;;R^"860.8:",100,68
143 ;;D^T+;SETAP(ROOT,DD,ITEM,ITEMNAME,DATA,DA) ; Set Rule Event data
144 ;;R^"860.8:",100,69
145 ;;D^T-;SETAP(ROOT,DD,DATA,DA) ; Set Rule Event data
146 ;;R^"860.8:",100,70
147 ;;D^ ; M @ROOT=DATA
148 ;;R^"860.8:",100,71
149 ;;D^ ; I +$G(DD) S @ROOT@(0)="^"_($G(DD))_"^"_($P($G(@ROOT@(0)),U,3)+1)_"^"_$G(DA)
150 ;;R^"860.8:",100,72
151 ;;D^ ; I '$G(DD) S $P(@ROOT@(0),U,3,4)=($P($G(@ROOT@(0)),U,3)+1)_"^"_$G(DA)
152 ;;R^"860.8:",100,73
153 ;;D^T+; W:$G(OCXTRACE) !,"File Active Data ",$G(ITEM),": ",$G(ITEMNAME)
154 ;;R^"860.8:",100,74
155 ;;D^ ; ;
156 ;;R^"860.8:",100,75
157 ;;D^ ; Q
158 ;;R^"860.8:",100,76
159 ;;D^ ; ;
160 ;;R^"860.8:",100,77
161 ;;D^ ; ;
162 ;;EOR^
163 ;;KEY^860.8:^RETURN POINTED TO VALUE
164 ;;R^"860.8:",.01,"E"
165 ;;D^RETURN POINTED TO VALUE
166 ;;R^"860.8:",.02,"E"
167 ;;D^POINTER
168 ;;R^"860.8:",1,1
169 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
170 ;;R^"860.8:",1,2
171 ;;D^ ; ; of record D0 in file OCXFILE
172 ;;R^"860.8:",100,1
173 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
174 ;;R^"860.8:",100,2
175 ;;D^ ; ; of record D0 in file OCXFILE
176 ;;R^"860.8:",100,3
177 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
178 ;;R^"860.8:",100,4
179 ;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
180 ;;R^"860.8:",100,5
181 ;;D^ ; N GLREF
182 ;;R^"860.8:",100,6
183 ;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
184 ;;R^"860.8:",100,7
185 ;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
186 ;;R^"860.8:",100,8
187 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
188 ;;R^"860.8:",100,9
189 ;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
190 ;;R^"860.8:",100,10
191 ;;D^ ; ;
192 ;;EOR^
193 ;;KEY^860.8:^STRING CONTAINS ONE OF A LIST OF VALUES
194 ;;R^"860.8:",.01,"E"
195 ;;D^STRING CONTAINS ONE OF A LIST OF VALUES
196 ;;R^"860.8:",.02,"E"
197 ;;D^CLIST
198 ;;R^"860.8:",100,1
199 ;;D^ ;CLIST(DATA,LIST) ; DOES THE DATA FIELD CONTAIN AN ELEMENT IN THE LIST
200 ;;R^"860.8:",100,2
201 ;;D^ ; ;
202 ;;R^"860.8:",100,3
203 ;;D^T+; W:$G(OCXTRACE) !!,"$$CLIST(",DATA,",""",LIST,""")"
204 ;;R^"860.8:",100,4
205 ;;D^ ; N PC F PC=1:1:$L(LIST,","),0 I PC,$L($P(LIST,",",PC)),(DATA[$P(LIST,",",PC)) Q
206 ;;R^"860.8:",100,5
207 ;;D^ ; Q ''PC
208 ;;EOR^
209 ;;EOF^OCXS(860.8)^1
210 ;;SOF^860.6 ORDER CHECK DATA CONTEXT
211 ;;KEY^860.6:^CPRS ORDER PRESCAN
212 ;;R^"860.6:",.01,"E"
213 ;;D^CPRS ORDER PRESCAN
214 ;;R^"860.6:",.02,"E"
215 ;;D^OEPS
216 ;;R^"860.6:",1,"E"
217 ;;D^DATA DRIVEN
218 ;;EOR^
219 ;;KEY^860.6:^CPRS ORDER PROTOCOL
220 ;;R^"860.6:",.01,"E"
221 ;;D^CPRS ORDER PROTOCOL
222 ;;R^"860.6:",.02,"E"
223 ;;D^OERR
224 ;;R^"860.6:",1,"E"
225 ;;D^DATA DRIVEN
226 ;;EOR^
227 ;;KEY^860.6:^DATABASE LOOKUP
228 ;;R^"860.6:",.01,"E"
229 ;;D^DATABASE LOOKUP
230 ;;R^"860.6:",.02,"E"
231 ;;D^DL
232 ;;R^"860.6:",1,"E"
233 ;;D^PACKAGE LOOKUP
234 ;;EOR^
235 ;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
236 ;;R^"860.6:",.01,"E"
237 ;;D^GENERIC HL7 MESSAGE ARRAY
238 ;;R^"860.6:",.02,"E"
239 ;;D^HL7
240 ;;R^"860.6:",1,"E"
241 ;;D^DATA DRIVEN
242 ;;EOR^
243 ;;EOF^OCXS(860.6)^1
244 ;;SOF^860.5 ORDER CHECK DATA SOURCE
245 ;;KEY^860.5:^DATABASE LOOKUP
246 ;;R^"860.5:",.01,"E"
247 ;;D^DATABASE LOOKUP
248 ;;R^"860.5:",.02,"E"
249 ;;D^DATABASE LOOKUP
250 ;;EOR^
251 ;;KEY^860.5:^HL7 COMMON ORDER SEGMENT
252 ;;R^"860.5:",.01,"E"
253 ;1;
254 ;
Note: See TracBrowser for help on using the repository browser.