ESPORM3 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;3/93
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CONTINUED FROME ESPORM2
WIT ;PRINT WITNESSES
G:'$D(^ESP(912,ESPID,50)) VEH
D HDR:$Y+5>IOSL
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,50,ESPN)) Q:ESPN'>0 D
. S DIC="^ESP(912,"_ESPID_",50,",DA=ESPN,DR=".02;1.01:1.06;2.01:2.06",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.06,DA))
. S ESPX=" " D MSG F I=1:1:16 S ESPX=ESPX_"* "
. S ESPX=ESPX_"WITNESS DATA" F I=1:1:17 S ESPX=ESPX_" *"
. D MSG
. S ESPX=" " D MSG S ESPX="WITNESS NAME: "_$G(^UTILITY("DIQ1",$J,912.06,DA,.02,"E")) D MSG
. S ESPX="HOME ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.06,DA,1.01,"E"))
. I $G(^UTILITY("DIQ1",$J,912.06,DA,1.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")
. I $G(^UTILITY("DIQ1",$J,912.06,DA,1.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
. S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.06,DA,1.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.04,DA,1.05,"E")) D MSG
. S ESPX="HOME PHONE: "_$G(^UTILITY("DIQ1",$J,912.06,DA,1.06,"E")) D MSG
. S ESPX="WORK ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.06,DA,2.01,"E")) D MSG
. I $G(^UTILITY("DIQ1",$J,912.06,DA,2.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E") D MSG
. I $G(^UTILITY("DIQ1",$J,912.06,DA,2.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
. S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.06,DA,2.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.04,DA,2.05,"E")) D MSG
. S ESPX="WORK PHONE: "_$G(^UTILITY("DIQ1",$J,912.06,DA,2.06,"E")) D MSG
;
VEH ;PRINT VEHICLE(S)
G:'$D(^ESP(912,ESPID,80)) LOST
D HDR:$Y+5>IOSL
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,80,ESPN)) Q:ESPN'>0 D
. S DIC="^ESP(912,"_ESPID_",80,",DA=ESPN,DR=".02:.11",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.09,DA))
. S ESPX=" " D MSG F I=1:1:15 S ESPX=ESPX_"* "
. S ESPX=ESPX_"VEHICLE INFORMATION" F I=1:1:15 S ESPX=ESPX_" *"
. D MSG
. S ESPX=" " D MSG S ESPX="LICENSE TAG # & STATE: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.02,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.09,DA,.03,"E")) D MSG
. S ESPX="MAKE: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.04,"E"))
. S ESPX=ESPX_" MODEL: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.05,"E")) D MSG
. S ESPX="STYLE: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.06,"E")) D MSG
. S ESPX="COLOR: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.07,"E")) D MSG
. S ESPX="DECAL # & COLOR: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.08,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.09,DA,.09,"E")) D MSG
. S ESPX="YEAR OF MANUFACTURE: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.1,"E")) D MSG
. S ESPX="OWNER NAME: "_$G(^UTILITY("DIQ1",$J,912.09,DA,.11,"E")) D MSG
LOST ;PRINT LOST PROPERTY
G:'$D(^ESP(912,ESPID,90)) CONT
D HDR:$Y+5>IOSL
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,90,ESPN)) Q:ESPN'>0 D
. S DIC="^ESP(912,"_ESPID_",90,",DA=ESPN,DR=".01:.04",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.1,DA))
. S ESPX=" " D MSG F I=1:1:15 S ESPX=ESPX_"* "
. S ESPX=ESPX_"LOST/STOLEN PROPERTY" F I=1:1:14 S ESPX=ESPX_" *"
. D MSG
. S ESPX=" " D MSG S ESPX="ITEM NAME: "_$G(^UTILITY("DIQ1",$J,912.1,DA,.01,"E")) D MSG
. S ESPX="DESCRIPTION: "_$G(^UTILITY("DIQ1",$J,912.1,DA,.02,"E")) D MSG
. S ESPX="DOLLAR LOSS: "_$G(^UTILITY("DIQ1",$J,912.1,DA,.03,"E")) D MSG
. S ESPX="DOLLAR RECOVERED: "_$G(^UTILITY("DIQ1",$J,912.1,DA,.04,"E")) D MSG
CONT G ^ESPORM4
EXIT K DA,DIC,DIQ,DIRUT,ESPDOB,ESPDOBP,DR,DTOUT,DUOUT,ESPDTR,ESPFN,ESPI,ESPID,ESPL,ESPN,ESPN1,ESPX,I,IEN,PAGE,SPACES,SSN,X,X1,X2,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[HESPORM3 4121 printed Dec 13, 2024@02:30:03 Page 2
ESPORM3 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;3/93
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CONTINUED FROME ESPORM2
WIT ;PRINT WITNESSES
+1 if '$DATA(^ESP(912,ESPID,50))
GOTO VEH
+2 if $Y+5>IOSL
DO HDR
+3 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,50,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+4 SET DIC="^ESP(912,"_ESPID_",50,"
SET DA=ESPN
SET DR=".02;1.01:1.06;2.01:2.06"
SET DIQ(0)="E"
DO EN^DIQ1
if '$DATA(^UTILITY("DIQ1",$JOB,912.06,DA))
QUIT
+5 SET ESPX=" "
DO MSG
FOR I=1:1:16
SET ESPX=ESPX_"* "
+6 SET ESPX=ESPX_"WITNESS DATA"
FOR I=1:1:17
SET ESPX=ESPX_" *"
+7 DO MSG
+8 SET ESPX=" "
DO MSG
SET ESPX="WITNESS NAME: "_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,.02,"E"))
DO MSG
+9 SET ESPX="HOME ADDRESS: "_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,1.01,"E"))
+10 IF $GET(^UTILITY("DIQ1",$JOB,912.06,DA,1.02,"E"))]""
SET ESPX=$EXTRACT(SPACES,1,14)_^("E")
+11 IF $GET(^UTILITY("DIQ1",$JOB,912.06,DA,1.03,"E"))]""
SET ESPX=$EXTRACT(SPACES,1,14)_^("E")_","
+12 SET ESPX=ESPX_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,1.04,"E"))_" "_$GET(^UTILITY("DIQ1",$JOB,912.04,DA,1.05,"E"))
DO MSG
+13 SET ESPX="HOME PHONE: "_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,1.06,"E"))
DO MSG
+14 SET ESPX="WORK ADDRESS: "_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,2.01,"E"))
DO MSG
+15 IF $GET(^UTILITY("DIQ1",$JOB,912.06,DA,2.02,"E"))]""
SET ESPX=$EXTRACT(SPACES,1,14)_^("E")
DO MSG
+16 IF $GET(^UTILITY("DIQ1",$JOB,912.06,DA,2.03,"E"))]""
SET ESPX=$EXTRACT(SPACES,1,14)_^("E")_","
+17 SET ESPX=ESPX_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,2.04,"E"))_" "_$GET(^UTILITY("DIQ1",$JOB,912.04,DA,2.05,"E"))
DO MSG
+18 SET ESPX="WORK PHONE: "_$GET(^UTILITY("DIQ1",$JOB,912.06,DA,2.06,"E"))
DO MSG
End DoDot:1
+19 ;
VEH ;PRINT VEHICLE(S)
+1 if '$DATA(^ESP(912,ESPID,80))
GOTO LOST
+2 if $Y+5>IOSL
DO HDR
+3 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,80,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+4 SET DIC="^ESP(912,"_ESPID_",80,"
SET DA=ESPN
SET DR=".02:.11"
SET DIQ(0)="E"
DO EN^DIQ1
if '$DATA(^UTILITY("DIQ1",$JOB,912.09,DA))
QUIT
+5 SET ESPX=" "
DO MSG
FOR I=1:1:15
SET ESPX=ESPX_"* "
+6 SET ESPX=ESPX_"VEHICLE INFORMATION"
FOR I=1:1:15
SET ESPX=ESPX_" *"
+7 DO MSG
+8 SET ESPX=" "
DO MSG
SET ESPX="LICENSE TAG # & STATE: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.02,"E"))_" "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.03,"E"))
DO MSG
+9 SET ESPX="MAKE: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.04,"E"))
+10 SET ESPX=ESPX_" MODEL: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.05,"E"))
DO MSG
+11 SET ESPX="STYLE: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.06,"E"))
DO MSG
+12 SET ESPX="COLOR: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.07,"E"))
DO MSG
+13 SET ESPX="DECAL # & COLOR: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.08,"E"))_" "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.09,"E"))
DO MSG
+14 SET ESPX="YEAR OF MANUFACTURE: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.1,"E"))
DO MSG
+15 SET ESPX="OWNER NAME: "_$GET(^UTILITY("DIQ1",$JOB,912.09,DA,.11,"E"))
DO MSG
End DoDot:1
LOST ;PRINT LOST PROPERTY
+1 if '$DATA(^ESP(912,ESPID,90))
GOTO CONT
+2 if $Y+5>IOSL
DO HDR
+3 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,90,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+4 SET DIC="^ESP(912,"_ESPID_",90,"
SET DA=ESPN
SET DR=".01:.04"
SET DIQ(0)="E"
DO EN^DIQ1
if '$DATA(^UTILITY("DIQ1",$JOB,912.1,DA))
QUIT
+5 SET ESPX=" "
DO MSG
FOR I=1:1:15
SET ESPX=ESPX_"* "
+6 SET ESPX=ESPX_"LOST/STOLEN PROPERTY"
FOR I=1:1:14
SET ESPX=ESPX_" *"
+7 DO MSG
+8 SET ESPX=" "
DO MSG
SET ESPX="ITEM NAME: "_$GET(^UTILITY("DIQ1",$JOB,912.1,DA,.01,"E"))
DO MSG
+9 SET ESPX="DESCRIPTION: "_$GET(^UTILITY("DIQ1",$JOB,912.1,DA,.02,"E"))
DO MSG
+10 SET ESPX="DOLLAR LOSS: "_$GET(^UTILITY("DIQ1",$JOB,912.1,DA,.03,"E"))
DO MSG
+11 SET ESPX="DOLLAR RECOVERED: "_$GET(^UTILITY("DIQ1",$JOB,912.1,DA,.04,"E"))
DO MSG
End DoDot:1
CONT GOTO ^ESPORM4
EXIT KILL DA,DIC,DIQ,DIRUT,ESPDOB,ESPDOBP,DR,DTOUT,DUOUT,ESPDTR,ESPFN,ESPI,ESPID,ESPL,ESPN,ESPN1,ESPX,I,IEN,PAGE,SPACES,SSN,X,X1,X2,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