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