ESPUCFD ;DALISC/CKA - DELETE CRIME STATISTICS- 3/99
;;1.0;POLICE & SECURITY;**27**;Mar 31, 1994
START ;
I '$D(DUZ(2)) W !,"Site # is not defined!" G EX
DATE ;ASK BEGINNING DATE
D DT^DICRW K BEGDATE
BEG ;ASK FOR CRIME DATA DATE TO DELETE
S DIC="^ESP(912.3,",DIC(0)="AEMQ",DIC("A")=" Beginning DATE of Report to Delete : " D ^DIC
I Y<0 G EX
S ESPIEN=+Y
PRT ;PRINT BEGINNING AND ENDING DATE
S DIC="^ESP(912.3,",DA=ESPIEN,DR=".01;.02",DIQ(0)="E" D EN^DIQ1 I '$D(^UTILITY("DIQ1",$J,912.3,DA)) W !,"RECORD DOESN'T EXIST!" G EX
BDT W !!,"BEGINNING DATE: ",$G(^UTILITY("DIQ1",$J,912.3,DA,.01,"E"))
EDT W !,"ENDING DATE: ",$G(^UTILITY("DIQ1",$J,912.3,DA,.02,"E")),!!
ASK S DIR(0)="Y",DIR("A")="Are you sure you want to delete these statistics",DIR("B")="NO" D ^DIR K DIR W !!
I 'Y G EX
DEL ;DIK CALL TO DELETE
S DIK="^ESP(912.3,",DA=ESPIEN D ^DIK W !,"Deleted"
EX W:$D(DTOUT) $C(7)
K BEGDATE,DA,DIC,DIK,DIQ,DIR,DR,DTOUT,ESPIEN,Y,^UTILITY("DIQ1",$J)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPUCFD 975 printed Dec 13, 2024@02:30:28 Page 2
ESPUCFD ;DALISC/CKA - DELETE CRIME STATISTICS- 3/99
+1 ;;1.0;POLICE & SECURITY;**27**;Mar 31, 1994
START ;
+1 IF '$DATA(DUZ(2))
WRITE !,"Site # is not defined!"
GOTO EX
DATE ;ASK BEGINNING DATE
+1 DO DT^DICRW
KILL BEGDATE
BEG ;ASK FOR CRIME DATA DATE TO DELETE
+1 SET DIC="^ESP(912.3,"
SET DIC(0)="AEMQ"
SET DIC("A")=" Beginning DATE of Report to Delete : "
DO ^DIC
+2 IF Y<0
GOTO EX
+3 SET ESPIEN=+Y
PRT ;PRINT BEGINNING AND ENDING DATE
+1 SET DIC="^ESP(912.3,"
SET DA=ESPIEN
SET DR=".01;.02"
SET DIQ(0)="E"
DO EN^DIQ1
IF '$DATA(^UTILITY("DIQ1",$JOB,912.3,DA))
WRITE !,"RECORD DOESN'T EXIST!"
GOTO EX
BDT WRITE !!,"BEGINNING DATE: ",$GET(^UTILITY("DIQ1",$JOB,912.3,DA,.01,"E"))
EDT WRITE !,"ENDING DATE: ",$GET(^UTILITY("DIQ1",$JOB,912.3,DA,.02,"E")),!!
ASK SET DIR(0)="Y"
SET DIR("A")="Are you sure you want to delete these statistics"
SET DIR("B")="NO"
DO ^DIR
KILL DIR
WRITE !!
+1 IF 'Y
GOTO EX
DEL ;DIK CALL TO DELETE
+1 SET DIK="^ESP(912.3,"
SET DA=ESPIEN
DO ^DIK
WRITE !,"Deleted"
EX if $DATA(DTOUT)
WRITE $CHAR(7)
+1 KILL BEGDATE,DA,DIC,DIK,DIQ,DIR,DR,DTOUT,ESPIEN,Y,^UTILITY("DIQ1",$JOB)
+2 QUIT