OCXDI029 ;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 ^OCXDI02A
;
Q
;
DATA ;
;
;;D^PATIENT.GLUCOPHAGE_CREAT_FLAG
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^GLUCO-CREATININE FLAG
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^GLCREAT^ORKPS(|PATIENT IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^1
;;EOR^
;;KEY^863.3:^PATIENT.GLUCOPHAGE_CREAT_TEXT
;;R^"863.3:",.01,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_TEXT
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^GLUCO-CREATININE TEXT
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^GLCREAT^ORKPS(|PATIENT IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^2
;;EOR^
;;KEY^863.3:^PATIENT.GLUCOPHAGE_CREAT_RSLT
;;R^"863.3:",.01,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_RSLT
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^GLUCO-CREATININE RESULT
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^GLCREAT^ORKPS(|PATIENT IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^3
;;EOR^
;;KEY^863.3:^PATIENT.GLUCOPHAGE_CREAT_DAYS
;;R^"863.3:",.01,"E"
;;D^PATIENT.GLUCOPHAGE_CREAT_DAYS
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^GLUCO_CREATININE DAYS
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^GCDAYS^ORKPS(|PATIENT IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^1
;;EOR^
;;KEY^863.3:^PATIENT.CLOZ_LABS_W/IN_6_DAYS
;;R^"863.3:",.01,"E"
;;D^PATIENT.CLOZ_LABS_W/IN_6_DAYS
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^CLOZAPINE LABS W/IN 6 DAYS
;;R^"863.3:",.06,"E"
;;D^999
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^CLOZLABS^ORKLR(|PATIENT IEN|,6,|DISP DRUG IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^1
;;EOR^
;;KEY^863.3:^PATIENT.ANC_W/IN_6_DAYS_FLAG
;;R^"863.3:",.01,"E"
;;D^PATIENT.ANC_W/IN_6_DAYS_FLAG
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^ANC W/IN 6 DAYS
;;R^"863.3:",.06,"E"
;;D^999
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^RECNTANC^ORKLR(|PATIENT IEN|,6)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^1
;;EOR^
;;KEY^863.3:^PATIENT.RECENT ANC RESULT
;;R^"863.3:",.01,"E"
;;D^PATIENT.RECENT ANC RESULT
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^RECENT ANC
;;R^"863.3:",.06,"E"
;;D^99
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^RECNTANC^ORKLR(|PATIENT IEN|,"")
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^2
;;EOR^
;;KEY^863.3:^PATIENT.CLOZ_LAB_RESULTS
;;R^"863.3:",.01,"E"
;;D^PATIENT.CLOZ_LAB_RESULTS
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^CLOZAPINE LAB RESULTS
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^CLOZLABS^ORKLR(|PATIENT IEN|,"",|DISP DRUG IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^4
;;EOR^
;;KEY^863.3:^PATIENT.OPS_DRUG_ID
;;R^"863.3:",.01,"E"
;;D^PATIENT.OPS_DRUG_ID
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^DISPENSE DRUG
;;R^"863.3:",.06,"E"
;;D^33
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^OCXPSD
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO VT-BAR PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^2
;;R^"863.3:","863.32:3",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:3",1,"E"
;;D^4
;;EOR^
;;KEY^863.3:^PATIENT.CLOZAPINE MED
;;R^"863.3:",.01,"E"
;;D^PATIENT.CLOZAPINE MED
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^CLOZAPINE MED
;;R^"863.3:",.06,"E"
;;D^3555
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^CLOZLABS^ORKLR(|PATIENT IEN|,7,|DISP DRUG IEN|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^1
;;EOR^
;;KEY^863.3:^QUERY.MODE
;;R^"863.3:",.01,"E"
;;D^QUERY.MODE
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^QUERY
;;R^"863.3:",.05,"E"
;;D^QUERY MODE
;;R^"863.3:",.06,"E"
;;D^999
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^OCXGNM
;;EOR^
;;KEY^863.3:^PATIENT.WBC_W/IN_7_DAYS_FLAG
;1;
;
OCXDI029 ;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 ^OCXDI02A
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;D^PATIENT.GLUCOPHAGE_CREAT_FLAG
+3 ;;R^"863.3:",.02,"E"
+4 ;;D^PATIENT
+5 ;;R^"863.3:",.05,"E"
+6 ;;D^GLUCO-CREATININE FLAG
+7 ;;R^"863.3:","863.32:1",.01,"E"
+8 ;;D^OCXO EXTERNAL FUNCTION CALL
+9 ;;R^"863.3:","863.32:1",1,"E"
+10 ;;D^GLCREAT^ORKPS(|PATIENT IEN|)
+11 ;;R^"863.3:","863.32:2",.01,"E"
+12 ;;D^OCXO UP-ARROW PIECE NUMBER
+13 ;;R^"863.3:","863.32:2",1,"E"
+14 ;;D^1
+15 ;;EOR^
+16 ;;KEY^863.3:^PATIENT.GLUCOPHAGE_CREAT_TEXT
+17 ;;R^"863.3:",.01,"E"
+18 ;;D^PATIENT.GLUCOPHAGE_CREAT_TEXT
+19 ;;R^"863.3:",.02,"E"
+20 ;;D^PATIENT
+21 ;;R^"863.3:",.05,"E"
+22 ;;D^GLUCO-CREATININE TEXT
+23 ;;R^"863.3:","863.32:1",.01,"E"
+24 ;;D^OCXO EXTERNAL FUNCTION CALL
+25 ;;R^"863.3:","863.32:1",1,"E"
+26 ;;D^GLCREAT^ORKPS(|PATIENT IEN|)
+27 ;;R^"863.3:","863.32:2",.01,"E"
+28 ;;D^OCXO UP-ARROW PIECE NUMBER
+29 ;;R^"863.3:","863.32:2",1,"E"
+30 ;;D^2
+31 ;;EOR^
+32 ;;KEY^863.3:^PATIENT.GLUCOPHAGE_CREAT_RSLT
+33 ;;R^"863.3:",.01,"E"
+34 ;;D^PATIENT.GLUCOPHAGE_CREAT_RSLT
+35 ;;R^"863.3:",.02,"E"
+36 ;;D^PATIENT
+37 ;;R^"863.3:",.05,"E"
+38 ;;D^GLUCO-CREATININE RESULT
+39 ;;R^"863.3:","863.32:1",.01,"E"
+40 ;;D^OCXO EXTERNAL FUNCTION CALL
+41 ;;R^"863.3:","863.32:1",1,"E"
+42 ;;D^GLCREAT^ORKPS(|PATIENT IEN|)
+43 ;;R^"863.3:","863.32:2",.01,"E"
+44 ;;D^OCXO UP-ARROW PIECE NUMBER
+45 ;;R^"863.3:","863.32:2",1,"E"
+46 ;;D^3
+47 ;;EOR^
+48 ;;KEY^863.3:^PATIENT.GLUCOPHAGE_CREAT_DAYS
+49 ;;R^"863.3:",.01,"E"
+50 ;;D^PATIENT.GLUCOPHAGE_CREAT_DAYS
+51 ;;R^"863.3:",.02,"E"
+52 ;;D^PATIENT
+53 ;;R^"863.3:",.05,"E"
+54 ;;D^GLUCO_CREATININE DAYS
+55 ;;R^"863.3:","863.32:1",.01,"E"
+56 ;;D^OCXO EXTERNAL FUNCTION CALL
+57 ;;R^"863.3:","863.32:1",1,"E"
+58 ;;D^GCDAYS^ORKPS(|PATIENT IEN|)
+59 ;;R^"863.3:","863.32:2",.01,"E"
+60 ;;D^OCXO UP-ARROW PIECE NUMBER
+61 ;;R^"863.3:","863.32:2",1,"E"
+62 ;;D^1
+63 ;;EOR^
+64 ;;KEY^863.3:^PATIENT.CLOZ_LABS_W/IN_6_DAYS
+65 ;;R^"863.3:",.01,"E"
+66 ;;D^PATIENT.CLOZ_LABS_W/IN_6_DAYS
+67 ;;R^"863.3:",.02,"E"
+68 ;;D^PATIENT
+69 ;;R^"863.3:",.05,"E"
+70 ;;D^CLOZAPINE LABS W/IN 6 DAYS
+71 ;;R^"863.3:",.06,"E"
+72 ;;D^999
+73 ;;R^"863.3:","863.32:1",.01,"E"
+74 ;;D^OCXO EXTERNAL FUNCTION CALL
+75 ;;R^"863.3:","863.32:1",1,"E"
+76 ;;D^CLOZLABS^ORKLR(|PATIENT IEN|,6,|DISP DRUG IEN|)
+77 ;;R^"863.3:","863.32:2",.01,"E"
+78 ;;D^OCXO UP-ARROW PIECE NUMBER
+79 ;;R^"863.3:","863.32:2",1,"E"
+80 ;;D^1
+81 ;;EOR^
+82 ;;KEY^863.3:^PATIENT.ANC_W/IN_6_DAYS_FLAG
+83 ;;R^"863.3:",.01,"E"
+84 ;;D^PATIENT.ANC_W/IN_6_DAYS_FLAG
+85 ;;R^"863.3:",.02,"E"
+86 ;;D^PATIENT
+87 ;;R^"863.3:",.05,"E"
+88 ;;D^ANC W/IN 6 DAYS
+89 ;;R^"863.3:",.06,"E"
+90 ;;D^999
+91 ;;R^"863.3:","863.32:1",.01,"E"
+92 ;;D^OCXO EXTERNAL FUNCTION CALL
+93 ;;R^"863.3:","863.32:1",1,"E"
+94 ;;D^RECNTANC^ORKLR(|PATIENT IEN|,6)
+95 ;;R^"863.3:","863.32:2",.01,"E"
+96 ;;D^OCXO UP-ARROW PIECE NUMBER
+97 ;;R^"863.3:","863.32:2",1,"E"
+98 ;;D^1
+99 ;;EOR^
+100 ;;KEY^863.3:^PATIENT.RECENT ANC RESULT
+101 ;;R^"863.3:",.01,"E"
+102 ;;D^PATIENT.RECENT ANC RESULT
+103 ;;R^"863.3:",.02,"E"
+104 ;;D^PATIENT
+105 ;;R^"863.3:",.05,"E"
+106 ;;D^RECENT ANC
+107 ;;R^"863.3:",.06,"E"
+108 ;;D^99
+109 ;;R^"863.3:","863.32:1",.01,"E"
+110 ;;D^OCXO EXTERNAL FUNCTION CALL
+111 ;;R^"863.3:","863.32:1",1,"E"
+112 ;;D^RECNTANC^ORKLR(|PATIENT IEN|,"")
+113 ;;R^"863.3:","863.32:2",.01,"E"
+114 ;;D^OCXO UP-ARROW PIECE NUMBER
+115 ;;R^"863.3:","863.32:2",1,"E"
+116 ;;D^2
+117 ;;EOR^
+118 ;;KEY^863.3:^PATIENT.CLOZ_LAB_RESULTS
+119 ;;R^"863.3:",.01,"E"
+120 ;;D^PATIENT.CLOZ_LAB_RESULTS
+121 ;;R^"863.3:",.02,"E"
+122 ;;D^PATIENT
+123 ;;R^"863.3:",.05,"E"
+124 ;;D^CLOZAPINE LAB RESULTS
+125 ;;R^"863.3:","863.32:1",.01,"E"
+126 ;;D^OCXO EXTERNAL FUNCTION CALL
+127 ;;R^"863.3:","863.32:1",1,"E"
+128 ;;D^CLOZLABS^ORKLR(|PATIENT IEN|,"",|DISP DRUG IEN|)
+129 ;;R^"863.3:","863.32:2",.01,"E"
+130 ;;D^OCXO UP-ARROW PIECE NUMBER
+131 ;;R^"863.3:","863.32:2",1,"E"
+132 ;;D^4
+133 ;;EOR^
+134 ;;KEY^863.3:^PATIENT.OPS_DRUG_ID
+135 ;;R^"863.3:",.01,"E"
+136 ;;D^PATIENT.OPS_DRUG_ID
+137 ;;R^"863.3:",.02,"E"
+138 ;;D^PATIENT
+139 ;;R^"863.3:",.05,"E"
+140 ;;D^DISPENSE DRUG
+141 ;;R^"863.3:",.06,"E"
+142 ;;D^33
+143 ;;R^"863.3:","863.32:1",.01,"E"
+144 ;;D^OCXO VARIABLE NAME
+145 ;;R^"863.3:","863.32:1",1,"E"
+146 ;;D^OCXPSD
+147 ;;R^"863.3:","863.32:2",.01,"E"
+148 ;;D^OCXO VT-BAR PIECE NUMBER
+149 ;;R^"863.3:","863.32:2",1,"E"
+150 ;;D^2
+151 ;;R^"863.3:","863.32:3",.01,"E"
+152 ;;D^OCXO UP-ARROW PIECE NUMBER
+153 ;;R^"863.3:","863.32:3",1,"E"
+154 ;;D^4
+155 ;;EOR^
+156 ;;KEY^863.3:^PATIENT.CLOZAPINE MED
+157 ;;R^"863.3:",.01,"E"
+158 ;;D^PATIENT.CLOZAPINE MED
+159 ;;R^"863.3:",.02,"E"
+160 ;;D^PATIENT
+161 ;;R^"863.3:",.05,"E"
+162 ;;D^CLOZAPINE MED
+163 ;;R^"863.3:",.06,"E"
+164 ;;D^3555
+165 ;;R^"863.3:","863.32:1",.01,"E"
+166 ;;D^OCXO EXTERNAL FUNCTION CALL
+167 ;;R^"863.3:","863.32:1",1,"E"
+168 ;;D^CLOZLABS^ORKLR(|PATIENT IEN|,7,|DISP DRUG IEN|)
+169 ;;R^"863.3:","863.32:2",.01,"E"
+170 ;;D^OCXO UP-ARROW PIECE NUMBER
+171 ;;R^"863.3:","863.32:2",1,"E"
+172 ;;D^1
+173 ;;EOR^
+174 ;;KEY^863.3:^QUERY.MODE
+175 ;;R^"863.3:",.01,"E"
+176 ;;D^QUERY.MODE
+177 ;;R^"863.3:",.02,"E"
+178 ;;D^PATIENT
+179 ;;R^"863.3:",.04,"E"
+180 ;;D^QUERY
+181 ;;R^"863.3:",.05,"E"
+182 ;;D^QUERY MODE
+183 ;;R^"863.3:",.06,"E"
+184 ;;D^999
+185 ;;R^"863.3:","863.32:1",.01,"E"
+186 ;;D^OCXO VARIABLE NAME
+187 ;;R^"863.3:","863.32:1",1,"E"
+188 ;;D^OCXGNM
+189 ;;EOR^
+190 ;;KEY^863.3:^PATIENT.WBC_W/IN_7_DAYS_FLAG
+191 ;1;
+192 ;