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