ECDSREF ;BIR/MAM/RHK,JPW-DSS MUMPS Cross References ;6 May 95
;;2.0; EVENT CAPTURE ;;8 May 96
INACT ; kill 'AP' x-ref for inactivated code
S ECK=$P(^ECJ(DA,0),"^"),ECLOC=$P(ECK,"-"),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
K ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECJ("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(^ECJ(DA,0),"^"),ECLOC=$P(ECK,"-"),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
S ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)="",^ECJ("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.3
Q:$D(ECCH) S ECK=$P(^ECJ(DA,0),"^",1),ECLOC=$P(ECK,"-",1),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
S ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)="",^ECJ("APP",ECLOC,ECUNIT,ECPRO,DA)=""
K ECLOC,ECUNIT,ECCAT,ECPRO,ECK
Q
KILLAP ; kill 'AP' x-ref on EVENT CODE field in file 720.3
S ECK=$P(^ECJ(DA,0),"^",1),ECLOC=$P(ECK,"-",1),ECUNIT=$P(ECK,"-",2),ECCAT=$P(ECK,"-",3),ECPRO=$P(ECK,"-",4)
K ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECJ("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.3
S ECLOC=$P($P(^ECJ(DA,0),"^"),"-"),^ECJ("AST",ECLOC,DA)="" K ECLOC Q
;
KAST ; kill AST cross reference on.01 field of 702.3
S ECLOC=$P($P(^ECJ(DA,0),"^"),"-") K ^ECJ("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[HECDSREF 1956 printed Nov 22, 2024@17:07:16 Page 2
ECDSREF ;BIR/MAM/RHK,JPW-DSS MUMPS Cross References ;6 May 95
+1 ;;2.0; EVENT CAPTURE ;;8 May 96
INACT ; kill 'AP' x-ref for inactivated code
+1 SET ECK=$PIECE(^ECJ(DA,0),"^")
SET ECLOC=$PIECE(ECK,"-")
SET ECUNIT=$PIECE(ECK,"-",2)
SET ECCAT=$PIECE(ECK,"-",3)
SET ECPRO=$PIECE(ECK,"-",4)
+2 KILL ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECJ("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(^ECJ(DA,0),"^")
SET ECLOC=$PIECE(ECK,"-")
SET ECUNIT=$PIECE(ECK,"-",2)
SET ECCAT=$PIECE(ECK,"-",3)
SET ECPRO=$PIECE(ECK,"-",4)
+2 SET ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)=""
SET ^ECJ("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.3
+1 if $DATA(ECCH)
QUIT
SET ECK=$PIECE(^ECJ(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 ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA)=""
SET ^ECJ("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.3
+1 SET ECK=$PIECE(^ECJ(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 ^ECJ("AP",ECLOC,ECUNIT,ECCAT,ECPRO,DA),^ECJ("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.3
+1 SET ECLOC=$PIECE($PIECE(^ECJ(DA,0),"^"),"-")
SET ^ECJ("AST",ECLOC,DA)=""
KILL ECLOC
QUIT
+2 ;
KAST ; kill AST cross reference on.01 field of 702.3
+1 SET ECLOC=$PIECE($PIECE(^ECJ(DA,0),"^"),"-")
KILL ^ECJ("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