- OCXDI02O ;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 ^OCXDI02P
- ;
- Q
- ;
- DATA ;
- ;
- ;;D^ORDER FLAGGED FOR RESULTS
- ;;R^"860.4:",101,"E"
- ;;D^BOOLEAN
- ;;R^"860.4:","860.41:4",.01,"E"
- ;;D^DATABASE LOOKUP
- ;;R^"860.4:","860.41:4",.02,"E"
- ;;D^DATABASE LOOKUP
- ;;R^"860.4:","860.41:4",1,"E"
- ;;D^ORDER FLAGGED FOR RESULTS
- ;;EOR^
- ;;KEY^860.4:^OBSERVATION VALUE
- ;;R^"860.4:",.01,"E"
- ;;D^OBSERVATION VALUE
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:1",.01,"E"
- ;;D^GENERIC HL7 MESSAGE ARRAY
- ;;R^"860.4:","860.41:1",.02,"E"
- ;;D^HL7 OBSERVATION/RESULT SEGMENT
- ;;R^"860.4:","860.41:1",1,"E"
- ;;D^PATIENT.HL7_OBSERVATION_VALUE
- ;;EOR^
- ;;KEY^860.4:^ORDER NUMBER
- ;;R^"860.4:",.01,"E"
- ;;D^ORDER NUMBER
- ;;R^"860.4:",101,"E"
- ;;D^NUMERIC
- ;;R^"860.4:","860.41:1",.01,"E"
- ;;D^GENERIC HL7 MESSAGE ARRAY
- ;;R^"860.4:","860.41:1",.02,"E"
- ;;D^HL7 COMMON ORDER SEGMENT
- ;;R^"860.4:","860.41:1",1,"E"
- ;;D^PATIENT.HL7 ORDER NUMBER
- ;;R^"860.4:","860.41:2",.01,"E"
- ;;D^CPRS ORDER PROTOCOL
- ;;R^"860.4:","860.41:2",.02,"E"
- ;;D^OERR ORDER EVENT FLAG PROTOCOL
- ;;R^"860.4:","860.41:2",1,"E"
- ;;D^PATIENT.OERR ORDER NUMBER
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_ORDER NUMBER
- ;;EOR^
- ;;KEY^860.4:^ORDERABLE ITEM
- ;;R^"860.4:",.01,"E"
- ;;D^ORDERABLE ITEM
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:1",.01,"E"
- ;;D^GENERIC HL7 MESSAGE ARRAY
- ;;R^"860.4:","860.41:1",.02,"E"
- ;;D^HL7 OBSERVATION/RESULT SEGMENT
- ;;R^"860.4:","860.41:1",1,"E"
- ;;D^PATIENT.ORDERABLE ITEM
- ;;EOR^
- ;;KEY^860.4:^PATIENT IEN
- ;;R^"860.4:",.01,"E"
- ;;D^PATIENT IEN
- ;;R^"860.4:",101,"E"
- ;;D^NUMERIC
- ;;R^"860.4:","860.41:1",.01,"E"
- ;;D^GENERIC HL7 MESSAGE ARRAY
- ;;R^"860.4:","860.41:1",.02,"E"
- ;;D^HL7 PATIENT ID SEGMENT
- ;;R^"860.4:","860.41:1",1,"E"
- ;;D^PATIENT.HL7_PATIENT_ID
- ;;R^"860.4:","860.41:4",.01,"E"
- ;;D^DATABASE LOOKUP
- ;;R^"860.4:","860.41:4",.02,"E"
- ;;D^DATABASE LOOKUP
- ;;R^"860.4:","860.41:4",1,"E"
- ;;D^PATIENT.IEN
- ;;EOR^
- ;;KEY^860.4:^PATIENT DATE OF BIRTH
- ;;R^"860.4:",.01,"E"
- ;;D^PATIENT DATE OF BIRTH
- ;;R^"860.4:",101,"E"
- ;;D^DATE/TIME
- ;;R^"860.4:","860.41:4",.01,"E"
- ;;D^DATABASE LOOKUP
- ;;R^"860.4:","860.41:4",.02,"E"
- ;;D^DATABASE LOOKUP
- ;;R^"860.4:","860.41:4",1,"E"
- ;;D^PATIENT.DATE OF BIRTH
- ;;EOR^
- ;;KEY^860.4:^ORDER MODE
- ;;R^"860.4:",.01,"E"
- ;;D^ORDER MODE
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_ORD_MODE
- ;;EOR^
- ;;KEY^860.4:^OI NATIONAL ID
- ;;R^"860.4:",.01,"E"
- ;;D^OI NATIONAL ID
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_NAT_ID
- ;;EOR^
- ;;KEY^860.4:^OI NATIONAL ID TEXT
- ;;R^"860.4:",.01,"E"
- ;;D^OI NATIONAL ID TEXT
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_NAT_TEXT
- ;;EOR^
- ;;KEY^860.4:^OI NATIONAL CODING SYSTEM
- ;;R^"860.4:",.01,"E"
- ;;D^OI NATIONAL CODING SYSTEM
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_NAT_COD_SYS
- ;;EOR^
- ;;KEY^860.4:^OI LOCAL ID
- ;;R^"860.4:",.01,"E"
- ;;D^OI LOCAL ID
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_LOCAL ID
- ;;EOR^
- ;;KEY^860.4:^OI LOCAL TEXT
- ;;R^"860.4:",.01,"E"
- ;;D^OI LOCAL TEXT
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_LOCAL_TEXT
- ;;EOR^
- ;;KEY^860.4:^OI LOCAL CODING SYSTEM
- ;;R^"860.4:",.01,"E"
- ;;D^OI LOCAL CODING SYSTEM
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_LOC_COD_SYS
- ;;EOR^
- ;;KEY^860.4:^ORDER EFFECTIVE DATE
- ;;R^"860.4:",.01,"E"
- ;;D^ORDER EFFECTIVE DATE
- ;;R^"860.4:","860.41:5",.01,"E"
- ;;D^CPRS ORDER PRESCAN
- ;;R^"860.4:","860.41:5",.02,"E"
- ;;D^ORDER ENTRY ORDER PRESCAN
- ;;R^"860.4:","860.41:5",1,"E"
- ;;D^PATIENT.OPS_ORD_EFF_DATE
- ;;EOR^
- ;;KEY^860.4:^DIET ORDERABLE ITEM
- ;;R^"860.4:",.01,"E"
- ;;D^DIET ORDERABLE ITEM
- ;;R^"860.4:",101,"E"
- ;;D^FREE TEXT
- ;;R^"860.4:","860.41:1",.01,"E"
- ;;D^GENERIC HL7 MESSAGE ARRAY
- ;1;
- ;
- OCXDI02O ;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 ^OCXDI02P
- +10 ;
- +11 QUIT
- +12 ;
- DATA ;
- +1 ;
- +2 ;;D^ORDER FLAGGED FOR RESULTS
- +3 ;;R^"860.4:",101,"E"
- +4 ;;D^BOOLEAN
- +5 ;;R^"860.4:","860.41:4",.01,"E"
- +6 ;;D^DATABASE LOOKUP
- +7 ;;R^"860.4:","860.41:4",.02,"E"
- +8 ;;D^DATABASE LOOKUP
- +9 ;;R^"860.4:","860.41:4",1,"E"
- +10 ;;D^ORDER FLAGGED FOR RESULTS
- +11 ;;EOR^
- +12 ;;KEY^860.4:^OBSERVATION VALUE
- +13 ;;R^"860.4:",.01,"E"
- +14 ;;D^OBSERVATION VALUE
- +15 ;;R^"860.4:",101,"E"
- +16 ;;D^FREE TEXT
- +17 ;;R^"860.4:","860.41:1",.01,"E"
- +18 ;;D^GENERIC HL7 MESSAGE ARRAY
- +19 ;;R^"860.4:","860.41:1",.02,"E"
- +20 ;;D^HL7 OBSERVATION/RESULT SEGMENT
- +21 ;;R^"860.4:","860.41:1",1,"E"
- +22 ;;D^PATIENT.HL7_OBSERVATION_VALUE
- +23 ;;EOR^
- +24 ;;KEY^860.4:^ORDER NUMBER
- +25 ;;R^"860.4:",.01,"E"
- +26 ;;D^ORDER NUMBER
- +27 ;;R^"860.4:",101,"E"
- +28 ;;D^NUMERIC
- +29 ;;R^"860.4:","860.41:1",.01,"E"
- +30 ;;D^GENERIC HL7 MESSAGE ARRAY
- +31 ;;R^"860.4:","860.41:1",.02,"E"
- +32 ;;D^HL7 COMMON ORDER SEGMENT
- +33 ;;R^"860.4:","860.41:1",1,"E"
- +34 ;;D^PATIENT.HL7 ORDER NUMBER
- +35 ;;R^"860.4:","860.41:2",.01,"E"
- +36 ;;D^CPRS ORDER PROTOCOL
- +37 ;;R^"860.4:","860.41:2",.02,"E"
- +38 ;;D^OERR ORDER EVENT FLAG PROTOCOL
- +39 ;;R^"860.4:","860.41:2",1,"E"
- +40 ;;D^PATIENT.OERR ORDER NUMBER
- +41 ;;R^"860.4:","860.41:5",.01,"E"
- +42 ;;D^CPRS ORDER PRESCAN
- +43 ;;R^"860.4:","860.41:5",.02,"E"
- +44 ;;D^ORDER ENTRY ORDER PRESCAN
- +45 ;;R^"860.4:","860.41:5",1,"E"
- +46 ;;D^PATIENT.OPS_ORDER NUMBER
- +47 ;;EOR^
- +48 ;;KEY^860.4:^ORDERABLE ITEM
- +49 ;;R^"860.4:",.01,"E"
- +50 ;;D^ORDERABLE ITEM
- +51 ;;R^"860.4:",101,"E"
- +52 ;;D^FREE TEXT
- +53 ;;R^"860.4:","860.41:1",.01,"E"
- +54 ;;D^GENERIC HL7 MESSAGE ARRAY
- +55 ;;R^"860.4:","860.41:1",.02,"E"
- +56 ;;D^HL7 OBSERVATION/RESULT SEGMENT
- +57 ;;R^"860.4:","860.41:1",1,"E"
- +58 ;;D^PATIENT.ORDERABLE ITEM
- +59 ;;EOR^
- +60 ;;KEY^860.4:^PATIENT IEN
- +61 ;;R^"860.4:",.01,"E"
- +62 ;;D^PATIENT IEN
- +63 ;;R^"860.4:",101,"E"
- +64 ;;D^NUMERIC
- +65 ;;R^"860.4:","860.41:1",.01,"E"
- +66 ;;D^GENERIC HL7 MESSAGE ARRAY
- +67 ;;R^"860.4:","860.41:1",.02,"E"
- +68 ;;D^HL7 PATIENT ID SEGMENT
- +69 ;;R^"860.4:","860.41:1",1,"E"
- +70 ;;D^PATIENT.HL7_PATIENT_ID
- +71 ;;R^"860.4:","860.41:4",.01,"E"
- +72 ;;D^DATABASE LOOKUP
- +73 ;;R^"860.4:","860.41:4",.02,"E"
- +74 ;;D^DATABASE LOOKUP
- +75 ;;R^"860.4:","860.41:4",1,"E"
- +76 ;;D^PATIENT.IEN
- +77 ;;EOR^
- +78 ;;KEY^860.4:^PATIENT DATE OF BIRTH
- +79 ;;R^"860.4:",.01,"E"
- +80 ;;D^PATIENT DATE OF BIRTH
- +81 ;;R^"860.4:",101,"E"
- +82 ;;D^DATE/TIME
- +83 ;;R^"860.4:","860.41:4",.01,"E"
- +84 ;;D^DATABASE LOOKUP
- +85 ;;R^"860.4:","860.41:4",.02,"E"
- +86 ;;D^DATABASE LOOKUP
- +87 ;;R^"860.4:","860.41:4",1,"E"
- +88 ;;D^PATIENT.DATE OF BIRTH
- +89 ;;EOR^
- +90 ;;KEY^860.4:^ORDER MODE
- +91 ;;R^"860.4:",.01,"E"
- +92 ;;D^ORDER MODE
- +93 ;;R^"860.4:",101,"E"
- +94 ;;D^FREE TEXT
- +95 ;;R^"860.4:","860.41:5",.01,"E"
- +96 ;;D^CPRS ORDER PRESCAN
- +97 ;;R^"860.4:","860.41:5",.02,"E"
- +98 ;;D^ORDER ENTRY ORDER PRESCAN
- +99 ;;R^"860.4:","860.41:5",1,"E"
- +100 ;;D^PATIENT.OPS_ORD_MODE
- +101 ;;EOR^
- +102 ;;KEY^860.4:^OI NATIONAL ID
- +103 ;;R^"860.4:",.01,"E"
- +104 ;;D^OI NATIONAL ID
- +105 ;;R^"860.4:",101,"E"
- +106 ;;D^FREE TEXT
- +107 ;;R^"860.4:","860.41:5",.01,"E"
- +108 ;;D^CPRS ORDER PRESCAN
- +109 ;;R^"860.4:","860.41:5",.02,"E"
- +110 ;;D^ORDER ENTRY ORDER PRESCAN
- +111 ;;R^"860.4:","860.41:5",1,"E"
- +112 ;;D^PATIENT.OPS_NAT_ID
- +113 ;;EOR^
- +114 ;;KEY^860.4:^OI NATIONAL ID TEXT
- +115 ;;R^"860.4:",.01,"E"
- +116 ;;D^OI NATIONAL ID TEXT
- +117 ;;R^"860.4:",101,"E"
- +118 ;;D^FREE TEXT
- +119 ;;R^"860.4:","860.41:5",.01,"E"
- +120 ;;D^CPRS ORDER PRESCAN
- +121 ;;R^"860.4:","860.41:5",.02,"E"
- +122 ;;D^ORDER ENTRY ORDER PRESCAN
- +123 ;;R^"860.4:","860.41:5",1,"E"
- +124 ;;D^PATIENT.OPS_NAT_TEXT
- +125 ;;EOR^
- +126 ;;KEY^860.4:^OI NATIONAL CODING SYSTEM
- +127 ;;R^"860.4:",.01,"E"
- +128 ;;D^OI NATIONAL CODING SYSTEM
- +129 ;;R^"860.4:","860.41:5",.01,"E"
- +130 ;;D^CPRS ORDER PRESCAN
- +131 ;;R^"860.4:","860.41:5",.02,"E"
- +132 ;;D^ORDER ENTRY ORDER PRESCAN
- +133 ;;R^"860.4:","860.41:5",1,"E"
- +134 ;;D^PATIENT.OPS_NAT_COD_SYS
- +135 ;;EOR^
- +136 ;;KEY^860.4:^OI LOCAL ID
- +137 ;;R^"860.4:",.01,"E"
- +138 ;;D^OI LOCAL ID
- +139 ;;R^"860.4:",101,"E"
- +140 ;;D^FREE TEXT
- +141 ;;R^"860.4:","860.41:5",.01,"E"
- +142 ;;D^CPRS ORDER PRESCAN
- +143 ;;R^"860.4:","860.41:5",.02,"E"
- +144 ;;D^ORDER ENTRY ORDER PRESCAN
- +145 ;;R^"860.4:","860.41:5",1,"E"
- +146 ;;D^PATIENT.OPS_LOCAL ID
- +147 ;;EOR^
- +148 ;;KEY^860.4:^OI LOCAL TEXT
- +149 ;;R^"860.4:",.01,"E"
- +150 ;;D^OI LOCAL TEXT
- +151 ;;R^"860.4:",101,"E"
- +152 ;;D^FREE TEXT
- +153 ;;R^"860.4:","860.41:5",.01,"E"
- +154 ;;D^CPRS ORDER PRESCAN
- +155 ;;R^"860.4:","860.41:5",.02,"E"
- +156 ;;D^ORDER ENTRY ORDER PRESCAN
- +157 ;;R^"860.4:","860.41:5",1,"E"
- +158 ;;D^PATIENT.OPS_LOCAL_TEXT
- +159 ;;EOR^
- +160 ;;KEY^860.4:^OI LOCAL CODING SYSTEM
- +161 ;;R^"860.4:",.01,"E"
- +162 ;;D^OI LOCAL CODING SYSTEM
- +163 ;;R^"860.4:","860.41:5",.01,"E"
- +164 ;;D^CPRS ORDER PRESCAN
- +165 ;;R^"860.4:","860.41:5",.02,"E"
- +166 ;;D^ORDER ENTRY ORDER PRESCAN
- +167 ;;R^"860.4:","860.41:5",1,"E"
- +168 ;;D^PATIENT.OPS_LOC_COD_SYS
- +169 ;;EOR^
- +170 ;;KEY^860.4:^ORDER EFFECTIVE DATE
- +171 ;;R^"860.4:",.01,"E"
- +172 ;;D^ORDER EFFECTIVE DATE
- +173 ;;R^"860.4:","860.41:5",.01,"E"
- +174 ;;D^CPRS ORDER PRESCAN
- +175 ;;R^"860.4:","860.41:5",.02,"E"
- +176 ;;D^ORDER ENTRY ORDER PRESCAN
- +177 ;;R^"860.4:","860.41:5",1,"E"
- +178 ;;D^PATIENT.OPS_ORD_EFF_DATE
- +179 ;;EOR^
- +180 ;;KEY^860.4:^DIET ORDERABLE ITEM
- +181 ;;R^"860.4:",.01,"E"
- +182 ;;D^DIET ORDERABLE ITEM
- +183 ;;R^"860.4:",101,"E"
- +184 ;;D^FREE TEXT
- +185 ;;R^"860.4:","860.41:1",.01,"E"
- +186 ;;D^GENERIC HL7 MESSAGE ARRAY
- +187 ;1;
- +188 ;