- Timestamp:
- Dec 4, 2009, 12:11:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOZ0X.m
r613 r623 1 OCXOZ0X ;SLC/RJS,CLA - Order Check Scan ;NOV 8,2009 at 18:44 2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,221,243**;Dec 17,1997;Build 242 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 ; 13 R57R4B ; Send Order Check, Notication messages and/or Execute code for Rule #57 'CLOZAPINE' Relation #4 'CLOZAPINE AND 1.5 <= ANC < 2.0' 14 ; Called from R57R4A+12^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^^ANC between 1.5 and 2.0 - please repeat CBC/Diff including WBC and ANC immediately and twice weekly. Most recent results - "_$$GETDATA(DFN,"116^140",130) I 1 25 E S OCXCMSG="ANC between 1.5 and 2.0 - please repeat CBC/Diff including WBC and ANC immediately and twice weekly. Most recent results - "_$$GETDATA(DFN,"116^140",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 ; 35 R59R1A ; Verify all Event/Elements of Rule #59 'AMINOGLYCOSIDE ORDER' Relation #1 'AGS ORDER' 36 ; Called from EL71+5^OCXOZ0I. 37 ; 38 Q:$G(OCXOERR) 39 ; 40 ; Local Extrinsic Functions 41 ; MCE71( -----------> Verify Event/Element: 'AMINOGLYCOSIDE ORDER SESSION' 42 ; 43 Q:$G(^OCXS(860.2,59,"INACT")) 44 ; 45 I $$MCE71 D R59R1B 46 Q 47 ; 48 R59R1B ; Send Order Check, Notication messages and/or Execute code for Rule #59 'AMINOGLYCOSIDE ORDER' Relation #1 'AGS ORDER' 49 ; Called from R59R1A+10. 50 ; 51 Q:$G(OCXOERR) 52 ; 53 ; Local Extrinsic Functions 54 ; GETDATA( ---------> GET DATA FROM THE ACTIVE DATA FILE 55 ; 56 Q:$D(OCXRULE("R59R1B")) 57 ; 58 N OCXNMSG,OCXCMSG,OCXPORD,OCXFORD,OCXDATA,OCXNUM,OCXDUZ,OCXQUIT,OCXLOGS,OCXLOGD 59 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 60 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)]" 61 S OCXNMSG="" 62 ; 63 Q:$G(OCXOERR) 64 ; 65 ; Send Order Check Message 66 ; 67 S OCXOCMSG($O(OCXOCMSG(999999),-1)+1)=OCXCMSG 68 Q 69 ; 70 R60R1A ; Verify all Event/Elements of Rule #60 'CT OR MRI PHYSICAL LIMIT CHECK' Relation #1 'TOO BIG' 71 ; Called from EL72+5^OCXOZ0I. 72 ; 73 Q:$G(OCXOERR) 74 ; 75 ; Local Extrinsic Functions 76 ; MCE72( -----------> Verify Event/Element: 'PATIENT OVER CT OR MRI DEVICE LIMITATIONS' 77 ; 78 Q:$G(^OCXS(860.2,60,"INACT")) 79 ; 80 I $$MCE72 D R60R1B 81 Q 82 ; 83 R60R1B ; Send Order Check, Notication messages and/or Execute code for Rule #60 'CT OR MRI PHYSICAL LIMIT CHECK' Relation #1 'TOO BIG' 84 ; Called from R60R1A+10. 85 ; 86 Q:$G(OCXOERR) 87 ; 88 ; Local Extrinsic Functions 89 ; GETDATA( ---------> GET DATA FROM THE ACTIVE DATA FILE 90 ; 91 Q:$D(OCXRULE("R60R1B")) 92 ; 93 N OCXNMSG,OCXCMSG,OCXPORD,OCXFORD,OCXDATA,OCXNUM,OCXDUZ,OCXQUIT,OCXLOGS,OCXLOGD 94 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 95 E S OCXCMSG="Patient may be "_$$GETDATA(DFN,"72^",79)_" for the "_$$GETDATA(DFN,"72^",80)_"." 96 S OCXNMSG="" 97 ; 98 Q:$G(OCXOERR) 99 ; 100 ; Send Order Check Message 101 ; 102 S OCXOCMSG($O(OCXOCMSG(999999),-1)+1)=OCXCMSG 103 Q 104 ; 105 GETDATA(DFN,OCXL,OCXDFI) ; This Local Extrinsic Function returns runtime data 106 ; 107 N OCXE,VAL,PC S VAL="" 108 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) 109 Q VAL 110 ; 111 MCE71() ; Verify Event/Element: AMINOGLYCOSIDE ORDER SESSION 112 ; 113 ; OCXDF(37) -> PATIENT IEN data field 114 ; 115 N OCXRES 116 S OCXDF(37)=$G(DFN) I $L(OCXDF(37)) S OCXRES(71,37)=OCXDF(37) 117 Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),71)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),71)) 118 Q 0 119 ; 120 MCE72() ; Verify Event/Element: PATIENT OVER CT OR MRI DEVICE LIMITATIONS 121 ; 122 ; OCXDF(37) -> PATIENT IEN data field 123 ; 124 N OCXRES 125 S OCXDF(37)=$G(DFN) I $L(OCXDF(37)) S OCXRES(72,37)=OCXDF(37) 126 Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),72)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),72)) 127 Q 0 128 ; 1 OCXOZ0X ;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 ; 13 R57R4B ; 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 ; 35 R57R5A ; 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 ; 50 R57R5B ; 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 ; 72 R59R1A ; 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 ; 85 R59R1B ; 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 ; 107 R60R1A ; 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 ; 120 R60R1B ; 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 ; 142 GETDATA(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 ; 148 MCE116() ; 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 ; 157 MCE121() ; 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 ; 166 MCE71() ; 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 ; 175 MCE72() ; 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 TracChangeset
for help on using the changeset viewer.