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