ESPORM4 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;4/93
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CONTINUED FROME ESPORM3
HELD ;PRINT PROPERTY HELD
G:'$D(^ESP(912,ESPID,100)) CIP
D HDR:$Y+5>IOSL
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,100,ESPN)) Q:ESPN'>0 D
. S DIC="^ESP(912,"_ESPID_",100,",DA=ESPN,DR=".01:.03",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.02,DA))
. S ESPX=" " D MSG F I=1:1:16 S ESPX=ESPX_"* "
. S ESPX=ESPX_"PROPERTY HELD" F I=1:1:17 S ESPX=ESPX_" *"
. D MSG
. S ESPX=" " D MSG S ESPX="ITEM #: "_$G(^UTILITY("DIQ1",$J,912.02,DA,.01,"E")) D MSG
. S ESPX="QUANTITY: "_$G(^UTILITY("DIQ1",$J,912.02,DA,.02,"E")) D MSG
. S ESPX="PURPOSE: "_$G(^UTILITY("DIQ1",$J,912.02,DA,.03,"E")) D MSG
. S ESPX="DESCRIPTION:" D MSG S ESPX=" " D MSG
. F ESPN1=0:0 S ESPN1=$O(^ESP(912,ESPID,100,ESPN,10,ESPN1)) Q:ESPN1'>0 S ESPX=$E(SPACES,1,7)_^(ESPN1,0) D MSG
. S ESPX=" " D MSG
CIP ;PRINT CIP WEAPON AND BATON USED
F ESPN=1:1:3 S ESPX=" " D MSG
S DIC="^ESP(912,",DA=ESPID,DR="1.01:1.02",DIQ(0)="E" D EN^DIQ1
S ESPX="WAS CIP WEAPON USED? "_$G(^UTILITY("DIQ1",$J,912,DA,1.01,"E")) D MSG
S ESPX="WAS POLICE BATON USED? "_$G(^UTILITY("DIQ1",$J,912,DA,1.02,"E")) D MSG
OTH ;PRINT OTHER AGENCY DATA
S ESPX=" " D MSG S ESPX="OTHER AGENCY NOTIFIED" D MSG S ESPX=" " D MSG
G:'$D(^ESP(912,ESPID,110)) ATTY
D HDR:$Y+5>IOSL
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,110,ESPN)) Q:ESPN'>0 D
. S DIC="^ESP(912,"_ESPID_",110,",DA=ESPN,DR=".01;.02;.03",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.14,DA,.01,"E"))
. S ESPX="DATE/TIME NOTIFIED: "_$G(^UTILITY("DIQ1",$J,912.14,DA,.01,"E")) D MSG
. S ESPX="CONTACT PERSON: "_$G(^UTILITY("DIQ1",$J,912.14,DA,.02,"E")) D MSG
. S ESPX="AGENCY: "_$G(^UTILITY("DIQ1",$J,912.14,DA,.03,"E")) D MSG
ATTY ;PRINT U.S. ATTY DATA
S ESPX=" " D MSG S ESPX="U.S. ATTORNEY NOTIFIED" D MSG S ESPX=" " D MSG
G:'$D(^ESP(912,ESPID,120)) CONT
D HDR:$Y+5>IOSL
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,120,ESPN)) Q:ESPN'>0 D
. S DIC="^ESP(912,"_ESPID_",120,",DA=ESPN,DR=".01",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.15,DA,.01,"E"))
. S ESPX="DATE/TIME NOTIFIED: "_$G(^UTILITY("DIQ1",$J,912.15,DA,.01,"E")) D MSG
. S ESPX="INSTRUCTIONS RECEIVED:" D MSG S ESPX=" " D MSG
. S IEN=0
. F ESPN1=1:1 S IEN=$O(^ESP(912,ESPID,120,DA,10,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,7)_^(IEN,0) D MSG
CONT G ^ESPORM5
EXIT K DA,DIC,DIQ,DIRUT,ESPDOB,ESPDOBP,DR,DTOUT,DUOUT,ESPDTR,ESPFN,ESPI,ESPID,ESPL,ESPN,ESPN1,ESPOFF,ESPX,ESPZ,I,IEN,PAGE,SPACES,SSN,X,X1,X2,XMDUN,XMSUB,XMTEXT,Y
K ^UTILITY("DIQ1",$J),^TMP($J,"UORM")
QUIT
HDR ;PRINT HEADING
S PAGE=PAGE+1 S ESPX=$E(SPACES,1,25)_"DEPARTMENT OF VETERANS AFFAIRS"_$E(SPACES,1,IOM-10)_"PAGE: "_$J(PAGE,3)
D MSG
S ESPX=$E(SPACES,1,35)_"VA POLICE"
S ESPX=$E(SPACES,1,28)_"UNIFORM OFFENSE REPORT"
D MSG
S ESPX=$E(SPACES,1,30)_"UOR# "_$E(ESPDTR,2,3)_"-"_$E(ESPDTR,4,5)_"-"_$E(ESPDTR,6,7)_"-"_$TR($E($P(ESPDTR,".",2)_"ZZZZ",1,4),"Z",0)
D MSG
S ESPX="VA Facility" D MSG
I $D(^ESP(912,ESPID,5)),$P(^(5),U)'="" S ESPX=$S($D(^DIC(4,$P(^(5),U),0)):$P(^(0),U),1:"") D MSG
S ESPX="Automated VA Form 10-1393" D MSG
F ESPI=1:1:2 S ESPX=" " D MSG
QUIT
MSG S ^TMP($J,"UORM",ESPL)=ESPX,ESPL=ESPL+1
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPORM4 3269 printed Nov 22, 2024@17:40:06 Page 2
ESPORM4 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;4/93
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CONTINUED FROME ESPORM3
HELD ;PRINT PROPERTY HELD
+1 if '$DATA(^ESP(912,ESPID,100))
GOTO CIP
+2 if $Y+5>IOSL
DO HDR
+3 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,100,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+4 SET DIC="^ESP(912,"_ESPID_",100,"
SET DA=ESPN
SET DR=".01:.03"
SET DIQ(0)="E"
DO EN^DIQ1
if '$DATA(^UTILITY("DIQ1",$JOB,912.02,DA))
QUIT
+5 SET ESPX=" "
DO MSG
FOR I=1:1:16
SET ESPX=ESPX_"* "
+6 SET ESPX=ESPX_"PROPERTY HELD"
FOR I=1:1:17
SET ESPX=ESPX_" *"
+7 DO MSG
+8 SET ESPX=" "
DO MSG
SET ESPX="ITEM #: "_$GET(^UTILITY("DIQ1",$JOB,912.02,DA,.01,"E"))
DO MSG
+9 SET ESPX="QUANTITY: "_$GET(^UTILITY("DIQ1",$JOB,912.02,DA,.02,"E"))
DO MSG
+10 SET ESPX="PURPOSE: "_$GET(^UTILITY("DIQ1",$JOB,912.02,DA,.03,"E"))
DO MSG
+11 SET ESPX="DESCRIPTION:"
DO MSG
SET ESPX=" "
DO MSG
+12 FOR ESPN1=0:0
SET ESPN1=$ORDER(^ESP(912,ESPID,100,ESPN,10,ESPN1))
if ESPN1'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,7)_^(ESPN1,0)
DO MSG
+13 SET ESPX=" "
DO MSG
End DoDot:1
CIP ;PRINT CIP WEAPON AND BATON USED
+1 FOR ESPN=1:1:3
SET ESPX=" "
DO MSG
+2 SET DIC="^ESP(912,"
SET DA=ESPID
SET DR="1.01:1.02"
SET DIQ(0)="E"
DO EN^DIQ1
+3 SET ESPX="WAS CIP WEAPON USED? "_$GET(^UTILITY("DIQ1",$JOB,912,DA,1.01,"E"))
DO MSG
+4 SET ESPX="WAS POLICE BATON USED? "_$GET(^UTILITY("DIQ1",$JOB,912,DA,1.02,"E"))
DO MSG
OTH ;PRINT OTHER AGENCY DATA
+1 SET ESPX=" "
DO MSG
SET ESPX="OTHER AGENCY NOTIFIED"
DO MSG
SET ESPX=" "
DO MSG
+2 if '$DATA(^ESP(912,ESPID,110))
GOTO ATTY
+3 if $Y+5>IOSL
DO HDR
+4 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,110,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+5 SET DIC="^ESP(912,"_ESPID_",110,"
SET DA=ESPN
SET DR=".01;.02;.03"
SET DIQ(0)="E"
DO EN^DIQ1
if '$DATA(^UTILITY("DIQ1",$JOB,912.14,DA,.01,"E"))
QUIT
+6 SET ESPX="DATE/TIME NOTIFIED: "_$GET(^UTILITY("DIQ1",$JOB,912.14,DA,.01,"E"))
DO MSG
+7 SET ESPX="CONTACT PERSON: "_$GET(^UTILITY("DIQ1",$JOB,912.14,DA,.02,"E"))
DO MSG
+8 SET ESPX="AGENCY: "_$GET(^UTILITY("DIQ1",$JOB,912.14,DA,.03,"E"))
DO MSG
End DoDot:1
ATTY ;PRINT U.S. ATTY DATA
+1 SET ESPX=" "
DO MSG
SET ESPX="U.S. ATTORNEY NOTIFIED"
DO MSG
SET ESPX=" "
DO MSG
+2 if '$DATA(^ESP(912,ESPID,120))
GOTO CONT
+3 if $Y+5>IOSL
DO HDR
+4 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,120,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+5 SET DIC="^ESP(912,"_ESPID_",120,"
SET DA=ESPN
SET DR=".01"
SET DIQ(0)="E"
DO EN^DIQ1
if '$DATA(^UTILITY("DIQ1",$JOB,912.15,DA,.01,"E"))
QUIT
+6 SET ESPX="DATE/TIME NOTIFIED: "_$GET(^UTILITY("DIQ1",$JOB,912.15,DA,.01,"E"))
DO MSG
+7 SET ESPX="INSTRUCTIONS RECEIVED:"
DO MSG
SET ESPX=" "
DO MSG
+8 SET IEN=0
+9 FOR ESPN1=1:1
SET IEN=$ORDER(^ESP(912,ESPID,120,DA,10,IEN))
if IEN'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,7)_^(IEN,0)
DO MSG
End DoDot:1
CONT GOTO ^ESPORM5
EXIT KILL DA,DIC,DIQ,DIRUT,ESPDOB,ESPDOBP,DR,DTOUT,DUOUT,ESPDTR,ESPFN,ESPI,ESPID,ESPL,ESPN,ESPN1,ESPOFF,ESPX,ESPZ,I,IEN,PAGE,SPACES,SSN,X,X1,X2,XMDUN,XMSUB,XMTEXT,Y
+1 KILL ^UTILITY("DIQ1",$JOB),^TMP($JOB,"UORM")
+2 QUIT
HDR ;PRINT HEADING
+1 SET PAGE=PAGE+1
SET ESPX=$EXTRACT(SPACES,1,25)_"DEPARTMENT OF VETERANS AFFAIRS"_$EXTRACT(SPACES,1,IOM-10)_"PAGE: "_$JUSTIFY(PAGE,3)
+2 DO MSG
+3 SET ESPX=$EXTRACT(SPACES,1,35)_"VA POLICE"
+4 SET ESPX=$EXTRACT(SPACES,1,28)_"UNIFORM OFFENSE REPORT"
+5 DO MSG
+6 SET ESPX=$EXTRACT(SPACES,1,30)_"UOR# "_$EXTRACT(ESPDTR,2,3)_"-"_$EXTRACT(ESPDTR,4,5)_"-"_$EXTRACT(ESPDTR,6,7)_"-"_$TRANSLATE($EXTRACT($PIECE(ESPDTR,".",2)_"ZZZZ",1,4),"Z",0)
+7 DO MSG
+8 SET ESPX="VA Facility"
DO MSG
+9 IF $DATA(^ESP(912,ESPID,5))
IF $PIECE(^(5),U)'=""
SET ESPX=$SELECT($DATA(^DIC(4,$PIECE(^(5),U),0)):$PIECE(^(0),U),1:"")
DO MSG
+10 SET ESPX="Automated VA Form 10-1393"
DO MSG
+11 FOR ESPI=1:1:2
SET ESPX=" "
DO MSG
+12 QUIT
MSG SET ^TMP($JOB,"UORM",ESPL)=ESPX
SET ESPL=ESPL+1
+1 QUIT