ESPUCP ;DALISC/CKA -PRINT UNIFORM CRIME REPORT- 3/93
;;1.0;POLICE & SECURITY;**11**;Mar 31, 1994
EN ;
I '$D(DUZ(2)) W !,"Site # is not defined!" G EX
DATE ;ASK BEGINNING DATE
D DT^DICRW K BEGDATE
ASK ;ASK FOR CRIME DATA DATE TO PRINT
S DIC="^ESP(912.4,",DIC(0)="AEMQ",DIC("A")=" Beginning DATE of Report to Print : " D ^DIC
I Y<0 G EX
S ESPIEN=+Y
PRT ;PRINT REPORT
Q S %ZIS="Q" D ^%ZIS G:POP EX I '$D(IO("Q")) U IO D START G EX
S ZTRTN="START^ESPUCP",ZTSAVE("ESP*")="",ZTDESC="UNIFORM CRIME REPORT" D ^%ZTLOAD,HOME^%ZIS G EX
START ; BEGINS THE PRINT OF THIS CRIME REPORT
K ^UTILITY("DIQ1",$J) S (END,PAGE)=0 D HDR G:END EX
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 ?45,"BEGINNING DATE: ",$G(^UTILITY("DIQ1",$J,912.4,DA,.01,"E"))
EDT W !,"Date/Time Printed",?45,"ENDING DATE: ",$G(^UTILITY("DIQ1",$J,912.4,DA,.02,"E"))
D NOW^%DTC S Y=% X ^DD("DD") W !,$P(Y,":",1,2)
F ESPN=0:0 S ESPN=$O(^ESP(912.4,ESPIEN,1,ESPN)) Q:ESPN'>0 D PRT^ESPUCP1
W !!,"Done."
QUIT
EX D ^%ZISC
K %ZIS,BEGDATE,DA,DIC,DIQ,DR,END,ESPIEN,ESPN,PAGE,TOT,X,Y,^UTILITY("DIQ1",$J)
QUIT
HDR ;PRINT HEADING
I $E(IOST,1,2)="C-" W !,"Press RETURN to continue or '^' to exit: " R X:DTIME S END='$T!(X="^") Q:END
S PAGE=PAGE+1 W @IOF,!?25,"DEPARTMENT OF VETERANS AFFAIRS",?70,"PAGE ",$J(PAGE,3)
W !?35,"VA POLICE",!?33,"UNIFORM CRIME REPORT"
W !!,"VA Facility ",$P(^ESP(912.4,ESPIEN,1,1,0),U)
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPUCP 1506 printed Nov 22, 2024@17:40:42 Page 2
ESPUCP ;DALISC/CKA -PRINT UNIFORM CRIME REPORT- 3/93
+1 ;;1.0;POLICE & SECURITY;**11**;Mar 31, 1994
EN ;
+1 IF '$DATA(DUZ(2))
WRITE !,"Site # is not defined!"
GOTO EX
DATE ;ASK BEGINNING DATE
+1 DO DT^DICRW
KILL BEGDATE
ASK ;ASK FOR CRIME DATA DATE TO PRINT
+1 SET DIC="^ESP(912.4,"
SET DIC(0)="AEMQ"
SET DIC("A")=" Beginning DATE of Report to Print : "
DO ^DIC
+2 IF Y<0
GOTO EX
+3 SET ESPIEN=+Y
PRT ;PRINT REPORT
Q SET %ZIS="Q"
DO ^%ZIS
if POP
GOTO EX
IF '$DATA(IO("Q"))
USE IO
DO START
GOTO EX
+1 SET ZTRTN="START^ESPUCP"
SET ZTSAVE("ESP*")=""
SET ZTDESC="UNIFORM CRIME REPORT"
DO ^%ZTLOAD
DO HOME^%ZIS
GOTO EX
START ; BEGINS THE PRINT OF THIS CRIME REPORT
+1 KILL ^UTILITY("DIQ1",$JOB)
SET (END,PAGE)=0
DO HDR
if END
GOTO EX
+2 SET DIC="^ESP(912.4,"
SET DA=ESPIEN
SET DR=".01;.02"
SET DIQ(0)="E"
DO EN^DIQ1
IF '$DATA(^UTILITY("DIQ1",$JOB,912.4,DA))
WRITE !,"RECORD DOESN'T EXIST!"
GOTO EX
BDT WRITE ?45,"BEGINNING DATE: ",$GET(^UTILITY("DIQ1",$JOB,912.4,DA,.01,"E"))
EDT WRITE !,"Date/Time Printed",?45,"ENDING DATE: ",$GET(^UTILITY("DIQ1",$JOB,912.4,DA,.02,"E"))
+1 DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
WRITE !,$PIECE(Y,":",1,2)
+2 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912.4,ESPIEN,1,ESPN))
if ESPN'>0
QUIT
DO PRT^ESPUCP1
+3 WRITE !!,"Done."
+4 QUIT
EX DO ^%ZISC
+1 KILL %ZIS,BEGDATE,DA,DIC,DIQ,DR,END,ESPIEN,ESPN,PAGE,TOT,X,Y,^UTILITY("DIQ1",$JOB)
+2 QUIT
HDR ;PRINT HEADING
+1 IF $EXTRACT(IOST,1,2)="C-"
WRITE !,"Press RETURN to continue or '^' to exit: "
READ X:DTIME
SET END='$TEST!(X="^")
if END
QUIT
+2 SET PAGE=PAGE+1
WRITE @IOF,!?25,"DEPARTMENT OF VETERANS AFFAIRS",?70,"PAGE ",$JUSTIFY(PAGE,3)
+3 WRITE !?35,"VA POLICE",!?33,"UNIFORM CRIME REPORT"
+4 WRITE !!,"VA Facility ",$PIECE(^ESP(912.4,ESPIEN,1,1,0),U)
+5 QUIT