source: WorldVistAEHR/trunk/r/POLICE_AND_SECURITY-ES/ESPUCR4.m@ 1006

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

initial load of WorldVistAEHR

File size: 4.9 KB
Line 
1ESPUCR4 ;DALISC/CKA - UNIFORM CRIME REPORT COUNT AND GET TOTALS- 1/92 [8/1/96 7:30am]
2 ;;1.0;POLICE & SECURITY;**12,17,22**;Mar 31, 1994
3EN Q ;CALLED FROM ESPUCR1
4STOP ;STOP & ARRESTS TOTALS
5OFFA ; COUNT PHYSICAL ARREST OFFENDERS
6 S ^(110)=^ESP(912.4,ESPIEN,1,ESPINS,110)+1
7 S ESPOF=0
8 F ESPX=1:1 S ESPOF=$O(^ESP(912,ESPOFN,40,ESPOF)) Q:ESPOF'>0 D
9 . S ESPOFF=$P(^ESP(912,ESPOFN,40,ESPOF,0),U,11) D
10 .. I ESPTYPE=42,$P(^ESP(912,ESPOFN,40,ESPOF,0),U,2) S ^(111)=^ESP(912.4,ESPIEN,1,ESPINS,111)+1 D QUIT
11 ... I ESPOFF="E"!(ESPOFF="PO") S ^(112)=^ESP(912.4,ESPIEN,1,ESPINS,112)+1 QUIT
12 ... I ESPOFF="O" S ^(113)=^ESP(912.4,ESPIEN,1,ESPINS,113)+1 QUIT
13 ... I ESPOFF="P" S ^(114)=^ESP(912.4,ESPIEN,1,ESPINS,114)+1 QUIT
14 ... I ESPOFF="V" S ^(115)=^ESP(912.4,ESPIEN,1,ESPINS,115)+1 QUIT
15 I ESPTYPE=43 S ^(116)=^ESP(912.4,ESPIEN,1,ESPINS,116)+1 D QUIT
16 . I ESPSUB=17 S ^(118)=^ESP(912.4,ESPIEN,1,ESPINS,118)+1 QUIT
17 . I ESPSUB=18 S ^(117)=^ESP(912.4,ESPIEN,1,ESPINS,117)+1 QUIT
18 QUIT
19THEFT ;THEFT TOTALS
20 S ^(119)=^ESP(912.4,ESPIEN,1,ESPINS,119)+1
21 ;COIN-OPERATED MACHINES
22 I ESPTYPE=44 S ^(120)=^ESP(912.4,ESPIEN,1,ESPINS,120)+1 D QUIT
23 . S ESPDOL=0
24 . F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
25 .. S ^ESP(912.4,ESPIEN,1,ESPINS,121)=^ESP(912.4,ESPIEN,1,ESPINS,121)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
26 .. S ^ESP(912.4,ESPIEN,1,ESPINS,122)=^ESP(912.4,ESPIEN,1,ESPINS,122)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
27 ;DRUG THEFTS
28 I ESPTYPE=45 S ^(129)=^ESP(912.4,ESPIEN,1,ESPINS,129)+1 D D DDOL QUIT
29 . I ESPSUB=19 S ^(125)=^ESP(912.4,ESPIEN,1,ESPINS,125)+1,^(123)=^ESP(912.4,ESPIEN,1,ESPINS,123)+1 QUIT
30 . I ESPSUB=21 S ^(126)=^ESP(912.4,ESPIEN,1,ESPINS,126)+1,^(123)=^ESP(912.4,ESPIEN,1,ESPINS,123)+1 QUIT
31 . I ESPSUB=20 S ^(127)=^ESP(912.4,ESPIEN,1,ESPINS,127)+1,^(124)=^ESP(912.4,ESPIEN,1,ESPINS,124)+1 QUIT
32 . I ESPSUB=22 S ^(128)=^ESP(912.4,ESPIEN,1,ESPINS,128)+1,^(124)=^ESP(912.4,ESPIEN,1,ESPINS,124)+1 QUIT
33 ;GOVERNMENT PROPERTY
34 I ESPTYPE=46 S ^(132)=^ESP(912.4,ESPIEN,1,ESPINS,132)+1 D D GDOL QUIT
35 . I ESPSUB=23 S ^(133)=^ESP(912.4,ESPIEN,1,ESPINS,133)+1 QUIT
36 . I ESPSUB=24 S ^(134)=^ESP(912.4,ESPIEN,1,ESPINS,134)+1 QUIT
37 . I ESPSUB=39 S ^(133.1)=^ESP(912.4,ESPIEN,1,ESPINS,133.1)+1 QUIT
38 . I ESPSUB=40 S ^(134.1)=^ESP(912.4,ESPIEN,1,ESPINS,134.1)+1 QUIT
39 ;PERSONAL PROPERTY
40 I ESPTYPE=47 S ^(137)=^ESP(912.4,ESPIEN,1,ESPINS,137)+1 D D PDOL QUIT
41 . I ESPSUB=25 S ^(138)=^ESP(912.4,ESPIEN,1,ESPINS,138)+1 QUIT
42 . I ESPSUB=26 S ^(139)=^ESP(912.4,ESPIEN,1,ESPINS,139)+1 QUIT
43 . I ESPSUB=41 S ^(138.1)=^ESP(912.4,ESPIEN,1,ESPINS,138.1)+1 QUIT
44 . I ESPSUB=42 S ^(139.1)=^ESP(912.4,ESPIEN,1,ESPINS,139.1)+1 QUIT
45 ;MOTOR VEHICLES
46 I ESPTYPE=48 S ^(142)=^ESP(912.4,ESPIEN,1,ESPINS,142)+1
47 ;GOVT VEHICLE
48 I ESPSUB=27 S ^(143)=^ESP(912.4,ESPIEN,1,ESPINS,143)+1 D QUIT
49 . ;GOVT VEHICLE DOLLARS
50 . S ESPDOL=0
51 . F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
52 .. S ^ESP(912.4,ESPIEN,1,ESPINS,144)=^ESP(912.4,ESPIEN,1,ESPINS,144)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
53 .. S ^ESP(912.4,ESPIEN,1,ESPINS,145)=^ESP(912.4,ESPIEN,1,ESPINS,145)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
54 .. I $P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)'="" S ^(146)=^ESP(912.4,ESPIEN,1,ESPINS,146)+1
55 ;PRIVATE VEHICLE
56 I ESPSUB=28 S ^(147)=^ESP(912.4,ESPIEN,1,ESPINS,147)+1 D QUIT
57 . ;PERSONAL VEHICLE DOLLARS
58 . S ESPDOL=0
59 . F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
60 .. S ^ESP(912.4,ESPIEN,1,ESPINS,148)=^ESP(912.4,ESPIEN,1,ESPINS,148)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
61 .. S ^ESP(912.4,ESPIEN,1,ESPINS,149)=^ESP(912.4,ESPIEN,1,ESPINS,149)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
62 .. I $P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)'="" S ^(150)=^ESP(912.4,ESPIEN,1,ESPINS,150)+1
63 QUIT
64EX Q
65DDOL ;DRUG DOLLARS
66 S ESPDOL=0
67 F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
68 . S ^ESP(912.4,ESPIEN,1,ESPINS,130)=^ESP(912.4,ESPIEN,1,ESPINS,130)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
69 . S ^ESP(912.4,ESPIEN,1,ESPINS,131)=^ESP(912.4,ESPIEN,1,ESPINS,131)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
70 QUIT
71GDOL ;GOV'T PROPERTY DOLLARS
72 S ESPDOL=0
73 F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
74 . S ^ESP(912.4,ESPIEN,1,ESPINS,135)=^ESP(912.4,ESPIEN,1,ESPINS,135)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
75 . S ^ESP(912.4,ESPIEN,1,ESPINS,136)=^ESP(912.4,ESPIEN,1,ESPINS,136)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
76 QUIT
77PDOL ;PERSONAL PROPERTY DOLLARS
78 S ESPDOL=0
79 F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
80 . S ^ESP(912.4,ESPIEN,1,ESPINS,140)=^ESP(912.4,ESPIEN,1,ESPINS,140)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
81 . S ^ESP(912.4,ESPIEN,1,ESPINS,141)=^ESP(912.4,ESPIEN,1,ESPINS,141)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,4)
82 QUIT
83ADOL ;ARSON PROPERTY DOLLARS - CALLED BY ^ESPUCR2 TO TOTAL FOR UCR
84 S ESPDOL=0
85 F ESPX=1:1 S ESPDOL=$O(^ESP(912,ESPOFN,90,ESPDOL)) Q:ESPDOL'>0 D
86 . S ^ESP(912.4,ESPIEN,1,ESPINS,83)=^ESP(912.4,ESPIEN,1,ESPINS,83)+$P($G(^ESP(912,ESPOFN,90,ESPDOL,0)),U,3)
87 QUIT
Note: See TracBrowser for help on using the repository browser.