source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY26706.m@ 757

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

initial load of FOIAVistA 6/30/08 version

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