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