source: WorldVistAEHR/trunk/r/POLICE_AND_SECURITY-ES/ESPOFFDE.m@ 1693

Last change on this file since 1693 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1ESPOFFDE ;DALISC/CKA- DELETE AN OFFENSE REPORT;8/92
2 ;;1.0;POLICE & SECURITY;40;Mar 31, 1994
3EN ;This program allows a person holding the ESP CHIEF key to delete
4 ;an offense report. The program sets the deleted/reopened flag
5 ;and stores the date/time and user # of the person deleting the
6 ;report. It does not REALLY delete the report; it logically deletes
7 ;the report.
8 ;** The offense report to be deleted *MUST* be closed prior to deleting.
9UOR S DIC(0)="QAEMZ",DIC("A")="UOR#: ",DIC("S")="I $D(^(5)),$P(^(5),U,2),$P(^(5),U,5)",DIC="^ESP(912,"
10 D ^DIC
11 G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
12 G:Y<0 OR
13 I $P(^ESP(912,+Y,0),U,8)'="C" W !,$C(7),"Cannot delete an 'open' UOR#, must close first." G UOR
14 S ESPDTR=$P(^ESP(912,+Y,0),U,2),(ESPID,ESPOFN)=+Y
15ASK S DIR(0)="Y",DIR("A")="Are you sure you want to delete this offense report",DIR("B")="NO" D ^DIR K DIR
16 G:$D(DTOUT) EXIT
17 G:'Y EXIT
18DEL ;DELETE REPORT
19 D NOW^%DTC S ESPNOW=%
20 S $P(^ESP(912,ESPOFN,5),U,5)="D",$P(^(5),U,6)=ESPNOW,$P(^(5),U,7)=DUZ
21 W !!,"The report is deleted."
22EXIT W:$D(DTOUT) $C(7)
23 K DIC,DTOUT,DUOUT,ESPDTR,ESPID,ESPN,ESPNOW,ESPOFN,Y Q
24OR W !,$C(7),"I could not find this UOR#. Try again."
25 G UOR
26 QUIT
Note: See TracBrowser for help on using the repository browser.