ECDSXREF ;BIR/MAM,RHK-DSS M Cross References (Old Files) ;18 Apr 95
;;2.0; EVENT CAPTURE ;;8 May 96
INACT ; kill 'AP' x-ref for inactivated code
S ECK=$P(^ECK(DA,0),"^"),ECLOC=$P(ECK,"-"),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
K ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECK("APP",ECLOC,ECUNIT,ECPRO,DA)
K ECK,ECCAT,ECLOC,ECPRO,ECUNIT
Q
ACTIV ; set 'AP' x-ref when re-activated
Q:$D(ECCH) S ECK=$P(^ECK(DA,0),"^"),ECLOC=$P(ECK,"-"),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
S ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)="",^ECK("APP",ECLOC,ECUNIT,ECPRO,DA)=""
K ECK,ECCAT,ECLOC,ECPRO,ECUNIT
Q
AC ; set 'AC' x-ref on CATEGORY (Y/N) field in file 720
I X=1 S ^ECP("AC",$P(^ECP(DA,0),"^"),DA)=""
Q
KILLAC ; kill 'AC' x-ref on CATEGORY (Y/N) field in file 720
K ^ECP("AC",$P(^ECP(DA,0),"^"),DA)
Q
AP ; set 'AP' x-ref on EVENT CODE field in file 720.2
Q:$D(ECCH) Q:$P(^ECK(DA,0),"^",2) S ECK=$P(^ECK(DA,0),"^",1),ECLOC=$P(ECK,"-",1),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
S ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)="",^ECK("APP",ECLOC,ECUNIT,ECPRO,DA)=""
K ECLOC,ECUNIT,ECCAT,ECPRO,ECK
Q
KILLAP ; kill 'AP' x-ref on EVENT CODE field in file 720.2
S ECK=$P(^ECK(DA,0),"^",1),ECLOC=$P(ECK,"-",1),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
K ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECK("APP",ECLOC,ECUNIT,ECPRO,DA),ECLOC,ECCAT,ECPRO,ECUNIT,ECK
Q
ACC ; set 'ACC' x-ref on COST CENTER field in file 49
S ^DIC(49,"ACC",+X,DA)=""
Q
KILLACC ; kill 'ACC' x-ref on COST CENTER field in file 49
K ^DIC(49,"ACC",+X,DA)
Q
AST ; set AST cross reference on .01 field of 720.2
S ECLOC=$P($P(^ECK(DA,0),"^"),"-"),^ECK("AST",ECLOC,DA)="" K ECLOC Q
;
KAST ; kill AST cross reference on.01 field of 702.2
S ECLOC=$P($P(^ECK(DA,0),"^"),"-") K ^ECK("AST",ECLOC,DA),ECLOC Q
;
QUIT R !,"Enter ^ to quit or return to continue : ",ECZ:DTIME W ! I '$T!(ECZ["^") S ECQT=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECDSXREF 1986 printed Dec 13, 2024@01:57:16 Page 2
ECDSXREF ;BIR/MAM,RHK-DSS M Cross References (Old Files) ;18 Apr 95
+1 ;;2.0; EVENT CAPTURE ;;8 May 96
INACT ; kill 'AP' x-ref for inactivated code
+1 SET ECK=$PIECE(^ECK(DA,0),"^")
SET ECLOC=$PIECE(ECK,"-")
SET ECUNIT=$PIECE(ECK,"-",2)
SET ECCAT=$PIECE(ECK,"-",3)
SET ECPRO=$PIECE(ECK,"-",4)
+2 KILL ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECK("APP",ECLOC,ECUNIT,ECPRO,DA)
+3 KILL ECK,ECCAT,ECLOC,ECPRO,ECUNIT
+4 QUIT
ACTIV ; set 'AP' x-ref when re-activated
+1 if $DATA(ECCH)
QUIT
SET ECK=$PIECE(^ECK(DA,0),"^")
SET ECLOC=$PIECE(ECK,"-")
SET ECUNIT=$PIECE(ECK,"-",2)
SET ECCAT=$PIECE(ECK,"-",3)
SET ECPRO=$PIECE(ECK,"-",4)
+2 SET ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)=""
SET ^ECK("APP",ECLOC,ECUNIT,ECPRO,DA)=""
+3 KILL ECK,ECCAT,ECLOC,ECPRO,ECUNIT
+4 QUIT
AC ; set 'AC' x-ref on CATEGORY (Y/N) field in file 720
+1 IF X=1
SET ^ECP("AC",$PIECE(^ECP(DA,0),"^"),DA)=""
+2 QUIT
KILLAC ; kill 'AC' x-ref on CATEGORY (Y/N) field in file 720
+1 KILL ^ECP("AC",$PIECE(^ECP(DA,0),"^"),DA)
+2 QUIT
AP ; set 'AP' x-ref on EVENT CODE field in file 720.2
+1 if $DATA(ECCH)
QUIT
if $PIECE(^ECK(DA,0),"^",2)
QUIT
SET ECK=$PIECE(^ECK(DA,0),"^",1)
SET ECLOC=$PIECE(ECK,"-",1)
SET ECUNIT=$PIECE(ECK,"-",2)
SET ECCAT=$PIECE(ECK,"-",3)
SET ECPRO=$PIECE(ECK,"-",4)
+2 SET ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)=""
SET ^ECK("APP",ECLOC,ECUNIT,ECPRO,DA)=""
+3 KILL ECLOC,ECUNIT,ECCAT,ECPRO,ECK
+4 QUIT
KILLAP ; kill 'AP' x-ref on EVENT CODE field in file 720.2
+1 SET ECK=$PIECE(^ECK(DA,0),"^",1)
SET ECLOC=$PIECE(ECK,"-",1)
SET ECUNIT=$PIECE(ECK,"-",2)
SET ECCAT=$PIECE(ECK,"-",3)
SET ECPRO=$PIECE(ECK,"-",4)
+2 KILL ^ECK("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECK("APP",ECLOC,ECUNIT,ECPRO,DA),ECLOC,ECCAT,ECPRO,ECUNIT,ECK
+3 QUIT
ACC ; set 'ACC' x-ref on COST CENTER field in file 49
+1 SET ^DIC(49,"ACC",+X,DA)=""
+2 QUIT
KILLACC ; kill 'ACC' x-ref on COST CENTER field in file 49
+1 KILL ^DIC(49,"ACC",+X,DA)
+2 QUIT
AST ; set AST cross reference on .01 field of 720.2
+1 SET ECLOC=$PIECE($PIECE(^ECK(DA,0),"^"),"-")
SET ^ECK("AST",ECLOC,DA)=""
KILL ECLOC
QUIT
+2 ;
KAST ; kill AST cross reference on.01 field of 702.2
+1 SET ECLOC=$PIECE($PIECE(^ECK(DA,0),"^"),"-")
KILL ^ECK("AST",ECLOC,DA),ECLOC
QUIT
+2 ;
QUIT READ !,"Enter ^ to quit or return to continue : ",ECZ:DTIME
WRITE !
IF '$TEST!(ECZ["^")
SET ECQT=1
+1 QUIT