ORY53903 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*539) ;JAN 13,2021 at 11:13
;;3.0;ORDER ENTRY/RESULTS REPORTING;**539**;Dec 17,1997;Build 41
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
S ;
;
D DOT^ORY539ES
;
;
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("OCXRULE",$J,$O(^TMP("OCXRULE",$J,"A"),-1)+1)=TEXT
;
G ^ORY53904
;
Q
;
DATA ;
;
;;R^"863.3:","863.32:1",1,"E"
;;D^DFN
;;EOR^
;;KEY^863.3:^PATIENT.OERR_ORDER_FLAGGED
;;R^"863.3:",.01,"E"
;;D^PATIENT.OERR_ORDER_FLAGGED
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.04,"E"
;;D^OERR
;;R^"863.3:",.05,"E"
;;D^ORDER FLAGGED
;;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^OCXORD
;;R^"863.3:","863.32:2",.01,"E"
;;D^OCXO VT-BAR PIECE NUMBER
;;R^"863.3:","863.32:3",.01,"E"
;;D^OCXO UP-ARROW PIECE NUMBER
;;R^"863.3:","863.32:3",1,"E"
;;D^4
;;R^"863.3:","863.32:4",.01,"E"
;;D^OCXO HL7 SEGMENT ID
;;R^"863.3:","863.32:5",.01,"E"
;;D^OCXO FILE POINTER
;;R^"863.3:","863.32:6",.01,"E"
;;D^OCXO DATA DRIVE SOURCE
;;R^"863.3:","863.32:6",1,"E"
;;D^ORD
;;EOR^
;;KEY^863.3:^PATIENT.OERR_ORDER_PATIENT
;;R^"863.3:",.01,"E"
;;D^PATIENT.OERR_ORDER_PATIENT
;;R^"863.3:",.02,"E"
;;D^PATIENT
;;R^"863.3:",.05,"E"
;;D^ORDER PATIENT
;;R^"863.3:",.06,"E"
;;D^5567
;;R^"863.3:","863.32:1",.01,"E"
;;D^OCXO VARIABLE NAME
;;R^"863.3:","863.32:1",1,"E"
;;D^OCXORD
;;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^
;;EOF^OCXS(863.3)^1
;;SOF^860.9 ORDER CHECK NATIONAL TERM
;;KEY^860.9:^ANGIOGRAM (PERIPHERAL)
;;R^"860.9:",.01,"E"
;;D^ANGIOGRAM (PERIPHERAL)
;;R^"860.9:",.02,"E"
;;D^101.43
;;EOR^
;;KEY^860.9:^BLOOD SPECIMEN
;;R^"860.9:",.01,"E"
;;D^BLOOD SPECIMEN
;;R^"860.9:",.02,"E"
;;D^61
;;EOR^
;;KEY^860.9:^DANGEROUS MEDS FOR PTS > 64
;;R^"860.9:",.01,"E"
;;D^DANGEROUS MEDS FOR PTS > 64
;;R^"860.9:",.02,"E"
;;D^101.43
;;R^"860.9:",2,"E"
;;D^I $P($G(^ORD(100.98,$P($G(^ORD(101.43,+Y,0)),U,5),0)),U)="PHARMACY"
;;EOR^
;;KEY^860.9:^DNR
;;R^"860.9:",.01,"E"
;;D^DNR
;;R^"860.9:",.02,"E"
;;D^101.43
;;EOR^
;;KEY^860.9:^EGFR
;;R^"860.9:",.01,"E"
;;D^EGFR
;;R^"860.9:",.02,"E"
;;D^60
;;EOR^
;;KEY^860.9:^FOOD-DRUG INTERACTION MED
;;R^"860.9:",.01,"E"
;;D^FOOD-DRUG INTERACTION MED
;;R^"860.9:",.02,"E"
;;D^101.43
;;R^"860.9:",2,"E"
;;D^I $P($G(^ORD(100.98,$P($G(^ORD(101.43,+Y,0)),U,5),0)),U)="PHARMACY"
;;EOR^
;;KEY^860.9:^NPO
;;R^"860.9:",.01,"E"
;;D^NPO
;;R^"860.9:",.02,"E"
;;D^101.43
;;EOR^
;;KEY^860.9:^ONE TIME MED
;;R^"860.9:",.01,"E"
;;D^ONE TIME MED
;;R^"860.9:",.02,"E"
;;D^51.1
;;R^"860.9:",2,"E"
;;D^I $E($P(^(0),U,4),1,2)="PS"
;;EOR^
;;KEY^860.9:^PARTIAL THROMBOPLASTIN TIME
;;R^"860.9:",.01,"E"
;;D^PARTIAL THROMBOPLASTIN TIME
;;R^"860.9:",.02,"E"
;;D^101.43
;;EOR^
;;KEY^860.9:^PROTHROMBIN TIME
;;R^"860.9:",.01,"E"
;;D^PROTHROMBIN TIME
;;R^"860.9:",.02,"E"
;;D^101.43
;;EOR^
;;KEY^860.9:^SERUM CREATININE
;;R^"860.9:",.01,"E"
;;D^SERUM CREATININE
;;R^"860.9:",.02,"E"
;;D^60
;;EOR^
;;KEY^860.9:^SERUM SPECIMEN
;;R^"860.9:",.01,"E"
;;D^SERUM SPECIMEN
;;R^"860.9:",.02,"E"
;;D^61
;;EOR^
;;KEY^860.9:^SERUM UREA NITROGEN
;;R^"860.9:",.01,"E"
;;D^SERUM UREA NITROGEN
;;R^"860.9:",.02,"E"
;;D^60
;;EOR^
;;KEY^860.9:^THROMBOPLASTIN TIME PARTIAL
;;R^"860.9:",.01,"E"
;;D^THROMBOPLASTIN TIME PARTIAL
;;R^"860.9:",.02,"E"
;;D^60
;;EOR^
;;KEY^860.9:^WBC
;;R^"860.9:",.01,"E"
;;D^WBC
;;R^"860.9:",.02,"E"
;;D^60
;;EOR^
;;EOF^OCXS(860.9)^1
;;SOF^860.8 ORDER CHECK COMPILER FUNCTIONS
;;KEY^860.8:^CONVERT DATE FROM FILEMAN FORMAT TO OCX FORMAT
;;R^"860.8:",.01,"E"
;;D^CONVERT DATE FROM FILEMAN FORMAT TO OCX FORMAT
;;R^"860.8:",.02,"E"
;;D^DT2INT
;;R^"860.8:",1,1
;;D^ ;DT2INT(OCXDT) ; This Local Extrinsic Function converts a date into an integer
;;R^"860.8:",1,2
;;D^ ; ; By taking the Years, Months, Days, Hours and Minutes converting
;;R^"860.8:",1,3
;;D^ ; ; Them into Seconds and then adding them all together into one big integer
;;R^"860.8:",100,1
;;D^ ;DT2INT(OCXDT) ; This Local Extrinsic Function converts a date into an integer
;;R^"860.8:",100,2
;;D^ ; ; By taking the Years, Months, Days, Hours and Minutes converting
;;R^"860.8:",100,3
;;D^ ; ; Them into Seconds and then adding them all together into one big integer
;;R^"860.8:",100,4
;;D^ ; ;
;;R^"860.8:",100,5
;;D^ ; Q:'$L($G(OCXDT)) ""
;;R^"860.8:",100,6
;;D^ ; N OCXDIFF,OCXVAL S (OCXDIFF,OCXVAL)=0
;;R^"860.8:",100,7
;;D^ ; ;
;;R^"860.8:",100,8
;;D^ ; I $L(OCXDT),'OCXDT,(OCXDT[" at ") D ; EXTERNAL EXPERT SYSTEM FORMAT 1 TO EXTERNAL FORMAT
;;R^"860.8:",100,9
;;D^ ; .N OCXHR,OCXMIN,OCXTIME
;;R^"860.8:",100,10
;;D^ ; .S OCXTIME=$P($P(OCXDT," at ",2),".",1),OCXHR=$P(OCXTIME,":",1),OCXMIN=$P(OCXTIME,":",2)
;;R^"860.8:",100,11
;;D^ ; .S:(OCXDT["Midnight") OCXHR=00
;;R^"860.8:",100,12
;;D^ ; .S:(OCXDT["PM") OCXHR=OCXHR+12
;;R^"860.8:",100,13
;;D^ ; .S OCXDT=$P(OCXDT," at ")_"@"_$E(OCXHR+100,2,3)_$E(OCXMIN+100,2,3)
;;R^"860.8:",100,14
;;D^ ; ;
;;R^"860.8:",100,15
;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 2 TO EXTERNAL FORMAT
;;R^"860.8:",100,16
;;D^ ; .N OCXMON
;;R^"860.8:",100,17
;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
;;R^"860.8:",100,18
;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_"@"_$TR($P(OCXDT," ",2),":","")
;;R^"860.8:",100,19
;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)
;;R^"860.8:",100,20
;;D^ ; ;
;;R^"860.8:",100,21
;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 3 TO EXTERNAL FORMAT
;;R^"860.8:",100,22
;;D^ ; .N OCXMON
;;R^"860.8:",100,23
;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
;;R^"860.8:",100,24
;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_","_$P($P(OCXDT," ",1),"/",3)_"@"_$TR($P(OCXDT," ",2),":","")
;;R^"860.8:",100,25
;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_", "_$P($P(OCXDT," ",1),"/",3)
;;R^"860.8:",100,26
;;D^ ; ;
;;R^"860.8:",100,27
;;D^ ; I $L(OCXDT),'OCXDT D ; EXTERNAL FORMAT TO INTERNAL FILEMAN FORMAT
;;R^"860.8:",100,28
;;D^ ; .I (OCXDT["@0000") S OCXDT=$P(OCXDT,"@",1),OCXDIFF=1
;;R^"860.8:",100,29
;;D^ ; .N %DT,X,Y S X=OCXDT,%DT="" S:(OCXDT["@")!(OCXDT="N") %DT="T" D ^%DT S OCXDT=+Y
;;R^"860.8:",100,30
;;D^ ; ;
;;R^"860.8:",100,31
;;D^ ; I ($L(OCXDT\1)>7) S OCXDT=$$HL7TFM^XLFDT(OCXDT) ; HL7 FORMAT TO INTERNAL FILEMAN FORMAT
;;R^"860.8:",100,32
;;D^ ; ;
;;R^"860.8:",100,33
;;D^ ; I ($L(OCXDT\1)=7) S OCXDT=$$FMTH^XLFDT(+OCXDT) ; INTERNAL FILEMAN FORMAT TO $H FORMAT
;;R^"860.8:",100,34
;;D^ ; ;
;;R^"860.8:",100,35
;;D^ ; I (OCXDT?5N1","1.5N) S OCXVAL=(OCXDT*86400)+$P(OCXDT,",",2) ; $H FORMAT TO EXPERT SYSTEM INTERNAL FORMAT
;;R^"860.8:",100,36
;;D^ ; ;
;;R^"860.8:",100,37
;;D^ ; Q OCXVAL
;;R^"860.8:",100,38
;;D^ ; ;
;;EOR^
;;KEY^860.8:^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
;;R^"860.8:",.01,"E"
;;D^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
;1;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY53903 7721 printed Dec 13, 2024@02:42:48 Page 2
ORY53903 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*539) ;JAN 13,2021 at 11:13
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**539**;Dec 17,1997;Build 41
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
S ;
+1 ;
+2 DO DOT^ORY539ES
+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("OCXRULE",$JOB,$ORDER(^TMP("OCXRULE",$JOB,"A"),-1)+1)=TEXT
End DoDot:1
if QUIT
QUIT
+8 ;
+9 GOTO ^ORY53904
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;R^"863.3:","863.32:1",1,"E"
+3 ;;D^DFN
+4 ;;EOR^
+5 ;;KEY^863.3:^PATIENT.OERR_ORDER_FLAGGED
+6 ;;R^"863.3:",.01,"E"
+7 ;;D^PATIENT.OERR_ORDER_FLAGGED
+8 ;;R^"863.3:",.02,"E"
+9 ;;D^PATIENT
+10 ;;R^"863.3:",.04,"E"
+11 ;;D^OERR
+12 ;;R^"863.3:",.05,"E"
+13 ;;D^ORDER FLAGGED
+14 ;;R^"863.3:",.06,"E"
+15 ;;D^99
+16 ;;R^"863.3:","863.32:1",.01,"E"
+17 ;;D^OCXO VARIABLE NAME
+18 ;;R^"863.3:","863.32:1",1,"E"
+19 ;;D^OCXORD
+20 ;;R^"863.3:","863.32:2",.01,"E"
+21 ;;D^OCXO VT-BAR PIECE NUMBER
+22 ;;R^"863.3:","863.32:3",.01,"E"
+23 ;;D^OCXO UP-ARROW PIECE NUMBER
+24 ;;R^"863.3:","863.32:3",1,"E"
+25 ;;D^4
+26 ;;R^"863.3:","863.32:4",.01,"E"
+27 ;;D^OCXO HL7 SEGMENT ID
+28 ;;R^"863.3:","863.32:5",.01,"E"
+29 ;;D^OCXO FILE POINTER
+30 ;;R^"863.3:","863.32:6",.01,"E"
+31 ;;D^OCXO DATA DRIVE SOURCE
+32 ;;R^"863.3:","863.32:6",1,"E"
+33 ;;D^ORD
+34 ;;EOR^
+35 ;;KEY^863.3:^PATIENT.OERR_ORDER_PATIENT
+36 ;;R^"863.3:",.01,"E"
+37 ;;D^PATIENT.OERR_ORDER_PATIENT
+38 ;;R^"863.3:",.02,"E"
+39 ;;D^PATIENT
+40 ;;R^"863.3:",.05,"E"
+41 ;;D^ORDER PATIENT
+42 ;;R^"863.3:",.06,"E"
+43 ;;D^5567
+44 ;;R^"863.3:","863.32:1",.01,"E"
+45 ;;D^OCXO VARIABLE NAME
+46 ;;R^"863.3:","863.32:1",1,"E"
+47 ;;D^OCXORD
+48 ;;R^"863.3:","863.32:2",.01,"E"
+49 ;;D^OCXO UP-ARROW PIECE NUMBER
+50 ;;R^"863.3:","863.32:2",1,"E"
+51 ;;D^1
+52 ;;EOR^
+53 ;;EOF^OCXS(863.3)^1
+54 ;;SOF^860.9 ORDER CHECK NATIONAL TERM
+55 ;;KEY^860.9:^ANGIOGRAM (PERIPHERAL)
+56 ;;R^"860.9:",.01,"E"
+57 ;;D^ANGIOGRAM (PERIPHERAL)
+58 ;;R^"860.9:",.02,"E"
+59 ;;D^101.43
+60 ;;EOR^
+61 ;;KEY^860.9:^BLOOD SPECIMEN
+62 ;;R^"860.9:",.01,"E"
+63 ;;D^BLOOD SPECIMEN
+64 ;;R^"860.9:",.02,"E"
+65 ;;D^61
+66 ;;EOR^
+67 ;;KEY^860.9:^DANGEROUS MEDS FOR PTS > 64
+68 ;;R^"860.9:",.01,"E"
+69 ;;D^DANGEROUS MEDS FOR PTS > 64
+70 ;;R^"860.9:",.02,"E"
+71 ;;D^101.43
+72 ;;R^"860.9:",2,"E"
+73 ;;D^I $P($G(^ORD(100.98,$P($G(^ORD(101.43,+Y,0)),U,5),0)),U)="PHARMACY"
+74 ;;EOR^
+75 ;;KEY^860.9:^DNR
+76 ;;R^"860.9:",.01,"E"
+77 ;;D^DNR
+78 ;;R^"860.9:",.02,"E"
+79 ;;D^101.43
+80 ;;EOR^
+81 ;;KEY^860.9:^EGFR
+82 ;;R^"860.9:",.01,"E"
+83 ;;D^EGFR
+84 ;;R^"860.9:",.02,"E"
+85 ;;D^60
+86 ;;EOR^
+87 ;;KEY^860.9:^FOOD-DRUG INTERACTION MED
+88 ;;R^"860.9:",.01,"E"
+89 ;;D^FOOD-DRUG INTERACTION MED
+90 ;;R^"860.9:",.02,"E"
+91 ;;D^101.43
+92 ;;R^"860.9:",2,"E"
+93 ;;D^I $P($G(^ORD(100.98,$P($G(^ORD(101.43,+Y,0)),U,5),0)),U)="PHARMACY"
+94 ;;EOR^
+95 ;;KEY^860.9:^NPO
+96 ;;R^"860.9:",.01,"E"
+97 ;;D^NPO
+98 ;;R^"860.9:",.02,"E"
+99 ;;D^101.43
+100 ;;EOR^
+101 ;;KEY^860.9:^ONE TIME MED
+102 ;;R^"860.9:",.01,"E"
+103 ;;D^ONE TIME MED
+104 ;;R^"860.9:",.02,"E"
+105 ;;D^51.1
+106 ;;R^"860.9:",2,"E"
+107 ;;D^I $E($P(^(0),U,4),1,2)="PS"
+108 ;;EOR^
+109 ;;KEY^860.9:^PARTIAL THROMBOPLASTIN TIME
+110 ;;R^"860.9:",.01,"E"
+111 ;;D^PARTIAL THROMBOPLASTIN TIME
+112 ;;R^"860.9:",.02,"E"
+113 ;;D^101.43
+114 ;;EOR^
+115 ;;KEY^860.9:^PROTHROMBIN TIME
+116 ;;R^"860.9:",.01,"E"
+117 ;;D^PROTHROMBIN TIME
+118 ;;R^"860.9:",.02,"E"
+119 ;;D^101.43
+120 ;;EOR^
+121 ;;KEY^860.9:^SERUM CREATININE
+122 ;;R^"860.9:",.01,"E"
+123 ;;D^SERUM CREATININE
+124 ;;R^"860.9:",.02,"E"
+125 ;;D^60
+126 ;;EOR^
+127 ;;KEY^860.9:^SERUM SPECIMEN
+128 ;;R^"860.9:",.01,"E"
+129 ;;D^SERUM SPECIMEN
+130 ;;R^"860.9:",.02,"E"
+131 ;;D^61
+132 ;;EOR^
+133 ;;KEY^860.9:^SERUM UREA NITROGEN
+134 ;;R^"860.9:",.01,"E"
+135 ;;D^SERUM UREA NITROGEN
+136 ;;R^"860.9:",.02,"E"
+137 ;;D^60
+138 ;;EOR^
+139 ;;KEY^860.9:^THROMBOPLASTIN TIME PARTIAL
+140 ;;R^"860.9:",.01,"E"
+141 ;;D^THROMBOPLASTIN TIME PARTIAL
+142 ;;R^"860.9:",.02,"E"
+143 ;;D^60
+144 ;;EOR^
+145 ;;KEY^860.9:^WBC
+146 ;;R^"860.9:",.01,"E"
+147 ;;D^WBC
+148 ;;R^"860.9:",.02,"E"
+149 ;;D^60
+150 ;;EOR^
+151 ;;EOF^OCXS(860.9)^1
+152 ;;SOF^860.8 ORDER CHECK COMPILER FUNCTIONS
+153 ;;KEY^860.8:^CONVERT DATE FROM FILEMAN FORMAT TO OCX FORMAT
+154 ;;R^"860.8:",.01,"E"
+155 ;;D^CONVERT DATE FROM FILEMAN FORMAT TO OCX FORMAT
+156 ;;R^"860.8:",.02,"E"
+157 ;;D^DT2INT
+158 ;;R^"860.8:",1,1
+159 ;;D^ ;DT2INT(OCXDT) ; This Local Extrinsic Function converts a date into an integer
+160 ;;R^"860.8:",1,2
+161 ;;D^ ; ; By taking the Years, Months, Days, Hours and Minutes converting
+162 ;;R^"860.8:",1,3
+163 ;;D^ ; ; Them into Seconds and then adding them all together into one big integer
+164 ;;R^"860.8:",100,1
+165 ;;D^ ;DT2INT(OCXDT) ; This Local Extrinsic Function converts a date into an integer
+166 ;;R^"860.8:",100,2
+167 ;;D^ ; ; By taking the Years, Months, Days, Hours and Minutes converting
+168 ;;R^"860.8:",100,3
+169 ;;D^ ; ; Them into Seconds and then adding them all together into one big integer
+170 ;;R^"860.8:",100,4
+171 ;;D^ ; ;
+172 ;;R^"860.8:",100,5
+173 ;;D^ ; Q:'$L($G(OCXDT)) ""
+174 ;;R^"860.8:",100,6
+175 ;;D^ ; N OCXDIFF,OCXVAL S (OCXDIFF,OCXVAL)=0
+176 ;;R^"860.8:",100,7
+177 ;;D^ ; ;
+178 ;;R^"860.8:",100,8
+179 ;;D^ ; I $L(OCXDT),'OCXDT,(OCXDT[" at ") D ; EXTERNAL EXPERT SYSTEM FORMAT 1 TO EXTERNAL FORMAT
+180 ;;R^"860.8:",100,9
+181 ;;D^ ; .N OCXHR,OCXMIN,OCXTIME
+182 ;;R^"860.8:",100,10
+183 ;;D^ ; .S OCXTIME=$P($P(OCXDT," at ",2),".",1),OCXHR=$P(OCXTIME,":",1),OCXMIN=$P(OCXTIME,":",2)
+184 ;;R^"860.8:",100,11
+185 ;;D^ ; .S:(OCXDT["Midnight") OCXHR=00
+186 ;;R^"860.8:",100,12
+187 ;;D^ ; .S:(OCXDT["PM") OCXHR=OCXHR+12
+188 ;;R^"860.8:",100,13
+189 ;;D^ ; .S OCXDT=$P(OCXDT," at ")_"@"_$E(OCXHR+100,2,3)_$E(OCXMIN+100,2,3)
+190 ;;R^"860.8:",100,14
+191 ;;D^ ; ;
+192 ;;R^"860.8:",100,15
+193 ;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 2 TO EXTERNAL FORMAT
+194 ;;R^"860.8:",100,16
+195 ;;D^ ; .N OCXMON
+196 ;;R^"860.8:",100,17
+197 ;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
+198 ;;R^"860.8:",100,18
+199 ;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_"@"_$TR($P(OCXDT," ",2),":","")
+200 ;;R^"860.8:",100,19
+201 ;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)
+202 ;;R^"860.8:",100,20
+203 ;;D^ ; ;
+204 ;;R^"860.8:",100,21
+205 ;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 3 TO EXTERNAL FORMAT
+206 ;;R^"860.8:",100,22
+207 ;;D^ ; .N OCXMON
+208 ;;R^"860.8:",100,23
+209 ;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
+210 ;;R^"860.8:",100,24
+211 ;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_","_$P($P(OCXDT," ",1),"/",3)_"@"_$TR($P(OCXDT," ",2),":","")
+212 ;;R^"860.8:",100,25
+213 ;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_", "_$P($P(OCXDT," ",1),"/",3)
+214 ;;R^"860.8:",100,26
+215 ;;D^ ; ;
+216 ;;R^"860.8:",100,27
+217 ;;D^ ; I $L(OCXDT),'OCXDT D ; EXTERNAL FORMAT TO INTERNAL FILEMAN FORMAT
+218 ;;R^"860.8:",100,28
+219 ;;D^ ; .I (OCXDT["@0000") S OCXDT=$P(OCXDT,"@",1),OCXDIFF=1
+220 ;;R^"860.8:",100,29
+221 ;;D^ ; .N %DT,X,Y S X=OCXDT,%DT="" S:(OCXDT["@")!(OCXDT="N") %DT="T" D ^%DT S OCXDT=+Y
+222 ;;R^"860.8:",100,30
+223 ;;D^ ; ;
+224 ;;R^"860.8:",100,31
+225 ;;D^ ; I ($L(OCXDT\1)>7) S OCXDT=$$HL7TFM^XLFDT(OCXDT) ; HL7 FORMAT TO INTERNAL FILEMAN FORMAT
+226 ;;R^"860.8:",100,32
+227 ;;D^ ; ;
+228 ;;R^"860.8:",100,33
+229 ;;D^ ; I ($L(OCXDT\1)=7) S OCXDT=$$FMTH^XLFDT(+OCXDT) ; INTERNAL FILEMAN FORMAT TO $H FORMAT
+230 ;;R^"860.8:",100,34
+231 ;;D^ ; ;
+232 ;;R^"860.8:",100,35
+233 ;;D^ ; I (OCXDT?5N1","1.5N) S OCXVAL=(OCXDT*86400)+$P(OCXDT,",",2) ; $H FORMAT TO EXPERT SYSTEM INTERNAL FORMAT
+234 ;;R^"860.8:",100,36
+235 ;;D^ ; ;
+236 ;;R^"860.8:",100,37
+237 ;;D^ ; Q OCXVAL
+238 ;;R^"860.8:",100,38
+239 ;;D^ ; ;
+240 ;;EOR^
+241 ;;KEY^860.8:^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
+242 ;;R^"860.8:",.01,"E"
+243 ;;D^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
+244 ;1;
+245 ;