OCXOZ0I ;SLC/RJS,CLA - Order Check Scan ;JAN 28,2014 at 03:37
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,221,243**;Dec 17,1997;Build 242
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
; ***************************************************************
; ** Warning: This routine is automatically generated by the **
; ** Rule Compiler (^OCXOCMP) and ANY changes to this routine **
; ** will be lost the next time the rule compiler executes. **
; ***************************************************************
;
Q
;
EL111 ; Examine every rule that involves Element #111 [GLUCOPHAGE CREATININE > 1.5]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R67R1A^OCXOZ11 ; Check Relation #1 in Rule #67 'GLUCOPHAGE - LAB RESULTS'
Q
;
EL112 ; Examine every rule that involves Element #112 [NO GLUCOPHAGE CREATININE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R67R2A^OCXOZ11 ; Check Relation #2 in Rule #67 'GLUCOPHAGE - LAB RESULTS'
Q
;
EL122 ; Examine every rule that involves Element #122 [AMITRIPTYLINE ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R68R1A^OCXOZ12 ; Check Relation #1 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
Q
;
EL125 ; Examine every rule that involves Element #125 [MED ORDER FOR PT > 64]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R68R1A^OCXOZ12 ; Check Relation #1 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
D R68R2A^OCXOZ12 ; Check Relation #2 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
D R68R3A^OCXOZ12 ; Check Relation #3 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
Q
;
EL123 ; Examine every rule that involves Element #123 [CHLORPROPAMIDE ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R68R2A^OCXOZ12 ; Check Relation #2 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
Q
;
EL124 ; Examine every rule that involves Element #124 [DIPYRIDAMOLE ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R68R3A^OCXOZ12 ; Check Relation #3 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
Q
;
EL131 ; Examine every rule that involves Element #131 [GREATER THAN LAB THRESHOLD]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R69R1A^OCXOZ12 ; Check Relation #1 in Rule #69 'LAB THRESHOLD'
Q
;
EL132 ; Examine every rule that involves Element #132 [LESS THAN LAB THRESHOLD]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R69R1A^OCXOZ12 ; Check Relation #1 in Rule #69 'LAB THRESHOLD'
Q
;
EL28 ; Examine every rule that involves Element #28 [RADIOLOGY ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R70R1A^OCXOZ13 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
D R72R1A^OCXOZ14 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
Q
;
EL135 ; Examine every rule that involves Element #135 [DIET ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R70R1A^OCXOZ13 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
D R72R1A^OCXOZ14 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
Q
;
EL136 ; Examine every rule that involves Element #136 [NO ALLERGY ASSESSMENT]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R70R1A^OCXOZ13 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
Q
;
EL137 ; Examine every rule that involves Element #137 [PHARMACY ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R70R1A^OCXOZ13 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
D R72R1A^OCXOZ14 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
Q
;
EL138 ; Examine every rule that involves Element #138 [DUP OPIOID MEDS]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R71R1A^OCXOZ14 ; Check Relation #1 in Rule #71 'OPIOID MEDICATIONS'
Q
;
EL139 ; Examine every rule that involves Element #139 [OPIOID MED ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R71R1A^OCXOZ14 ; Check Relation #1 in Rule #71 'OPIOID MEDICATIONS'
Q
;
EL140 ; Examine every rule that involves Element #140 [ALLERGIES UNASSESSIBLE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R72R1A^OCXOZ14 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
Q
;
R3R1A ; Verify all Event/Elements of Rule #3 'CRITICAL LAB RESULTS' Relation #1 'CRITICAL LAB TEST'
; Called from EL24+5^OCXOZ0G.
;
Q:$G(OCXOERR)
;
; Local Extrinsic Functions
; MCE24( -----------> Verify Event/Element: 'HL7 LAB TEST RESULTS CRITICAL'
;
Q:$G(^OCXS(860.2,3,"INACT"))
;
I $$MCE24 D R3R1B^OCXOZ0J
Q
;
MCE24() ; Verify Event/Element: HL7 LAB TEST RESULTS CRITICAL
;
;
N OCXRES
I $L(OCXDF(37)) S OCXRES(24,37)=OCXDF(37)
Q:'(OCXDF(37)) 0 I $D(^TMP("OCXCHK",$J,OCXDF(37),24)) Q $G(^TMP("OCXCHK",$J,OCXDF(37),24))
Q 0
;
OCXOZ0I ;SLC/RJS,CLA - Order Check Scan ;JAN 28,2014 at 03:37
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,221,243**;Dec 17,1997;Build 242
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
+4 ; ***************************************************************
+5 ; ** Warning: This routine is automatically generated by the **
+6 ; ** Rule Compiler (^OCXOCMP) and ANY changes to this routine **
+7 ; ** will be lost the next time the rule compiler executes. **
+8 ; ***************************************************************
+9 ;
+10 QUIT
+11 ;
EL111 ; Examine every rule that involves Element #111 [GLUCOPHAGE CREATININE > 1.5]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #67 'GLUCOPHAGE - LAB RESULTS'
DO R67R1A^OCXOZ11
+6 QUIT
+7 ;
EL112 ; Examine every rule that involves Element #112 [NO GLUCOPHAGE CREATININE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #67 'GLUCOPHAGE - LAB RESULTS'
DO R67R2A^OCXOZ11
+6 QUIT
+7 ;
EL122 ; Examine every rule that involves Element #122 [AMITRIPTYLINE ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
DO R68R1A^OCXOZ12
+6 QUIT
+7 ;
EL125 ; Examine every rule that involves Element #125 [MED ORDER FOR PT > 64]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
DO R68R1A^OCXOZ12
+6 ; Check Relation #2 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
DO R68R2A^OCXOZ12
+7 ; Check Relation #3 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
DO R68R3A^OCXOZ12
+8 QUIT
+9 ;
EL123 ; Examine every rule that involves Element #123 [CHLORPROPAMIDE ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
DO R68R2A^OCXOZ12
+6 QUIT
+7 ;
EL124 ; Examine every rule that involves Element #124 [DIPYRIDAMOLE ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #3 in Rule #68 'DANGEROUS MEDS OVER AGE 64'
DO R68R3A^OCXOZ12
+6 QUIT
+7 ;
EL131 ; Examine every rule that involves Element #131 [GREATER THAN LAB THRESHOLD]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #69 'LAB THRESHOLD'
DO R69R1A^OCXOZ12
+6 QUIT
+7 ;
EL132 ; Examine every rule that involves Element #132 [LESS THAN LAB THRESHOLD]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #69 'LAB THRESHOLD'
DO R69R1A^OCXOZ12
+6 QUIT
+7 ;
EL28 ; Examine every rule that involves Element #28 [RADIOLOGY ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
DO R70R1A^OCXOZ13
+6 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
DO R72R1A^OCXOZ14
+7 QUIT
+8 ;
EL135 ; Examine every rule that involves Element #135 [DIET ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
DO R70R1A^OCXOZ13
+6 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
DO R72R1A^OCXOZ14
+7 QUIT
+8 ;
EL136 ; Examine every rule that involves Element #136 [NO ALLERGY ASSESSMENT]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
DO R70R1A^OCXOZ13
+6 QUIT
+7 ;
EL137 ; Examine every rule that involves Element #137 [PHARMACY ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #70 'NO ALLERGY ASSESSMENT'
DO R70R1A^OCXOZ13
+6 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
DO R72R1A^OCXOZ14
+7 QUIT
+8 ;
EL138 ; Examine every rule that involves Element #138 [DUP OPIOID MEDS]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #71 'OPIOID MEDICATIONS'
DO R71R1A^OCXOZ14
+6 QUIT
+7 ;
EL139 ; Examine every rule that involves Element #139 [OPIOID MED ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #71 'OPIOID MEDICATIONS'
DO R71R1A^OCXOZ14
+6 QUIT
+7 ;
EL140 ; Examine every rule that involves Element #140 [ALLERGIES UNASSESSIBLE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #72 'ALLERGIES UNASSESSIBLE'
DO R72R1A^OCXOZ14
+6 QUIT
+7 ;
R3R1A ; Verify all Event/Elements of Rule #3 'CRITICAL LAB RESULTS' Relation #1 'CRITICAL LAB TEST'
+1 ; Called from EL24+5^OCXOZ0G.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Local Extrinsic Functions
+6 ; MCE24( -----------> Verify Event/Element: 'HL7 LAB TEST RESULTS CRITICAL'
+7 ;
+8 IF $GET(^OCXS(860.2,3,"INACT"))
QUIT
+9 ;
+10 IF $$MCE24
DO R3R1B^OCXOZ0J
+11 QUIT
+12 ;
MCE24() ; Verify Event/Element: HL7 LAB TEST RESULTS CRITICAL
+1 ;
+2 ;
+3 NEW OCXRES
+4 IF $LENGTH(OCXDF(37))
SET OCXRES(24,37)=OCXDF(37)
+5 IF '(OCXDF(37))
QUIT 0
IF $DATA(^TMP("OCXCHK",$JOB,OCXDF(37),24))
QUIT $GET(^TMP("OCXCHK",$JOB,OCXDF(37),24))
+6 QUIT 0
+7 ;