ESPUCR3 ;DALISC/CKA - UNIFORM CRIME REPORT COUNT AND GET TOTALS- 1/92
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN Q ;CALLED FROM ESPUCR1
RAPE ;RAPE TOTALS
OFFR ; COUNT RAPE OFFENDER AND VICTIMS
S ESPVIC=0
F ESPX=1:1 S ESPVIC=$O(^ESP(912,ESPOFN,30,ESPVIC)) Q:ESPVIC'>0 D
. S ESPVICT=$P(^ESP(912,ESPOFN,30,ESPVIC,0),U,5) D
.. S ^(88)=^ESP(912.4,ESPIEN,1,ESPINS,88)+1
.. I ESPTYPE=38 S ^(89)=^ESP(912.4,ESPIEN,1,ESPINS,89)+1 QUIT
.. I ESPTYPE=39 S ^(90)=^ESP(912.4,ESPIEN,1,ESPINS,90)+1 QUIT
. I ESPVICT="E"!(ESPVICT="PO") S ^(96)=^ESP(912.4,ESPIEN,1,ESPINS,96)+1 QUIT
. I ESPVICT="O" S ^(97)=^ESP(912.4,ESPIEN,1,ESPINS,97)+1 QUIT
. I ESPVICT="P" S ^(98)=^ESP(912.4,ESPIEN,1,ESPINS,98)+1 QUIT
. I ESPVICT="V" S ^(99)=^ESP(912.4,ESPIEN,1,ESPINS,99)+1 QUIT
I $D(^ESP(912,ESPOFN,30)) D OFFE
QUIT
OFFE ;COUNT OFFENDERS FOR RAPE
S ESPOF=0
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 ^(91)=^ESP(912.4,ESPIEN,1,ESPINS,91)+1 QUIT
. I ESPOFF="O" S ^(92)=^ESP(912.4,ESPIEN,1,ESPINS,92)+1 QUIT
. I ESPOFF="P" S ^(93)=^ESP(912.4,ESPIEN,1,ESPINS,93)+1 QUIT
. I ESPOFF="V" S ^(95)=^ESP(912.4,ESPIEN,1,ESPINS,95)+1 QUIT
. S ^(94)=^ESP(912.4,ESPIEN,1,ESPINS,94)+1
QUIT
ROBB ;ROBBERY TOTALS
S ^(100)=^ESP(912.4,ESPIEN,1,ESPINS,100)+1
I ESPTYPE=40 S ^(101)=^ESP(912.4,ESPIEN,1,ESPINS,101)+1 D ARMED,DOL QUIT
I ESPTYPE=41 S ^(104)=^ESP(912.4,ESPIEN,1,ESPINS,104)+1 D STRONG,DOL QUIT
I ESPTYPE=58 S ^(107)=^ESP(912.4,ESPIEN,1,ESPINS,107)+1 D DOL QUIT
QUIT
ARMED ;ARMED ROBBERY TOTALS
I ESPSUB=11 S ^(102)=^ESP(912.4,ESPIEN,1,ESPINS,102)+1 QUIT
I ESPSUB=12 S ^(103)=^ESP(912.4,ESPIEN,1,ESPINS,103)+1 QUIT
QUIT
STRONG ;STRONG ARMED ROBBERY TOTALS
I ESPSUB=13 S ^(105)=^ESP(912.4,ESPIEN,1,ESPINS,105)+1 QUIT
I ESPSUB=14 S ^(106)=^ESP(912.4,ESPIEN,1,ESPINS,106)+1 QUIT
QUIT
DOL ;ADD DOLLAR TOTALS
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,108)=^ESP(912.4,ESPIEN,1,ESPINS,108)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
. S ^ESP(912.4,ESPIEN,1,ESPINS,109)=^ESP(912.4,ESPIEN,1,ESPINS,109)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPUCR3 2268 printed Dec 13, 2024@02:30:50 Page 2
ESPUCR3 ;DALISC/CKA - UNIFORM CRIME REPORT COUNT AND GET TOTALS- 1/92
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CALLED FROM ESPUCR1
QUIT
RAPE ;RAPE TOTALS
OFFR ; COUNT RAPE OFFENDER AND VICTIMS
+1 SET ESPVIC=0
+2 FOR ESPX=1:1
SET ESPVIC=$ORDER(^ESP(912,ESPOFN,30,ESPVIC))
if ESPVIC'>0
QUIT
Begin DoDot:1
+3 SET ESPVICT=$PIECE(^ESP(912,ESPOFN,30,ESPVIC,0),U,5)
Begin DoDot:2
+4 SET ^(88)=^ESP(912.4,ESPIEN,1,ESPINS,88)+1
+5 IF ESPTYPE=38
SET ^(89)=^ESP(912.4,ESPIEN,1,ESPINS,89)+1
QUIT
+6 IF ESPTYPE=39
SET ^(90)=^ESP(912.4,ESPIEN,1,ESPINS,90)+1
QUIT
End DoDot:2
+7 IF ESPVICT="E"!(ESPVICT="PO")
SET ^(96)=^ESP(912.4,ESPIEN,1,ESPINS,96)+1
QUIT
+8 IF ESPVICT="O"
SET ^(97)=^ESP(912.4,ESPIEN,1,ESPINS,97)+1
QUIT
+9 IF ESPVICT="P"
SET ^(98)=^ESP(912.4,ESPIEN,1,ESPINS,98)+1
QUIT
+10 IF ESPVICT="V"
SET ^(99)=^ESP(912.4,ESPIEN,1,ESPINS,99)+1
QUIT
End DoDot:1
+11 IF $DATA(^ESP(912,ESPOFN,30))
DO OFFE
+12 QUIT
OFFE ;COUNT OFFENDERS FOR RAPE
+1 SET ESPOF=0
+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 ^(91)=^ESP(912.4,ESPIEN,1,ESPINS,91)+1
QUIT
+5 IF ESPOFF="O"
SET ^(92)=^ESP(912.4,ESPIEN,1,ESPINS,92)+1
QUIT
+6 IF ESPOFF="P"
SET ^(93)=^ESP(912.4,ESPIEN,1,ESPINS,93)+1
QUIT
+7 IF ESPOFF="V"
SET ^(95)=^ESP(912.4,ESPIEN,1,ESPINS,95)+1
QUIT
+8 SET ^(94)=^ESP(912.4,ESPIEN,1,ESPINS,94)+1
End DoDot:1
+9 QUIT
ROBB ;ROBBERY TOTALS
+1 SET ^(100)=^ESP(912.4,ESPIEN,1,ESPINS,100)+1
+2 IF ESPTYPE=40
SET ^(101)=^ESP(912.4,ESPIEN,1,ESPINS,101)+1
DO ARMED
DO DOL
QUIT
+3 IF ESPTYPE=41
SET ^(104)=^ESP(912.4,ESPIEN,1,ESPINS,104)+1
DO STRONG
DO DOL
QUIT
+4 IF ESPTYPE=58
SET ^(107)=^ESP(912.4,ESPIEN,1,ESPINS,107)+1
DO DOL
QUIT
+5 QUIT
ARMED ;ARMED ROBBERY TOTALS
+1 IF ESPSUB=11
SET ^(102)=^ESP(912.4,ESPIEN,1,ESPINS,102)+1
QUIT
+2 IF ESPSUB=12
SET ^(103)=^ESP(912.4,ESPIEN,1,ESPINS,103)+1
QUIT
+3 QUIT
STRONG ;STRONG ARMED ROBBERY TOTALS
+1 IF ESPSUB=13
SET ^(105)=^ESP(912.4,ESPIEN,1,ESPINS,105)+1
QUIT
+2 IF ESPSUB=14
SET ^(106)=^ESP(912.4,ESPIEN,1,ESPINS,106)+1
QUIT
+3 QUIT
DOL ;ADD DOLLAR TOTALS
+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,108)=^ESP(912.4,ESPIEN,1,ESPINS,108)+$PIECE($GET(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
+4 SET ^ESP(912.4,ESPIEN,1,ESPINS,109)=^ESP(912.4,ESPIEN,1,ESPINS,109)+$PIECE($GET(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
End DoDot:1
+5 QUIT