ORY53905 ;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 ^ORY53906
;
Q
;
DATA ;
;
;;R^"860.8:",100,5
;;D^ ; Q (LIST[DATA)
;;R^"860.8:",100,6
;;D^ ; ;
;;EOR^
;;KEY^860.8:^LOCAL TERM LOOKUP
;;R^"860.8:",.01,"E"
;;D^LOCAL TERM LOOKUP
;;R^"860.8:",.02,"E"
;;D^TERMLKUP
;;R^"860.8:",1,1
;;D^ This function allows a local site to define to Order Checking
;;R^"860.8:",1,2
;;D^ a term specific to that site. (ie. Lab Test Name, Radiology
;;R^"860.8:",1,3
;;D^ procedure name, etc.)
;;R^"860.8:",100,1
;;D^ ;TERMLKUP(OCXTERM,OCXFILE) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; Q
;;R^"860.8:",100,4
;;D^ ; ;
;;EOR^
;;KEY^860.8:^NEW RULE MESSAGE
;;R^"860.8:",.01,"E"
;;D^NEW RULE MESSAGE
;;R^"860.8:",.02,"E"
;;D^NEWRULE
;;R^"860.8:",100,1
;;D^ ;NEWRULE(OCXDFN,OCXORD,OCXRUL,OCXREL,OCXNOTF,OCXMESS) ; Has this rule already been triggered for this order number
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^L+; S OCXERR=$$TIMELOG("M","NEWRULE("_(+$G(OCXDFN))_","_(+$G(OCXORD))_","_(+$G(OCXRUL))_","_(+$G(OCXREL))_","_(+$G(OCXNOTF))_","_$G(OCXMESS)_")")
;;R^"860.8:",100,4
;;D^ ; ;
;;R^"860.8:",100,5
;;D^ ; Q:'$G(OCXDFN) 0 Q:'$G(OCXRUL) 0
;;R^"860.8:",100,6
;;D^ ; Q:'$G(OCXREL) 0 Q:'$G(OCXNOTF) 0 Q:'$L($G(OCXMESS)) 0
;;R^"860.8:",100,7
;;D^ ; S OCXORD=+$G(OCXORD),OCXDFN=+OCXDFN
;;R^"860.8:",100,8
;;D^ ; ;
;;R^"860.8:",100,9
;;D^ ; N OCXNDX,OCXDATA,OCXDFI,OCXELE,OCXGR,OCXTIME,OCXCKSUM,OCXTSP,OCXTSPL
;;R^"860.8:",100,10
;;D^ ; ;
;;R^"860.8:",100,11
;;D^ ; S OCXTIME=(+$H)
;;R^"860.8:",100,12
;;D^ ; S OCXCKSUM=$$CKSUM(OCXMESS)
;;R^"860.8:",100,13
;;D^ ; ;
;;R^"860.8:",100,14
;;D^ ; S OCXTSP=($H*86400)+$P($H,",",2)
;;R^"860.8:",100,15
;;D^ ; S OCXTSPL=($G(^OCXD(860.7,"AT",OCXTIME,OCXDFN,OCXRUL,+OCXORD,OCXCKSUM))+$G(OCXTSPI,300))
;;R^"860.8:",100,16
;;D^ ; ;
;;R^"860.8:",100,17
;;D^ ; Q:(OCXTSPL>OCXTSP) 0
;;R^"860.8:",100,18
;;D^ ; ;
;;R^"860.8:",100,19
;;D^ ; K OCXDATA
;;R^"860.8:",100,20
;;D^ ; S OCXDATA(OCXDFN,0)=OCXDFN
;;R^"860.8:",100,21
;;D^ ; S OCXDATA("B",OCXDFN,OCXDFN)=""
;;R^"860.8:",100,22
;;D^ ; S OCXDATA("AT",OCXTIME,OCXDFN,OCXRUL,+OCXORD,OCXCKSUM)=OCXTSP
;;R^"860.8:",100,23
;;D^ ; ;
;;R^"860.8:",100,24
;;D^ ; S OCXGR="^OCXD(860.7"
;;R^"860.8:",100,25
;;D^T+; D SETAP(OCXGR_")",0,"Patient",$P($G(^DPT(OCXDFN,0)),U,1),.OCXDATA,OCXDFN)
;;R^"860.8:",100,26
;;D^T-; D SETAP(OCXGR_")",0,.OCXDATA,OCXDFN)
;;R^"860.8:",100,27
;;D^ ; ;
;;R^"860.8:",100,28
;;D^ ; K OCXDATA
;;R^"860.8:",100,29
;;D^ ; S OCXDATA(OCXRUL,0)=OCXRUL_U_(OCXTIME)_U_(+OCXORD)
;;R^"860.8:",100,30
;;D^ ; S OCXDATA(OCXRUL,"M")=OCXMESS
;;R^"860.8:",100,31
;;D^ ; S OCXDATA("B",OCXRUL,OCXRUL)=""
;;R^"860.8:",100,32
;;D^ ; S OCXGR=OCXGR_","_OCXDFN_",1"
;;R^"860.8:",100,33
;;D^T+; D SETAP(OCXGR_")","860.71P","Rule",$P($G(^OCXS(860.2,OCXRUL,0)),U,1),.OCXDATA,OCXRUL)
;;R^"860.8:",100,34
;;D^T-; D SETAP(OCXGR_")","860.71P",.OCXDATA,OCXRUL)
;;R^"860.8:",100,35
;;D^ ; ;
;;R^"860.8:",100,36
;;D^ ; K OCXDATA
;;R^"860.8:",100,37
;;D^ ; S OCXDATA(OCXREL,0)=OCXREL
;;R^"860.8:",100,38
;;D^ ; S OCXDATA("B",OCXREL,OCXREL)=""
;;R^"860.8:",100,39
;;D^ ; S OCXGR=OCXGR_","_OCXRUL_",1"
;;R^"860.8:",100,40
;;D^T+; D SETAP(OCXGR_")","860.712","Relation",OCXREL,.OCXDATA,OCXREL)
;;R^"860.8:",100,41
;;D^T-; D SETAP(OCXGR_")","860.712",.OCXDATA,OCXREL)
;;R^"860.8:",100,42
;;D^ ; ;
;;R^"860.8:",100,43
;;D^ ; S OCXELE=0 F S OCXELE=$O(^OCXS(860.2,OCXRUL,"C","C",OCXELE)) Q:'OCXELE D
;;R^"860.8:",100,44
;;D^ ; .;
;;R^"860.8:",100,45
;;D^ ; .N OCXGR1
;;R^"860.8:",100,46
;;D^ ; .S OCXGR1=OCXGR_","_OCXREL_",1"
;;R^"860.8:",100,47
;;D^ ; .K OCXDATA
;;R^"860.8:",100,48
;;D^ ; .S OCXDATA(OCXELE,0)=OCXELE
;;R^"860.8:",100,49
;;D^ ; .S OCXDATA(OCXELE,"TIME")=OCXTIME
;;R^"860.8:",100,50
;;D^ ; .S OCXDATA(OCXELE,"LOG")=$G(OCXOLOG)
;;R^"860.8:",100,51
;;D^ ; .S OCXDATA("B",OCXELE,OCXELE)=""
;;R^"860.8:",100,52
;;D^ ; .K ^OCXD(860.7,OCXDFN,1,OCXRUL,1,OCXREL,1,OCXELE)
;;R^"860.8:",100,53
;;D^T+; .D SETAP(OCXGR1_")","860.7122P","Element",$P($G(^OCXS(860.3,OCXELE,0)),U,1),.OCXDATA,OCXELE)
;;R^"860.8:",100,54
;;D^T-; .D SETAP(OCXGR1_")","860.7122P",.OCXDATA,OCXELE)
;;R^"860.8:",100,55
;;D^ ; .;
;;R^"860.8:",100,56
;;D^ ; .S OCXDFI=0 F S OCXDFI=$O(^TMP("OCXCHK",$J,OCXDFN,OCXELE,OCXDFI)) Q:'OCXDFI D
;;R^"860.8:",100,57
;;D^ ; ..N OCXGR2
;;R^"860.8:",100,58
;;D^ ; ..S OCXGR2=OCXGR1_","_OCXELE_",1"
;;R^"860.8:",100,59
;;D^ ; ..K OCXDATA
;;R^"860.8:",100,60
;;D^ ; ..S OCXDATA(OCXDFI,0)=OCXDFI
;;R^"860.8:",100,61
;;D^ ; ..S OCXDATA(OCXDFI,"VAL")=^TMP("OCXCHK",$J,OCXDFN,OCXELE,OCXDFI)
;;R^"860.8:",100,62
;;D^ ; ..S OCXDATA("B",OCXDFI,OCXDFI)=""
;;R^"860.8:",100,63
;;D^T+; ..D SETAP(OCXGR2_")","860.71223P","Data Field",$P($G(^OCXS(860.4,OCXDFI,0)),U,1),.OCXDATA,OCXDFI)
;;R^"860.8:",100,64
;;D^T-; ..D SETAP(OCXGR2_")","860.71223P",.OCXDATA,OCXDFI)
;;R^"860.8:",100,65
;;D^ ; ;
;;R^"860.8:",100,66
;;D^ ; Q 1
;;R^"860.8:",100,67
;;D^ ; ;
;;R^"860.8:",100,68
;;D^T+;SETAP(ROOT,DD,ITEM,ITEMNAME,DATA,DA) ; Set Rule Event data
;;R^"860.8:",100,69
;;D^T-;SETAP(ROOT,DD,DATA,DA) ; Set Rule Event data
;;R^"860.8:",100,70
;;D^ ; M @ROOT=DATA
;;R^"860.8:",100,71
;;D^ ; I +$G(DD) S @ROOT@(0)="^"_($G(DD))_"^"_($P($G(@ROOT@(0)),U,3)+1)_"^"_$G(DA)
;;R^"860.8:",100,72
;;D^ ; I '$G(DD) S $P(@ROOT@(0),U,3,4)=($P($G(@ROOT@(0)),U,3)+1)_"^"_$G(DA)
;;R^"860.8:",100,73
;;D^T+; W:$G(OCXTRACE) !,"File Active Data ",$G(ITEM),": ",$G(ITEMNAME)
;;R^"860.8:",100,74
;;D^ ; ;
;;R^"860.8:",100,75
;;D^ ; Q
;;R^"860.8:",100,76
;;D^ ; ;
;;R^"860.8:",100,77
;;D^ ; ;
;;EOR^
;;KEY^860.8:^RETURN POINTED TO VALUE
;;R^"860.8:",.01,"E"
;;D^RETURN POINTED TO VALUE
;;R^"860.8:",.02,"E"
;;D^POINTER
;;R^"860.8:",1,1
;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
;;R^"860.8:",1,2
;;D^ ; ; of record D0 in file OCXFILE
;;R^"860.8:",100,1
;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
;;R^"860.8:",100,2
;;D^ ; ; of record D0 in file OCXFILE
;;R^"860.8:",100,3
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
;;R^"860.8:",100,4
;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
;;R^"860.8:",100,5
;;D^ ; N GLREF
;;R^"860.8:",100,6
;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
;;R^"860.8:",100,7
;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
;;R^"860.8:",100,8
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
;;R^"860.8:",100,9
;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
;;R^"860.8:",100,10
;;D^ ; ;
;;EOR^
;;KEY^860.8:^STRING CONTAINS ONE OF A LIST OF VALUES
;;R^"860.8:",.01,"E"
;;D^STRING CONTAINS ONE OF A LIST OF VALUES
;;R^"860.8:",.02,"E"
;;D^CLIST
;;R^"860.8:",100,1
;;D^ ;CLIST(DATA,LIST) ; DOES THE DATA FIELD CONTAIN AN ELEMENT IN THE LIST
;1;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY53905 7666 printed Oct 16, 2024@18:43:08 Page 2
ORY53905 ;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 ^ORY53906
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;R^"860.8:",100,5
+3 ;;D^ ; Q (LIST[DATA)
+4 ;;R^"860.8:",100,6
+5 ;;D^ ; ;
+6 ;;EOR^
+7 ;;KEY^860.8:^LOCAL TERM LOOKUP
+8 ;;R^"860.8:",.01,"E"
+9 ;;D^LOCAL TERM LOOKUP
+10 ;;R^"860.8:",.02,"E"
+11 ;;D^TERMLKUP
+12 ;;R^"860.8:",1,1
+13 ;;D^ This function allows a local site to define to Order Checking
+14 ;;R^"860.8:",1,2
+15 ;;D^ a term specific to that site. (ie. Lab Test Name, Radiology
+16 ;;R^"860.8:",1,3
+17 ;;D^ procedure name, etc.)
+18 ;;R^"860.8:",100,1
+19 ;;D^ ;TERMLKUP(OCXTERM,OCXFILE) ;
+20 ;;R^"860.8:",100,2
+21 ;;D^ ; ;
+22 ;;R^"860.8:",100,3
+23 ;;D^ ; Q
+24 ;;R^"860.8:",100,4
+25 ;;D^ ; ;
+26 ;;EOR^
+27 ;;KEY^860.8:^NEW RULE MESSAGE
+28 ;;R^"860.8:",.01,"E"
+29 ;;D^NEW RULE MESSAGE
+30 ;;R^"860.8:",.02,"E"
+31 ;;D^NEWRULE
+32 ;;R^"860.8:",100,1
+33 ;;D^ ;NEWRULE(OCXDFN,OCXORD,OCXRUL,OCXREL,OCXNOTF,OCXMESS) ; Has this rule already been triggered for this order number
+34 ;;R^"860.8:",100,2
+35 ;;D^ ; ;
+36 ;;R^"860.8:",100,3
+37 ;;D^L+; S OCXERR=$$TIMELOG("M","NEWRULE("_(+$G(OCXDFN))_","_(+$G(OCXORD))_","_(+$G(OCXRUL))_","_(+$G(OCXREL))_","_(+$G(OCXNOTF))_","_$G(OCXMESS)_")")
+38 ;;R^"860.8:",100,4
+39 ;;D^ ; ;
+40 ;;R^"860.8:",100,5
+41 ;;D^ ; Q:'$G(OCXDFN) 0 Q:'$G(OCXRUL) 0
+42 ;;R^"860.8:",100,6
+43 ;;D^ ; Q:'$G(OCXREL) 0 Q:'$G(OCXNOTF) 0 Q:'$L($G(OCXMESS)) 0
+44 ;;R^"860.8:",100,7
+45 ;;D^ ; S OCXORD=+$G(OCXORD),OCXDFN=+OCXDFN
+46 ;;R^"860.8:",100,8
+47 ;;D^ ; ;
+48 ;;R^"860.8:",100,9
+49 ;;D^ ; N OCXNDX,OCXDATA,OCXDFI,OCXELE,OCXGR,OCXTIME,OCXCKSUM,OCXTSP,OCXTSPL
+50 ;;R^"860.8:",100,10
+51 ;;D^ ; ;
+52 ;;R^"860.8:",100,11
+53 ;;D^ ; S OCXTIME=(+$H)
+54 ;;R^"860.8:",100,12
+55 ;;D^ ; S OCXCKSUM=$$CKSUM(OCXMESS)
+56 ;;R^"860.8:",100,13
+57 ;;D^ ; ;
+58 ;;R^"860.8:",100,14
+59 ;;D^ ; S OCXTSP=($H*86400)+$P($H,",",2)
+60 ;;R^"860.8:",100,15
+61 ;;D^ ; S OCXTSPL=($G(^OCXD(860.7,"AT",OCXTIME,OCXDFN,OCXRUL,+OCXORD,OCXCKSUM))+$G(OCXTSPI,300))
+62 ;;R^"860.8:",100,16
+63 ;;D^ ; ;
+64 ;;R^"860.8:",100,17
+65 ;;D^ ; Q:(OCXTSPL>OCXTSP) 0
+66 ;;R^"860.8:",100,18
+67 ;;D^ ; ;
+68 ;;R^"860.8:",100,19
+69 ;;D^ ; K OCXDATA
+70 ;;R^"860.8:",100,20
+71 ;;D^ ; S OCXDATA(OCXDFN,0)=OCXDFN
+72 ;;R^"860.8:",100,21
+73 ;;D^ ; S OCXDATA("B",OCXDFN,OCXDFN)=""
+74 ;;R^"860.8:",100,22
+75 ;;D^ ; S OCXDATA("AT",OCXTIME,OCXDFN,OCXRUL,+OCXORD,OCXCKSUM)=OCXTSP
+76 ;;R^"860.8:",100,23
+77 ;;D^ ; ;
+78 ;;R^"860.8:",100,24
+79 ;;D^ ; S OCXGR="^OCXD(860.7"
+80 ;;R^"860.8:",100,25
+81 ;;D^T+; D SETAP(OCXGR_")",0,"Patient",$P($G(^DPT(OCXDFN,0)),U,1),.OCXDATA,OCXDFN)
+82 ;;R^"860.8:",100,26
+83 ;;D^T-; D SETAP(OCXGR_")",0,.OCXDATA,OCXDFN)
+84 ;;R^"860.8:",100,27
+85 ;;D^ ; ;
+86 ;;R^"860.8:",100,28
+87 ;;D^ ; K OCXDATA
+88 ;;R^"860.8:",100,29
+89 ;;D^ ; S OCXDATA(OCXRUL,0)=OCXRUL_U_(OCXTIME)_U_(+OCXORD)
+90 ;;R^"860.8:",100,30
+91 ;;D^ ; S OCXDATA(OCXRUL,"M")=OCXMESS
+92 ;;R^"860.8:",100,31
+93 ;;D^ ; S OCXDATA("B",OCXRUL,OCXRUL)=""
+94 ;;R^"860.8:",100,32
+95 ;;D^ ; S OCXGR=OCXGR_","_OCXDFN_",1"
+96 ;;R^"860.8:",100,33
+97 ;;D^T+; D SETAP(OCXGR_")","860.71P","Rule",$P($G(^OCXS(860.2,OCXRUL,0)),U,1),.OCXDATA,OCXRUL)
+98 ;;R^"860.8:",100,34
+99 ;;D^T-; D SETAP(OCXGR_")","860.71P",.OCXDATA,OCXRUL)
+100 ;;R^"860.8:",100,35
+101 ;;D^ ; ;
+102 ;;R^"860.8:",100,36
+103 ;;D^ ; K OCXDATA
+104 ;;R^"860.8:",100,37
+105 ;;D^ ; S OCXDATA(OCXREL,0)=OCXREL
+106 ;;R^"860.8:",100,38
+107 ;;D^ ; S OCXDATA("B",OCXREL,OCXREL)=""
+108 ;;R^"860.8:",100,39
+109 ;;D^ ; S OCXGR=OCXGR_","_OCXRUL_",1"
+110 ;;R^"860.8:",100,40
+111 ;;D^T+; D SETAP(OCXGR_")","860.712","Relation",OCXREL,.OCXDATA,OCXREL)
+112 ;;R^"860.8:",100,41
+113 ;;D^T-; D SETAP(OCXGR_")","860.712",.OCXDATA,OCXREL)
+114 ;;R^"860.8:",100,42
+115 ;;D^ ; ;
+116 ;;R^"860.8:",100,43
+117 ;;D^ ; S OCXELE=0 F S OCXELE=$O(^OCXS(860.2,OCXRUL,"C","C",OCXELE)) Q:'OCXELE D
+118 ;;R^"860.8:",100,44
+119 ;;D^ ; .;
+120 ;;R^"860.8:",100,45
+121 ;;D^ ; .N OCXGR1
+122 ;;R^"860.8:",100,46
+123 ;;D^ ; .S OCXGR1=OCXGR_","_OCXREL_",1"
+124 ;;R^"860.8:",100,47
+125 ;;D^ ; .K OCXDATA
+126 ;;R^"860.8:",100,48
+127 ;;D^ ; .S OCXDATA(OCXELE,0)=OCXELE
+128 ;;R^"860.8:",100,49
+129 ;;D^ ; .S OCXDATA(OCXELE,"TIME")=OCXTIME
+130 ;;R^"860.8:",100,50
+131 ;;D^ ; .S OCXDATA(OCXELE,"LOG")=$G(OCXOLOG)
+132 ;;R^"860.8:",100,51
+133 ;;D^ ; .S OCXDATA("B",OCXELE,OCXELE)=""
+134 ;;R^"860.8:",100,52
+135 ;;D^ ; .K ^OCXD(860.7,OCXDFN,1,OCXRUL,1,OCXREL,1,OCXELE)
+136 ;;R^"860.8:",100,53
+137 ;;D^T+; .D SETAP(OCXGR1_")","860.7122P","Element",$P($G(^OCXS(860.3,OCXELE,0)),U,1),.OCXDATA,OCXELE)
+138 ;;R^"860.8:",100,54
+139 ;;D^T-; .D SETAP(OCXGR1_")","860.7122P",.OCXDATA,OCXELE)
+140 ;;R^"860.8:",100,55
+141 ;;D^ ; .;
+142 ;;R^"860.8:",100,56
+143 ;;D^ ; .S OCXDFI=0 F S OCXDFI=$O(^TMP("OCXCHK",$J,OCXDFN,OCXELE,OCXDFI)) Q:'OCXDFI D
+144 ;;R^"860.8:",100,57
+145 ;;D^ ; ..N OCXGR2
+146 ;;R^"860.8:",100,58
+147 ;;D^ ; ..S OCXGR2=OCXGR1_","_OCXELE_",1"
+148 ;;R^"860.8:",100,59
+149 ;;D^ ; ..K OCXDATA
+150 ;;R^"860.8:",100,60
+151 ;;D^ ; ..S OCXDATA(OCXDFI,0)=OCXDFI
+152 ;;R^"860.8:",100,61
+153 ;;D^ ; ..S OCXDATA(OCXDFI,"VAL")=^TMP("OCXCHK",$J,OCXDFN,OCXELE,OCXDFI)
+154 ;;R^"860.8:",100,62
+155 ;;D^ ; ..S OCXDATA("B",OCXDFI,OCXDFI)=""
+156 ;;R^"860.8:",100,63
+157 ;;D^T+; ..D SETAP(OCXGR2_")","860.71223P","Data Field",$P($G(^OCXS(860.4,OCXDFI,0)),U,1),.OCXDATA,OCXDFI)
+158 ;;R^"860.8:",100,64
+159 ;;D^T-; ..D SETAP(OCXGR2_")","860.71223P",.OCXDATA,OCXDFI)
+160 ;;R^"860.8:",100,65
+161 ;;D^ ; ;
+162 ;;R^"860.8:",100,66
+163 ;;D^ ; Q 1
+164 ;;R^"860.8:",100,67
+165 ;;D^ ; ;
+166 ;;R^"860.8:",100,68
+167 ;;D^T+;SETAP(ROOT,DD,ITEM,ITEMNAME,DATA,DA) ; Set Rule Event data
+168 ;;R^"860.8:",100,69
+169 ;;D^T-;SETAP(ROOT,DD,DATA,DA) ; Set Rule Event data
+170 ;;R^"860.8:",100,70
+171 ;;D^ ; M @ROOT=DATA
+172 ;;R^"860.8:",100,71
+173 ;;D^ ; I +$G(DD) S @ROOT@(0)="^"_($G(DD))_"^"_($P($G(@ROOT@(0)),U,3)+1)_"^"_$G(DA)
+174 ;;R^"860.8:",100,72
+175 ;;D^ ; I '$G(DD) S $P(@ROOT@(0),U,3,4)=($P($G(@ROOT@(0)),U,3)+1)_"^"_$G(DA)
+176 ;;R^"860.8:",100,73
+177 ;;D^T+; W:$G(OCXTRACE) !,"File Active Data ",$G(ITEM),": ",$G(ITEMNAME)
+178 ;;R^"860.8:",100,74
+179 ;;D^ ; ;
+180 ;;R^"860.8:",100,75
+181 ;;D^ ; Q
+182 ;;R^"860.8:",100,76
+183 ;;D^ ; ;
+184 ;;R^"860.8:",100,77
+185 ;;D^ ; ;
+186 ;;EOR^
+187 ;;KEY^860.8:^RETURN POINTED TO VALUE
+188 ;;R^"860.8:",.01,"E"
+189 ;;D^RETURN POINTED TO VALUE
+190 ;;R^"860.8:",.02,"E"
+191 ;;D^POINTER
+192 ;;R^"860.8:",1,1
+193 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
+194 ;;R^"860.8:",1,2
+195 ;;D^ ; ; of record D0 in file OCXFILE
+196 ;;R^"860.8:",100,1
+197 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
+198 ;;R^"860.8:",100,2
+199 ;;D^ ; ; of record D0 in file OCXFILE
+200 ;;R^"860.8:",100,3
+201 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
+202 ;;R^"860.8:",100,4
+203 ;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
+204 ;;R^"860.8:",100,5
+205 ;;D^ ; N GLREF
+206 ;;R^"860.8:",100,6
+207 ;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
+208 ;;R^"860.8:",100,7
+209 ;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
+210 ;;R^"860.8:",100,8
+211 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
+212 ;;R^"860.8:",100,9
+213 ;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
+214 ;;R^"860.8:",100,10
+215 ;;D^ ; ;
+216 ;;EOR^
+217 ;;KEY^860.8:^STRING CONTAINS ONE OF A LIST OF VALUES
+218 ;;R^"860.8:",.01,"E"
+219 ;;D^STRING CONTAINS ONE OF A LIST OF VALUES
+220 ;;R^"860.8:",.02,"E"
+221 ;;D^CLIST
+222 ;;R^"860.8:",100,1
+223 ;;D^ ;CLIST(DATA,LIST) ; DOES THE DATA FIELD CONTAIN AN ELEMENT IN THE LIST
+224 ;1;
+225 ;