source: WorldVistAEHR/trunk/r/POLICE_AND_SECURITY-ES/ESPORM1.m@ 691

Last change on this file since 691 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.1 KB
RevLine 
[613]1ESPORM1 ;DALISC/CKA - OFFENSE REPORT IN MAIL MESSAGE CONT. ;3/93
2 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
3EN ;
4COMP ;PRINT COMPLAINANTS
5 D HDR:$Y+5>IOSL
6 F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,20,ESPN)) Q:ESPN'>0 D
7 . S DIC="^ESP(912,"_ESPID_",20,",DA=ESPN,DR=".02;.03;1.01:1.06;2.01:2.06",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.03,DA))
8 . S ESPX=" " D MSG F I=1:1:16 S ESPX=ESPX_"* "
9 . S ESPX=ESPX_"COMPLAINANT DATA" F I=1:1:15 S ESPX=ESPX_" *"
10 . D MSG
11 . S ESPX=" " D MSG S ESPX="COMPLAINANT NAME: "_$G(^UTILITY("DIQ1",$J,912.03,DA,.02,"E")) D MSG
12 . S ESPX="STATUS: "_$G(^UTILITY("DIQ1",$J,912.03,DA,.03,"E")) D MSG
13 . S ESPX="HOME ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.03,DA,1.01,"E")) D MSG
14 . I $G(^UTILITY("DIQ1",$J,912.03,DA,1.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E") D MSG
15 . I $G(^UTILITY("DIQ1",$J,912.03,DA,1.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
16 . S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.03,DA,1.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.03,DA,1.05,"E")) D MSG
17 . S ESPX="HOME PHONE: "_$G(^UTILITY("DIQ1",$J,912.03,DA,1.06,"E")) D MSG
18 . S ESPX="WORK ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.03,DA,2.01,"E")) D MSG
19 . I $G(^UTILITY("DIQ1",$J,912.03,DA,2.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E") D MSG
20 . I $G(^UTILITY("DIQ1",$J,912.03,DA,2.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
21 . S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.03,DA,2.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.03,DA,2.05,"E")) D MSG
22 . S ESPX="WORK PHONE: "_$G(^UTILITY("DIQ1",$J,912.03,DA,2.06,"E")) D MSG
23VIC ;PRINT VICTIMS
24 G:'$D(^ESP(912,ESPID,30)) CONT
25 D HDR:$Y+5>IOSL
26 F ESPN=0:0 S ESPN=$O(^ESP(912,ESPID,30,ESPN)) Q:ESPN'>0 D
27 . S DIC="^ESP(912,"_ESPID_",30,",DA=ESPN,DR=".02:.07;1.01:1.06;2.01:2.06",DIQ(0)="E" D EN^DIQ1 Q:'$D(^UTILITY("DIQ1",$J,912.04,DA))
28 . S ESPX=" " D MSG F I=1:1:17 S ESPX=ESPX_"* "
29 . S ESPX=ESPX_"VICTIM DATA"
30 . F I=1:1:17 S ESPX=ESPX_" *"
31 . D MSG
32 . S ESPX=" " D MSG S ESPX="VICTIM NAME: "_$G(^UTILITY("DIQ1",$J,912.04,DA,.02,"E")) D MSG
33 . S ESPX="SEX: "_$G(^UTILITY("DIQ1",$J,912.04,DA,.03,"E"))
34 . S ESPX=$E(SPACES,1,20)_"RACE: "_$G(^UTILITY("DIQ1",$J,912.04,DA,.04,"E")) D MSG
35 . S ESPX="STATUS: "_$G(^UTILITY("DIQ1",$J,912.04,DA,.05,"E")) D MSG
36 . S ESPX="DRIVER'S LICENSE & STATE: "_$G(^UTILITY("DIQ1",$J,912.04,DA,.06,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.04,DA,.07,"E")) D MSG
37 . S ESPX="HOME ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.04,DA,1.01,"E")) D MSG
38 . I $G(^UTILITY("DIQ1",$J,912.04,DA,1.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")
39 . I $G(^UTILITY("DIQ1",$J,912.04,DA,1.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
40 . S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.04,DA,1.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.04,DA,1.05,"E"))
41 . S ESPX="HOME PHONE: "_$G(^UTILITY("DIQ1",$J,912.04,DA,1.06,"E")) D MSG
42 . S ESPX="WORK ADDRESS: "_$G(^UTILITY("DIQ1",$J,912.04,DA,2.01,"E")) D MSG
43 . I $G(^UTILITY("DIQ1",$J,912.04,DA,2.02,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E") D MSG
44 . I $G(^UTILITY("DIQ1",$J,912.04,DA,2.03,"E"))]"" S ESPX=$E(SPACES,1,14)_^("E")_","
45 . S ESPX=ESPX_$G(^UTILITY("DIQ1",$J,912.04,DA,2.04,"E"))_" "_$G(^UTILITY("DIQ1",$J,912.04,DA,2.05,"E")) D MSG
46 . S ESPX="WORK PHONE: "_$G(^UTILITY("DIQ1",$J,912.04,DA,2.06,"E")) D MSG
47 . S IEN=0,ESPX="MEDICAL TREATMENT:" D MSG
48 . F ESPN1=1:1 S IEN=$O(^ESP(912,ESPID,30,ESPN,10,IEN)) Q:IEN'>0 S ESPX=$E(SPACES,1,7)_^(IEN,0) D MSG
49 . S ESPX=" " D MSG
50CONT G ^ESPORM2
51EXIT K DA,DIC,DIQ,DIRUT,DR,DTOUT,DUOUT,ESPDTR,ESPI,ESPID,ESPL,ESPN,ESPN1,ESPX,I,IEN,PAGE,SPACES,X,Y
52 K ^UTILITY("DIQ1",$J),^TMP($J,"UORM")
53 QUIT
54HDR ;PRINT HEADING
55 S PAGE=PAGE+1 S ESPX=$E(SPACES,1,25)_"DEPARTMENT OF VETERANS AFFAIRS"_$E(SPACES,1,IOM-10)_"PAGE: "_$J(PAGE,3)
56 D MSG
57 S ESPX=$E(SPACES,1,35)_"VA POLICE" D MSG
58 S ESPX=$E(SPACES,1,28)_"UNIFORM OFFENSE REPORT"
59 D MSG
60 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)
61 D MSG
62 S ESPX="VA Facility" D MSG
63 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
64 S ESPX="Automated VA Form 10-1393" D MSG
65 F ESPI=1:1:2 S ESPX=" " D MSG
66 QUIT
67MSG S ^TMP($J,"UORM",ESPL)=ESPX,ESPL=ESPL+1
68 QUIT
Note: See TracBrowser for help on using the repository browser.