source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOZ0X.m@ 1195

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

revised back to 6/30/08 version

File size: 6.2 KB
RevLine 
[623]1OCXOZ0X ;SLC/RJS,CLA - Order Check Scan ;DEC 27,2007 at 06:00
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,221**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5 ; ***************************************************************
6 ; ** Warning: This routine is automatically generated by the **
7 ; ** Rule Compiler (^OCXOCMP) and ANY changes to this routine **
8 ; ** will be lost the next time the rule compiler executes. **
9 ; ***************************************************************
10 ;
11 Q
12 ;
13R57R4B ; Send Order Check, Notication messages and/or Execute code for Rule #57 'CLOZAPINE' Relation #4 'CLOZAPINE AND 3.0 <= WBC < 3.5 AND ANC >= 1.5'
14 ; Called from R57R4A+14^OCXOZ0W.
15 ;
16 Q:$G(OCXOERR)
17 ;
18 ; Local Extrinsic Functions
19 ; GETDATA( ---------> GET DATA FROM THE ACTIVE DATA FILE
20 ;
21 Q:$D(OCXRULE("R57R4B"))
22 ;
23 N OCXNMSG,OCXCMSG,OCXPORD,OCXFORD,OCXDATA,OCXNUM,OCXDUZ,OCXQUIT,OCXLOGS,OCXLOGD
24 I ($G(OCXOSRC)="CPRS ORDER PRESCAN") S OCXCMSG=(+OCXPSD)_"^19^^WBC between 3.0 and 3.5 with ANC >= 1.5 - please repeat CBC/Diff including WBC and ANC immediately and twice weekly. Most recent results - "_$$GETDATA(DFN,"115^116^120",130) I 1
25 E S OCXCMSG="WBC between 3.0 and 3.5 with ANC >= 1.5 - please repeat CBC/Diff including WBC and ANC immediately and twice weekly. Most recent results - "_$$GETDATA(DFN,"115^116^120",130)
26 S OCXNMSG=""
27 ;
28 Q:$G(OCXOERR)
29 ;
30 ; Send Order Check Message
31 ;
32 S OCXOCMSG($O(OCXOCMSG(999999),-1)+1)=OCXCMSG
33 Q
34 ;
35R57R5A ; Verify all Event/Elements of Rule #57 'CLOZAPINE' Relation #5 'CLOZAPINE AND WBC >= 3.5'
36 ; Called from EL116+9^OCXOZ0H, and EL121+5^OCXOZ0I.
37 ;
38 Q:$G(OCXOERR)
39 ;
40 ; Local Extrinsic Functions
41 ; MCE116( ----------> Verify Event/Element: 'CLOZAPINE DRUG SELECTED'
42 ; MCE121( ----------> Verify Event/Element: 'CLOZAPINE WBC >= 3.5'
43 ;
44 Q:$G(^OCXS(860.2,57,"INACT"))
45 ;
46 I $$MCE116 D
47 .I $$MCE121 D R57R5B
48 Q
49 ;
50R57R5B ; Send Order Check, Notication messages and/or Execute code for Rule #57 'CLOZAPINE' Relation #5 'CLOZAPINE AND WBC >= 3.5'
51 ; Called from R57R5A+12.
52 ;
53 Q:$G(OCXOERR)
54 ;
55 ; Local Extrinsic Functions
56 ; GETDATA( ---------> GET DATA FROM THE ACTIVE DATA FILE
57 ;
58 Q:$D(OCXRULE("R57R5B"))
59 ;
60 N OCXNMSG,OCXCMSG,OCXPORD,OCXFORD,OCXDATA,OCXNUM,OCXDUZ,OCXQUIT,OCXLOGS,OCXLOGD
61 I ($G(OCXOSRC)="CPRS ORDER PRESCAN") S OCXCMSG=(+OCXPSD)_"^19^^Clozapine - most recent results - "_$$GETDATA(DFN,"116^121",130) I 1
62 E S OCXCMSG="Clozapine - most recent results - "_$$GETDATA(DFN,"116^121",130)
63 S OCXNMSG=""
64 ;
65 Q:$G(OCXOERR)
66 ;
67 ; Send Order Check Message
68 ;
69 S OCXOCMSG($O(OCXOCMSG(999999),-1)+1)=OCXCMSG
70 Q
71 ;
72R59R1A ; Verify all Event/Elements of Rule #59 'AMINOGLYCOSIDE ORDER' Relation #1 'AGS ORDER'
73 ; Called from EL71+5^OCXOZ0I.
74 ;
75 Q:$G(OCXOERR)
76 ;
77 ; Local Extrinsic Functions
78 ; MCE71( -----------> Verify Event/Element: 'AMINOGLYCOSIDE ORDER SESSION'
79 ;
80 Q:$G(^OCXS(860.2,59,"INACT"))
81 ;
82 I $$MCE71 D R59R1B
83 Q
84 ;
85R59R1B ; Send Order Check, Notication messages and/or Execute code for Rule #59 'AMINOGLYCOSIDE ORDER' Relation #1 'AGS ORDER'
86 ; Called from R59R1A+10.
87 ;
88 Q:$G(OCXOERR)
89 ;
90 ; Local Extrinsic Functions
91 ; GETDATA( ---------> GET DATA FROM THE ACTIVE DATA FILE
92 ;
93 Q:$D(OCXRULE("R59R1B"))
94 ;
95 N OCXNMSG,OCXCMSG,OCXPORD,OCXFORD,OCXDATA,OCXNUM,OCXDUZ,OCXQUIT,OCXLOGS,OCXLOGD
96 I ($G(OCXOSRC)="CPRS ORDER PRESCAN") S OCXCMSG=(+OCXPSD)_"^20^^Aminoglycoside - est. CrCl: "_$$GETDATA(DFN,"71^",76)_" ("_$$GETDATA(DFN,"71^",64)_") [Est. CrCl based on modified Cockcroft-Gault equation using Adjusted Body Weight (if ht > 60 in)]" I 1
97 E S OCXCMSG="Aminoglycoside - est. CrCl: "_$$GETDATA(DFN,"71^",76)_" ("_$$GETDATA(DFN,"71^",64)_") [Est. CrCl based on modified Cockcroft-Gault equation using Adjusted Body Weight (if ht > 60 in)]"
98 S OCXNMSG=""
99 ;
100 Q:$G(OCXOERR)
101 ;
102 ; Send Order Check Message
103 ;
104 S OCXOCMSG($O(OCXOCMSG(999999),-1)+1)=OCXCMSG
105 Q
106 ;
107R60R1A ; Verify all Event/Elements of Rule #60 'CT OR MRI PHYSICAL LIMIT CHECK' Relation #1 'TOO BIG'
108 ; Called from EL72+5^OCXOZ0I.
109 ;
110 Q:$G(OCXOERR)
111 ;
112 ; Local Extrinsic Functions
113 ; MCE72( -----------> Verify Event/Element: 'PATIENT OVER CT OR MRI DEVICE LIMITATIONS'
114 ;
115 Q:$G(^OCXS(860.2,60,"INACT"))
116 ;
117 I $$MCE72 D R60R1B
118 Q
119 ;
120R60R1B ; Send Order Check, Notication messages and/or Execute code for Rule #60 'CT OR MRI PHYSICAL LIMIT CHECK' Relation #1 'TOO BIG'
121 ; Called from R60R1A+10.
122 ;
123 Q:$G(OCXOERR)
124 ;
125 ; Local Extrinsic Functions
126 ; GETDATA( ---------> GET DATA FROM THE ACTIVE DATA FILE
127 ;
128 Q:$D(OCXRULE("R60R1B"))
129 ;
130 N OCXNMSG,OCXCMSG,OCXPORD,OCXFORD,OCXDATA,OCXNUM,OCXDUZ,OCXQUIT,OCXLOGS,OCXLOGD
131 I ($G(OCXOSRC)="CPRS ORDER PRESCAN") S OCXCMSG=(+OCXPSD)_"^8^^Patient may be "_$$GETDATA(DFN,"72^",79)_" for the "_$$GETDATA(DFN,"72^",80)_"." I 1
132 E S OCXCMSG="Patient may be "_$$GETDATA(DFN,"72^",79)_" for the "_$$GETDATA(DFN,"72^",80)_"."
133 S OCXNMSG=""
134 ;
135 Q:$G(OCXOERR)
136 ;
137 ; Send Order Check Message
138 ;
139 S OCXOCMSG($O(OCXOCMSG(999999),-1)+1)=OCXCMSG
140 Q
141 ;
142GETDATA(DFN,OCXL,OCXDFI) ; This Local Extrinsic Function returns runtime data
143 ;
144 N OCXE,VAL,PC S VAL=""
145 F PC=1:1:$L(OCXL,U) S OCXE=$P(OCXL,U,PC) I OCXE S VAL=$G(^TMP("OCXCHK",$J,DFN,OCXE,OCXDFI)) Q:$L(VAL)
146 Q VAL
147 ;
148MCE116() ; Verify Event/Element: CLOZAPINE DRUG SELECTED
149 ;
150 ; OCXDF(37) -> PATIENT IEN data field
151 ;
152 N OCXRES
153 S OCXDF(37)=$G(DFN) I $L(OCXDF(37)) S OCXRES(116,37)=OCXDF(37)
154 Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),116)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),116))
155 Q 0
156 ;
157MCE121() ; Verify Event/Element: CLOZAPINE WBC >= 3.5
158 ;
159 ; OCXDF(37) -> PATIENT IEN data field
160 ;
161 N OCXRES
162 S OCXDF(37)=$G(DFN) I $L(OCXDF(37)) S OCXRES(121,37)=OCXDF(37)
163 Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),121)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),121))
164 Q 0
165 ;
166MCE71() ; Verify Event/Element: AMINOGLYCOSIDE ORDER SESSION
167 ;
168 ; OCXDF(37) -> PATIENT IEN data field
169 ;
170 N OCXRES
171 S OCXDF(37)=$G(DFN) I $L(OCXDF(37)) S OCXRES(71,37)=OCXDF(37)
172 Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),71)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),71))
173 Q 0
174 ;
175MCE72() ; Verify Event/Element: PATIENT OVER CT OR MRI DEVICE LIMITATIONS
176 ;
177 ; OCXDF(37) -> PATIENT IEN data field
178 ;
179 N OCXRES
180 S OCXDF(37)=$G(DFN) I $L(OCXDF(37)) S OCXRES(72,37)=OCXDF(37)
181 Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),72)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),72))
182 Q 0
183 ;
Note: See TracBrowser for help on using the repository browser.