CIAUDIC ;MSC/IND/DKM - Encapsulated FileMan API;15-Feb-2007 10:32;DKM
;;1.2;CIA UTILITIES;;Mar 20, 2007
;;Copyright 2000-2006, Medsphere Systems Corporation
;=================================================================
; Parameterized routine to add/edit/extract an entry in a
; FileMan file. Encapsulates global structure info so no
; need to specify this directly.
; Inputs:
; %CIADIC = Global root, file number, or bookmark
; %CIACMD = n : IEN of entry to process
; 0 : Process last IEN referenced
; +n : Move down to subfile n
; - : Move up to parent file
; @n : Delete IEN #n (or last referenced if missing)
; =x;y : Lookup y at current level using options in x
; ?x;y ; Lookup y using CIAULKP utility with options in x
; >x;y : Read fields specified in y using options in x
; <x;y : Write fields specified in y using options in x
; ~x;y : Same as <, but creates new entry
; %n : Force DINUM to n
; Outputs:
; Returns in the first piece the IEN of the entry or...
; 0 = Entry was deleted
; -1 = Entry was rejected
; -2 = Entry locked by another process
; -3 = Unexpected error
;=================================================================
ENTRY(%CIADIC,%CIACMD) ;
S %CIADIC(0)=+$G(DUZ)
N DUZ,DIC,DINUM,DIE,DIQ,DIQUIET,DIK,%CIAX,%CIAIEN,%CIAARG,%CIAN1,%CIAN2,%CIAZ,X,Y
N DA,DC,DD,DG,DH,DK,DL,DO,DQ,DR,DU,DV,DW,DY
S DUZ=%CIADIC(0),DUZ(0)="@",@$$TRAP^CIAUOS("ERROR^CIAUDIC"),%CIACMD=$G(%CIACMD),%CIAIEN="",DIQUIET=1
; Build the bookmark if a global reference or file # passed
I %CIADIC'[U D
.S:%CIADIC'=+%CIADIC %CIADIC=+$O(^DIC("B",%CIADIC,0))
.S %CIADIC=$$ROOT^DILFD(%CIADIC)_U_U_%CIADIC
I $P(%CIADIC,U,4)="" D
.S %CIAZ=U_$P(%CIADIC,U,2),%CIAZ=$E(%CIAZ,1,$L(%CIAZ)-1),%CIAZ=%CIAZ_$S(%CIAZ["(":")",1:"")
.S $P(%CIADIC,U,4)=$P(@%CIAZ@(0),U,2)
F %CIAN1=1:1:$L(%CIACMD,"|") S %CIAARG=$P(%CIACMD,"|",%CIAN1),%CIAZ=$E(%CIAARG) D Q:%CIAIEN<0
.S %CIAN2=$F("-+=@><~?%",%CIAZ)
.S:%CIAN2 %CIAN2=%CIAN2-1,%CIAARG=$E(%CIAARG,2,999)
.D DA,@%CIAN2
.S:%CIAIEN>0 $P(%CIADIC,U,3)=%CIAIEN
S $P(%CIADIC,U)=%CIAIEN
Q %CIADIC
; Set IEN
0 S:%CIAARG'<0 %CIAIEN=$S($D(@%CIADIC(2)@(+%CIAARG)):+%CIAARG,1:0),$P(%CIADIC,U,3)=%CIAIEN
Q
; Move up to parent file
1 N %CIAX,%CIAY
S $P(%CIADIC,U,4)=$P($P(%CIADIC,U,4),"|",2,999)
S %CIAY=$P(%CIADIC,U,2),%CIAX=$L(%CIAY,"|"),$P(%CIADIC,U,2)=$P(%CIAY,"|",1,%CIAX-1)
S %CIAIEN=+$P(%CIAY,"|",%CIAX),$P(%CIADIC,U,3)=%CIAIEN
D DA
Q
; Move down to subfile
2 N %CIAX,%CIAY,%CIAZ
I $P(%CIADIC,U,3)'>0 S %CIAIEN=-1 Q
S %CIAY=+$P(%CIADIC,U,4)
S:%CIAARG'=+%CIAARG %CIAARG=+$O(^DD(%CIAY,"B",%CIAARG,0)),%CIAARG=+$P($G(^DD(%CIAY,%CIAARG,0)),U,2)
S %CIAX=+%CIAARG,%CIAZ=+$O(^DD(%CIAY,"SB",%CIAX,0)),%CIAZ=$P($P(^DD(%CIAY,%CIAZ,0),U,4),";"),%CIAX=$P(^(0),U,2)
S:%CIAZ'=+%CIAZ %CIAZ=""""_%CIAZ_""""
S $P(%CIADIC,U,4)=%CIAX_"|"_$P(%CIADIC,U,4),$P(%CIADIC,U,2)=$P(%CIADIC,U,2)_"|"_$P(%CIADIC,U,3)_","_%CIAZ_","
S %CIAIEN="",$P(%CIADIC,U,3)=""
D DA
Q
; Lookup an entry
3 N X,Y
I %CIAARG[";" S DIC(0)=$P(%CIAARG,";"),%CIAARG=$P(%CIAARG,";",2,999)
E S DIC(0)="XMF"
S DIC=%CIADIC(1),X=%CIAARG
D ^DIC
S %CIAIEN=+Y
Q
; Delete an entry
4 N X,Y
S:%CIAARG DA=%CIAARG
S DIK=%CIADIC(1),%CIAIEN=0
D ^DIK
Q
; Extract data
5 N %CIAZ,%CIAZ1,%CIAX,%CIAY
I '%CIAIEN S %CIAIEN=-1 Q
S DR=""
F %CIAX=2:1:$L(%CIAARG,";") D
.S %CIAY=$P(%CIAARG,";",%CIAX)
.I %CIAY["=" S %CIAZ=$$FLD($P(%CIAY,"=",2)),%CIAZ1(%CIAZ,$P(%CIAY,"="))="",%CIAY=%CIAZ
.S DR=DR_$S($L(DR):";",1:"")_%CIAY
S DIC=%CIADIC(1),DIQ(0)=$P(%CIAARG,";")
S:DIQ(0)="" DIQ(0)="E"
K ^UTILITY("DIQ1",$J)
D
.N X,Y
.D EN^DIQ1
F %CIAX=0:0 S %CIAX=$O(%CIAZ1(%CIAX)),%CIAZ="" Q:'%CIAX D
.F S %CIAZ=$O(%CIAZ1(%CIAX,%CIAZ)),%CIAZ1="" Q:%CIAZ="" D
..F %CIAY="E","I" D
...S:$D(^UTILITY("DIQ1",$J,+$P(%CIADIC,U,4),%CIAIEN,%CIAX,%CIAY)) %CIAZ1=%CIAZ1_$S($L(%CIAZ1):U,1:"")_^(%CIAY)
..S @%CIAZ=%CIAZ1
Q
; Edit existing entry
6 S DIC(0)=$P(%CIAARG,";"),DIC("P")=$P($P(%CIADIC,U,4),"|"),%CIAARG=$P(%CIAARG,";",2,999)
I %CIAIEN'>0 S %CIAIEN=-1 Q
S DIE=%CIADIC(1),DR=%CIAARG
L +@%CIADIC(2)@(%CIAIEN):$S(DIC(0)["!":9999999,1:0)
E S %CIAIEN=-2 Q
D ^DIE
L -@%CIADIC(2)@(%CIAIEN)
S %CIAIEN=+$G(DA)
Q
; Create new entry
7 N X,Y,DD,DO,DLAYGO
S DIC=%CIADIC(1),DIC(0)=$P(%CIAARG,";")_"L",DIC("P")=$P($P(%CIADIC,U,4),"|"),Y=$P(%CIAARG,";",2),%CIAARG=DIC(0)_";"_$P(%CIAARG,";",3,999),DLAYGO=DIC("P")\1
I +Y'=.01 S %CIAIEN=-1 Q
S X=$P(Y,"/",4)
S:X="" X=$P(Y,"/",5)
X:$E(X)=U $E(X,2,999)
I $P(^DD(+DIC("P"),.01,0),U,2)["W" D
.D WP
E D ^DIC:DIC(0)'["U",FILE^DICN:DIC(0)["U"
S %CIAIEN=+Y
I %CIAIEN>0,$P(%CIAARG,";",2,99)'="" D DA,6
K DINUM
Q
8 ; Lookup entry
N %CIAOPT,%CIAP,CIAFN
S %CIAOPT=$P(%CIAARG,";"),%CIAARG=$P(%CIAARG,";",2,999),CIAFN=+$P(%CIADIC,U,4)
S %CIAP=+$P(%CIADIC,U,4),%CIAP=$P($G(^DD(%CIAP,.01,0)),U)
S:$L(%CIAP) %CIAP=%CIAP_": "
S %CIAIEN=$$ENTRY^CIAULKP(%CIADIC(2),%CIAOPT,%CIAP,"",%CIAARG,"","",$X,$Y,"","","HLP^CIAUDIC")
Q
; Force DINUM
9 S DINUM=%CIAARG
Q
HLP W $G(^DD(+CIAFN,.01,3)),!
Q
; Word processing field (special case of #7)
WP N %CIAZ,%CIAZ1
I X="@" D
.K @%CIADIC(2)
.S Y=0
E D
.S %CIAZ=$G(@%CIADIC(2)@(0)),Y=$G(DINUM,1+$O(^($C(1)),-1))
.S %CIAZ1=+$P(%CIAZ,U,4),%CIAZ=+$P(%CIAZ,U,3)
.S:Y>%CIAZ %CIAZ=Y
.S:'$D(^(Y)) %CIAZ1=%CIAZ1+1
.S ^(0)=U_U_%CIAZ_U_%CIAZ1_U_$G(DT),^(Y,0)=X
Q:$P(^DD(+DIC("P"),.01,0),U,2)'["a"
S %CIAIEN=Y
D DA,WPAUDIT^CCCODAUD(+DIC("P"),.DA,X,"")
Q
; Trap unexpected error
ERROR S $P(%CIADIC,U)=-3
Q %CIADIC
; Return field #
FLD(X) Q $S(X=+X:X,1:+$O(^DD(+$P(%CIADIC,U,4),"B",X,0)))
; Set up DA array
DA N %CIAZ,%CIAZ1,%CIAZ2
K DA
S:'$G(%CIAIEN) %CIAIEN=$P(%CIADIC,U,3)
S %CIAZ=$P(%CIADIC,U,2),%CIAZ2=$L(%CIAZ,"|"),DA=%CIAIEN
F %CIAZ1=2:1:%CIAZ2 S DA(%CIAZ2-%CIAZ1+1)=+$P(%CIAZ,"|",%CIAZ1)
S %CIADIC(1)=U_$TR($P(%CIADIC,U,2),"|"),%CIADIC(2)=$E(%CIADIC(1),1,$L(%CIADIC(1))-1),%CIADIC(2)=%CIADIC(2)_$S(%CIADIC(2)["(":")",1:"")
Q
CIAUDIC ;MSC/IND/DKM - Encapsulated FileMan API;15-Feb-2007 10:32;DKM
+1 ;;1.2;CIA UTILITIES;;Mar 20, 2007
+2 ;;Copyright 2000-2006, Medsphere Systems Corporation
+3 ;=================================================================
+4 ; Parameterized routine to add/edit/extract an entry in a
+5 ; FileMan file. Encapsulates global structure info so no
+6 ; need to specify this directly.
+7 ; Inputs:
+8 ; %CIADIC = Global root, file number, or bookmark
+9 ; %CIACMD = n : IEN of entry to process
+10 ; 0 : Process last IEN referenced
+11 ; +n : Move down to subfile n
+12 ; - : Move up to parent file
+13 ; @n : Delete IEN #n (or last referenced if missing)
+14 ; =x;y : Lookup y at current level using options in x
+15 ; ?x;y ; Lookup y using CIAULKP utility with options in x
+16 ; >x;y : Read fields specified in y using options in x
+17 ; <x;y : Write fields specified in y using options in x
+18 ; ~x;y : Same as <, but creates new entry
+19 ; %n : Force DINUM to n
+20 ; Outputs:
+21 ; Returns in the first piece the IEN of the entry or...
+22 ; 0 = Entry was deleted
+23 ; -1 = Entry was rejected
+24 ; -2 = Entry locked by another process
+25 ; -3 = Unexpected error
+26 ;=================================================================
ENTRY(%CIADIC,%CIACMD) ;
+1 SET %CIADIC(0)=+$GET(DUZ)
+2 NEW DUZ,DIC,DINUM,DIE,DIQ,DIQUIET,DIK,%CIAX,%CIAIEN,%CIAARG,%CIAN1,%CIAN2,%CIAZ,X,Y
+3 NEW DA,DC,DD,DG,DH,DK,DL,DO,DQ,DR,DU,DV,DW,DY
+4 SET DUZ=%CIADIC(0)
SET DUZ(0)="@"
SET @$$TRAP^CIAUOS("ERROR^CIAUDIC")
SET %CIACMD=$GET(%CIACMD)
SET %CIAIEN=""
SET DIQUIET=1
+5 ; Build the bookmark if a global reference or file # passed
+6 IF %CIADIC'[U
Begin DoDot:1
+7 IF %CIADIC'=+%CIADIC
SET %CIADIC=+$ORDER(^DIC("B",%CIADIC,0))
+8 SET %CIADIC=$$ROOT^DILFD(%CIADIC)_U_U_%CIADIC
End DoDot:1
+9 IF $PIECE(%CIADIC,U,4)=""
Begin DoDot:1
+10 SET %CIAZ=U_$PIECE(%CIADIC,U,2)
SET %CIAZ=$EXTRACT(%CIAZ,1,$LENGTH(%CIAZ)-1)
SET %CIAZ=%CIAZ_$SELECT(%CIAZ["(":")",1:"")
+11 SET $PIECE(%CIADIC,U,4)=$PIECE(@%CIAZ@(0),U,2)
End DoDot:1
+12 FOR %CIAN1=1:1:$LENGTH(%CIACMD,"|")
SET %CIAARG=$PIECE(%CIACMD,"|",%CIAN1)
SET %CIAZ=$EXTRACT(%CIAARG)
Begin DoDot:1
+13 SET %CIAN2=$FIND("-+=@><~?%",%CIAZ)
+14 IF %CIAN2
SET %CIAN2=%CIAN2-1
SET %CIAARG=$EXTRACT(%CIAARG,2,999)
+15 DO DA
DO @%CIAN2
+16 IF %CIAIEN>0
SET $PIECE(%CIADIC,U,3)=%CIAIEN
End DoDot:1
IF %CIAIEN<0
QUIT
+17 SET $PIECE(%CIADIC,U)=%CIAIEN
+18 QUIT %CIADIC
+19 ; Set IEN
0 IF %CIAARG'<0
SET %CIAIEN=$SELECT($DATA(@%CIADIC(2)@(+%CIAARG)):+%CIAARG,1:0)
SET $PIECE(%CIADIC,U,3)=%CIAIEN
+1 QUIT
+2 ; Move up to parent file
1 NEW %CIAX,%CIAY
+1 SET $PIECE(%CIADIC,U,4)=$PIECE($PIECE(%CIADIC,U,4),"|",2,999)
+2 SET %CIAY=$PIECE(%CIADIC,U,2)
SET %CIAX=$LENGTH(%CIAY,"|")
SET $PIECE(%CIADIC,U,2)=$PIECE(%CIAY,"|",1,%CIAX-1)
+3 SET %CIAIEN=+$PIECE(%CIAY,"|",%CIAX)
SET $PIECE(%CIADIC,U,3)=%CIAIEN
+4 DO DA
+5 QUIT
+6 ; Move down to subfile
2 NEW %CIAX,%CIAY,%CIAZ
+1 IF $PIECE(%CIADIC,U,3)'>0
SET %CIAIEN=-1
QUIT
+2 SET %CIAY=+$PIECE(%CIADIC,U,4)
+3 IF %CIAARG'=+%CIAARG
SET %CIAARG=+$ORDER(^DD(%CIAY,"B",%CIAARG,0))
SET %CIAARG=+$PIECE($GET(^DD(%CIAY,%CIAARG,0)),U,2)
+4 SET %CIAX=+%CIAARG
SET %CIAZ=+$ORDER(^DD(%CIAY,"SB",%CIAX,0))
SET %CIAZ=$PIECE($PIECE(^DD(%CIAY,%CIAZ,0),U,4),";")
SET %CIAX=$PIECE(^(0),U,2)
+5 IF %CIAZ'=+%CIAZ
SET %CIAZ=""""_%CIAZ_""""
+6 SET $PIECE(%CIADIC,U,4)=%CIAX_"|"_$PIECE(%CIADIC,U,4)
SET $PIECE(%CIADIC,U,2)=$PIECE(%CIADIC,U,2)_"|"_$PIECE(%CIADIC,U,3)_","_%CIAZ_","
+7 SET %CIAIEN=""
SET $PIECE(%CIADIC,U,3)=""
+8 DO DA
+9 QUIT
+10 ; Lookup an entry
3 NEW X,Y
+1 IF %CIAARG[";"
SET DIC(0)=$PIECE(%CIAARG,";")
SET %CIAARG=$PIECE(%CIAARG,";",2,999)
+2 IF '$TEST
SET DIC(0)="XMF"
+3 SET DIC=%CIADIC(1)
SET X=%CIAARG
+4 DO ^DIC
+5 SET %CIAIEN=+Y
+6 QUIT
+7 ; Delete an entry
4 NEW X,Y
+1 IF %CIAARG
SET DA=%CIAARG
+2 SET DIK=%CIADIC(1)
SET %CIAIEN=0
+3 DO ^DIK
+4 QUIT
+5 ; Extract data
5 NEW %CIAZ,%CIAZ1,%CIAX,%CIAY
+1 IF '%CIAIEN
SET %CIAIEN=-1
QUIT
+2 SET DR=""
+3 FOR %CIAX=2:1:$LENGTH(%CIAARG,";")
Begin DoDot:1
+4 SET %CIAY=$PIECE(%CIAARG,";",%CIAX)
+5 IF %CIAY["="
SET %CIAZ=$$FLD($PIECE(%CIAY,"=",2))
SET %CIAZ1(%CIAZ,$PIECE(%CIAY,"="))=""
SET %CIAY=%CIAZ
+6 SET DR=DR_$SELECT($LENGTH(DR):";",1:"")_%CIAY
End DoDot:1
+7 SET DIC=%CIADIC(1)
SET DIQ(0)=$PIECE(%CIAARG,";")
+8 IF DIQ(0)=""
SET DIQ(0)="E"
+9 KILL ^UTILITY("DIQ1",$JOB)
+10 Begin DoDot:1
+11 NEW X,Y
+12 DO EN^DIQ1
End DoDot:1
+13 FOR %CIAX=0:0
SET %CIAX=$ORDER(%CIAZ1(%CIAX))
SET %CIAZ=""
IF '%CIAX
QUIT
Begin DoDot:1
+14 FOR
SET %CIAZ=$ORDER(%CIAZ1(%CIAX,%CIAZ))
SET %CIAZ1=""
IF %CIAZ=""
QUIT
Begin DoDot:2
+15 FOR %CIAY="E","I"
Begin DoDot:3
+16 IF $DATA(^UTILITY("DIQ1",$JOB,+$PIECE(%CIADIC,U,4),%CIAIEN,%CIAX,%CIAY))
SET %CIAZ1=%CIAZ1_$SELECT($LENGTH(%CIAZ1):U,1:"")_^(%CIAY)
End DoDot:3
+17 SET @%CIAZ=%CIAZ1
End DoDot:2
End DoDot:1
+18 QUIT
+19 ; Edit existing entry
6 SET DIC(0)=$PIECE(%CIAARG,";")
SET DIC("P")=$PIECE($PIECE(%CIADIC,U,4),"|")
SET %CIAARG=$PIECE(%CIAARG,";",2,999)
+1 IF %CIAIEN'>0
SET %CIAIEN=-1
QUIT
+2 SET DIE=%CIADIC(1)
SET DR=%CIAARG
+3 LOCK +@%CIADIC(2)@(%CIAIEN):$SELECT(DIC(0)["!":9999999,1:0)
+4 IF '$TEST
SET %CIAIEN=-2
QUIT
+5 DO ^DIE
+6 LOCK -@%CIADIC(2)@(%CIAIEN)
+7 SET %CIAIEN=+$GET(DA)
+8 QUIT
+9 ; Create new entry
7 NEW X,Y,DD,DO,DLAYGO
+1 SET DIC=%CIADIC(1)
SET DIC(0)=$PIECE(%CIAARG,";")_"L"
SET DIC("P")=$PIECE($PIECE(%CIADIC,U,4),"|")
SET Y=$PIECE(%CIAARG,";",2)
SET %CIAARG=DIC(0)_";"_$PIECE(%CIAARG,";",3,999)
SET DLAYGO=DIC("P")\1
+2 IF +Y'=.01
SET %CIAIEN=-1
QUIT
+3 SET X=$PIECE(Y,"/",4)
+4 IF X=""
SET X=$PIECE(Y,"/",5)
+5 IF $EXTRACT(X)=U
XECUTE $EXTRACT(X,2,999)
+6 IF $PIECE(^DD(+DIC("P"),.01,0),U,2)["W"
Begin DoDot:1
+7 DO WP
End DoDot:1
+8 IF '$TEST
IF DIC(0)'["U"
DO ^DIC
IF DIC(0)["U"
DO FILE^DICN
+9 SET %CIAIEN=+Y
+10 IF %CIAIEN>0
IF $PIECE(%CIAARG,";",2,99)'=""
DO DA
DO 6
+11 KILL DINUM
+12 QUIT
8 ; Lookup entry
+1 NEW %CIAOPT,%CIAP,CIAFN
+2 SET %CIAOPT=$PIECE(%CIAARG,";")
SET %CIAARG=$PIECE(%CIAARG,";",2,999)
SET CIAFN=+$PIECE(%CIADIC,U,4)
+3 SET %CIAP=+$PIECE(%CIADIC,U,4)
SET %CIAP=$PIECE($GET(^DD(%CIAP,.01,0)),U)
+4 IF $LENGTH(%CIAP)
SET %CIAP=%CIAP_": "
+5 SET %CIAIEN=$$ENTRY^CIAULKP(%CIADIC(2),%CIAOPT,%CIAP,"",%CIAARG,"","",$X,$Y,"","","HLP^CIAUDIC")
+6 QUIT
+7 ; Force DINUM
9 SET DINUM=%CIAARG
+1 QUIT
HLP WRITE $GET(^DD(+CIAFN,.01,3)),!
+1 QUIT
+2 ; Word processing field (special case of #7)
WP NEW %CIAZ,%CIAZ1
+1 IF X="@"
Begin DoDot:1
+2 KILL @%CIADIC(2)
+3 SET Y=0
End DoDot:1
+4 IF '$TEST
Begin DoDot:1
+5 SET %CIAZ=$GET(@%CIADIC(2)@(0))
SET Y=$GET(DINUM,1+$ORDER(^($CHAR(1)),-1))
+6 SET %CIAZ1=+$PIECE(%CIAZ,U,4)
SET %CIAZ=+$PIECE(%CIAZ,U,3)
+7 IF Y>%CIAZ
SET %CIAZ=Y
+8 IF '$DATA(^(Y))
SET %CIAZ1=%CIAZ1+1
+9 SET ^(0)=U_U_%CIAZ_U_%CIAZ1_U_$GET(DT)
SET ^(Y,0)=X
End DoDot:1
+10 IF $PIECE(^DD(+DIC("P"),.01,0),U,2)'["a"
QUIT
+11 SET %CIAIEN=Y
+12 DO DA
DO WPAUDIT^CCCODAUD(+DIC("P"),.DA,X,"")
+13 QUIT
+14 ; Trap unexpected error
ERROR SET $PIECE(%CIADIC,U)=-3
+1 QUIT %CIADIC
+2 ; Return field #
FLD(X) QUIT $SELECT(X=+X:X,1:+$ORDER(^DD(+$PIECE(%CIADIC,U,4),"B",X,0)))
+1 ; Set up DA array
DA NEW %CIAZ,%CIAZ1,%CIAZ2
+1 KILL DA
+2 IF '$GET(%CIAIEN)
SET %CIAIEN=$PIECE(%CIADIC,U,3)
+3 SET %CIAZ=$PIECE(%CIADIC,U,2)
SET %CIAZ2=$LENGTH(%CIAZ,"|")
SET DA=%CIAIEN
+4 FOR %CIAZ1=2:1:%CIAZ2
SET DA(%CIAZ2-%CIAZ1+1)=+$PIECE(%CIAZ,"|",%CIAZ1)
+5 SET %CIADIC(1)=U_$TRANSLATE($PIECE(%CIADIC,U,2),"|")
SET %CIADIC(2)=$EXTRACT(%CIADIC(1),1,$LENGTH(%CIADIC(1))-1)
SET %CIADIC(2)=%CIADIC(2)_$SELECT(%CIADIC(2)["(":")",1:"")
+6 QUIT