ESPOFFCL ;DALISC/CKA- CLOSE AN OFFENSE REPORT;8/92
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;This routine allows the officer to close an open offense report.
;A report must be completed before it can be closed.
;Program will check if user holds ESP CHIEF key.
; OR for nonholders of the key (will not see confidential reports)
D DT^DICRW
I $D(^XUSEC("ESP CHIEF",DUZ)) G ORC
OR S DIC(0)="QAEMZ",DIC("A")="UOR#: ",DIC("S")="I $D(^(5)),$P(^(5),U,2),'$P(^(5),U,4),$P(^(5),U,5),'($P(^ESP(912,+Y,0),U,8)=""C"")",DIC="^ESP(912,"
D ^DIC
G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
G:Y<0 OR S ESPDTR=$P(^ESP(912,+Y,0),U,2),(ESPID,ESPOFN)=+Y
G CLO
ORC S DIC(0)="QAEMZ",DIC("A")="UOR#: ",DIC("S")="I $D(^(5)),$P(^(5),U,2),$P(^(5),U,5),'($P(^ESP(912,+Y,0),U,8)=""C"")",DIC="^ESP(912,"
D ^DIC
G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
G:Y<0 OR S ESPDTR=$P(^ESP(912,+Y,0),U,2),(ESPID,ESPOFN)=+Y
CLO ;ASK IF WANT TO CLOSE THE REPORT
D CLO1^ESPOFFE
G EXIT
;
OR1 ;ENTRY POINT FOR MAKE A REPORT SENSITIVE
S DIC(0)="AEMZ",DIC("A")="UOR#: ",DIC("S")="I $D(^(5)),$P(^(5),U,2),$P(^(5),U,5)",DIC="^ESP(912,"
D ^DIC
G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
G:Y<0 OR1 S ESPDTR=$P(^ESP(912,+Y,0),U,2),(ESPID,ESPOFN)=+Y
CHK I $P(^ESP(912,ESPOFN,5),U,4) D UNCONF G EXIT
CONF ;MAKE REPORT SENSITIVE
S $P(^ESP(912,ESPOFN,5),U,4)=1
W !!,"The report is now sensitive."
EXIT K DIC,DTOUT,DUOUT,ESPDTR,ESPID,ESPN,ESPOFN,Y Q
UNCONF ;MAKE REPORT NONSENSITIVE
W !!,"This report is now sensitive."
ASK S DIR(0)="Y",DIR("A")="Do you want to make it nonsensitive",DIR("?")="Answer YES or NO.",DIR("??")="Answer NO if you want the report to remain sensitive. Answer YES if you want the report to be nonsensitive."
D ^DIR K DIR
W:$D(DTOUT) $C(7)
Q:'Y!($D(DIRUT))
S $P(^ESP(912,ESPOFN,5),U,4)=0
W !!,"The report is now nonsensitive."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPOFFCL 1843 printed Dec 13, 2024@02:29:54 Page 2
ESPOFFCL ;DALISC/CKA- CLOSE AN OFFENSE REPORT;8/92
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;This routine allows the officer to close an open offense report.
+1 ;A report must be completed before it can be closed.
+2 ;Program will check if user holds ESP CHIEF key.
+3 ; OR for nonholders of the key (will not see confidential reports)
+4 DO DT^DICRW
+5 IF $DATA(^XUSEC("ESP CHIEF",DUZ))
GOTO ORC
OR SET DIC(0)="QAEMZ"
SET DIC("A")="UOR#: "
SET DIC("S")="I $D(^(5)),$P(^(5),U,2),'$P(^(5),U,4),$P(^(5),U,5),'($P(^ESP(912,+Y,0),U,8)=""C"")"
SET DIC="^ESP(912,"
+1 DO ^DIC
+2 if $DATA(DTOUT)!($DATA(DUOUT))!(X="")
GOTO EXIT
+3 if Y<0
GOTO OR
SET ESPDTR=$PIECE(^ESP(912,+Y,0),U,2)
SET (ESPID,ESPOFN)=+Y
+4 GOTO CLO
ORC SET DIC(0)="QAEMZ"
SET DIC("A")="UOR#: "
SET DIC("S")="I $D(^(5)),$P(^(5),U,2),$P(^(5),U,5),'($P(^ESP(912,+Y,0),U,8)=""C"")"
SET DIC="^ESP(912,"
+1 DO ^DIC
+2 if $DATA(DTOUT)!($DATA(DUOUT))!(X="")
GOTO EXIT
+3 if Y<0
GOTO OR
SET ESPDTR=$PIECE(^ESP(912,+Y,0),U,2)
SET (ESPID,ESPOFN)=+Y
CLO ;ASK IF WANT TO CLOSE THE REPORT
+1 DO CLO1^ESPOFFE
+2 GOTO EXIT
+3 ;
OR1 ;ENTRY POINT FOR MAKE A REPORT SENSITIVE
+1 SET DIC(0)="AEMZ"
SET DIC("A")="UOR#: "
SET DIC("S")="I $D(^(5)),$P(^(5),U,2),$P(^(5),U,5)"
SET DIC="^ESP(912,"
+2 DO ^DIC
+3 if $DATA(DTOUT)!($DATA(DUOUT))!(X="")
GOTO EXIT
+4 if Y<0
GOTO OR1
SET ESPDTR=$PIECE(^ESP(912,+Y,0),U,2)
SET (ESPID,ESPOFN)=+Y
CHK IF $PIECE(^ESP(912,ESPOFN,5),U,4)
DO UNCONF
GOTO EXIT
CONF ;MAKE REPORT SENSITIVE
+1 SET $PIECE(^ESP(912,ESPOFN,5),U,4)=1
+2 WRITE !!,"The report is now sensitive."
EXIT KILL DIC,DTOUT,DUOUT,ESPDTR,ESPID,ESPN,ESPOFN,Y
QUIT
UNCONF ;MAKE REPORT NONSENSITIVE
+1 WRITE !!,"This report is now sensitive."
ASK SET DIR(0)="Y"
SET DIR("A")="Do you want to make it nonsensitive"
SET DIR("?")="Answer YES or NO."
SET DIR("??")="Answer NO if you want the report to remain sensitive. Answer YES if you want the report to be nonsensitive."
+1 DO ^DIR
KILL DIR
+2 if $DATA(DTOUT)
WRITE $CHAR(7)
+3 if 'Y!($DATA(DIRUT))
QUIT
+4 SET $PIECE(^ESP(912,ESPOFN,5),U,4)=0
+5 WRITE !!,"The report is now nonsensitive."
+6 QUIT