ESPORM5 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;4/93
;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CONTINUED FROME ESPORM4
NARR ;PRINT NARRATIVE
D HDR S ESPX=""
F I=1:1:18 S ESPX=ESPX_"* "
S ESPX=ESPX_"NARRATIVE" F I=1:1:17 S ESPX=ESPX_" *"
D MSG
S IEN=0,ESPX=" " D MSG S ESPX=$E(SPACES,1,3)_"ORIGIN:" D MSG F ESPN=1:1:2 S ESPX=" " D MSG
F ESPN=1:1 S IEN=$O(^ESP(912,ESPID,70,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,3)_^(IEN,0) D MSG
S IEN=0,ESPX=" " D MSG S ESPX=$E(SPACES,1,3)_"INITIAL OBSERVATION:" D MSG F ESPN=1:1:2 S ESPX=" " D MSG
F ESPN=1:1 S IEN=$O(^ESP(912,ESPID,72,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,3)_^(IEN,0) D MSG
S IEN=0,ESPX=" " D MSG S ESPX=$E(SPACES,1,3)_"INVESTIGATION:" D MSG S ESPX=" " D MSG
F ESPN=1:1 S IEN=$O(^ESP(912,ESPID,73,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,3)_^(IEN,0) D MSG
S IEN=0,ESPX=" " D MSG S ESPX=$E(SPACES,1,3)_"DISPOSITION:" D MSG F ESPN=1:1:2 S ESPX=" " D MSG
F ESPN=1:1 S IEN=$O(^ESP(912,ESPID,74,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,3)_^(IEN,0) D MSG
SIG D HDR:$Y+5>IOSL
F ESPN=1:1:4 S ESPX=" " D MSG
S DIC="^ESP(912,",DA=ESPID,DR=".06",DIQ(0)="I" D EN^DIQ1
S ESPOFF=$G(^UTILITY("DIQ1",$J,912,DA,.06,"I")),DIC="^VA(200,",DA=ESPOFF,DR="20.2;910.1",DIQ(0)="E" D EN^DIQ1
S ESPX=$G(^UTILITY("DIQ1",$J,200,DA,20.2,"E"))_" # "_$G(^UTILITY("DIQ1",$J,200,DA,910.1,"E")) D MSG S ESPX=" " D MSG S ESPX="INVESTIGATING OFFICER" D MSG
F ESPN=1:1:5 S ESPX=" " D MSG
FOL ;PRINT FOLLOW-UP NOTES
G:'$D(^ESP(912,ESPID,130)) SEND
D HDR
F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,130,ESPN)) Q:ESPN'>0 D
. D HDR:$Y+5>IOSL&(ESPN'=1)
. S IEN=0,ESPX=" " D MSG S ESPX=$E(SPACES,1,3)_"FOLLOW-UP NOTES:" D MSG F ESPZ=1:1:2 S ESPX=" " D MSG
. F ESPN1=1:1 S IEN=$O(^ESP(912,ESPID,130,ESPN,10,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,3)_^(IEN,0) D MSG
. S DIC="^ESP(912,"_ESPID_",130,",DA=ESPN,DR=".01",DIQ(0)="I" D EN^DIQ1
. S ESPOFF=$G(^UTILITY("DIQ1",$J,912.17,DA,.01,"I"))
. S DIC="^VA(200,",DA=ESPOFF,DR="20.2;910.1",DIQ(0)="E" D EN^DIQ1
. S ESPX=" " D MSG S ESPX=" " D MSG S ESPX=" " D MSG S ESPX=" " D MSG
. S ESPX=$G(^UTILITY("DIQ1",$J,200,DA,20.2,"E"))_" # "_$G(^UTILITY("DIQ1",$J,200,DA,910.1,"E")) D MSG S ESPX="FOLLOW-UP INVESTIGATOR" D MSG
. S ESPX=" " D MSG S ESPX=" " D MSG S ESPX=" " D MSG S ESPX=" " D MSG
W !,"COMPLETED."
SEND S XMSUB="UOR"_$E(ESPDTR,4,5)_"-"_$E(ESPDTR,6,7)_"-"_$TR($E($P(ESPDTR,".",2)_"ZZZZ",1,4),"Z",0)
S XMTEXT="^TMP($J,""UORM"","
S XMDUN="Police & Security Package"
D ^XMD
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[HESPORM5 3351 printed Nov 22, 2024@17:40:06 Page 2
ESPORM5 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;4/93
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;CONTINUED FROME ESPORM4
NARR ;PRINT NARRATIVE
+1 DO HDR
SET ESPX=""
+2 FOR I=1:1:18
SET ESPX=ESPX_"* "
+3 SET ESPX=ESPX_"NARRATIVE"
FOR I=1:1:17
SET ESPX=ESPX_" *"
+4 DO MSG
+5 SET IEN=0
SET ESPX=" "
DO MSG
SET ESPX=$EXTRACT(SPACES,1,3)_"ORIGIN:"
DO MSG
FOR ESPN=1:1:2
SET ESPX=" "
DO MSG
+6 FOR ESPN=1:1
SET IEN=$ORDER(^ESP(912,ESPID,70,IEN))
if IEN'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,3)_^(IEN,0)
DO MSG
+7 SET IEN=0
SET ESPX=" "
DO MSG
SET ESPX=$EXTRACT(SPACES,1,3)_"INITIAL OBSERVATION:"
DO MSG
FOR ESPN=1:1:2
SET ESPX=" "
DO MSG
+8 FOR ESPN=1:1
SET IEN=$ORDER(^ESP(912,ESPID,72,IEN))
if IEN'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,3)_^(IEN,0)
DO MSG
+9 SET IEN=0
SET ESPX=" "
DO MSG
SET ESPX=$EXTRACT(SPACES,1,3)_"INVESTIGATION:"
DO MSG
SET ESPX=" "
DO MSG
+10 FOR ESPN=1:1
SET IEN=$ORDER(^ESP(912,ESPID,73,IEN))
if IEN'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,3)_^(IEN,0)
DO MSG
+11 SET IEN=0
SET ESPX=" "
DO MSG
SET ESPX=$EXTRACT(SPACES,1,3)_"DISPOSITION:"
DO MSG
FOR ESPN=1:1:2
SET ESPX=" "
DO MSG
+12 FOR ESPN=1:1
SET IEN=$ORDER(^ESP(912,ESPID,74,IEN))
if IEN'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,3)_^(IEN,0)
DO MSG
SIG if $Y+5>IOSL
DO HDR
+1 FOR ESPN=1:1:4
SET ESPX=" "
DO MSG
+2 SET DIC="^ESP(912,"
SET DA=ESPID
SET DR=".06"
SET DIQ(0)="I"
DO EN^DIQ1
+3 SET ESPOFF=$GET(^UTILITY("DIQ1",$JOB,912,DA,.06,"I"))
SET DIC="^VA(200,"
SET DA=ESPOFF
SET DR="20.2;910.1"
SET DIQ(0)="E"
DO EN^DIQ1
+4 SET ESPX=$GET(^UTILITY("DIQ1",$JOB,200,DA,20.2,"E"))_" # "_$GET(^UTILITY("DIQ1",$JOB,200,DA,910.1,"E"))
DO MSG
SET ESPX=" "
DO MSG
SET ESPX="INVESTIGATING OFFICER"
DO MSG
+5 FOR ESPN=1:1:5
SET ESPX=" "
DO MSG
FOL ;PRINT FOLLOW-UP NOTES
+1 if '$DATA(^ESP(912,ESPID,130))
GOTO SEND
+2 DO HDR
+3 FOR ESPN=0:0
SET ESPN=$ORDER(^ESP(912,ESPID,130,ESPN))
if ESPN'>0
QUIT
Begin DoDot:1
+4 if $Y+5>IOSL&(ESPN'=1)
DO HDR
+5 SET IEN=0
SET ESPX=" "
DO MSG
SET ESPX=$EXTRACT(SPACES,1,3)_"FOLLOW-UP NOTES:"
DO MSG
FOR ESPZ=1:1:2
SET ESPX=" "
DO MSG
+6 FOR ESPN1=1:1
SET IEN=$ORDER(^ESP(912,ESPID,130,ESPN,10,IEN))
if IEN'>0
QUIT
SET ESPX=$EXTRACT(SPACES,1,3)_^(IEN,0)
DO MSG
+7 SET DIC="^ESP(912,"_ESPID_",130,"
SET DA=ESPN
SET DR=".01"
SET DIQ(0)="I"
DO EN^DIQ1
+8 SET ESPOFF=$GET(^UTILITY("DIQ1",$JOB,912.17,DA,.01,"I"))
+9 SET DIC="^VA(200,"
SET DA=ESPOFF
SET DR="20.2;910.1"
SET DIQ(0)="E"
DO EN^DIQ1
+10 SET ESPX=" "
DO MSG
SET ESPX=" "
DO MSG
SET ESPX=" "
DO MSG
SET ESPX=" "
DO MSG
+11 SET ESPX=$GET(^UTILITY("DIQ1",$JOB,200,DA,20.2,"E"))_" # "_$GET(^UTILITY("DIQ1",$JOB,200,DA,910.1,"E"))
DO MSG
SET ESPX="FOLLOW-UP INVESTIGATOR"
DO MSG
+12 SET ESPX=" "
DO MSG
SET ESPX=" "
DO MSG
SET ESPX=" "
DO MSG
SET ESPX=" "
DO MSG
End DoDot:1
+13 WRITE !,"COMPLETED."
SEND SET XMSUB="UOR"_$EXTRACT(ESPDTR,4,5)_"-"_$EXTRACT(ESPDTR,6,7)_"-"_$TRANSLATE($EXTRACT($PIECE(ESPDTR,".",2)_"ZZZZ",1,4),"Z",0)
+1 SET XMTEXT="^TMP($J,""UORM"","
+2 SET XMDUN="Police & Security Package"
+3 DO ^XMD
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