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

ESPOFFDE.m

Go to the documentation of this file.
  1. ESPOFFDE ;DALISC/CKA- DELETE AN OFFENSE REPORT;8/92
  1. ;;1.0;POLICE & SECURITY;40;Mar 31, 1994
  1. EN ;This program allows a person holding the ESP CHIEF key to delete
  1. ;an offense report. The program sets the deleted/reopened flag
  1. ;and stores the date/time and user # of the person deleting the
  1. ;report. It does not REALLY delete the report; it logically deletes
  1. ;the report.
  1. ;** The offense report to be deleted *MUST* be closed prior to deleting.
  1. UOR S DIC(0)="QAEMZ",DIC("A")="UOR#: ",DIC("S")="I $D(^(5)),$P(^(5),U,2),$P(^(5),U,5)",DIC="^ESP(912,"
  1. D ^DIC
  1. G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
  1. G:Y<0 OR
  1. I $P(^ESP(912,+Y,0),U,8)'="C" W !,$C(7),"Cannot delete an 'open' UOR#, must close first." G UOR
  1. S ESPDTR=$P(^ESP(912,+Y,0),U,2),(ESPID,ESPOFN)=+Y
  1. ASK S DIR(0)="Y",DIR("A")="Are you sure you want to delete this offense report",DIR("B")="NO" D ^DIR K DIR
  1. G:$D(DTOUT) EXIT
  1. G:'Y EXIT
  1. DEL ;DELETE REPORT
  1. D NOW^%DTC S ESPNOW=%
  1. S $P(^ESP(912,ESPOFN,5),U,5)="D",$P(^(5),U,6)=ESPNOW,$P(^(5),U,7)=DUZ
  1. W !!,"The report is deleted."
  1. EXIT W:$D(DTOUT) $C(7)
  1. K DIC,DTOUT,DUOUT,ESPDTR,ESPID,ESPN,ESPNOW,ESPOFN,Y Q
  1. OR W !,$C(7),"I could not find this UOR#. Try again."
  1. G UOR
  1. QUIT