Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: OCXOZ0G

OCXOZ0G.m

Go to the documentation of this file.
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
 ;