OCXDI02T ;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 ^OCXDI02U
;
Q
;
DATA ;
;
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^LAB TEST PRINT NAME
;;EOR^
;;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:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^CURRENT_DATE/TIME
;;EOR^
;;KEY^860.4:^RECENT SERUM CREATININE TEXT
;;R^"860.4:",.01,"E"
;;D^RECENT SERUM CREATININE TEXT
;;R^"860.4:",1,"E"
;;D^CREATININE TEXT
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.REC_CREATININE_TEXT
;;EOR^
;;KEY^860.4:^RECENT SERUM CREATININE FLAG
;;R^"860.4:",.01,"E"
;;D^RECENT SERUM CREATININE FLAG
;;R^"860.4:",101,"E"
;;D^BOOLEAN
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.REC_CREATININE_FLAG
;;EOR^
;;KEY^860.4:^RECENT BARIUM STUDY ORDER STATUS
;;R^"860.4:",.01,"E"
;;D^RECENT BARIUM STUDY ORDER STATUS
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.REC_BAR_ORDER_STATUS
;;EOR^
;;KEY^860.4:^RECENT CHOLECYSTOGRAM ORDER STATUS
;;R^"860.4:",.01,"E"
;;D^RECENT CHOLECYSTOGRAM ORDER STATUS
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.REC_CHOLEC_ORD_STATUS
;;EOR^
;;KEY^860.4:^POLYPHARMACY
;;R^"860.4:",.01,"E"
;;D^POLYPHARMACY
;;R^"860.4:",1,"E"
;;D^POLYRX
;;R^"860.4:",101,"E"
;;D^BOOLEAN
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.POLYPHARMACY
;;EOR^
;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE FLAG
;;R^"860.4:",.01,"E"
;;D^RECENT GLUCOPHAGE CREATININE FLAG
;;R^"860.4:",101,"E"
;;D^BOOLEAN
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_FLAG
;;EOR^
;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE TEXT
;;R^"860.4:",.01,"E"
;;D^RECENT GLUCOPHAGE CREATININE TEXT
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_TEXT
;;EOR^
;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE RESULT
;;R^"860.4:",.01,"E"
;;D^RECENT GLUCOPHAGE CREATININE RESULT
;;R^"860.4:",101,"E"
;;D^NUMERIC
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_RSLT
;;EOR^
;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE DAYS
;;R^"860.4:",.01,"E"
;;D^RECENT GLUCOPHAGE CREATININE DAYS
;;R^"860.4:",101,"E"
;;D^NUMERIC
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_DAYS
;;EOR^
;;KEY^860.4:^ANC W/IN 6 DAYS
;;R^"860.4:",.01,"E"
;;D^ANC W/IN 6 DAYS
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.ANC_W/IN_6_DAYS_FLAG
;;EOR^
;;KEY^860.4:^RECENT ANC RESULT
;;R^"860.4:",.01,"E"
;;D^RECENT ANC RESULT
;;R^"860.4:",1,"E"
;;D^RECENT ANC
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.RECENT ANC RESULT
;;EOR^
;;KEY^860.4:^CLOZAPINE LAB RESULTS
;;R^"860.4:",.01,"E"
;;D^CLOZAPINE LAB RESULTS
;;R^"860.4:",1,"E"
;;D^CLOZ LAB RSLTS
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:4",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",.02,"E"
;;D^DATABASE LOOKUP
;;R^"860.4:","860.41:4",1,"E"
;;D^PATIENT.CLOZ_LAB_RESULTS
;;EOR^
;;KEY^860.4:^PHARMACY LOCAL ID
;;R^"860.4:",.01,"E"
;;D^PHARMACY LOCAL ID
;;R^"860.4:",1,"E"
;;D^DISP DRUG IEN
;;R^"860.4:",101,"E"
;;D^FREE TEXT
;;R^"860.4:","860.41:5",.01,"E"
;;D^CPRS ORDER PRESCAN
;;R^"860.4:","860.41:5",.02,"E"
;;D^ORDER ENTRY ORDER PRESCAN
;;R^"860.4:","860.41:5",1,"E"
;;D^PATIENT.OPS_DRUG_ID
;;EOR^
;;KEY^860.4:^CLOZAPINE MED
;;R^"860.4:",.01,"E"
;;D^CLOZAPINE MED
;;R^"860.4:",1,"E"
;;D^CLOZAPINE
;1;
;
OCXDI02T ;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 ^OCXDI02U
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;D^DATABASE LOOKUP
+3 ;;R^"860.4:","860.41:4",.02,"E"
+4 ;;D^DATABASE LOOKUP
+5 ;;R^"860.4:","860.41:4",1,"E"
+6 ;;D^LAB TEST PRINT NAME
+7 ;;EOR^
+8 ;;KEY^860.4:^CURRENT DATE/TIME
+9 ;;R^"860.4:",.01,"E"
+10 ;;D^CURRENT DATE/TIME
+11 ;;R^"860.4:",1,"E"
+12 ;;D^CDT
+13 ;;R^"860.4:",101,"E"
+14 ;;D^FREE TEXT
+15 ;;R^"860.4:","860.41:4",.01,"E"
+16 ;;D^DATABASE LOOKUP
+17 ;;R^"860.4:","860.41:4",.02,"E"
+18 ;;D^DATABASE LOOKUP
+19 ;;R^"860.4:","860.41:4",1,"E"
+20 ;;D^CURRENT_DATE/TIME
+21 ;;EOR^
+22 ;;KEY^860.4:^RECENT SERUM CREATININE TEXT
+23 ;;R^"860.4:",.01,"E"
+24 ;;D^RECENT SERUM CREATININE TEXT
+25 ;;R^"860.4:",1,"E"
+26 ;;D^CREATININE TEXT
+27 ;;R^"860.4:",101,"E"
+28 ;;D^FREE TEXT
+29 ;;R^"860.4:","860.41:4",.01,"E"
+30 ;;D^DATABASE LOOKUP
+31 ;;R^"860.4:","860.41:4",.02,"E"
+32 ;;D^DATABASE LOOKUP
+33 ;;R^"860.4:","860.41:4",1,"E"
+34 ;;D^PATIENT.REC_CREATININE_TEXT
+35 ;;EOR^
+36 ;;KEY^860.4:^RECENT SERUM CREATININE FLAG
+37 ;;R^"860.4:",.01,"E"
+38 ;;D^RECENT SERUM CREATININE FLAG
+39 ;;R^"860.4:",101,"E"
+40 ;;D^BOOLEAN
+41 ;;R^"860.4:","860.41:4",.01,"E"
+42 ;;D^DATABASE LOOKUP
+43 ;;R^"860.4:","860.41:4",.02,"E"
+44 ;;D^DATABASE LOOKUP
+45 ;;R^"860.4:","860.41:4",1,"E"
+46 ;;D^PATIENT.REC_CREATININE_FLAG
+47 ;;EOR^
+48 ;;KEY^860.4:^RECENT BARIUM STUDY ORDER STATUS
+49 ;;R^"860.4:",.01,"E"
+50 ;;D^RECENT BARIUM STUDY ORDER STATUS
+51 ;;R^"860.4:",101,"E"
+52 ;;D^FREE TEXT
+53 ;;R^"860.4:","860.41:4",.01,"E"
+54 ;;D^DATABASE LOOKUP
+55 ;;R^"860.4:","860.41:4",.02,"E"
+56 ;;D^DATABASE LOOKUP
+57 ;;R^"860.4:","860.41:4",1,"E"
+58 ;;D^PATIENT.REC_BAR_ORDER_STATUS
+59 ;;EOR^
+60 ;;KEY^860.4:^RECENT CHOLECYSTOGRAM ORDER STATUS
+61 ;;R^"860.4:",.01,"E"
+62 ;;D^RECENT CHOLECYSTOGRAM ORDER STATUS
+63 ;;R^"860.4:",101,"E"
+64 ;;D^FREE TEXT
+65 ;;R^"860.4:","860.41:4",.01,"E"
+66 ;;D^DATABASE LOOKUP
+67 ;;R^"860.4:","860.41:4",.02,"E"
+68 ;;D^DATABASE LOOKUP
+69 ;;R^"860.4:","860.41:4",1,"E"
+70 ;;D^PATIENT.REC_CHOLEC_ORD_STATUS
+71 ;;EOR^
+72 ;;KEY^860.4:^POLYPHARMACY
+73 ;;R^"860.4:",.01,"E"
+74 ;;D^POLYPHARMACY
+75 ;;R^"860.4:",1,"E"
+76 ;;D^POLYRX
+77 ;;R^"860.4:",101,"E"
+78 ;;D^BOOLEAN
+79 ;;R^"860.4:","860.41:4",.01,"E"
+80 ;;D^DATABASE LOOKUP
+81 ;;R^"860.4:","860.41:4",.02,"E"
+82 ;;D^DATABASE LOOKUP
+83 ;;R^"860.4:","860.41:4",1,"E"
+84 ;;D^PATIENT.POLYPHARMACY
+85 ;;EOR^
+86 ;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE FLAG
+87 ;;R^"860.4:",.01,"E"
+88 ;;D^RECENT GLUCOPHAGE CREATININE FLAG
+89 ;;R^"860.4:",101,"E"
+90 ;;D^BOOLEAN
+91 ;;R^"860.4:","860.41:4",.01,"E"
+92 ;;D^DATABASE LOOKUP
+93 ;;R^"860.4:","860.41:4",.02,"E"
+94 ;;D^DATABASE LOOKUP
+95 ;;R^"860.4:","860.41:4",1,"E"
+96 ;;D^PATIENT.GLUCOPHAGE_CREAT_FLAG
+97 ;;EOR^
+98 ;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE TEXT
+99 ;;R^"860.4:",.01,"E"
+100 ;;D^RECENT GLUCOPHAGE CREATININE TEXT
+101 ;;R^"860.4:",101,"E"
+102 ;;D^FREE TEXT
+103 ;;R^"860.4:","860.41:4",.01,"E"
+104 ;;D^DATABASE LOOKUP
+105 ;;R^"860.4:","860.41:4",.02,"E"
+106 ;;D^DATABASE LOOKUP
+107 ;;R^"860.4:","860.41:4",1,"E"
+108 ;;D^PATIENT.GLUCOPHAGE_CREAT_TEXT
+109 ;;EOR^
+110 ;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE RESULT
+111 ;;R^"860.4:",.01,"E"
+112 ;;D^RECENT GLUCOPHAGE CREATININE RESULT
+113 ;;R^"860.4:",101,"E"
+114 ;;D^NUMERIC
+115 ;;R^"860.4:","860.41:4",.01,"E"
+116 ;;D^DATABASE LOOKUP
+117 ;;R^"860.4:","860.41:4",.02,"E"
+118 ;;D^DATABASE LOOKUP
+119 ;;R^"860.4:","860.41:4",1,"E"
+120 ;;D^PATIENT.GLUCOPHAGE_CREAT_RSLT
+121 ;;EOR^
+122 ;;KEY^860.4:^RECENT GLUCOPHAGE CREATININE DAYS
+123 ;;R^"860.4:",.01,"E"
+124 ;;D^RECENT GLUCOPHAGE CREATININE DAYS
+125 ;;R^"860.4:",101,"E"
+126 ;;D^NUMERIC
+127 ;;R^"860.4:","860.41:4",.01,"E"
+128 ;;D^DATABASE LOOKUP
+129 ;;R^"860.4:","860.41:4",.02,"E"
+130 ;;D^DATABASE LOOKUP
+131 ;;R^"860.4:","860.41:4",1,"E"
+132 ;;D^PATIENT.GLUCOPHAGE_CREAT_DAYS
+133 ;;EOR^
+134 ;;KEY^860.4:^ANC W/IN 6 DAYS
+135 ;;R^"860.4:",.01,"E"
+136 ;;D^ANC W/IN 6 DAYS
+137 ;;R^"860.4:","860.41:4",.01,"E"
+138 ;;D^DATABASE LOOKUP
+139 ;;R^"860.4:","860.41:4",.02,"E"
+140 ;;D^DATABASE LOOKUP
+141 ;;R^"860.4:","860.41:4",1,"E"
+142 ;;D^PATIENT.ANC_W/IN_6_DAYS_FLAG
+143 ;;EOR^
+144 ;;KEY^860.4:^RECENT ANC RESULT
+145 ;;R^"860.4:",.01,"E"
+146 ;;D^RECENT ANC RESULT
+147 ;;R^"860.4:",1,"E"
+148 ;;D^RECENT ANC
+149 ;;R^"860.4:",101,"E"
+150 ;;D^FREE TEXT
+151 ;;R^"860.4:","860.41:4",.01,"E"
+152 ;;D^DATABASE LOOKUP
+153 ;;R^"860.4:","860.41:4",.02,"E"
+154 ;;D^DATABASE LOOKUP
+155 ;;R^"860.4:","860.41:4",1,"E"
+156 ;;D^PATIENT.RECENT ANC RESULT
+157 ;;EOR^
+158 ;;KEY^860.4:^CLOZAPINE LAB RESULTS
+159 ;;R^"860.4:",.01,"E"
+160 ;;D^CLOZAPINE LAB RESULTS
+161 ;;R^"860.4:",1,"E"
+162 ;;D^CLOZ LAB RSLTS
+163 ;;R^"860.4:",101,"E"
+164 ;;D^FREE TEXT
+165 ;;R^"860.4:","860.41:4",.01,"E"
+166 ;;D^DATABASE LOOKUP
+167 ;;R^"860.4:","860.41:4",.02,"E"
+168 ;;D^DATABASE LOOKUP
+169 ;;R^"860.4:","860.41:4",1,"E"
+170 ;;D^PATIENT.CLOZ_LAB_RESULTS
+171 ;;EOR^
+172 ;;KEY^860.4:^PHARMACY LOCAL ID
+173 ;;R^"860.4:",.01,"E"
+174 ;;D^PHARMACY LOCAL ID
+175 ;;R^"860.4:",1,"E"
+176 ;;D^DISP DRUG IEN
+177 ;;R^"860.4:",101,"E"
+178 ;;D^FREE TEXT
+179 ;;R^"860.4:","860.41:5",.01,"E"
+180 ;;D^CPRS ORDER PRESCAN
+181 ;;R^"860.4:","860.41:5",.02,"E"
+182 ;;D^ORDER ENTRY ORDER PRESCAN
+183 ;;R^"860.4:","860.41:5",1,"E"
+184 ;;D^PATIENT.OPS_DRUG_ID
+185 ;;EOR^
+186 ;;KEY^860.4:^CLOZAPINE MED
+187 ;;R^"860.4:",.01,"E"
+188 ;;D^CLOZAPINE MED
+189 ;;R^"860.4:",1,"E"
+190 ;;D^CLOZAPINE
+191 ;1;
+192 ;