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