226 lines
5.1 KiB
Mathematica
226 lines
5.1 KiB
Mathematica
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;
|
|
;
|