OCXDI026 ;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 ^OCXDI027
;
Q
;
DATA ;
;
;;D^6
;;R^"863.3:","863.32:3",.01,"E"
;;D^OCXO FILE POINTER
;;R^"863.3:","863.32:3",1,"E"
;;D^42
;;EOR^
;;KEY^863.3:^PATIENT.MOVE_SERV_CURR
;;R^"863.3:",.01,"E"
;;D^PATIENT.MOVE_SERV_CURR
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^DGPM
;;R^"863.3:",.05,"E"
;;D^SERVICE CATEGORY
;;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^WARDSERV(|PMWIENC|)
;;EOR^
;;KEY^863.3:^PATIENT.MOV_WARD_IEN_CURR
;;R^"863.3:",.01,"E"
;;D^PATIENT.MOV_WARD_IEN_CURR
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^DGPM
;;R^"863.3:",.05,"E"
;;D^IEN
;;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^DGPMA
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^6
;;EOR^
;;KEY^863.3:^PATIENT.MOV_WARD_IEN_PREV
;;R^"863.3:",.01,"E"
;;D^PATIENT.MOV_WARD_IEN_PREV
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^DGPM
;;R^"863.3:",.05,"E"
;;D^IEN
;;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^DGPM0
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^6
;;EOR^
;;KEY^863.3:^PATIENT.MOVE_SERV_PREV
;;R^"863.3:",.01,"E"
;;D^PATIENT.MOVE_SERV_PREV
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^DGPM
;;R^"863.3:",.05,"E"
;;D^SERVICE CATEGORY
;;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^WARDSERV(|PMWIENP|)
;;EOR^
;;KEY^863.3:^PATIENT.MOVE_WARD_PREV
;;R^"863.3:",.01,"E"
;;D^PATIENT.MOVE_WARD_PREV
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^DGPM
;;R^"863.3:",.05,"E"
;;D^WARD NAME
;;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^DGPM0
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^6
;;R^"863.3:","863.32:3",.01,"E"
;;D^OCXO FILE POINTER
;;R^"863.3:","863.32:3",1,"E"
;;D^42
;;EOR^
;;KEY^863.3:^PATIENT.ORD_ITEM_NAME
;;R^"863.3:",.01,"E"
;;D^PATIENT.ORD_ITEM_NAME
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^DBL
;;R^"863.3:",.05,"E"
;;D^ORDERABLE ITEM
;;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^ORDITEM(|ORDER NUMBER|)
;;EOR^
;;KEY^863.3:^PATIENT.NEW_MOVEMENT
;;R^"863.3:",.01,"E"
;;D^PATIENT.NEW_MOVEMENT
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^NEW MOVEMENT
;;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^('(+$G(DGPMA)=+$G(DGPM0))&'$L(DGPMP))
;;EOR^
;;KEY^863.3:^PATIENT.ACTIVE MEDS
;;R^"863.3:",.01,"E"
;;D^PATIENT.ACTIVE MEDS
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.06,"E"
;;D^1
;;EOR^
;;KEY^863.3:^LOCAL GLUCOPHAGE MEDS
;;R^"863.3:",.01,"E"
;;D^LOCAL GLUCOPHAGE MEDS
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;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^("METFORMIN")
;;EOR^
;;KEY^863.3:^PATIENT.TAKING_LITHIUM
;;R^"863.3:",.01,"E"
;;D^PATIENT.TAKING_LITHIUM
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^CURRENT LITHIUM FLAG
;;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^TAKEMED^ORKPS(|PATIENT IEN|,"^LITHIUM")
;;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.DATE_LAST_LITHIUM_TEST
;;R^"863.3:",.01,"E"
;;D^PATIENT.DATE_LAST_LITHIUM_TEST
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^LAB TEST 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^LOCL^ORQQLR1(|PATIENT IEN|,|LITHIUM LAB TEST NID|,"SERUM SPECIMEN")
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:2",1,"E"
;;D^6
;;EOR^
;;KEY^863.3:^LITHIUM LAB TEST NID
;;R^"863.3:",.01,"E"
;;D^LITHIUM LAB TEST NID
;;R^"863.3:",.05,"E"
;;D^NATIONAL LAB ID
;;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^(0)
;;EOR^
;;KEY^863.3:^PATIENT.TAKING_GLUCOPHAGE
;;R^"863.3:",.01,"E"
;;D^PATIENT.TAKING_GLUCOPHAGE
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^CURRENT GLUCOPHAGE FLAG
;;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"
;1;
;
OCXDI026 ;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 ^OCXDI027
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;D^6
+3 ;;R^"863.3:","863.32:3",.01,"E"
+4 ;;D^OCXO FILE POINTER
+5 ;;R^"863.3:","863.32:3",1,"E"
+6 ;;D^42
+7 ;;EOR^
+8 ;;KEY^863.3:^PATIENT.MOVE_SERV_CURR
+9 ;;R^"863.3:",.01,"E"
+10 ;;D^PATIENT.MOVE_SERV_CURR
+11 ;;R^"863.3:",.02,"E"
+12 ;;D^PATIENT
+13 ;;R^"863.3:",.04,"E"
+14 ;;D^DGPM
+15 ;;R^"863.3:",.05,"E"
+16 ;;D^SERVICE CATEGORY
+17 ;;R^"863.3:",.06,"E"
+18 ;;D^99
+19 ;;R^"863.3:","863.32:1",.01,"E"
+20 ;;D^OCXO EXTERNAL FUNCTION CALL
+21 ;;R^"863.3:","863.32:1",1,"E"
+22 ;;D^WARDSERV(|PMWIENC|)
+23 ;;EOR^
+24 ;;KEY^863.3:^PATIENT.MOV_WARD_IEN_CURR
+25 ;;R^"863.3:",.01,"E"
+26 ;;D^PATIENT.MOV_WARD_IEN_CURR
+27 ;;R^"863.3:",.02,"E"
+28 ;;D^PATIENT
+29 ;;R^"863.3:",.04,"E"
+30 ;;D^DGPM
+31 ;;R^"863.3:",.05,"E"
+32 ;;D^IEN
+33 ;;R^"863.3:",.06,"E"
+34 ;;D^99
+35 ;;R^"863.3:","863.32:1",.01,"E"
+36 ;;D^OCXO VARIABLE NAME
+37 ;;R^"863.3:","863.32:1",1,"E"
+38 ;;D^DGPMA
+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^6
+43 ;;EOR^
+44 ;;KEY^863.3:^PATIENT.MOV_WARD_IEN_PREV
+45 ;;R^"863.3:",.01,"E"
+46 ;;D^PATIENT.MOV_WARD_IEN_PREV
+47 ;;R^"863.3:",.02,"E"
+48 ;;D^PATIENT
+49 ;;R^"863.3:",.04,"E"
+50 ;;D^DGPM
+51 ;;R^"863.3:",.05,"E"
+52 ;;D^IEN
+53 ;;R^"863.3:",.06,"E"
+54 ;;D^99
+55 ;;R^"863.3:","863.32:1",.01,"E"
+56 ;;D^OCXO VARIABLE NAME
+57 ;;R^"863.3:","863.32:1",1,"E"
+58 ;;D^DGPM0
+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^6
+63 ;;EOR^
+64 ;;KEY^863.3:^PATIENT.MOVE_SERV_PREV
+65 ;;R^"863.3:",.01,"E"
+66 ;;D^PATIENT.MOVE_SERV_PREV
+67 ;;R^"863.3:",.02,"E"
+68 ;;D^PATIENT
+69 ;;R^"863.3:",.04,"E"
+70 ;;D^DGPM
+71 ;;R^"863.3:",.05,"E"
+72 ;;D^SERVICE CATEGORY
+73 ;;R^"863.3:",.06,"E"
+74 ;;D^99
+75 ;;R^"863.3:","863.32:1",.01,"E"
+76 ;;D^OCXO EXTERNAL FUNCTION CALL
+77 ;;R^"863.3:","863.32:1",1,"E"
+78 ;;D^WARDSERV(|PMWIENP|)
+79 ;;EOR^
+80 ;;KEY^863.3:^PATIENT.MOVE_WARD_PREV
+81 ;;R^"863.3:",.01,"E"
+82 ;;D^PATIENT.MOVE_WARD_PREV
+83 ;;R^"863.3:",.02,"E"
+84 ;;D^PATIENT
+85 ;;R^"863.3:",.04,"E"
+86 ;;D^DGPM
+87 ;;R^"863.3:",.05,"E"
+88 ;;D^WARD NAME
+89 ;;R^"863.3:",.06,"E"
+90 ;;D^99
+91 ;;R^"863.3:","863.32:1",.01,"E"
+92 ;;D^OCXO VARIABLE NAME
+93 ;;R^"863.3:","863.32:1",1,"E"
+94 ;;D^DGPM0
+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^6
+99 ;;R^"863.3:","863.32:3",.01,"E"
+100 ;;D^OCXO FILE POINTER
+101 ;;R^"863.3:","863.32:3",1,"E"
+102 ;;D^42
+103 ;;EOR^
+104 ;;KEY^863.3:^PATIENT.ORD_ITEM_NAME
+105 ;;R^"863.3:",.01,"E"
+106 ;;D^PATIENT.ORD_ITEM_NAME
+107 ;;R^"863.3:",.02,"E"
+108 ;;D^PATIENT
+109 ;;R^"863.3:",.04,"E"
+110 ;;D^DBL
+111 ;;R^"863.3:",.05,"E"
+112 ;;D^ORDERABLE ITEM
+113 ;;R^"863.3:",.06,"E"
+114 ;;D^99
+115 ;;R^"863.3:","863.32:1",.01,"E"
+116 ;;D^OCXO EXTERNAL FUNCTION CALL
+117 ;;R^"863.3:","863.32:1",1,"E"
+118 ;;D^ORDITEM(|ORDER NUMBER|)
+119 ;;EOR^
+120 ;;KEY^863.3:^PATIENT.NEW_MOVEMENT
+121 ;;R^"863.3:",.01,"E"
+122 ;;D^PATIENT.NEW_MOVEMENT
+123 ;;R^"863.3:",.02,"E"
+124 ;;D^PATIENT
+125 ;;R^"863.3:",.05,"E"
+126 ;;D^NEW MOVEMENT
+127 ;;R^"863.3:",.06,"E"
+128 ;;D^9999
+129 ;;R^"863.3:","863.32:1",.01,"E"
+130 ;;D^OCXO EXTERNAL FUNCTION CALL
+131 ;;R^"863.3:","863.32:1",1,"E"
+132 ;;D^('(+$G(DGPMA)=+$G(DGPM0))&'$L(DGPMP))
+133 ;;EOR^
+134 ;;KEY^863.3:^PATIENT.ACTIVE MEDS
+135 ;;R^"863.3:",.01,"E"
+136 ;;D^PATIENT.ACTIVE MEDS
+137 ;;R^"863.3:",.02,"E"
+138 ;;D^PATIENT
+139 ;;R^"863.3:",.06,"E"
+140 ;;D^1
+141 ;;EOR^
+142 ;;KEY^863.3:^LOCAL GLUCOPHAGE MEDS
+143 ;;R^"863.3:",.01,"E"
+144 ;;D^LOCAL GLUCOPHAGE MEDS
+145 ;;R^"863.3:",.02,"E"
+146 ;;D^PATIENT
+147 ;;R^"863.3:",.06,"E"
+148 ;;D^99
+149 ;;R^"863.3:","863.32:1",.01,"E"
+150 ;;D^OCXO EXTERNAL FUNCTION CALL
+151 ;;R^"863.3:","863.32:1",1,"E"
+152 ;;D^("METFORMIN")
+153 ;;EOR^
+154 ;;KEY^863.3:^PATIENT.TAKING_LITHIUM
+155 ;;R^"863.3:",.01,"E"
+156 ;;D^PATIENT.TAKING_LITHIUM
+157 ;;R^"863.3:",.02,"E"
+158 ;;D^PATIENT
+159 ;;R^"863.3:",.05,"E"
+160 ;;D^CURRENT LITHIUM FLAG
+161 ;;R^"863.3:",.06,"E"
+162 ;;D^99
+163 ;;R^"863.3:","863.32:1",.01,"E"
+164 ;;D^OCXO EXTERNAL FUNCTION CALL
+165 ;;R^"863.3:","863.32:1",1,"E"
+166 ;;D^TAKEMED^ORKPS(|PATIENT IEN|,"^LITHIUM")
+167 ;;R^"863.3:","863.32:2",.01,"E"
+168 ;;D^OCXO UP-ARROW PIECE NUMBER
+169 ;;R^"863.3:","863.32:2",1,"E"
+170 ;;D^1
+171 ;;EOR^
+172 ;;KEY^863.3:^PATIENT.DATE_LAST_LITHIUM_TEST
+173 ;;R^"863.3:",.01,"E"
+174 ;;D^PATIENT.DATE_LAST_LITHIUM_TEST
+175 ;;R^"863.3:",.02,"E"
+176 ;;D^PATIENT
+177 ;;R^"863.3:",.05,"E"
+178 ;;D^LAB TEST DATE
+179 ;;R^"863.3:",.06,"E"
+180 ;;D^99
+181 ;;R^"863.3:","863.32:1",.01,"E"
+182 ;;D^OCXO EXTERNAL FUNCTION CALL
+183 ;;R^"863.3:","863.32:1",1,"E"
+184 ;;D^LOCL^ORQQLR1(|PATIENT IEN|,|LITHIUM LAB TEST NID|,"SERUM SPECIMEN")
+185 ;;R^"863.3:","863.32:2",.01,"E"
+186 ;;D^OCXO UP-ARROW PIECE NUMBER
+187 ;;R^"863.3:","863.32:2",1,"E"
+188 ;;D^6
+189 ;;EOR^
+190 ;;KEY^863.3:^LITHIUM LAB TEST NID
+191 ;;R^"863.3:",.01,"E"
+192 ;;D^LITHIUM LAB TEST NID
+193 ;;R^"863.3:",.05,"E"
+194 ;;D^NATIONAL LAB ID
+195 ;;R^"863.3:",.06,"E"
+196 ;;D^99
+197 ;;R^"863.3:","863.32:1",.01,"E"
+198 ;;D^OCXO EXTERNAL FUNCTION CALL
+199 ;;R^"863.3:","863.32:1",1,"E"
+200 ;;D^(0)
+201 ;;EOR^
+202 ;;KEY^863.3:^PATIENT.TAKING_GLUCOPHAGE
+203 ;;R^"863.3:",.01,"E"
+204 ;;D^PATIENT.TAKING_GLUCOPHAGE
+205 ;;R^"863.3:",.02,"E"
+206 ;;D^PATIENT
+207 ;;R^"863.3:",.05,"E"
+208 ;;D^CURRENT GLUCOPHAGE FLAG
+209 ;;R^"863.3:",.06,"E"
+210 ;;D^999
+211 ;;R^"863.3:","863.32:1",.01,"E"
+212 ;;D^OCXO EXTERNAL FUNCTION CALL
+213 ;;R^"863.3:","863.32:1",1,"E"
+214 ;1;
+215 ;