ORY42705 ;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 ^ORY42706
;
Q
;
DATA ;
;
;;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
;;D^ ; E S OCXMON=$E(OCXMON+100,2,3)
;;R^"860.8:",100,19
;;D^ ; S OCXAP=$S('OCXHR:"Midnight",(OCXHR=12):"Noon",(OCXHR<12):"AM",1:"PM")
;;R^"860.8:",100,20
;;D^ ; I OCXF S OCXHR=OCXHR#12 S:'OCXHR OCXHR=12
;;R^"860.8:",100,21
;;D^ ; Q:'OCXF $E(OCXMON+100,2,3)_"/"_$E(OCXDAY+100,2,3)_$S((OCXCYR=OCXYR):" "_OCXHR_":"_OCXMIN,1:"/"_$E(OCXYR,3,4))
;;R^"860.8:",100,22
;;D^ ; Q:(OCXHR+OCXMIN+OCXSEC) OCXMON_" "_OCXDAY_","_OCXYR_" at "_OCXHR_":"_OCXMIN_"."_OCXSEC_" "_OCXAP
;;R^"860.8:",100,23
;;D^ ; Q OCXMON_" "_OCXDAY_","_OCXYR
;;R^"860.8:",100,24
;;D^ ; ;
;;EOR^
;;KEY^860.8:^ELAPSED ORDER CHECK TIME LOGGER
;;R^"860.8:",.01,"E"
;;D^ELAPSED ORDER CHECK TIME LOGGER
;;R^"860.8:",.02,"E"
;;D^TIMELOG
;;R^"860.8:",100,1
;;D^ ;TIMELOG(OCXMODE,OCXCALL) ; Log an entry in the Elapsed time log.
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; ;
;;R^"860.8:",100,4
;;D^ ; Q 0
;;R^"860.8:",100,5
;;D^ ; ;
;;EOR^
;;KEY^860.8:^EQUALS TERM OPERATOR
;;R^"860.8:",.01,"E"
;;D^EQUALS TERM OPERATOR
;;R^"860.8:",.02,"E"
;;D^EQTERM
;;R^"860.8:",100,1
;;D^ ;EQTERM(DATA,TERM) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," Execution trace DATA: ",$G(DATA)," TERM: ",$G(TERM)
;;R^"860.8:",100,4
;;D^ ; N OCXF,OCXL
;;R^"860.8:",100,5
;;D^ ; ;
;;R^"860.8:",100,6
;;D^ ; S OCXL="",OCXF=$$TERMLKUP(TERM,.OCXL)
;;R^"860.8:",100,7
;;D^T-; Q:'OCXF 0
;;R^"860.8:",100,8
;;D^T+; I 'OCXF W:$G(OCXTRACE) !,"%%%%",?20," Term '",TERM,"' not in Order Check National Term File" Q 0
;;R^"860.8:",100,9
;;D^T+; I '$O(OCXL(0)) W:$G(OCXTRACE) !,"%%%%",?20," There are no local terms listed for the National Term '",TERM,"'." Q 0
;;R^"860.8:",100,10
;;D^T+; I ($D(OCXL(DATA))!$D(OCXL("B",DATA))) W:$G(OCXTRACE) !,"%%%%",?20," Data equals Term" Q 1
;;R^"860.8:",100,11
;;D^T-; I ($D(OCXL(DATA))!$D(OCXL("B",DATA))) Q 1
;;R^"860.8:",100,12
;;D^T-; Q 0
;;R^"860.8:",100,13
;;D^T+; W:$G(OCXTRACE) !,"%%%%",?20," Data does not equal Term" Q 0
;;R^"860.8:",100,14
;;D^ ; ;
;;EOR^
;;KEY^860.8:^FILE DATA IN PATIENT ACTIVE DATA FILE
;;R^"860.8:",.01,"E"
;;D^FILE DATA IN PATIENT ACTIVE DATA FILE
;;R^"860.8:",.02,"E"
;;D^FILE
;;R^"860.8:",1,1
;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function files data
;;R^"860.8:",1,2
;;D^ ; ; in the Order Check Patient Data File
;;R^"860.8:",1,3
;;D^ ; ;
;;R^"860.8:",100,1
;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function logs a validated event/element.
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," Execution trace DFN: ",DFN," OCXELE: ",+$G(OCXELE)," OCXDFL: ",$G(OCXDFL)
;;R^"860.8:",100,4
;;D^ ; N OCXTIMN,OCXTIML,OCXTIMT1,OCXTIMT2,OCXDATA,OCXPC,OCXPC,OCXVAL,OCXSUB,OCXDFI
;;R^"860.8:",100,5
;;D^ ; S DFN=+$G(DFN),OCXELE=+$G(OCXELE)
;;R^"860.8:",100,6
;;D^ ; ;
;;R^"860.8:",100,7
;;D^ ; Q:'DFN 1 Q:'OCXELE 1 K OCXDATA
;;R^"860.8:",100,8
;;D^ ; ;
;;R^"860.8:",100,9
;;D^ ; S OCXDATA(DFN,OCXELE)=1
;;R^"860.8:",100,10
;;D^ ; F OCXPC=1:1:$L(OCXDFL,",") S OCXDFI=$P(OCXDFL,",",OCXPC) I OCXDFI D
;;R^"860.8:",100,11
;;D^ ; .S OCXVAL=$G(OCXDF(+OCXDFI)),OCXDATA(DFN,OCXELE,+OCXDFI)=OCXVAL
;;R^"860.8:",100,12
;;D^T+; .I $G(OCXTRACE) W !,"%%%%",?20," ",$P($G(^OCXS(860.4,+OCXDFI,0)),U,1)," = """,OCXVAL,""""
;;R^"860.8:",100,13
;;D^ ; ;
;;R^"860.8:",100,14
;;D^ ; M ^TMP("OCXCHK",$J,DFN)=OCXDATA(DFN)
;;R^"860.8:",100,15
;;D^ ; ;
;;R^"860.8:",100,16
;;D^ ; Q 0
;;R^"860.8:",100,17
;;D^ ; ;
;;EOR^
;;KEY^860.8:^GENERATE STRING CHECKSUM
;;R^"860.8:",.01,"E"
;;D^GENERATE STRING CHECKSUM
;;R^"860.8:",.02,"E"
;;D^CKSUM
;;R^"860.8:",100,1
;;D^ ;CKSUM(STR) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; N CKSUM,PTR,ASC S CKSUM=0
;;R^"860.8:",100,4
;;D^ ; S STR=$TR(STR,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
;;R^"860.8:",100,5
;;D^ ; F PTR=$L(STR):-1:1 S ASC=$A(STR,PTR)-42 I (ASC>0),(ASC<51) S CKSUM=CKSUM*2+ASC
;;R^"860.8:",100,6
;;D^ ; Q +CKSUM
;;R^"860.8:",100,7
;;D^ ; ;
;;EOR^
;;KEY^860.8:^GET DATA FROM THE ACTIVE DATA FILE
;;R^"860.8:",.01,"E"
;;D^GET DATA FROM THE ACTIVE DATA FILE
;;R^"860.8:",.02,"E"
;;D^GETDATA
;;R^"860.8:",100,1
;;D^ ;GETDATA(DFN,OCXL,OCXDFI) ; This Local Extrinsic Function returns runtime data
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; N OCXE,VAL,PC S VAL=""
;;R^"860.8:",100,4
;;D^ ; F PC=1:1:$L(OCXL,U) S OCXE=$P(OCXL,U,PC) I OCXE S VAL=$G(^TMP("OCXCHK",$J,DFN,OCXE,OCXDFI)) Q:$L(VAL)
;1;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY42705 7651 printed Dec 13, 2024@02:42:12 Page 2
ORY42705 ;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 ^ORY42706
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;D^ ; ;
+3 ;;R^"860.8:",100,33
+4 ;;D^ ; I ($L(OCXDT\1)=7) S OCXDT=$$FMTH^XLFDT(+OCXDT) ; INTERNAL FILEMAN FORMAT TO $H FORMAT
+5 ;;R^"860.8:",100,34
+6 ;;D^ ; ;
+7 ;;R^"860.8:",100,35
+8 ;;D^ ; I (OCXDT?5N1","1.5N) S OCXVAL=(OCXDT*86400)+$P(OCXDT,",",2) ; $H FORMAT TO EXPERT SYSTEM INTERNAL FORMAT
+9 ;;R^"860.8:",100,36
+10 ;;D^ ; ;
+11 ;;R^"860.8:",100,37
+12 ;;D^ ; Q OCXVAL
+13 ;;R^"860.8:",100,38
+14 ;;D^ ; ;
+15 ;;EOR^
+16 ;;KEY^860.8:^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
+17 ;;R^"860.8:",.01,"E"
+18 ;;D^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
+19 ;;R^"860.8:",.02,"E"
+20 ;;D^INT2DT
+21 ;;R^"860.8:",1,1
+22 ;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
+23 ;;R^"860.8:",1,2
+24 ;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
+25 ;;R^"860.8:",1,3
+26 ;;D^ ; ;
+27 ;;R^"860.8:",100,1
+28 ;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
+29 ;;R^"860.8:",100,2
+30 ;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
+31 ;;R^"860.8:",100,3
+32 ;;D^ ; ;
+33 ;;R^"860.8:",100,4
+34 ;;D^ ; Q:'$L($G(OCXDT)) "" S OCXF=+$G(OCXF)
+35 ;;R^"860.8:",100,5
+36 ;;D^ ; N OCXYR,OCXLPYR,OCXMON,OCXDAY,OCXHR,OCXMIN,OCXSEC,OCXCYR
+37 ;;R^"860.8:",100,6
+38 ;;D^ ; S (OCXYR,OCXLPYR,OCXMON,OCXDAY,OCXHR,OCXMIN,OCXSEC,OCXAP)=""
+39 ;;R^"860.8:",100,7
+40 ;;D^ ; S OCXSEC=$E(OCXDT#60+100,2,3),OCXDT=OCXDT\60
+41 ;;R^"860.8:",100,8
+42 ;;D^ ; S OCXMIN=$E(OCXDT#60+100,2,3),OCXDT=OCXDT\60
+43 ;;R^"860.8:",100,9
+44 ;;D^ ; S OCXHR=$E(OCXDT#24+100,2,3),OCXDT=OCXDT\24
+45 ;;R^"860.8:",100,10
+46 ;;D^ ; S OCXCYR=($H\1461)*4+1841+(($H#1461)\365)
+47 ;;R^"860.8:",100,11
+48 ;;D^ ; S OCXYR=(OCXDT\1461)*4+1841,OCXDT=OCXDT#1461
+49 ;;R^"860.8:",100,12
+50 ;;D^ ; S OCXLPYR=(OCXDT\365),OCXDT=OCXDT-(OCXLPYR*365),OCXYR=OCXYR+OCXLPYR
+51 ;;R^"860.8:",100,13
+52 ;;D^ ; S OCXCNT="031^059^090^120^151^181^212^243^273^304^334^365"
+53 ;;R^"860.8:",100,14
+54 ;;D^ ; S:(OCXLPYR=3) OCXCNT="031^060^091^121^152^182^213^244^274^305^335^366"
+55 ;;R^"860.8:",100,15
+56 ;;D^ ; F OCXMON=1:1:12 Q:(OCXDT<$P(OCXCNT,U,OCXMON))
+57 ;;R^"860.8:",100,16
+58 ;;D^ ; S OCXDAY=OCXDT-$P(OCXCNT,U,OCXMON-1)+1
+59 ;;R^"860.8:",100,17
+60 ;;D^ ; I OCXF S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,OCXMON)
+61 ;;R^"860.8:",100,18
+62 ;;D^ ; E S OCXMON=$E(OCXMON+100,2,3)
+63 ;;R^"860.8:",100,19
+64 ;;D^ ; S OCXAP=$S('OCXHR:"Midnight",(OCXHR=12):"Noon",(OCXHR<12):"AM",1:"PM")
+65 ;;R^"860.8:",100,20
+66 ;;D^ ; I OCXF S OCXHR=OCXHR#12 S:'OCXHR OCXHR=12
+67 ;;R^"860.8:",100,21
+68 ;;D^ ; Q:'OCXF $E(OCXMON+100,2,3)_"/"_$E(OCXDAY+100,2,3)_$S((OCXCYR=OCXYR):" "_OCXHR_":"_OCXMIN,1:"/"_$E(OCXYR,3,4))
+69 ;;R^"860.8:",100,22
+70 ;;D^ ; Q:(OCXHR+OCXMIN+OCXSEC) OCXMON_" "_OCXDAY_","_OCXYR_" at "_OCXHR_":"_OCXMIN_"."_OCXSEC_" "_OCXAP
+71 ;;R^"860.8:",100,23
+72 ;;D^ ; Q OCXMON_" "_OCXDAY_","_OCXYR
+73 ;;R^"860.8:",100,24
+74 ;;D^ ; ;
+75 ;;EOR^
+76 ;;KEY^860.8:^ELAPSED ORDER CHECK TIME LOGGER
+77 ;;R^"860.8:",.01,"E"
+78 ;;D^ELAPSED ORDER CHECK TIME LOGGER
+79 ;;R^"860.8:",.02,"E"
+80 ;;D^TIMELOG
+81 ;;R^"860.8:",100,1
+82 ;;D^ ;TIMELOG(OCXMODE,OCXCALL) ; Log an entry in the Elapsed time log.
+83 ;;R^"860.8:",100,2
+84 ;;D^ ; ;
+85 ;;R^"860.8:",100,3
+86 ;;D^ ; ;
+87 ;;R^"860.8:",100,4
+88 ;;D^ ; Q 0
+89 ;;R^"860.8:",100,5
+90 ;;D^ ; ;
+91 ;;EOR^
+92 ;;KEY^860.8:^EQUALS TERM OPERATOR
+93 ;;R^"860.8:",.01,"E"
+94 ;;D^EQUALS TERM OPERATOR
+95 ;;R^"860.8:",.02,"E"
+96 ;;D^EQTERM
+97 ;;R^"860.8:",100,1
+98 ;;D^ ;EQTERM(DATA,TERM) ;
+99 ;;R^"860.8:",100,2
+100 ;;D^ ; ;
+101 ;;R^"860.8:",100,3
+102 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," Execution trace DATA: ",$G(DATA)," TERM: ",$G(TERM)
+103 ;;R^"860.8:",100,4
+104 ;;D^ ; N OCXF,OCXL
+105 ;;R^"860.8:",100,5
+106 ;;D^ ; ;
+107 ;;R^"860.8:",100,6
+108 ;;D^ ; S OCXL="",OCXF=$$TERMLKUP(TERM,.OCXL)
+109 ;;R^"860.8:",100,7
+110 ;;D^T-; Q:'OCXF 0
+111 ;;R^"860.8:",100,8
+112 ;;D^T+; I 'OCXF W:$G(OCXTRACE) !,"%%%%",?20," Term '",TERM,"' not in Order Check National Term File" Q 0
+113 ;;R^"860.8:",100,9
+114 ;;D^T+; I '$O(OCXL(0)) W:$G(OCXTRACE) !,"%%%%",?20," There are no local terms listed for the National Term '",TERM,"'." Q 0
+115 ;;R^"860.8:",100,10
+116 ;;D^T+; I ($D(OCXL(DATA))!$D(OCXL("B",DATA))) W:$G(OCXTRACE) !,"%%%%",?20," Data equals Term" Q 1
+117 ;;R^"860.8:",100,11
+118 ;;D^T-; I ($D(OCXL(DATA))!$D(OCXL("B",DATA))) Q 1
+119 ;;R^"860.8:",100,12
+120 ;;D^T-; Q 0
+121 ;;R^"860.8:",100,13
+122 ;;D^T+; W:$G(OCXTRACE) !,"%%%%",?20," Data does not equal Term" Q 0
+123 ;;R^"860.8:",100,14
+124 ;;D^ ; ;
+125 ;;EOR^
+126 ;;KEY^860.8:^FILE DATA IN PATIENT ACTIVE DATA FILE
+127 ;;R^"860.8:",.01,"E"
+128 ;;D^FILE DATA IN PATIENT ACTIVE DATA FILE
+129 ;;R^"860.8:",.02,"E"
+130 ;;D^FILE
+131 ;;R^"860.8:",1,1
+132 ;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function files data
+133 ;;R^"860.8:",1,2
+134 ;;D^ ; ; in the Order Check Patient Data File
+135 ;;R^"860.8:",1,3
+136 ;;D^ ; ;
+137 ;;R^"860.8:",100,1
+138 ;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function logs a validated event/element.
+139 ;;R^"860.8:",100,2
+140 ;;D^ ; ;
+141 ;;R^"860.8:",100,3
+142 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," Execution trace DFN: ",DFN," OCXELE: ",+$G(OCXELE)," OCXDFL: ",$G(OCXDFL)
+143 ;;R^"860.8:",100,4
+144 ;;D^ ; N OCXTIMN,OCXTIML,OCXTIMT1,OCXTIMT2,OCXDATA,OCXPC,OCXPC,OCXVAL,OCXSUB,OCXDFI
+145 ;;R^"860.8:",100,5
+146 ;;D^ ; S DFN=+$G(DFN),OCXELE=+$G(OCXELE)
+147 ;;R^"860.8:",100,6
+148 ;;D^ ; ;
+149 ;;R^"860.8:",100,7
+150 ;;D^ ; Q:'DFN 1 Q:'OCXELE 1 K OCXDATA
+151 ;;R^"860.8:",100,8
+152 ;;D^ ; ;
+153 ;;R^"860.8:",100,9
+154 ;;D^ ; S OCXDATA(DFN,OCXELE)=1
+155 ;;R^"860.8:",100,10
+156 ;;D^ ; F OCXPC=1:1:$L(OCXDFL,",") S OCXDFI=$P(OCXDFL,",",OCXPC) I OCXDFI D
+157 ;;R^"860.8:",100,11
+158 ;;D^ ; .S OCXVAL=$G(OCXDF(+OCXDFI)),OCXDATA(DFN,OCXELE,+OCXDFI)=OCXVAL
+159 ;;R^"860.8:",100,12
+160 ;;D^T+; .I $G(OCXTRACE) W !,"%%%%",?20," ",$P($G(^OCXS(860.4,+OCXDFI,0)),U,1)," = """,OCXVAL,""""
+161 ;;R^"860.8:",100,13
+162 ;;D^ ; ;
+163 ;;R^"860.8:",100,14
+164 ;;D^ ; M ^TMP("OCXCHK",$J,DFN)=OCXDATA(DFN)
+165 ;;R^"860.8:",100,15
+166 ;;D^ ; ;
+167 ;;R^"860.8:",100,16
+168 ;;D^ ; Q 0
+169 ;;R^"860.8:",100,17
+170 ;;D^ ; ;
+171 ;;EOR^
+172 ;;KEY^860.8:^GENERATE STRING CHECKSUM
+173 ;;R^"860.8:",.01,"E"
+174 ;;D^GENERATE STRING CHECKSUM
+175 ;;R^"860.8:",.02,"E"
+176 ;;D^CKSUM
+177 ;;R^"860.8:",100,1
+178 ;;D^ ;CKSUM(STR) ;
+179 ;;R^"860.8:",100,2
+180 ;;D^ ; ;
+181 ;;R^"860.8:",100,3
+182 ;;D^ ; N CKSUM,PTR,ASC S CKSUM=0
+183 ;;R^"860.8:",100,4
+184 ;;D^ ; S STR=$TR(STR,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+185 ;;R^"860.8:",100,5
+186 ;;D^ ; F PTR=$L(STR):-1:1 S ASC=$A(STR,PTR)-42 I (ASC>0),(ASC<51) S CKSUM=CKSUM*2+ASC
+187 ;;R^"860.8:",100,6
+188 ;;D^ ; Q +CKSUM
+189 ;;R^"860.8:",100,7
+190 ;;D^ ; ;
+191 ;;EOR^
+192 ;;KEY^860.8:^GET DATA FROM THE ACTIVE DATA FILE
+193 ;;R^"860.8:",.01,"E"
+194 ;;D^GET DATA FROM THE ACTIVE DATA FILE
+195 ;;R^"860.8:",.02,"E"
+196 ;;D^GETDATA
+197 ;;R^"860.8:",100,1
+198 ;;D^ ;GETDATA(DFN,OCXL,OCXDFI) ; This Local Extrinsic Function returns runtime data
+199 ;;R^"860.8:",100,2
+200 ;;D^ ; ;
+201 ;;R^"860.8:",100,3
+202 ;;D^ ; N OCXE,VAL,PC S VAL=""
+203 ;;R^"860.8:",100,4
+204 ;;D^ ; F PC=1:1:$L(OCXL,U) S OCXE=$P(OCXL,U,PC) I OCXE S VAL=$G(^TMP("OCXCHK",$J,DFN,OCXE,OCXDFI)) Q:$L(VAL)
+205 ;1;
+206 ;