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