OCXOZ0G ;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
;
CHK513 ; Look through the current environment for valid Event/Elements for this patient.
; Called from CHK95+26^OCXOZ06.
;
Q:$G(OCXOERR)
;
; Local CHK513 Variables
; OCXDF(161) --> Data Field: SS REFILL REQUEST (BOOLEAN)
;
; Local Extrinsic Functions
; FILE(DFN,142, ----> FILE DATA IN PATIENT ACTIVE DATA FILE (Event/Element: NO SS REFILL REQUEST)
; FILE(DFN,143, ----> FILE DATA IN PATIENT ACTIVE DATA FILE (Event/Element: SS REFILL REQUEST)
;
I '(OCXDF(161)) S OCXOERR=$$FILE(DFN,142,"") Q:OCXOERR
I (OCXDF(161)) S OCXOERR=$$FILE(DFN,143,"") Q:OCXOERR
Q
;
EL24 ; Examine every rule that involves Element #24 [HL7 LAB TEST RESULTS CRITICAL]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R3R1A^OCXOZ0I ; Check Relation #1 in Rule #3 'CRITICAL LAB RESULTS'
Q
;
EL105 ; Examine every rule that involves Element #105 [HL7 LAB ORDER RESULTS CRITICAL]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R3R2A^OCXOZ0J ; Check Relation #2 in Rule #3 'CRITICAL LAB RESULTS'
Q
;
EL44 ; Examine every rule that involves Element #44 [ORDER FLAGGED]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R5R1A^OCXOZ0J ; Check Relation #1 in Rule #5 'ORDER FLAGGED FOR CLARIFICATION'
Q
;
EL134 ; Examine every rule that involves Element #134 [ORDER UNFLAGGED]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R5R2A^OCXOZ0K ; Check Relation #2 in Rule #5 'ORDER FLAGGED FOR CLARIFICATION'
Q
;
EL45 ; Examine every rule that involves Element #45 [ORDER REQUIRES CHART SIGNATURE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R6R1A^OCXOZ0K ; Check Relation #1 in Rule #6 'ORDER REQUIRES CHART SIGNATURE'
Q
;
EL21 ; Examine every rule that involves Element #21 [PATIENT ADMISSION]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R7R1A^OCXOZ0K ; Check Relation #1 in Rule #7 'PATIENT ADMISSION'
Q
;
EL31 ; Examine every rule that involves Element #31 [RADIOLOGY ORDER CANCELLED]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R11R1A^OCXOZ0L ; Check Relation #1 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
Q
;
EL100 ; Examine every rule that involves Element #100 [CANCELED BY NON-ORIG ORDERING PROVIDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R11R1A^OCXOZ0L ; Check Relation #1 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
D R11R2A^OCXOZ0L ; Check Relation #2 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
D R11R3A^OCXOZ0M ; Check Relation #3 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
D R35R1A^OCXOZ0Q ; Check Relation #1 in Rule #35 'LAB ORDER CANCELLED'
Q
;
EL30 ; Examine every rule that involves Element #30 [RADIOLOGY ORDER PUT ON-HOLD]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R11R2A^OCXOZ0L ; Check Relation #2 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
Q
;
EL32 ; Examine every rule that involves Element #32 [RADIOLOGY ORDER DISCONTINUED]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R11R3A^OCXOZ0M ; Check Relation #3 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
Q
;
EL46 ; Examine every rule that involves Element #46 [SERVICE ORDER REQUIRES CHART SIGNATURE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R16R1A^OCXOZ0M ; Check Relation #1 in Rule #16 'SERVICE ORDER REQUIRES CHART SIGNATURE'
Q
;
EL76 ; Examine every rule that involves Element #76 [STAT LAB RESULT]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R18R1A^OCXOZ0M ; Check Relation #1 in Rule #18 'STAT RESULTS AVAILABLE'
Q
;
EL75 ; Examine every rule that involves Element #75 [STAT IMAGING RESULT]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R18R2A^OCXOZ0N ; Check Relation #2 in Rule #18 'STAT RESULTS AVAILABLE'
Q
;
EL110 ; Examine every rule that involves Element #110 [STAT CONSULT RESULT]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R18R3A^OCXOZ0N ; Check Relation #3 in Rule #18 'STAT RESULTS AVAILABLE'
Q
;
EL56 ; Examine every rule that involves Element #56 [PATIENT DISCHARGE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R19R1A^OCXOZ0N ; Check Relation #1 in Rule #19 'PATIENT DISCHARGE'
Q
;
EL47 ; Examine every rule that involves Element #47 [ORDER REQUIRES CO-SIGNATURE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R22R1A^OCXOZ0O ; Check Relation #1 in Rule #22 'ORDER REQUIRES CO-SIGNATURE'
Q
;
EL5 ; Examine every rule that involves Element #5 [HL7 FINAL LAB RESULT]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R24R1A^OCXOZ0O ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
D R66R1A^OCXOZ10 ; Check Relation #1 in Rule #66 'LAB RESULTS'
D R69R1A^OCXOZ12 ; Check Relation #1 in Rule #69 'LAB THRESHOLD'
Q
;
EL49 ; Examine every rule that involves Element #49 [ORDER FLAGGED FOR RESULTS]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R24R1A^OCXOZ0O ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
Q
;
EL55 ; Examine every rule that involves Element #55 [CONSULT FINAL RESULTS]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R24R1A^OCXOZ0O ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
Q
;
EL101 ; Examine every rule that involves Element #101 [HL7 FINAL IMAGING RESULT]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R24R1A^OCXOZ0O ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
Q
;
EL60 ; Examine every rule that involves Element #60 [NEW OBR STAT ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R28R1A^OCXOZ0P ; Check Relation #1 in Rule #28 'STAT ORDER PLACED'
Q
;
EL61 ; Examine every rule that involves Element #61 [NEW ORC STAT ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R28R1A^OCXOZ0P ; Check Relation #1 in Rule #28 'STAT ORDER PLACED'
Q
;
EL42 ; Examine every rule that involves Element #42 [PATIENT TRANSFERRED FROM PSYCH WARD]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R32R1A^OCXOZ0P ; Check Relation #1 in Rule #32 'PATIENT TRANSFERRED FROM PSYCHIATRY TO ANOTHER UNIT'
Q
;
EL20 ; Examine every rule that involves Element #20 [HL7 LAB ORDER CANCELLED]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R35R1A^OCXOZ0Q ; Check Relation #1 in Rule #35 'LAB ORDER CANCELLED'
Q
;
EL40 ; Examine every rule that involves Element #40 [HL7 LAB REQUEST CANCELLED]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R35R1A^OCXOZ0Q ; Check Relation #1 in Rule #35 'LAB ORDER CANCELLED'
Q
;
EL6 ; Examine every rule that involves Element #6 [HL7 NEW OERR ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R38R1A^OCXOZ0Q ; Check Relation #1 in Rule #38 'NEW ORDER PLACED'
Q
;
EL126 ; Examine every rule that involves Element #126 [HL7 DCED OERR ORDER]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R38R2A^OCXOZ0Q ; Check Relation #2 in Rule #38 'NEW ORDER PLACED'
Q
;
EL23 ; Examine every rule that involves Element #23 [HL7 LAB ORDER RESULTS ABNORMAL]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R42R1A^OCXOZ0R ; Check Relation #1 in Rule #42 'ABNORMAL LAB RESULTS'
Q
;
EL103 ; Examine every rule that involves Element #103 [HL7 LAB TEST RESULTS ABNORMAL]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R42R2A^OCXOZ0R ; Check Relation #2 in Rule #42 'ABNORMAL LAB RESULTS'
Q
;
EL48 ; Examine every rule that involves Element #48 [ORDER REQUIRES ELECTRONIC SIGNATURE]
; Called from SCAN+9^OCXOZ01.
;
Q:$G(OCXOERR)
;
D R44R1A^OCXOZ0R ; Check Relation #1 in Rule #44 'ORDER REQUIRES ELECTRONIC SIGNATURE'
D R44R2A^OCXOZ0S ; Check Relation #2 in Rule #44 'ORDER REQUIRES ELECTRONIC SIGNATURE'
Q
;
FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function logs a validated event/element.
;
N OCXTIMN,OCXTIML,OCXTIMT1,OCXTIMT2,OCXDATA,OCXPC,OCXPC,OCXVAL,OCXSUB,OCXDFI
S DFN=+$G(DFN),OCXELE=+$G(OCXELE)
;
Q:'DFN 1 Q:'OCXELE 1 K OCXDATA
;
S OCXDATA(DFN,OCXELE)=1
F OCXPC=1:1:$L(OCXDFL,",") S OCXDFI=$P(OCXDFL,",",OCXPC) I OCXDFI D
.S OCXVAL=$G(OCXDF(+OCXDFI)),OCXDATA(DFN,OCXELE,+OCXDFI)=OCXVAL
;
M ^TMP("OCXCHK",$J,DFN)=OCXDATA(DFN)
;
Q 0
;
OCXOZ0G ;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 ;
CHK513 ; Look through the current environment for valid Event/Elements for this patient.
+1 ; Called from CHK95+26^OCXOZ06.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Local CHK513 Variables
+6 ; OCXDF(161) --> Data Field: SS REFILL REQUEST (BOOLEAN)
+7 ;
+8 ; Local Extrinsic Functions
+9 ; FILE(DFN,142, ----> FILE DATA IN PATIENT ACTIVE DATA FILE (Event/Element: NO SS REFILL REQUEST)
+10 ; FILE(DFN,143, ----> FILE DATA IN PATIENT ACTIVE DATA FILE (Event/Element: SS REFILL REQUEST)
+11 ;
+12 IF '(OCXDF(161))
SET OCXOERR=$$FILE(DFN,142,"")
IF OCXOERR
QUIT
+13 IF (OCXDF(161))
SET OCXOERR=$$FILE(DFN,143,"")
IF OCXOERR
QUIT
+14 QUIT
+15 ;
EL24 ; Examine every rule that involves Element #24 [HL7 LAB TEST RESULTS CRITICAL]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #3 'CRITICAL LAB RESULTS'
DO R3R1A^OCXOZ0I
+6 QUIT
+7 ;
EL105 ; Examine every rule that involves Element #105 [HL7 LAB ORDER RESULTS CRITICAL]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #3 'CRITICAL LAB RESULTS'
DO R3R2A^OCXOZ0J
+6 QUIT
+7 ;
EL44 ; Examine every rule that involves Element #44 [ORDER FLAGGED]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #5 'ORDER FLAGGED FOR CLARIFICATION'
DO R5R1A^OCXOZ0J
+6 QUIT
+7 ;
EL134 ; Examine every rule that involves Element #134 [ORDER UNFLAGGED]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #5 'ORDER FLAGGED FOR CLARIFICATION'
DO R5R2A^OCXOZ0K
+6 QUIT
+7 ;
EL45 ; Examine every rule that involves Element #45 [ORDER REQUIRES CHART SIGNATURE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #6 'ORDER REQUIRES CHART SIGNATURE'
DO R6R1A^OCXOZ0K
+6 QUIT
+7 ;
EL21 ; Examine every rule that involves Element #21 [PATIENT ADMISSION]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #7 'PATIENT ADMISSION'
DO R7R1A^OCXOZ0K
+6 QUIT
+7 ;
EL31 ; Examine every rule that involves Element #31 [RADIOLOGY ORDER CANCELLED]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
DO R11R1A^OCXOZ0L
+6 QUIT
+7 ;
EL100 ; Examine every rule that involves Element #100 [CANCELED BY NON-ORIG ORDERING PROVIDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
DO R11R1A^OCXOZ0L
+6 ; Check Relation #2 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
DO R11R2A^OCXOZ0L
+7 ; Check Relation #3 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
DO R11R3A^OCXOZ0M
+8 ; Check Relation #1 in Rule #35 'LAB ORDER CANCELLED'
DO R35R1A^OCXOZ0Q
+9 QUIT
+10 ;
EL30 ; Examine every rule that involves Element #30 [RADIOLOGY ORDER PUT ON-HOLD]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
DO R11R2A^OCXOZ0L
+6 QUIT
+7 ;
EL32 ; Examine every rule that involves Element #32 [RADIOLOGY ORDER DISCONTINUED]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #3 in Rule #11 'IMAGING REQUEST CANCELLED/HELD'
DO R11R3A^OCXOZ0M
+6 QUIT
+7 ;
EL46 ; Examine every rule that involves Element #46 [SERVICE ORDER REQUIRES CHART SIGNATURE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #16 'SERVICE ORDER REQUIRES CHART SIGNATURE'
DO R16R1A^OCXOZ0M
+6 QUIT
+7 ;
EL76 ; Examine every rule that involves Element #76 [STAT LAB RESULT]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #18 'STAT RESULTS AVAILABLE'
DO R18R1A^OCXOZ0M
+6 QUIT
+7 ;
EL75 ; Examine every rule that involves Element #75 [STAT IMAGING RESULT]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #18 'STAT RESULTS AVAILABLE'
DO R18R2A^OCXOZ0N
+6 QUIT
+7 ;
EL110 ; Examine every rule that involves Element #110 [STAT CONSULT RESULT]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #3 in Rule #18 'STAT RESULTS AVAILABLE'
DO R18R3A^OCXOZ0N
+6 QUIT
+7 ;
EL56 ; Examine every rule that involves Element #56 [PATIENT DISCHARGE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #19 'PATIENT DISCHARGE'
DO R19R1A^OCXOZ0N
+6 QUIT
+7 ;
EL47 ; Examine every rule that involves Element #47 [ORDER REQUIRES CO-SIGNATURE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #22 'ORDER REQUIRES CO-SIGNATURE'
DO R22R1A^OCXOZ0O
+6 QUIT
+7 ;
EL5 ; Examine every rule that involves Element #5 [HL7 FINAL LAB RESULT]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
DO R24R1A^OCXOZ0O
+6 ; Check Relation #1 in Rule #66 'LAB RESULTS'
DO R66R1A^OCXOZ10
+7 ; Check Relation #1 in Rule #69 'LAB THRESHOLD'
DO R69R1A^OCXOZ12
+8 QUIT
+9 ;
EL49 ; Examine every rule that involves Element #49 [ORDER FLAGGED FOR RESULTS]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
DO R24R1A^OCXOZ0O
+6 QUIT
+7 ;
EL55 ; Examine every rule that involves Element #55 [CONSULT FINAL RESULTS]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
DO R24R1A^OCXOZ0O
+6 QUIT
+7 ;
EL101 ; Examine every rule that involves Element #101 [HL7 FINAL IMAGING RESULT]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #24 'ORDERER FLAGGED RESULTS AVAILABLE'
DO R24R1A^OCXOZ0O
+6 QUIT
+7 ;
EL60 ; Examine every rule that involves Element #60 [NEW OBR STAT ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #28 'STAT ORDER PLACED'
DO R28R1A^OCXOZ0P
+6 QUIT
+7 ;
EL61 ; Examine every rule that involves Element #61 [NEW ORC STAT ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #28 'STAT ORDER PLACED'
DO R28R1A^OCXOZ0P
+6 QUIT
+7 ;
EL42 ; Examine every rule that involves Element #42 [PATIENT TRANSFERRED FROM PSYCH WARD]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #32 'PATIENT TRANSFERRED FROM PSYCHIATRY TO ANOTHER UNIT'
DO R32R1A^OCXOZ0P
+6 QUIT
+7 ;
EL20 ; Examine every rule that involves Element #20 [HL7 LAB ORDER CANCELLED]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #35 'LAB ORDER CANCELLED'
DO R35R1A^OCXOZ0Q
+6 QUIT
+7 ;
EL40 ; Examine every rule that involves Element #40 [HL7 LAB REQUEST CANCELLED]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #35 'LAB ORDER CANCELLED'
DO R35R1A^OCXOZ0Q
+6 QUIT
+7 ;
EL6 ; Examine every rule that involves Element #6 [HL7 NEW OERR ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #38 'NEW ORDER PLACED'
DO R38R1A^OCXOZ0Q
+6 QUIT
+7 ;
EL126 ; Examine every rule that involves Element #126 [HL7 DCED OERR ORDER]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #38 'NEW ORDER PLACED'
DO R38R2A^OCXOZ0Q
+6 QUIT
+7 ;
EL23 ; Examine every rule that involves Element #23 [HL7 LAB ORDER RESULTS ABNORMAL]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #42 'ABNORMAL LAB RESULTS'
DO R42R1A^OCXOZ0R
+6 QUIT
+7 ;
EL103 ; Examine every rule that involves Element #103 [HL7 LAB TEST RESULTS ABNORMAL]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #2 in Rule #42 'ABNORMAL LAB RESULTS'
DO R42R2A^OCXOZ0R
+6 QUIT
+7 ;
EL48 ; Examine every rule that involves Element #48 [ORDER REQUIRES ELECTRONIC SIGNATURE]
+1 ; Called from SCAN+9^OCXOZ01.
+2 ;
+3 IF $GET(OCXOERR)
QUIT
+4 ;
+5 ; Check Relation #1 in Rule #44 'ORDER REQUIRES ELECTRONIC SIGNATURE'
DO R44R1A^OCXOZ0R
+6 ; Check Relation #2 in Rule #44 'ORDER REQUIRES ELECTRONIC SIGNATURE'
DO R44R2A^OCXOZ0S
+7 QUIT
+8 ;
FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function logs a validated event/element.
+1 ;
+2 NEW OCXTIMN,OCXTIML,OCXTIMT1,OCXTIMT2,OCXDATA,OCXPC,OCXPC,OCXVAL,OCXSUB,OCXDFI
+3 SET DFN=+$GET(DFN)
SET OCXELE=+$GET(OCXELE)
+4 ;
+5 IF 'DFN
QUIT 1
IF 'OCXELE
QUIT 1
KILL OCXDATA
+6 ;
+7 SET OCXDATA(DFN,OCXELE)=1
+8 FOR OCXPC=1:1:$LENGTH(OCXDFL,",")
SET OCXDFI=$PIECE(OCXDFL,",",OCXPC)
IF OCXDFI
Begin DoDot:1
+9 SET OCXVAL=$GET(OCXDF(+OCXDFI))
SET OCXDATA(DFN,OCXELE,+OCXDFI)=OCXVAL
End DoDot:1
+10 ;
+11 MERGE ^TMP("OCXCHK",$JOB,DFN)=OCXDATA(DFN)
+12 ;
+13 QUIT 0
+14 ;