ORY53906 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*539) ;JAN 13,2021 at 11:13
;;3.0;ORDER ENTRY/RESULTS REPORTING;**539**;Dec 17,1997;Build 41
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
S ;
;
D DOT^ORY539ES
;
;
K REMOTE,LOCAL,OPCODE,REF
F LINE=1:1:500 S TEXT=$P($T(DATA+LINE),";",2,999) Q:TEXT I $L(TEXT) D Q:QUIT
.S ^TMP("OCXRULE",$J,$O(^TMP("OCXRULE",$J,"A"),-1)+1)=TEXT
;
;
;
Q
;
DATA ;
;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^T+; W:$G(OCXTRACE) !!,"$$CLIST(",DATA,",""",LIST,""")"
;;R^"860.8:",100,4
;;D^ ; N PC F PC=1:1:$L(LIST,","),0 I PC,$L($P(LIST,",",PC)),(DATA[$P(LIST,",",PC)) Q
;;R^"860.8:",100,5
;;D^ ; Q ''PC
;;EOR^
;;EOF^OCXS(860.8)^1
;;SOF^860.6 ORDER CHECK DATA CONTEXT
;;KEY^860.6:^CPRS ORDER PROTOCOL
;;R^"860.6:",.01,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.6:",.02,"E"
;;D^OERR
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^DATABASE LOOKUP
;;R^"860.6:",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.6:",.02,"E"
;;D^DL
;;R^"860.6:",1,"E"
;;D^PACKAGE LOOKUP
;;EOR^
;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
;;R^"860.6:",.01,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;R^"860.6:",.02,"E"
;;D^HL7
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;EOF^OCXS(860.6)^1
;;SOF^860.5 ORDER CHECK DATA SOURCE
;;KEY^860.5:^DATABASE LOOKUP
;;R^"860.5:",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.5:",.02,"E"
;;D^DATABASE LOOKUP
;;EOR^
;;KEY^860.5:^HL7 PATIENT ID SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 PATIENT ID SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^OERR ORDER EVENT FLAG PROTOCOL
;;R^"860.5:",.01,"E"
;;D^OERR ORDER EVENT FLAG PROTOCOL
;;R^"860.5:",.02,"E"
;;D^CPRS ORDER PROTOCOL
;;EOR^
;;EOF^OCXS(860.5)^1
;;SOF^860.4 ORDER CHECK DATA FIELD
;;KEY^860.4:^CURRENT DATE/TIME
;;R^"860.4:",.01,"E"
;;D^CURRENT DATE/TIME
;;R^"860.4:",1,"E"
;;D^CDT
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
;;D^CURRENT_DATE/TIME
;;EOR^
;;KEY^860.4:^ORDER FLAGGED FOR CLARIFICATION
;;R^"860.4:",.01,"E"
;;D^ORDER FLAGGED FOR CLARIFICATION
;;R^"860.4:",101,"E"
;;D^BOOLEAN
;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.01,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.02,"E"
;;D^OERR ORDER EVENT FLAG PROTOCOL
;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",1,"E"
;;D^PATIENT.OERR_ORDER_FLAGGED
;;EOR^
;;KEY^860.4:^PATIENT IEN
;;R^"860.4:",.01,"E"
;;D^PATIENT IEN
;;R^"860.4:",101,"E"
;;D^NUMERIC
;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.01,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.02,"E"
;;D^OERR ORDER EVENT FLAG PROTOCOL
;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",1,"E"
;;D^PATIENT.OERR_ORDER_PATIENT
;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
;;D^PATIENT.IEN
;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",.01,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",.02,"E"
;;D^HL7 PATIENT ID SEGMENT
;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",1,"E"
;;D^PATIENT.HL7_PATIENT_ID
;;EOR^
;;EOF^OCXS(860.4)^1
;;SOF^860.3 ORDER CHECK ELEMENT
;;KEY^860.3:^ORDER FLAGGED
;;R^"860.3:",.01,"E"
;;D^ORDER FLAGGED
;;R^"860.3:",.02,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^ORDER FLAGGED FOR CLARIFICATION
;;R^"860.3:","860.31:1",2,"E"
;;D^LOGICAL TRUE
;;EOR^
;;KEY^860.3:^ORDER UNFLAGGED
;;R^"860.3:",.01,"E"
;;D^ORDER UNFLAGGED
;;R^"860.3:",.02,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^ORDER FLAGGED FOR CLARIFICATION
;;R^"860.3:","860.31:1",2,"E"
;;D^LOGICAL FALSE
;;EOR^
;;EOF^OCXS(860.3)^1
;;SOF^860.2 ORDER CHECK RULE
;;KEY^860.2:^ORDER FLAGGED FOR CLARIFICATION
;;R^"860.2:",.01,"E"
;;D^ORDER FLAGGED FOR CLARIFICATION
;;R^"860.2:","860.21:2",.01,"E"
;;D^ORDER FLAGGED
;;R^"860.2:","860.21:2",.02,"E"
;;D^SIMPLE DEFINITION
;;R^"860.2:","860.21:2",1,"E"
;;D^ORDER FLAGGED
;;R^"860.2:","860.21:3",.01,"E"
;;D^ORDER UNFLAGGED
;;R^"860.2:","860.21:3",.02,"E"
;;D^SIMPLE DEFINITION
;;R^"860.2:","860.21:3",1,"E"
;;D^ORDER UNFLAGGED
;;R^"860.2:","860.22:1",.01,"E"
;;D^1
;;R^"860.2:","860.22:1",1,"E"
;;D^ORDER FLAGGED
;;R^"860.2:","860.22:1",3,"E"
;;D^FLAG ORDER FOR CLARIFICATION
;;R^"860.2:","860.22:1",5,"E"
;;D^Order(s) needing clarification: Flagged |CURRENT DATE/TIME|.
;;R^"860.2:","860.22:1",9,"E"
;;D^N I,USR S I=0 F S I=$O(ORLIST(I)) Q:'I S USR=+ORLIST(I) I USR S OCXDUZ(USR)=""
;;R^"860.2:","860.22:2",.01,"E"
;;D^2
;;R^"860.2:","860.22:2",1,"E"
;;D^ORDER UNFLAGGED
;;R^"860.2:","860.22:2",9,"E"
;;D^D UNFLAG^ORB3FUP1(|PATIENT IEN|)
;;EOR^
;;EOF^OCXS(860.2)^1
;1;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY53906 5312 printed Nov 22, 2024@17:52:46 Page 2
ORY53906 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*539) ;JAN 13,2021 at 11:13
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**539**;Dec 17,1997;Build 41
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
S ;
+1 ;
+2 DO DOT^ORY539ES
+3 ;
+4 ;
+5 KILL REMOTE,LOCAL,OPCODE,REF
+6 FOR LINE=1:1:500
SET TEXT=$PIECE($TEXT(DATA+LINE),";",2,999)
if TEXT
QUIT
IF $LENGTH(TEXT)
Begin DoDot:1
+7 SET ^TMP("OCXRULE",$JOB,$ORDER(^TMP("OCXRULE",$JOB,"A"),-1)+1)=TEXT
End DoDot:1
if QUIT
QUIT
+8 ;
+9 ;
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;R^"860.8:",100,2
+3 ;;D^ ; ;
+4 ;;R^"860.8:",100,3
+5 ;;D^T+; W:$G(OCXTRACE) !!,"$$CLIST(",DATA,",""",LIST,""")"
+6 ;;R^"860.8:",100,4
+7 ;;D^ ; N PC F PC=1:1:$L(LIST,","),0 I PC,$L($P(LIST,",",PC)),(DATA[$P(LIST,",",PC)) Q
+8 ;;R^"860.8:",100,5
+9 ;;D^ ; Q ''PC
+10 ;;EOR^
+11 ;;EOF^OCXS(860.8)^1
+12 ;;SOF^860.6 ORDER CHECK DATA CONTEXT
+13 ;;KEY^860.6:^CPRS ORDER PROTOCOL
+14 ;;R^"860.6:",.01,"E"
+15 ;;D^CPRS ORDER PROTOCOL
+16 ;;R^"860.6:",.02,"E"
+17 ;;D^OERR
+18 ;;R^"860.6:",1,"E"
+19 ;;D^DATA DRIVEN
+20 ;;EOR^
+21 ;;KEY^860.6:^DATABASE LOOKUP
+22 ;;R^"860.6:",.01,"E"
+23 ;;D^DATABASE LOOKUP
+24 ;;R^"860.6:",.02,"E"
+25 ;;D^DL
+26 ;;R^"860.6:",1,"E"
+27 ;;D^PACKAGE LOOKUP
+28 ;;EOR^
+29 ;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
+30 ;;R^"860.6:",.01,"E"
+31 ;;D^GENERIC HL7 MESSAGE ARRAY
+32 ;;R^"860.6:",.02,"E"
+33 ;;D^HL7
+34 ;;R^"860.6:",1,"E"
+35 ;;D^DATA DRIVEN
+36 ;;EOR^
+37 ;;EOF^OCXS(860.6)^1
+38 ;;SOF^860.5 ORDER CHECK DATA SOURCE
+39 ;;KEY^860.5:^DATABASE LOOKUP
+40 ;;R^"860.5:",.01,"E"
+41 ;;D^DATABASE LOOKUP
+42 ;;R^"860.5:",.02,"E"
+43 ;;D^DATABASE LOOKUP
+44 ;;EOR^
+45 ;;KEY^860.5:^HL7 PATIENT ID SEGMENT
+46 ;;R^"860.5:",.01,"E"
+47 ;;D^HL7 PATIENT ID SEGMENT
+48 ;;R^"860.5:",.02,"E"
+49 ;;D^GENERIC HL7 MESSAGE ARRAY
+50 ;;EOR^
+51 ;;KEY^860.5:^OERR ORDER EVENT FLAG PROTOCOL
+52 ;;R^"860.5:",.01,"E"
+53 ;;D^OERR ORDER EVENT FLAG PROTOCOL
+54 ;;R^"860.5:",.02,"E"
+55 ;;D^CPRS ORDER PROTOCOL
+56 ;;EOR^
+57 ;;EOF^OCXS(860.5)^1
+58 ;;SOF^860.4 ORDER CHECK DATA FIELD
+59 ;;KEY^860.4:^CURRENT DATE/TIME
+60 ;;R^"860.4:",.01,"E"
+61 ;;D^CURRENT DATE/TIME
+62 ;;R^"860.4:",1,"E"
+63 ;;D^CDT
+64 ;;R^"860.4:",101,"E"
+65 ;;D^FREE TEXT
+66 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
+67 ;;D^DATABASE LOOKUP
+68 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
+69 ;;D^DATABASE LOOKUP
+70 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
+71 ;;D^CURRENT_DATE/TIME
+72 ;;EOR^
+73 ;;KEY^860.4:^ORDER FLAGGED FOR CLARIFICATION
+74 ;;R^"860.4:",.01,"E"
+75 ;;D^ORDER FLAGGED FOR CLARIFICATION
+76 ;;R^"860.4:",101,"E"
+77 ;;D^BOOLEAN
+78 ;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.01,"E"
+79 ;;D^CPRS ORDER PROTOCOL
+80 ;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.02,"E"
+81 ;;D^OERR ORDER EVENT FLAG PROTOCOL
+82 ;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",1,"E"
+83 ;;D^PATIENT.OERR_ORDER_FLAGGED
+84 ;;EOR^
+85 ;;KEY^860.4:^PATIENT IEN
+86 ;;R^"860.4:",.01,"E"
+87 ;;D^PATIENT IEN
+88 ;;R^"860.4:",101,"E"
+89 ;;D^NUMERIC
+90 ;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.01,"E"
+91 ;;D^CPRS ORDER PROTOCOL
+92 ;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",.02,"E"
+93 ;;D^OERR ORDER EVENT FLAG PROTOCOL
+94 ;;R^"860.4:","860.41:CPRS ORDER PROTOCOL^860.6",1,"E"
+95 ;;D^PATIENT.OERR_ORDER_PATIENT
+96 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.01,"E"
+97 ;;D^DATABASE LOOKUP
+98 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",.02,"E"
+99 ;;D^DATABASE LOOKUP
+100 ;;R^"860.4:","860.41:DATABASE LOOKUP^860.6",1,"E"
+101 ;;D^PATIENT.IEN
+102 ;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",.01,"E"
+103 ;;D^GENERIC HL7 MESSAGE ARRAY
+104 ;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",.02,"E"
+105 ;;D^HL7 PATIENT ID SEGMENT
+106 ;;R^"860.4:","860.41:GENERIC HL7 MESSAGE ARRAY^860.6",1,"E"
+107 ;;D^PATIENT.HL7_PATIENT_ID
+108 ;;EOR^
+109 ;;EOF^OCXS(860.4)^1
+110 ;;SOF^860.3 ORDER CHECK ELEMENT
+111 ;;KEY^860.3:^ORDER FLAGGED
+112 ;;R^"860.3:",.01,"E"
+113 ;;D^ORDER FLAGGED
+114 ;;R^"860.3:",.02,"E"
+115 ;;D^CPRS ORDER PROTOCOL
+116 ;;R^"860.3:","860.31:1",.01,"E"
+117 ;;D^1
+118 ;;R^"860.3:","860.31:1",1,"E"
+119 ;;D^ORDER FLAGGED FOR CLARIFICATION
+120 ;;R^"860.3:","860.31:1",2,"E"
+121 ;;D^LOGICAL TRUE
+122 ;;EOR^
+123 ;;KEY^860.3:^ORDER UNFLAGGED
+124 ;;R^"860.3:",.01,"E"
+125 ;;D^ORDER UNFLAGGED
+126 ;;R^"860.3:",.02,"E"
+127 ;;D^CPRS ORDER PROTOCOL
+128 ;;R^"860.3:","860.31:1",.01,"E"
+129 ;;D^1
+130 ;;R^"860.3:","860.31:1",1,"E"
+131 ;;D^ORDER FLAGGED FOR CLARIFICATION
+132 ;;R^"860.3:","860.31:1",2,"E"
+133 ;;D^LOGICAL FALSE
+134 ;;EOR^
+135 ;;EOF^OCXS(860.3)^1
+136 ;;SOF^860.2 ORDER CHECK RULE
+137 ;;KEY^860.2:^ORDER FLAGGED FOR CLARIFICATION
+138 ;;R^"860.2:",.01,"E"
+139 ;;D^ORDER FLAGGED FOR CLARIFICATION
+140 ;;R^"860.2:","860.21:2",.01,"E"
+141 ;;D^ORDER FLAGGED
+142 ;;R^"860.2:","860.21:2",.02,"E"
+143 ;;D^SIMPLE DEFINITION
+144 ;;R^"860.2:","860.21:2",1,"E"
+145 ;;D^ORDER FLAGGED
+146 ;;R^"860.2:","860.21:3",.01,"E"
+147 ;;D^ORDER UNFLAGGED
+148 ;;R^"860.2:","860.21:3",.02,"E"
+149 ;;D^SIMPLE DEFINITION
+150 ;;R^"860.2:","860.21:3",1,"E"
+151 ;;D^ORDER UNFLAGGED
+152 ;;R^"860.2:","860.22:1",.01,"E"
+153 ;;D^1
+154 ;;R^"860.2:","860.22:1",1,"E"
+155 ;;D^ORDER FLAGGED
+156 ;;R^"860.2:","860.22:1",3,"E"
+157 ;;D^FLAG ORDER FOR CLARIFICATION
+158 ;;R^"860.2:","860.22:1",5,"E"
+159 ;;D^Order(s) needing clarification: Flagged |CURRENT DATE/TIME|.
+160 ;;R^"860.2:","860.22:1",9,"E"
+161 ;;D^N I,USR S I=0 F S I=$O(ORLIST(I)) Q:'I S USR=+ORLIST(I) I USR S OCXDUZ(USR)=""
+162 ;;R^"860.2:","860.22:2",.01,"E"
+163 ;;D^2
+164 ;;R^"860.2:","860.22:2",1,"E"
+165 ;;D^ORDER UNFLAGGED
+166 ;;R^"860.2:","860.22:2",9,"E"
+167 ;;D^D UNFLAG^ORB3FUP1(|PATIENT IEN|)
+168 ;;EOR^
+169 ;;EOF^OCXS(860.2)^1
+170 ;1;
+171 ;