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