Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ESPORM2

ESPORM2.m

Go to the documentation of this file.
ESPORM2 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;3/93
 ;;1.0;POLICE & SECURITY;**20**;Mar 31, 1994
EN ;CONTINUED FROM ESPORM1
OFFE ;PRINT OFFENDER(S)
 G:'$D(^ESP(912,ESPID,40)) CONT
 D HDR:$Y+5>IOSL
 F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,40,ESPN)) Q:ESPN'>0  D
 .  S DIC="^ESP(912,"_ESPID_",40,",DA=ESPN,DR=".02:.13;1.01:1.06;2.01:2.06;3.01",DIQ(0)="IE" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.05,DA))
 .  S ESPX=" " D MSG F I=1:1:17 S ESPX=ESPX_"* "
 .  S ESPX=ESPX_"OFFENDER DATA"
 .  F I=1:1:16 S ESPX=ESPX_" *"
 .  D MSG
 .  S ESPX=" " D MSG S ESPX="OFFENDER NAME: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.02,"E")) D MSG
 .  S ESPFN=$G(^UTILITY("DIQ1",$J,912.05,DA,.02,"I")),SSN=$P($G(^ESP(910,+ESPFN,0)),U,2),ESPDOB=$P($G(^ESP(910,+ESPFN,0)),U,3),Y=ESPDOB X ^DD("DD") S ESPDOBP=Y
 .  S ESPX="SSN: "_$E(SSN,1,3)_"-"_$E(SSN,4,5)_"-"_$E(SSN,6,9) D MSG
 .  S ESPX="DOB: "_ESPDOBP_"    " D NOW^%DTC S X1=%,X2=ESPDOB,X="" S:X2]"" X=$E(X1,1,3)-$E(X2,1,3)-($E(X1,4,7)<$E(X2,4,7)) S ESPX=ESPX_"AGE: "_X D MSG
 .  S ESPX="SEX: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.03,"E"))_$E(SPACES,1,10)_"RACE: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.04,"E")) D MSG
 .  S ESPX="HEIGHT: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.05,"E"))_$E(SPACES,1,10)_"WEIGHT: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.06,"E")) D MSG
 .  S ESPX="HAIR COLOR: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.07,"E"))_$E(SPACES,1,20)_"EYE COLOR: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.08,"E")) D MSG
 .  S ESPX="SKIN TONE: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.09,"E"))_$E(SPACES,1,40)_"SCARS/MARKS: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.1,"E")) D MSG
 .  S ESPX="STATUS: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.11,"E")) D MSG
 .  S ESPX="DRIVER'S LICENSE & STATE: "_$G(^UTILITY("DIQ1",$J,912.05,DA,.12,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.05,DA,.13,"E")) D MSG
 .  S ESPX="PERSONAL DESCRIPTION: " D MSG
 .  S ESPX=$G(^UTILITY("DIQ1",$J,912.05,DA,3.01,"E")) D MSG
 .  S ESPX="HOME ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.05,DA,1.01,"E")) D MSG
 .  I $G(^UTILITY("DIQ1",$J,912.05,DA,1.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E") D MSG
 .  I $G(^UTILITY("DIQ1",$J,912.05,DA,1.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
 .  S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.05,DA,1.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.05,DA,1.05,"E")) D MSG
 .  S ESPX="HOME PHONE: "_$G(^UTILITY("DIQ1",$J,912.05,DA,1.06,"E")) D MSG
 .  S ESPX="WORK ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.05,DA,2.01,"E")) D MSG
 .  I $G(^UTILITY("DIQ1",$J,912.05,DA,2.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E") D MSG
 .  I $G(^UTILITY("DIQ1",$J,912.05,DA,2.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
 .  S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.05,DA,2.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.05,DA,2.05,"E")) D MSG
 .  S ESPX="WORK PHONE: "_$G(^UTILITY("DIQ1",$J,912.05,DA,2.06,"E")) D MSG
 .  F ESPN1=0:0 S ESPN1=$O(^ESP(912,ESPID,40,ESPN,10,ESPN1)) Q:ESPN1'>0  D
 ..    S DIC="^ESP(912,"_ESPID_",40,"_ESPN_",10,",DA=ESPN1,DR=".01;.02;.03;.04",DIQ(0)="IE" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.11,DA))
 ..    S ESPX="OFFENSE COMMITTED: "_$G(^UTILITY("DIQ1",$J,912.11,DA,.01,"E"))_" "_$P($G(^ESP(915,+$G(^("I")),0)),U,3)_" "_$P($G(^(0)),U,5) D MSG
 ..    S ESPX="DISPOSITION: "_$G(^UTILITY("DIQ1",$J,912.11,DA,.02,"E"))
 ..    S ESPX=ESPX_"  CHARGING DOCUMENT: "_$G(^UTILITY("DIQ1",$J,912.11,DA,.04,"E")) D MSG
 ;
CONT G ^ESPORM3
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" D MSG
 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