VistA-WorldVistAEHR/r/POLICE_AND_SECURITY-ES/ESPORM3.m

71 lines
4.0 KiB
Mathematica

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