Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ESPUCD

ESPUCD.m

Go to the documentation of this file.
ESPUCD ;DALISC/CKA - DELETE CRIME STATISTICS- 3/93
 ;;1.0;POLICE & SECURITY;;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.4,",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.4,",DA=ESPIEN,DR=".01;.02",DIQ(0)="E" D EN^DIQ1 I '$D(^UTILITY("DIQ1",$J,912.4,DA)) W !,"RECORD DOESN'T EXIST!" G EX
BDT W !!,"BEGINNING DATE: ",$G(^UTILITY("DIQ1",$J,912.4,DA,.01,"E"))
EDT W !,"ENDING DATE: ",$G(^UTILITY("DIQ1",$J,912.4,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.4,",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