OCXDI027 ;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 ^OCXDI028
;
Q
;
DATA ;
;
;;D^TAKEMED^ORKPS(|PATIENT IEN|,"^GLUCOPHAGE^METFORMIN")
;;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.HAS_DIABETES
;;R^"863.3:",.01,"E"
;;D^PATIENT.HAS_DIABETES
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^PROBLEM LIST HAS DIABETES
;;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^HASPROB^ORQQPL(|PATIENT IEN|,"^;250")
;;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.ORDER TEXT (51 CHARS)
;;R^"863.3:",.01,"E"
;;D^PATIENT.ORDER TEXT (51 CHARS)
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^ORDER TEXT
;;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^TEXT^ORKOR(|ORDER NUMBER|)
;;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.DATE_LAST_LITH_ORDER
;;R^"863.3:",.01,"E"
;;D^PATIENT.DATE_LAST_LITH_ORDER
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^LAB TEST ORDER DATE
;;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^RECENT^ORQOR2(|PATIENT IEN|,|OI 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:^LITHIUM LAB TEST OI IEN
;;R^"863.3:",.01,"E"
;;D^LITHIUM LAB TEST OI IEN
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^IEN
;;R^"863.3:",.06,"E"
;;D^9999
;;EOR^
;;KEY^863.3:^PATIENT.MOVE_DATE_PREV
;;R^"863.3:",.01,"E"
;;D^PATIENT.MOVE_DATE_PREV
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^MOVEMENT DATE
;;R^"863.3:",.06,"E"
;;D^9999
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^DGPM0
;;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:^NUMMEDS
;;R^"863.3:",.01,"E"
;;D^NUMMEDS
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^NUMBER OF ACTIVE MEDS
;;R^"863.3:",.06,"E"
;;D^9991
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^NUMRX^ORQQPS(|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:^ORIG ORDERING PROVIDER
;;R^"863.3:",.01,"E"
;;D^ORIG ORDERING PROVIDER
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^ORIGINAL ORDERING PROVIDER
;;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^ORDERER^ORKOR(|ORDER NUMBER|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^1
;;R^"863.3:","863.32:3",.01,"E"
;;D^OCXO FILE POINTER
;;R^"863.3:","863.32:3",1,"E"
;;D^VA(200,
;;EOR^
;;KEY^863.3:^HL7_ENTERED BY
;;R^"863.3:",.01,"E"
;;D^HL7_ENTERED BY
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^HL7 ENTERED BY
;;R^"863.3:",.06,"E"
;;D^99
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^OCXODATA("ORC",10)
;;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:^ORDER.ORDERED BY
;;R^"863.3:",.01,"E"
;;D^ORDER.ORDERED BY
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^ORDERED BY
;;R^"863.3:",.06,"E"
;;D^9999
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO EXTERNAL FUNCTION CALL
;;R^"863.3:","863.32:1",1,"E"
;;D^ORDERER^ORKOR(|ORDER NUMBER|)
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO FILE POINTER
;;R^"863.3:","863.32:2",1,"E"
;;D^VA(200,
;;EOR^
;;KEY^863.3:^LAB TEST ID
;;R^"863.3:",.01,"E"
;;D^LAB TEST ID
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.06,"E"
;;D^998
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^OCXODATA("OBX",3)
;;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.HL7_LAB_LOCAL_ID
;;R^"863.3:",.01,"E"
;;D^PATIENT.HL7_LAB_LOCAL_ID
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^LAB TEST ID
;;R^"863.3:",.06,"E"
;;D^998
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^OCXODATA("OBX",3)
;;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:^LAB TEST PRINT NAME
;;R^"863.3:",.01,"E"
;;D^LAB TEST PRINT NAME
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;1;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXDI027 5485 printed Dec 13, 2024@02:23:47 Page 2
OCXDI027 ;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 ^OCXDI028
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;D^TAKEMED^ORKPS(|PATIENT IEN|,"^GLUCOPHAGE^METFORMIN")
+3 ;;R^"863.3:","863.32:2",.01,"E"
+4 ;;D^OCXO UP-ARROW PIECE NUMBER
+5 ;;R^"863.3:","863.32:2",1,"E"
+6 ;;D^1
+7 ;;EOR^
+8 ;;KEY^863.3:^PATIENT.HAS_DIABETES
+9 ;;R^"863.3:",.01,"E"
+10 ;;D^PATIENT.HAS_DIABETES
+11 ;;R^"863.3:",.02,"E"
+12 ;;D^PATIENT
+13 ;;R^"863.3:",.05,"E"
+14 ;;D^PROBLEM LIST HAS DIABETES
+15 ;;R^"863.3:",.06,"E"
+16 ;;D^999
+17 ;;R^"863.3:","863.32:1",.01,"E"
+18 ;;D^OCXO EXTERNAL FUNCTION CALL
+19 ;;R^"863.3:","863.32:1",1,"E"
+20 ;;D^HASPROB^ORQQPL(|PATIENT IEN|,"^;250")
+21 ;;R^"863.3:","863.32:2",.01,"E"
+22 ;;D^OCXO UP-ARROW PIECE NUMBER
+23 ;;R^"863.3:","863.32:2",1,"E"
+24 ;;D^1
+25 ;;EOR^
+26 ;;KEY^863.3:^PATIENT.ORDER TEXT (51 CHARS)
+27 ;;R^"863.3:",.01,"E"
+28 ;;D^PATIENT.ORDER TEXT (51 CHARS)
+29 ;;R^"863.3:",.02,"E"
+30 ;;D^PATIENT
+31 ;;R^"863.3:",.05,"E"
+32 ;;D^ORDER TEXT
+33 ;;R^"863.3:",.06,"E"
+34 ;;D^999
+35 ;;R^"863.3:","863.32:1",.01,"E"
+36 ;;D^OCXO EXTERNAL FUNCTION CALL
+37 ;;R^"863.3:","863.32:1",1,"E"
+38 ;;D^TEXT^ORKOR(|ORDER NUMBER|)
+39 ;;R^"863.3:","863.32:2",.01,"E"
+40 ;;D^OCXO UP-ARROW PIECE NUMBER
+41 ;;R^"863.3:","863.32:2",1,"E"
+42 ;;D^2
+43 ;;EOR^
+44 ;;KEY^863.3:^PATIENT.DATE_LAST_LITH_ORDER
+45 ;;R^"863.3:",.01,"E"
+46 ;;D^PATIENT.DATE_LAST_LITH_ORDER
+47 ;;R^"863.3:",.02,"E"
+48 ;;D^PATIENT
+49 ;;R^"863.3:",.05,"E"
+50 ;;D^LAB TEST ORDER DATE
+51 ;;R^"863.3:",.06,"E"
+52 ;;D^99
+53 ;;R^"863.3:","863.32:1",.01,"E"
+54 ;;D^OCXO EXTERNAL FUNCTION CALL
+55 ;;R^"863.3:","863.32:1",1,"E"
+56 ;;D^RECENT^ORQOR2(|PATIENT IEN|,|OI IEN|,"")
+57 ;;R^"863.3:","863.32:2",.01,"E"
+58 ;;D^OCXO UP-ARROW PIECE NUMBER
+59 ;;R^"863.3:","863.32:2",1,"E"
+60 ;;D^3
+61 ;;EOR^
+62 ;;KEY^863.3:^LITHIUM LAB TEST OI IEN
+63 ;;R^"863.3:",.01,"E"
+64 ;;D^LITHIUM LAB TEST OI IEN
+65 ;;R^"863.3:",.02,"E"
+66 ;;D^PATIENT
+67 ;;R^"863.3:",.05,"E"
+68 ;;D^IEN
+69 ;;R^"863.3:",.06,"E"
+70 ;;D^9999
+71 ;;EOR^
+72 ;;KEY^863.3:^PATIENT.MOVE_DATE_PREV
+73 ;;R^"863.3:",.01,"E"
+74 ;;D^PATIENT.MOVE_DATE_PREV
+75 ;;R^"863.3:",.02,"E"
+76 ;;D^PATIENT
+77 ;;R^"863.3:",.05,"E"
+78 ;;D^MOVEMENT DATE
+79 ;;R^"863.3:",.06,"E"
+80 ;;D^9999
+81 ;;R^"863.3:","863.32:1",.01,"E"
+82 ;;D^OCXO VARIABLE NAME
+83 ;;R^"863.3:","863.32:1",1,"E"
+84 ;;D^DGPM0
+85 ;;R^"863.3:","863.32:2",.01,"E"
+86 ;;D^OCXO UP-ARROW PIECE NUMBER
+87 ;;R^"863.3:","863.32:2",1,"E"
+88 ;;D^1
+89 ;;EOR^
+90 ;;KEY^863.3:^NUMMEDS
+91 ;;R^"863.3:",.01,"E"
+92 ;;D^NUMMEDS
+93 ;;R^"863.3:",.02,"E"
+94 ;;D^PATIENT
+95 ;;R^"863.3:",.05,"E"
+96 ;;D^NUMBER OF ACTIVE MEDS
+97 ;;R^"863.3:",.06,"E"
+98 ;;D^9991
+99 ;;R^"863.3:","863.32:1",.01,"E"
+100 ;;D^OCXO EXTERNAL FUNCTION CALL
+101 ;;R^"863.3:","863.32:1",1,"E"
+102 ;;D^NUMRX^ORQQPS(|PATIENT IEN|)
+103 ;;R^"863.3:","863.32:2",.01,"E"
+104 ;;D^OCXO UP-ARROW PIECE NUMBER
+105 ;;R^"863.3:","863.32:2",1,"E"
+106 ;;D^1
+107 ;;EOR^
+108 ;;KEY^863.3:^ORIG ORDERING PROVIDER
+109 ;;R^"863.3:",.01,"E"
+110 ;;D^ORIG ORDERING PROVIDER
+111 ;;R^"863.3:",.02,"E"
+112 ;;D^PATIENT
+113 ;;R^"863.3:",.05,"E"
+114 ;;D^ORIGINAL ORDERING PROVIDER
+115 ;;R^"863.3:",.06,"E"
+116 ;;D^999
+117 ;;R^"863.3:","863.32:1",.01,"E"
+118 ;;D^OCXO EXTERNAL FUNCTION CALL
+119 ;;R^"863.3:","863.32:1",1,"E"
+120 ;;D^ORDERER^ORKOR(|ORDER NUMBER|)
+121 ;;R^"863.3:","863.32:2",.01,"E"
+122 ;;D^OCXO UP-ARROW PIECE NUMBER
+123 ;;R^"863.3:","863.32:2",1,"E"
+124 ;;D^1
+125 ;;R^"863.3:","863.32:3",.01,"E"
+126 ;;D^OCXO FILE POINTER
+127 ;;R^"863.3:","863.32:3",1,"E"
+128 ;;D^VA(200,
+129 ;;EOR^
+130 ;;KEY^863.3:^HL7_ENTERED BY
+131 ;;R^"863.3:",.01,"E"
+132 ;;D^HL7_ENTERED BY
+133 ;;R^"863.3:",.02,"E"
+134 ;;D^PATIENT
+135 ;;R^"863.3:",.05,"E"
+136 ;;D^HL7 ENTERED BY
+137 ;;R^"863.3:",.06,"E"
+138 ;;D^99
+139 ;;R^"863.3:","863.32:1",.01,"E"
+140 ;;D^OCXO VARIABLE NAME
+141 ;;R^"863.3:","863.32:1",1,"E"
+142 ;;D^OCXODATA("ORC",10)
+143 ;;R^"863.3:","863.32:2",.01,"E"
+144 ;;D^OCXO UP-ARROW PIECE NUMBER
+145 ;;R^"863.3:","863.32:2",1,"E"
+146 ;;D^2
+147 ;;EOR^
+148 ;;KEY^863.3:^ORDER.ORDERED BY
+149 ;;R^"863.3:",.01,"E"
+150 ;;D^ORDER.ORDERED BY
+151 ;;R^"863.3:",.02,"E"
+152 ;;D^PATIENT
+153 ;;R^"863.3:",.05,"E"
+154 ;;D^ORDERED BY
+155 ;;R^"863.3:",.06,"E"
+156 ;;D^9999
+157 ;;R^"863.3:","863.32:1",.01,"E"
+158 ;;D^OCXO EXTERNAL FUNCTION CALL
+159 ;;R^"863.3:","863.32:1",1,"E"
+160 ;;D^ORDERER^ORKOR(|ORDER NUMBER|)
+161 ;;R^"863.3:","863.32:2",.01,"E"
+162 ;;D^OCXO FILE POINTER
+163 ;;R^"863.3:","863.32:2",1,"E"
+164 ;;D^VA(200,
+165 ;;EOR^
+166 ;;KEY^863.3:^LAB TEST ID
+167 ;;R^"863.3:",.01,"E"
+168 ;;D^LAB TEST ID
+169 ;;R^"863.3:",.02,"E"
+170 ;;D^PATIENT
+171 ;;R^"863.3:",.06,"E"
+172 ;;D^998
+173 ;;R^"863.3:","863.32:1",.01,"E"
+174 ;;D^OCXO VARIABLE NAME
+175 ;;R^"863.3:","863.32:1",1,"E"
+176 ;;D^OCXODATA("OBX",3)
+177 ;;R^"863.3:","863.32:2",.01,"E"
+178 ;;D^OCXO UP-ARROW PIECE NUMBER
+179 ;;R^"863.3:","863.32:2",1,"E"
+180 ;;D^4
+181 ;;EOR^
+182 ;;KEY^863.3:^PATIENT.HL7_LAB_LOCAL_ID
+183 ;;R^"863.3:",.01,"E"
+184 ;;D^PATIENT.HL7_LAB_LOCAL_ID
+185 ;;R^"863.3:",.02,"E"
+186 ;;D^PATIENT
+187 ;;R^"863.3:",.05,"E"
+188 ;;D^LAB TEST ID
+189 ;;R^"863.3:",.06,"E"
+190 ;;D^998
+191 ;;R^"863.3:","863.32:1",.01,"E"
+192 ;;D^OCXO VARIABLE NAME
+193 ;;R^"863.3:","863.32:1",1,"E"
+194 ;;D^OCXODATA("OBX",3)
+195 ;;R^"863.3:","863.32:2",.01,"E"
+196 ;;D^OCXO UP-ARROW PIECE NUMBER
+197 ;;R^"863.3:","863.32:2",1,"E"
+198 ;;D^4
+199 ;;EOR^
+200 ;;KEY^863.3:^LAB TEST PRINT NAME
+201 ;;R^"863.3:",.01,"E"
+202 ;;D^LAB TEST PRINT NAME
+203 ;;R^"863.3:",.02,"E"
+204 ;;D^PATIENT
+205 ;;R^"863.3:",.04,"E"
+206 ;1;
+207 ;