ESPUCR5 ;DALISC/CKA - UNIFORM CRIME REPORT COUNT AND GET TOTALS- 1/92
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN Q ;CALLED FROM ESPUCR1
VAND ;VANDALISM TOTALS
OFFV ; COUNT VANDALISM OFFENDERS
D VDOL S ESPOF=0,^(152)=^ESP(912.4,ESPIEN,1,ESPINS,152)+1
I '$O(^ESP(912,ESPOFN,40,ESPOF)) S ^(156)=^ESP(912.4,ESPIEN,1,ESPINS,156)+1 QUIT
F ESPX=1:1 S ESPOF=$O(^ESP(912,ESPOFN,40,ESPOF)) Q:ESPOF'>0 D
. S ESPOFF=$P(^ESP(912,ESPOFN,40,ESPOF,0),U,11)
. I ESPOFF="E"!(ESPOFF="PO") S ^(153)=^ESP(912.4,ESPIEN,1,ESPINS,153)+1 QUIT
. I ESPOFF="O" S ^(154)=^ESP(912.4,ESPIEN,1,ESPINS,154)+1 QUIT
. I ESPOFF="P" S ^(155)=^ESP(912.4,ESPIEN,1,ESPINS,155)+1 QUIT
. I ESPOFF="V" S ^(157)=^ESP(912.4,ESPIEN,1,ESPINS,157)+1 QUIT
. S ^(156)=^ESP(912.4,ESPIEN,1,ESPINS,156)+1 QUIT
QUIT
VICE ;VICE TOTALS
OFFVIC ; COUNT VICE OFFENDERS
S ESPOF=0,^(159)=^ESP(912.4,ESPIEN,1,ESPINS,159)+1
F ESPX=1:1 S ESPOF=$O(^ESP(912,ESPOFN,40,ESPOF)) Q:ESPOF'>0 D
. S ESPOFF=$P(^ESP(912,ESPOFN,40,ESPOF,0),U,11)
. I ESPOFF="E"!(ESPOFF="PO") S ^(166)=^ESP(912.4,ESPIEN,1,ESPINS,166)+1
. I ESPOFF="O" S ^(167)=^ESP(912.4,ESPIEN,1,ESPINS,167)+1
. I ESPOFF="P" S ^(168)=^ESP(912.4,ESPIEN,1,ESPINS,168)+1
. I ESPOFF="V" S ^(170)=^ESP(912.4,ESPIEN,1,ESPINS,170)+1
. I ESPOFF'="E",ESPOFF'="PO",ESPOFF'="O",ESPOFF'="P",ESPOFF'="V" S ^(169)=^ESP(912.4,ESPIEN,1,ESPINS,170)+1
. I ESPTYPE=50 S ^(160)=^ESP(912.4,ESPIEN,1,ESPINS,160)+1
. I ESPTYPE=51 S ^(161)=^ESP(912.4,ESPIEN,1,ESPINS,161)+1
. I ESPTYPE=52 S ^(162)=^ESP(912.4,ESPIEN,1,ESPINS,162)+1 QUIT
. I ESPTYPE=53 S ^(163)=^ESP(912.4,ESPIEN,1,ESPINS,163)+1 QUIT
. I ESPTYPE=54 S ^(164)=^ESP(912.4,ESPIEN,1,ESPINS,164)+1 QUIT
. I ESPTYPE=55 S ^(165)=^ESP(912.4,ESPIEN,1,ESPINS,165)+1 QUIT
QUIT
VIO ;VIOLATION TOTALS
EX QUIT
VDOL ;VANDALISM DOLLARS
S ESPDOL=0
F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
. S ^ESP(912.4,ESPIEN,1,ESPINS,158)=^ESP(912.4,ESPIEN,1,ESPINS,158)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPUCR5 2032 printed Dec 13, 2024@02:30:52 Page 2
ESPUCR5 ;DALISC/CKA - UNIFORM CRIME REPORT COUNT AND GET TOTALS- 1/92
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CALLED FROM ESPUCR1
QUIT
VAND ;VANDALISM TOTALS
OFFV ; COUNT VANDALISM OFFENDERS
+1 DO VDOL
SET ESPOF=0
SET ^(152)=^ESP(912.4,ESPIEN,1,ESPINS,152)+1
+2 IF '$ORDER(^ESP(912,ESPOFN,40,ESPOF))
SET ^(156)=^ESP(912.4,ESPIEN,1,ESPINS,156)+1
QUIT
+3 FOR ESPX=1:1
SET ESPOF=$ORDER(^ESP(912,ESPOFN,40,ESPOF))
if ESPOF'>0
QUIT
Begin DoDot:1
+4 SET ESPOFF=$PIECE(^ESP(912,ESPOFN,40,ESPOF,0),U,11)
+5 IF ESPOFF="E"!(ESPOFF="PO")
SET ^(153)=^ESP(912.4,ESPIEN,1,ESPINS,153)+1
QUIT
+6 IF ESPOFF="O"
SET ^(154)=^ESP(912.4,ESPIEN,1,ESPINS,154)+1
QUIT
+7 IF ESPOFF="P"
SET ^(155)=^ESP(912.4,ESPIEN,1,ESPINS,155)+1
QUIT
+8 IF ESPOFF="V"
SET ^(157)=^ESP(912.4,ESPIEN,1,ESPINS,157)+1
QUIT
+9 SET ^(156)=^ESP(912.4,ESPIEN,1,ESPINS,156)+1
QUIT
End DoDot:1
+10 QUIT
VICE ;VICE TOTALS
OFFVIC ; COUNT VICE OFFENDERS
+1 SET ESPOF=0
SET ^(159)=^ESP(912.4,ESPIEN,1,ESPINS,159)+1
+2 FOR ESPX=1:1
SET ESPOF=$ORDER(^ESP(912,ESPOFN,40,ESPOF))
if ESPOF'>0
QUIT
Begin DoDot:1
+3 SET ESPOFF=$PIECE(^ESP(912,ESPOFN,40,ESPOF,0),U,11)
+4 IF ESPOFF="E"!(ESPOFF="PO")
SET ^(166)=^ESP(912.4,ESPIEN,1,ESPINS,166)+1
+5 IF ESPOFF="O"
SET ^(167)=^ESP(912.4,ESPIEN,1,ESPINS,167)+1
+6 IF ESPOFF="P"
SET ^(168)=^ESP(912.4,ESPIEN,1,ESPINS,168)+1
+7 IF ESPOFF="V"
SET ^(170)=^ESP(912.4,ESPIEN,1,ESPINS,170)+1
+8 IF ESPOFF'="E"
IF ESPOFF'="PO"
IF ESPOFF'="O"
IF ESPOFF'="P"
IF ESPOFF'="V"
SET ^(169)=^ESP(912.4,ESPIEN,1,ESPINS,170)+1
+9 IF ESPTYPE=50
SET ^(160)=^ESP(912.4,ESPIEN,1,ESPINS,160)+1
+10 IF ESPTYPE=51
SET ^(161)=^ESP(912.4,ESPIEN,1,ESPINS,161)+1
+11 IF ESPTYPE=52
SET ^(162)=^ESP(912.4,ESPIEN,1,ESPINS,162)+1
QUIT
+12 IF ESPTYPE=53
SET ^(163)=^ESP(912.4,ESPIEN,1,ESPINS,163)+1
QUIT
+13 IF ESPTYPE=54
SET ^(164)=^ESP(912.4,ESPIEN,1,ESPINS,164)+1
QUIT
+14 IF ESPTYPE=55
SET ^(165)=^ESP(912.4,ESPIEN,1,ESPINS,165)+1
QUIT
End DoDot:1
+15 QUIT
VIO ;VIOLATION TOTALS
EX QUIT
VDOL ;VANDALISM DOLLARS
+1 SET ESPDOL=0
+2 FOR ESPX=1:1
SET ESPDOL=$ORDER(^ESP(912,ESPOFN,90,ESPDOL))
if ESPDOL'>0
QUIT
Begin DoDot:1
+3 SET ^ESP(912.4,ESPIEN,1,ESPINS,158)=^ESP(912.4,ESPIEN,1,ESPINS,158)+$PIECE($GET(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
End DoDot:1
+4 QUIT