source: WorldVistAEHR/trunk/r/POLICE_AND_SECURITY-ES/ESPDISP.m@ 1006

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

initial load of WorldVistAEHR

File size: 4.1 KB
Line 
1ESPDISP ;DALISC/CKA - DISPLAYS DATA OFFENSE REPORT EDIT;8/92
2 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
3EN ;
4COM ;DISPLAY COMPLAINANTS
5 Q:'$D(DA) W !!,"COMPLAINANT DATA",! S NUM=0,ESPID=DA
6 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,20,NUM)) Q:NUM'>0 D
7 . S ESPFN=$P(^ESP(912,ESPID,20,NUM,0),U,2),ESPNAM="" S:ESPFN]"" ESPNAM=$P($G(^ESP(910,ESPFN,0)),U)
8 . W !?5,NUM," ",ESPNAM
9 I '$D(ESPDO) S NUM=$P($G(^ESP(912,ESPID,20,0)),U,3) D NUM
10 K ESPDO,ESPFN,ESPN,ESPNAM,NUM,Y
11 QUIT
12STUFF1 ;STUFF COMPLAINANT INFO
13 S ESPFN=$P(^ESP(912,DA(1),20,DA,0),U,2),COMP0=^ESP(910,ESPFN,0),$P(^ESP(912,DA(1),20,DA,0),U,3)=$P(COMP0,U,4)
14 S ^ESP(912,DA(1),20,DA,1)=$G(^ESP(910,ESPFN,1)),^ESP(912,DA(1),20,DA,2)=$G(^ESP(910,ESPFN,2))
15 K COMP0,ESPFN
16 Q
17 ;
18VIC ;DISPLAY VICTIMS
19 Q:'$D(DA) W !!,"VICTIM DATA",! S NUM=0,ESPID=DA
20 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,30,NUM)) Q:NUM'>0 D
21 . S ESPFN=$P(^ESP(912,ESPID,30,NUM,0),U,2),ESPNAM="" S:ESPFN]"" ESPNAM=$P($G(^ESP(910,+ESPFN,0)),U)
22 . W !?5,NUM," ",ESPNAM
23 I '$D(ESPDO) S NUM=$P($G(^ESP(912,ESPID,30,0)),U,3) D NUM
24 K ESPDO,ESPFN,ESPN,ESPNAM,NUM,Y
25 QUIT
26STUFF2 ;STUFF VICTIM INFO
27 S ESPFN=$P(^ESP(912,DA(1),30,DA,0),U,2),VIC0=^ESP(910,ESPFN,0)
28 S $P(^ESP(912,DA(1),30,DA,0),U,3,7)=$P(VIC0,U,8,9)_"^"_$P(VIC0,U,4)_"^"_$P(VIC0,U,10,11)
29 S ^ESP(912,DA(1),30,DA,1)=$G(^ESP(910,ESPFN,1)),^ESP(912,DA(1),30,DA,2)=$G(^ESP(910,ESPFN,2))
30 K VIC0,ESPFN
31 Q
32OFF ;DISPLAY OFFENDERS
33 Q:'$D(DA) W !!,"OFFENDER DATA",! S NUM=0,ESPID=DA
34 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,40,NUM)) Q:NUM'>0 D
35 . S ESPFN=$P(^ESP(912,ESPID,40,NUM,0),U,2) S:ESPFN'="" ESPNAM(NUM)=$P($G(^ESP(910,ESPFN,0)),U) S:ESPFN="" ESPNAM(NUM)="UNKNOWN"
36 . W !?5,NUM," ",ESPNAM(NUM)
37 I '$D(ESPDO) S NUM=$P($G(^ESP(912,ESPID,40,0)),U,3) D NUM
38 K ESPDO,ESPFN,ESPN,NUM,Y
39 QUIT
40STUFF3 ;STUFF OFFENDER INFO
41 S ESPFN=$P(^ESP(912,DA(1),40,DA,0),U,2),OFF0=^ESP(910,ESPFN,0)
42 S $P(^ESP(912,DA(1),40,DA,0),U,3,4)=$P(OFF0,U,8,9),ESPDESCR=$G(^ESP(910,ESPFN,3)),$P(^ESP(912,DA(1),40,DA,0),U,5,10)=ESPDESCR
43 S $P(^ESP(912,DA(1),40,DA,0),U,11)=$P(OFF0,U,4),$P(^ESP(912,DA(1),40,DA,0),U,12,13)=$P(OFF0,U,10,11)
44 S ^ESP(912,DA(1),40,DA,1)=$G(^ESP(910,ESPFN,1)),^ESP(912,DA(1),40,DA,2)=$G(^ESP(910,ESPFN,2))
45 K ESPDESCR,OFF0,ESPFN
46 Q
47WIT ;DISPLAY WITNESSES
48 Q:'$D(DA) W !!,"WITNESS DATA",! S NUM=0,ESPID=DA
49 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,50,NUM)) Q:NUM'>0 D
50 . S ESPFN=$P(^ESP(912,ESPID,50,NUM,0),U,2),ESPNAM="" S:ESPFN]"" ESPNAM=$P($G(^ESP(910,+ESPFN,0)),U)
51 . W !?5,NUM," ",ESPNAM
52 I '$D(ESPDO) S NUM=$P($G(^ESP(912,ESPID,50,0)),U,3) D NUM
53 K ESPDO,ESPFN,ESPN,ESPNAM,NUM,Y
54 QUIT
55STUFF4 ;STUFF WITNESS INFO
56 S ESPFN=$P(^ESP(912,DA(1),50,DA,0),U,2),WIT0=^ESP(910,ESPFN,0),$P(^ESP(912,DA(1),50,DA,0),U,3)=$P(WIT0,U,4)
57 S ^ESP(912,DA(1),50,DA,1)=$G(^ESP(910,ESPFN,1)),^ESP(912,DA(1),50,DA,2)=$G(^ESP(910,ESPFN,2))
58 K WIT0,ESPFN
59 Q
60VEH ;DISPLAY VEHICLES
61 S NUM=0,ESPID=DA
62 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,80,NUM)) Q:NUM'>0 D
63 . W !?5,NUM," ",$P($G(^ESP(912,ESPID,80,NUM,0)),U,2)," ",$P($G(^DIC(5,+$P($G(^(0)),U,3),0)),U,2)
64 K ESPN,NUM
65 QUIT
66LOST ;DISPLAY LOST PROPERTY
67 S NUM=0,ESPID=DA
68 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,90,NUM)) Q:NUM'>0 D
69 . W !?5,NUM," ",$P($G(^ESP(912,ESPID,90,NUM,0)),U)," "
70 K ESPN,NUM
71 QUIT
72HELD ;DISPLAY PROPERTY (HELD)
73 S NUM=0,ESPID=DA
74 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,100,NUM)) Q:NUM'>0 D
75 . W !?5,NUM," ",$P($G(^ESP(912,ESPID,100,NUM,0)),U,2)," ",$P($G(^(0)),U,3)
76 K ESPN,NUM
77 QUIT
78OTH ;DISPLAY OTHER AGENCIES NOTIFICATIONS
79 S NUM=0,ESPID=DA
80 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,110,NUM)) Q:NUM'>0 D
81 . W !?5,NUM," " S Y=$P($G(^ESP(912,ESPID,110,NUM,0)),U) X ^DD("DD") W Y
82 K ESPN,NUM,Y
83 QUIT
84ATTY ;DISPLAY U.S ATTORNEY NOTIFICATIONS
85 S NUM=0,ESPID=DA
86 F ESPN=0:0 S NUM=$O(^ESP(912,ESPID,120,NUM)) Q:NUM'>0 D
87 . W !?5,NUM," " S Y=$P($G(^ESP(912,ESPID,120,NUM,0)),U) X ^DD("DD") W Y
88 K ESPN,NUM,Y
89 QUIT
90NUM S NEWNUM=NUM+1,DIR("A")="Enter "_NEWNUM_" to add a new entry",DIR(0)="N^"_NEWNUM_":"_NEWNUM_":0^",DIR("??")="^W !?5,""Enter "_NEWNUM_" to add a new entry."""
91 D ^DIR K:$D(DIRUT) X K DIR,ESPNAM(NEWNUM),NEWNUM
92 QUIT
93UNKN ;Ask if unknown if offender
94 S DIR(0)="Y",DIR("A")="Is this an unknown offender",DIR("B")="NO"
95 D ^DIR K DIR
96 I 'Y S ESPNAM(DA)="",Y=.02 QUIT
97 I Y S ESPNAM(DA)="UNKNOWN",Y=.03
98 QUIT
Note: See TracBrowser for help on using the repository browser.