Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ESPUCR5

ESPUCR5.m

Go to the documentation of this file.
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