VistA-FOIAVistA/r/ORDER_ENTRY_RESULTS_REPORTI.../OCXDI02L.m

215 lines
5.1 KiB
Mathematica

OCXDI02L ;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 ^OCXDI02M
;
Q
;
DATA ;
;
;;R^"860.8:",100,24
;;D^ ; ..I CDT'<BDT S CREARSLT=1
;;R^"860.8:",100,25
;;D^ ; Q:+$G(CREARSLT)<1 "0^"
;;R^"860.8:",100,26
;;D^ ; Q $P(ORZ,U)_U_$P(ORZ,U,3)_" "_$P(ORZ,U,4)_" "_$P(ORZ,U,5)_" ("_$P(ORZ,U,6)_") "_$$FMTE^XLFDT(CDT,"2P")_U_$P(ORZ,U,3)
;;EOR^
;;KEY^860.8:^RECENT BARIUM ORDER STATUS
;;R^"860.8:",.01,"E"
;;D^RECENT BARIUM ORDER STATUS
;;R^"860.8:",.02,"E"
;;D^RECBARST
;;R^"860.8:",100,1
;;D^;RECBARST(DFN,HOURS) ;
;;R^"860.8:",100,2
;;D^; ;
;;R^"860.8:",100,3
;;D^; Q:'$G(DFN) 0 Q:'$G(HOURS) 0
;;R^"860.8:",100,4
;;D^; N ORDER S ORDER=$P($$RECENTBA^ORKRA(DFN,HOURS),U) Q:'$L(ORDER) 0
;;R^"860.8:",100,5
;;D^; N STATUS S STATUS=$P($$STATUS^ORQOR2(ORDER),U,2) Q:'$L(STATUS) 0
;;R^"860.8:",100,6
;;D^; Q 1_U_STATUS
;;EOR^
;;KEY^860.8:^RECENT CHOLECYSTOGRAM ORDER STATUS
;;R^"860.8:",.01,"E"
;;D^RECENT CHOLECYSTOGRAM ORDER STATUS
;;R^"860.8:",.02,"E"
;;D^RECCHST
;;R^"860.8:",100,1
;;D^;RECCHST(DFN,DAYS) ;
;;R^"860.8:",100,2
;;D^; ;
;;R^"860.8:",100,3
;;D^; Q:'$G(DFN) 0 Q:'$G(DAYS) 0
;;R^"860.8:",100,4
;;D^; N ORDER S ORDER=$P($$RECENTCH^ORKRA(DFN,DAYS),U) Q:'$L(ORDER) 0
;;R^"860.8:",100,5
;;D^; N STATUS S STATUS=$P($$STATUS^ORQOR2(ORDER),U,2) Q:'$L(STATUS) 0
;;R^"860.8:",100,6
;;D^; Q 1_U_STATUS
;;EOR^
;;EOF^OCXS(860.8)^1
;;SOF^860.6 ORDER CHECK DATA CONTEXT
;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
;;R^"860.6:",.01,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;R^"860.6:",.02,"E"
;;D^HL7
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^CPRS ORDER PROTOCOL
;;R^"860.6:",.01,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.6:",.02,"E"
;;D^OERR
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^DGPM PATIENT MOVEMENT PROTOCOL
;;R^"860.6:",.01,"E"
;;D^DGPM PATIENT MOVEMENT PROTOCOL
;;R^"860.6:",.02,"E"
;;D^DGPM
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^DATABASE LOOKUP
;;R^"860.6:",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.6:",.02,"E"
;;D^DL
;;R^"860.6:",1,"E"
;;D^PACKAGE LOOKUP
;;EOR^
;;KEY^860.6:^CPRS ORDER PRESCAN
;;R^"860.6:",.01,"E"
;;D^CPRS ORDER PRESCAN
;;R^"860.6:",.02,"E"
;;D^OEPS
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^TIMED ORDER CHECK
;;R^"860.6:",.01,"E"
;;D^TIMED ORDER CHECK
;;R^"860.6:",.02,"E"
;;D^TIME
;;R^"860.6:",1,"E"
;;D^TIMED EVENT
;;EOR^
;;KEY^860.6:^GENERIC QUERY
;;R^"860.6:",.01,"E"
;;D^GENERIC QUERY
;;R^"860.6:",.02,"E"
;;D^QUERY
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;EOF^OCXS(860.6)^1
;;SOF^860.5 ORDER CHECK DATA SOURCE
;;KEY^860.5:^HL7 COMMON ORDER SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 COMMON ORDER SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^HL7 OBSERVATION/RESULT SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 OBSERVATION/RESULT SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^HL7 NOTES AND COMMENTS SECTION
;;R^"860.5:",.01,"E"
;;D^HL7 NOTES AND COMMENTS SECTION
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^DGPM MOVEMENT EVENTS PROTOCOL
;;R^"860.5:",.01,"E"
;;D^DGPM MOVEMENT EVENTS PROTOCOL
;;R^"860.5:",.02,"E"
;;D^DGPM PATIENT MOVEMENT PROTOCOL
;;EOR^
;;KEY^860.5:^HL7 OBSERVATION REQUEST SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 OBSERVATION REQUEST SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^OERR ORDER EVENT FLAG PROTOCOL
;;R^"860.5:",.01,"E"
;;D^OERR ORDER EVENT FLAG PROTOCOL
;;R^"860.5:",.02,"E"
;;D^CPRS ORDER PROTOCOL
;;EOR^
;;KEY^860.5:^DATABASE LOOKUP
;;R^"860.5:",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.5:",.02,"E"
;;D^DATABASE LOOKUP
;;EOR^
;;KEY^860.5:^ORDER ENTRY ORDER PRESCAN
;;R^"860.5:",.01,"E"
;;D^ORDER ENTRY ORDER PRESCAN
;;R^"860.5:",.02,"E"
;;D^CPRS ORDER PRESCAN
;;EOR^
;;KEY^860.5:^HL7 DIETARY SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 DIETARY SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^HL7 PHARMACY PRESCRIPTION ORDER SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 PHARMACY PRESCRIPTION ORDER SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^HL7 MESSAGE HEADER
;;R^"860.5:",.01,"E"
;;D^HL7 MESSAGE HEADER
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^HL7 PATIENT ID SEGMENT
;;R^"860.5:",.01,"E"
;;D^HL7 PATIENT ID SEGMENT
;;R^"860.5:",.02,"E"
;;D^GENERIC HL7 MESSAGE ARRAY
;;EOR^
;;KEY^860.5:^TIMED EVENT ORDER CHECK
;;R^"860.5:",.01,"E"
;;D^TIMED EVENT ORDER CHECK
;;R^"860.5:",.02,"E"
;;D^TIMED ORDER CHECK
;;EOR^
;;KEY^860.5:^GENERIC QUERY RESULTS
;;R^"860.5:",.01,"E"
;;D^GENERIC QUERY RESULTS
;;R^"860.5:",.02,"E"
;;D^GENERIC QUERY
;;EOR^
;;EOF^OCXS(860.5)^1
;;SOF^860.4 ORDER CHECK DATA FIELD
;;KEY^860.4:^CONTROL CODE
;;R^"860.4:",.01,"E"
;;D^CONTROL CODE
;;R^"860.4:",101,"E"
;1;
;