ESPVAL ;DALISC/CKA - OFFENSE REPORT VALIDATION CHECK;11/92
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;Q;
;CALLED FROM ESPOFFE
S ER=0 W !!,"Data Validation in progress"
DTR I $P(^ESP(912,ESPOFN,0),U,2)']"" W !,$C(7),"No Date/Time Received." S ER=1
DTO I $P(^ESP(912,ESPOFN,0),U,3)']"" W !,$C(7),"No Date/Time of Offense." S ER=1
POL I $P(^ESP(912,ESPOFN,0),U,6)']"" W !,$C(7),"No Investigating Officer." S ER=1
CL ;CHECK CLASSIFICATION CODES
I '$D(^ESP(912,ESPOFN,10)) W !,$C(7),"No Classification Code." S ER=1
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPOFN,10,ESPN)) Q:ESPN'>0 D
. S CL=^ESP(912,ESPOFN,10,ESPN,0) I $P(CL,U)']"" W !,$C(7),"No Classification Code." S ER=1 Q:ER
. I $O(^ESP(912.8,"AC",$P(CL,U),0)),$P(CL,U,2)']"" W !,$C(7),"No Type for this Classification Code." S ER=1 Q:ER
. I $O(^ESP(912.9,"AC",$P(CL,U,2),0)),$P(CL,U,3)']"" W !,$C(7),"No Sub-Type for this Type." S ER=1
COMP I ER W !,"This report must have the above before it can be completed."
I 'ER W !,"Report Completed." S $P(^ESP(912,ESPOFN,5),U,2)=1
EXIT K ER,CL
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPVAL 1065 printed Nov 22, 2024@17:40:57 Page 2
ESPVAL ;DALISC/CKA - OFFENSE REPORT VALIDATION CHECK;11/92
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;Q;
+1 ;CALLED FROM ESPOFFE
+2 SET ER=0
WRITE !!,"Data Validation in progress"
DTR IF $PIECE(^ESP(912,ESPOFN,0),U,2)']""
WRITE !,$CHAR(7),"No Date/Time Received."
SET ER=1
DTO IF $PIECE(^ESP(912,ESPOFN,0),U,3)']""
WRITE !,$CHAR(7),"No Date/Time of Offense."
SET ER=1
POL IF $PIECE(^ESP(912,ESPOFN,0),U,6)']""
WRITE !,$CHAR(7),"No Investigating Officer."
SET ER=1
CL ;CHECK CLASSIFICATION CODES
+1 IF '$DATA(^ESP(912,ESPOFN,10))
WRITE !,$CHAR(7),"No Classification Code."
SET ER=1
+2 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPOFN,10,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+3 SET CL=^ESP(912,ESPOFN,10,ESPN,0)
IF $PIECE(CL,U)']""
WRITE !,$CHAR(7),"No Classification Code."
SET ER=1
if ER
QUIT
+4 IF $ORDER(^ESP(912.8,"AC",$PIECE(CL,U),0))
IF $PIECE(CL,U,2)']""
WRITE !,$CHAR(7),"No Type for this Classification Code."
SET ER=1
if ER
QUIT
+5 IF $ORDER(^ESP(912.9,"AC",$PIECE(CL,U,2),0))
IF $PIECE(CL,U,3)']""
WRITE !,$CHAR(7),"No Sub-Type for this Type."
SET ER=1
End DoDot:1
COMP IF ER
WRITE !,"This report must have the above before it can be completed."
+1 IF 'ER
WRITE !,"Report Completed."
SET $PIECE(^ESP(912,ESPOFN,5),U,2)=1
EXIT KILL ER,CL
+1 QUIT