OCXDI033 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC ROUTINES ;SEP 7,1999 at 10:30
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
S ;
;
D DOT^OCXDIAG
;
;
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("OCXDIAG",$J,$O(^TMP("OCXDIAG",$J,"A"),-1)+1)=TEXT
;
G ^OCXDI034
;
Q
;
DATA ;
;
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^PHARMACY LOCAL ORDERABLE ITEM TEXT
;;R^"860.3:","860.31:1",2,"E"
;;D^CONTAINS
;;R^"860.3:","860.31:1",3,"E"
;;D^LITHIUM
;;R^"860.3:","860.31:2",.01,"E"
;;D^2
;;R^"860.3:","860.31:2",1,"E"
;;D^CONTROL CODE
;;R^"860.3:","860.31:2",2,"E"
;;D^EQUALS ELEMENT IN SET
;;R^"860.3:","860.31:2",3,"E"
;;D^NW,SN
;;EOR^
;;KEY^860.3:^PATIENT WITH LITHIUM MEDS
;;R^"860.3:",.01,"E"
;;D^PATIENT WITH LITHIUM MEDS
;;R^"860.3:",.02,"E"
;;D^TIMED ORDER CHECK
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^PATIENT CURRENTLY ON LITHIUM FLAG
;;R^"860.3:","860.31:1",2,"E"
;;D^LOGICAL TRUE
;;EOR^
;;KEY^860.3:^PATIENT WITHOUT LITHIUM MEDS
;;R^"860.3:",.01,"E"
;;D^PATIENT WITHOUT LITHIUM MEDS
;;R^"860.3:",.02,"E"
;;D^TIMED ORDER CHECK
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^PATIENT CURRENTLY ON LITHIUM FLAG
;;R^"860.3:","860.31:1",2,"E"
;;D^LOGICAL FALSE
;;EOR^
;;KEY^860.3:^PATIENT WITH GLUCOPHAGE MED
;;R^"860.3:",.01,"E"
;;D^PATIENT WITH GLUCOPHAGE MED
;;R^"860.3:",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^PATIENT CURRENTLY ON GLUCOPHAGE
;;R^"860.3:","860.31:1",2,"E"
;;D^LOGICAL TRUE
;;EOR^
;;KEY^860.3:^PATIENT HAS DIABETES ON PROBLEM LIST
;;R^"860.3:",.01,"E"
;;D^PATIENT HAS DIABETES ON PROBLEM LIST
;;R^"860.3:",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^PATIENT HAS DIABETES
;;R^"860.3:","860.31:1",2,"E"
;;D^LOGICAL TRUE
;;EOR^
;;KEY^860.3:^PATIENT NEEDS LITHIUM LEVEL PERFORMED
;;R^"860.3:",.01,"E"
;;D^PATIENT NEEDS LITHIUM LEVEL PERFORMED
;;R^"860.3:",.02,"E"
;;D^TIMED ORDER CHECK
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^DATE OF LAST LITHIUM LAB TEST
;;R^"860.3:","860.31:1",2,"E"
;;D^DATE BEFORE
;;R^"860.3:","860.31:1",3,"E"
;;D^T-120
;;EOR^
;;KEY^860.3:^PATIENT NEEDS LITHIUM LAB LEVEL ORDERED
;;R^"860.3:",.01,"E"
;;D^PATIENT NEEDS LITHIUM LAB LEVEL ORDERED
;;R^"860.3:",.02,"E"
;;D^TIMED ORDER CHECK
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^DATE OF LAST LITHIUM LAB ORDER
;;R^"860.3:","860.31:1",2,"E"
;;D^DATE BEFORE
;;R^"860.3:","860.31:1",3,"E"
;;D^T-120
;;EOR^
;;KEY^860.3:^POLYPHARMACY
;;R^"860.3:",.01,"E"
;;D^POLYPHARMACY
;;R^"860.3:",.02,"E"
;;D^CPRS ORDER PRESCAN
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^ORDER MODE
;;R^"860.3:","860.31:1",2,"E"
;;D^EQ FREE TEXT
;;R^"860.3:","860.31:1",3,"E"
;;D^DISPLAY
;;R^"860.3:","860.31:2",.01,"E"
;;D^2
;;R^"860.3:","860.31:2",1,"E"
;;D^FILLER
;;R^"860.3:","860.31:2",2,"E"
;;D^STARTS WITH
;;R^"860.3:","860.31:2",3,"E"
;;D^PS
;;R^"860.3:","860.31:3",.01,"E"
;;D^3
;;R^"860.3:","860.31:3",1,"E"
;;D^POLYPHARMACY
;;R^"860.3:","860.31:3",2,"E"
;;D^LOGICAL TRUE
;;EOR^
;;KEY^860.3:^CREATININE CLEARANCE DATE/TIME
;;R^"860.3:",.01,"E"
;;D^CREATININE CLEARANCE DATE/TIME
;;R^"860.3:",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^CREATININE CLEARANCE (ESTIM) DATE
;;R^"860.3:","860.31:1",2,"E"
;;D^DATE AFTER
;;R^"860.3:","860.31:1",3,"E"
;;D^0
;;EOR^
;;KEY^860.3:^RENAL RESULTS
;;R^"860.3:",.01,"E"
;;D^RENAL RESULTS
;;R^"860.3:",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^FORMATTED RENAL LAB RESULTS
;;R^"860.3:","860.31:1",2,"E"
;;D^NOT EQUAL TO
;;R^"860.3:","860.31:1",3,"E"
;;D^<Results Not Found>
;;EOR^
;;KEY^860.3:^CANCELLED BY NON-ORDERER
;;R^"860.3:",.01,"E"
;;D^CANCELLED BY NON-ORDERER
;;R^"860.3:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.3:^ORDER ENTERED BY
;;R^"860.3:",.01,"E"
;;D^ORDER ENTERED BY
;;R^"860.3:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^ENTERED BY
;;R^"860.3:","860.31:1",2,"E"
;;D^FREE TEXT LENGTH GREATER THAN
;;R^"860.3:","860.31:1",3,"E"
;;D^0
;;EOR^
;;KEY^860.3:^CANCELED BY NON-ORIG ORDERING PROVIDER
;;R^"860.3:",.01,"E"
;;D^CANCELED BY NON-ORIG ORDERING PROVIDER
;;R^"860.3:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^ENTERED BY
;;R^"860.3:","860.31:1",2,"E"
;;D^NOT EQUAL TO
;;R^"860.3:","860.31:1",4,"E"
;;D^ORDERED BY
;;EOR^
;;KEY^860.3:^HL7 FINAL IMAGING RESULT
;;R^"860.3:",.01,"E"
;;D^HL7 FINAL IMAGING RESULT
;;R^"860.3:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;R^"860.3:","860.31:1",.01,"E"
;;D^1
;;R^"860.3:","860.31:1",1,"E"
;;D^REQUEST STATUS (OBR)
;;R^"860.3:","860.31:1",2,"E"
;;D^EQ FREE TEXT
;;R^"860.3:","860.31:1",3,"E"
;1;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXDI033 5434 printed Nov 22, 2024@17:34:16 Page 2
OCXDI033 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC ROUTINES ;SEP 7,1999 at 10:30
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
S ;
+1 ;
+2 DO DOT^OCXDIAG
+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("OCXDIAG",$JOB,$ORDER(^TMP("OCXDIAG",$JOB,"A"),-1)+1)=TEXT
End DoDot:1
if QUIT
QUIT
+8 ;
+9 GOTO ^OCXDI034
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;D^1
+3 ;;R^"860.3:","860.31:1",1,"E"
+4 ;;D^PHARMACY LOCAL ORDERABLE ITEM TEXT
+5 ;;R^"860.3:","860.31:1",2,"E"
+6 ;;D^CONTAINS
+7 ;;R^"860.3:","860.31:1",3,"E"
+8 ;;D^LITHIUM
+9 ;;R^"860.3:","860.31:2",.01,"E"
+10 ;;D^2
+11 ;;R^"860.3:","860.31:2",1,"E"
+12 ;;D^CONTROL CODE
+13 ;;R^"860.3:","860.31:2",2,"E"
+14 ;;D^EQUALS ELEMENT IN SET
+15 ;;R^"860.3:","860.31:2",3,"E"
+16 ;;D^NW,SN
+17 ;;EOR^
+18 ;;KEY^860.3:^PATIENT WITH LITHIUM MEDS
+19 ;;R^"860.3:",.01,"E"
+20 ;;D^PATIENT WITH LITHIUM MEDS
+21 ;;R^"860.3:",.02,"E"
+22 ;;D^TIMED ORDER CHECK
+23 ;;R^"860.3:","860.31:1",.01,"E"
+24 ;;D^1
+25 ;;R^"860.3:","860.31:1",1,"E"
+26 ;;D^PATIENT CURRENTLY ON LITHIUM FLAG
+27 ;;R^"860.3:","860.31:1",2,"E"
+28 ;;D^LOGICAL TRUE
+29 ;;EOR^
+30 ;;KEY^860.3:^PATIENT WITHOUT LITHIUM MEDS
+31 ;;R^"860.3:",.01,"E"
+32 ;;D^PATIENT WITHOUT LITHIUM MEDS
+33 ;;R^"860.3:",.02,"E"
+34 ;;D^TIMED ORDER CHECK
+35 ;;R^"860.3:","860.31:1",.01,"E"
+36 ;;D^1
+37 ;;R^"860.3:","860.31:1",1,"E"
+38 ;;D^PATIENT CURRENTLY ON LITHIUM FLAG
+39 ;;R^"860.3:","860.31:1",2,"E"
+40 ;;D^LOGICAL FALSE
+41 ;;EOR^
+42 ;;KEY^860.3:^PATIENT WITH GLUCOPHAGE MED
+43 ;;R^"860.3:",.01,"E"
+44 ;;D^PATIENT WITH GLUCOPHAGE MED
+45 ;;R^"860.3:",.02,"E"
+46 ;;D^DATABASE LOOKUP
+47 ;;R^"860.3:","860.31:1",.01,"E"
+48 ;;D^1
+49 ;;R^"860.3:","860.31:1",1,"E"
+50 ;;D^PATIENT CURRENTLY ON GLUCOPHAGE
+51 ;;R^"860.3:","860.31:1",2,"E"
+52 ;;D^LOGICAL TRUE
+53 ;;EOR^
+54 ;;KEY^860.3:^PATIENT HAS DIABETES ON PROBLEM LIST
+55 ;;R^"860.3:",.01,"E"
+56 ;;D^PATIENT HAS DIABETES ON PROBLEM LIST
+57 ;;R^"860.3:",.02,"E"
+58 ;;D^DATABASE LOOKUP
+59 ;;R^"860.3:","860.31:1",.01,"E"
+60 ;;D^1
+61 ;;R^"860.3:","860.31:1",1,"E"
+62 ;;D^PATIENT HAS DIABETES
+63 ;;R^"860.3:","860.31:1",2,"E"
+64 ;;D^LOGICAL TRUE
+65 ;;EOR^
+66 ;;KEY^860.3:^PATIENT NEEDS LITHIUM LEVEL PERFORMED
+67 ;;R^"860.3:",.01,"E"
+68 ;;D^PATIENT NEEDS LITHIUM LEVEL PERFORMED
+69 ;;R^"860.3:",.02,"E"
+70 ;;D^TIMED ORDER CHECK
+71 ;;R^"860.3:","860.31:1",.01,"E"
+72 ;;D^1
+73 ;;R^"860.3:","860.31:1",1,"E"
+74 ;;D^DATE OF LAST LITHIUM LAB TEST
+75 ;;R^"860.3:","860.31:1",2,"E"
+76 ;;D^DATE BEFORE
+77 ;;R^"860.3:","860.31:1",3,"E"
+78 ;;D^T-120
+79 ;;EOR^
+80 ;;KEY^860.3:^PATIENT NEEDS LITHIUM LAB LEVEL ORDERED
+81 ;;R^"860.3:",.01,"E"
+82 ;;D^PATIENT NEEDS LITHIUM LAB LEVEL ORDERED
+83 ;;R^"860.3:",.02,"E"
+84 ;;D^TIMED ORDER CHECK
+85 ;;R^"860.3:","860.31:1",.01,"E"
+86 ;;D^1
+87 ;;R^"860.3:","860.31:1",1,"E"
+88 ;;D^DATE OF LAST LITHIUM LAB ORDER
+89 ;;R^"860.3:","860.31:1",2,"E"
+90 ;;D^DATE BEFORE
+91 ;;R^"860.3:","860.31:1",3,"E"
+92 ;;D^T-120
+93 ;;EOR^
+94 ;;KEY^860.3:^POLYPHARMACY
+95 ;;R^"860.3:",.01,"E"
+96 ;;D^POLYPHARMACY
+97 ;;R^"860.3:",.02,"E"
+98 ;;D^CPRS ORDER PRESCAN
+99 ;;R^"860.3:","860.31:1",.01,"E"
+100 ;;D^1
+101 ;;R^"860.3:","860.31:1",1,"E"
+102 ;;D^ORDER MODE
+103 ;;R^"860.3:","860.31:1",2,"E"
+104 ;;D^EQ FREE TEXT
+105 ;;R^"860.3:","860.31:1",3,"E"
+106 ;;D^DISPLAY
+107 ;;R^"860.3:","860.31:2",.01,"E"
+108 ;;D^2
+109 ;;R^"860.3:","860.31:2",1,"E"
+110 ;;D^FILLER
+111 ;;R^"860.3:","860.31:2",2,"E"
+112 ;;D^STARTS WITH
+113 ;;R^"860.3:","860.31:2",3,"E"
+114 ;;D^PS
+115 ;;R^"860.3:","860.31:3",.01,"E"
+116 ;;D^3
+117 ;;R^"860.3:","860.31:3",1,"E"
+118 ;;D^POLYPHARMACY
+119 ;;R^"860.3:","860.31:3",2,"E"
+120 ;;D^LOGICAL TRUE
+121 ;;EOR^
+122 ;;KEY^860.3:^CREATININE CLEARANCE DATE/TIME
+123 ;;R^"860.3:",.01,"E"
+124 ;;D^CREATININE CLEARANCE DATE/TIME
+125 ;;R^"860.3:",.02,"E"
+126 ;;D^DATABASE LOOKUP
+127 ;;R^"860.3:","860.31:1",.01,"E"
+128 ;;D^1
+129 ;;R^"860.3:","860.31:1",1,"E"
+130 ;;D^CREATININE CLEARANCE (ESTIM) DATE
+131 ;;R^"860.3:","860.31:1",2,"E"
+132 ;;D^DATE AFTER
+133 ;;R^"860.3:","860.31:1",3,"E"
+134 ;;D^0
+135 ;;EOR^
+136 ;;KEY^860.3:^RENAL RESULTS
+137 ;;R^"860.3:",.01,"E"
+138 ;;D^RENAL RESULTS
+139 ;;R^"860.3:",.02,"E"
+140 ;;D^DATABASE LOOKUP
+141 ;;R^"860.3:","860.31:1",.01,"E"
+142 ;;D^1
+143 ;;R^"860.3:","860.31:1",1,"E"
+144 ;;D^FORMATTED RENAL LAB RESULTS
+145 ;;R^"860.3:","860.31:1",2,"E"
+146 ;;D^NOT EQUAL TO
+147 ;;R^"860.3:","860.31:1",3,"E"
+148 ;;D^<Results Not Found>
+149 ;;EOR^
+150 ;;KEY^860.3:^CANCELLED BY NON-ORDERER
+151 ;;R^"860.3:",.01,"E"
+152 ;;D^CANCELLED BY NON-ORDERER
+153 ;;R^"860.3:",.02,"E"
+154 ;;D^GENERIC HL7 MESSAGE ARRAY
+155 ;;EOR^
+156 ;;KEY^860.3:^ORDER ENTERED BY
+157 ;;R^"860.3:",.01,"E"
+158 ;;D^ORDER ENTERED BY
+159 ;;R^"860.3:",.02,"E"
+160 ;;D^GENERIC HL7 MESSAGE ARRAY
+161 ;;R^"860.3:","860.31:1",.01,"E"
+162 ;;D^1
+163 ;;R^"860.3:","860.31:1",1,"E"
+164 ;;D^ENTERED BY
+165 ;;R^"860.3:","860.31:1",2,"E"
+166 ;;D^FREE TEXT LENGTH GREATER THAN
+167 ;;R^"860.3:","860.31:1",3,"E"
+168 ;;D^0
+169 ;;EOR^
+170 ;;KEY^860.3:^CANCELED BY NON-ORIG ORDERING PROVIDER
+171 ;;R^"860.3:",.01,"E"
+172 ;;D^CANCELED BY NON-ORIG ORDERING PROVIDER
+173 ;;R^"860.3:",.02,"E"
+174 ;;D^GENERIC HL7 MESSAGE ARRAY
+175 ;;R^"860.3:","860.31:1",.01,"E"
+176 ;;D^1
+177 ;;R^"860.3:","860.31:1",1,"E"
+178 ;;D^ENTERED BY
+179 ;;R^"860.3:","860.31:1",2,"E"
+180 ;;D^NOT EQUAL TO
+181 ;;R^"860.3:","860.31:1",4,"E"
+182 ;;D^ORDERED BY
+183 ;;EOR^
+184 ;;KEY^860.3:^HL7 FINAL IMAGING RESULT
+185 ;;R^"860.3:",.01,"E"
+186 ;;D^HL7 FINAL IMAGING RESULT
+187 ;;R^"860.3:",.02,"E"
+188 ;;D^GENERIC HL7 MESSAGE ARRAY
+189 ;;R^"860.3:","860.31:1",.01,"E"
+190 ;;D^1
+191 ;;R^"860.3:","860.31:1",1,"E"
+192 ;;D^REQUEST STATUS (OBR)
+193 ;;R^"860.3:","860.31:1",2,"E"
+194 ;;D^EQ FREE TEXT
+195 ;;R^"860.3:","860.31:1",3,"E"
+196 ;1;
+197 ;