ESPOFF3 ;DALISC/CKA - OFFENSE REPORT INPUT (CONT.);9/92
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN Q ;Called from ESPOFF2
;Check if this report falls within VACO 48 hour reporting criteria
CHECK ; ENTRY POINT FROM ESPOFF2
S ESPCN=0
F ESPX=1:1 S ESPCN=$O(^ESP(912,ESPOFN,10,ESPCN)) Q:ESPCN'>0 D
. S ESPCL=^ESP(912,ESPOFN,10,ESPCN,0),ESPCC=$P(ESPCL,U),ESPTYPE=$P(ESPCL,U,2),ESPSUB=$P(ESPCL,U,3)
. ;BURGLARIES OF CANTEEN, CASHIER, OR PHARMACY
. I ESPCC=2,ESPTYPE=7!(ESPTYPE=8)!(ESPTYPE=11) S ESPBULL=1 QUIT
. ;RAPES
. I ESPCC=8 S ESPBULL=1 QUIT
. ;ROBBERIES
. I ESPCC=9 S ESPBULL=1 QUIT
. ;DRUG THEFTS
. I ESPCC=11,ESPTYPE=45 S ESPBULL=1 QUIT
. ;FORGED RX'S
. I ESPCC=3,ESPTYPE=14,ESPSUB=4 S ESPBULL=1 QUIT
. ;POLICE OFFICER ASSAULT
. I ESPCC=1 F ESPN=1:1 S VIC=$O(^ESP(912,ESPOFN,30,ESPN)) Q:VIC'>0 I $P(^ESP(912,ESPOFN,30,ESPN,0),U,5)["PO" S ESPBULL=1 QUIT
. ;GOVT. PROPERTY THEFT > $5,000
. S LOSS=0
. I ESPCC=11,ESPTYPE=46 F ESPN=1:1 S PROP=$O(^ESP(912,ESPOFN,90,ESPN)) Q:PROP'>0 S LOSS=LOSS+$P($G(^ESP(912,ESPOFN,90,ESPN,0)),U,3)
. I LOSS>5000 S ESPBULL=1
;SEND BULLETIN IF MEETS VACO REPORTING CRITERIA
G:'$D(ESPBULL) EXIT
S ESPDTR=$P(^ESP(912,ESPOFN,0),U,2),XMB(1)=$$CONV^ESPUOR(ESPDTR),XMB="ESP VACO 48 HR CRITERIA"
D EN^XMB
EXIT K ESPBULL,ESPCC,ESPCL,ESPCN,ESPN,ESPSUB,ESPTYPE,ESPX,LOSS,PROP,VIC
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPOFF3 1382 printed Nov 22, 2024@17:39:54 Page 2
ESPOFF3 ;DALISC/CKA - OFFENSE REPORT INPUT (CONT.);9/92
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;Called from ESPOFF2
QUIT
+1 ;Check if this report falls within VACO 48 hour reporting criteria
CHECK ; ENTRY POINT FROM ESPOFF2
+1 SET ESPCN=0
+2 FOR ESPX=1:1
SET ESPCN=$ORDER(^ESP(912,ESPOFN,10,ESPCN))
if ESPCN'>0
QUIT
Begin DoDot:1
+3 SET ESPCL=^ESP(912,ESPOFN,10,ESPCN,0)
SET ESPCC=$PIECE(ESPCL,U)
SET ESPTYPE=$PIECE(ESPCL,U,2)
SET ESPSUB=$PIECE(ESPCL,U,3)
+4 ;BURGLARIES OF CANTEEN, CASHIER, OR PHARMACY
+5 IF ESPCC=2
IF ESPTYPE=7!(ESPTYPE=8)!(ESPTYPE=11)
SET ESPBULL=1
QUIT
+6 ;RAPES
+7 IF ESPCC=8
SET ESPBULL=1
QUIT
+8 ;ROBBERIES
+9 IF ESPCC=9
SET ESPBULL=1
QUIT
+10 ;DRUG THEFTS
+11 IF ESPCC=11
IF ESPTYPE=45
SET ESPBULL=1
QUIT
+12 ;FORGED RX'S
+13 IF ESPCC=3
IF ESPTYPE=14
IF ESPSUB=4
SET ESPBULL=1
QUIT
+14 ;POLICE OFFICER ASSAULT
+15 IF ESPCC=1
FOR ESPN=1:1
SET VIC=$ORDER(^ESP(912,ESPOFN,30,ESPN))
if VIC'>0
QUIT
IF $PIECE(^ESP(912,ESPOFN,30,ESPN,0),U,5)["PO"
SET ESPBULL=1
QUIT
+16 ;GOVT. PROPERTY THEFT > $5,000
+17 SET LOSS=0
+18 IF ESPCC=11
IF ESPTYPE=46
FOR ESPN=1:1
SET PROP=$ORDER(^ESP(912,ESPOFN,90,ESPN))
if PROP'>0
QUIT
SET LOSS=LOSS+$PIECE($GET(^ESP(912,ESPOFN,90,ESPN,0)),U,3)
+19 IF LOSS>5000
SET ESPBULL=1
End DoDot:1
+20 ;SEND BULLETIN IF MEETS VACO REPORTING CRITERIA
+21 if '$DATA(ESPBULL)
GOTO EXIT
+22 SET ESPDTR=$PIECE(^ESP(912,ESPOFN,0),U,2)
SET XMB(1)=$$CONV^ESPUOR(ESPDTR)
SET XMB="ESP VACO 48 HR CRITERIA"
+23 DO EN^XMB
EXIT KILL ESPBULL,ESPCC,ESPCL,ESPCN,ESPN,ESPSUB,ESPTYPE,ESPX,LOSS,PROP,VIC
+1 QUIT