1 | ESPJOU1 ;DALISC/RWW - ENHANCED/MODIFIED PRINT DAILY OPERATIONS JOURNAL ;3/93
|
---|
2 | ;;1.0;POLICE & SECURITY;**1,7,12,14,18,32**;Mar 31, 1994
|
---|
3 | EN ;
|
---|
4 | D DT^DICRW
|
---|
5 | JOU S DIC(0)="QAEMZ",DIC("A")="DATE: ",DIC="^ESP(916,"
|
---|
6 | D ^DIC
|
---|
7 | G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
|
---|
8 | I Y<0 W !,$C(7),"DATE not found. Please try again." G JOU
|
---|
9 | S ESPID=+Y
|
---|
10 | Q S %ZIS="Q" D ^%ZIS G:POP EXIT I '$D(IO("Q")) U IO D START G EXIT
|
---|
11 | S ZTRTN="START^ESPJOU1",ZTSAVE("ESP*")="",ZTDESC="DAILY JOURNAL" D ^%ZTLOAD,HOME^%ZIS
|
---|
12 | EXIT Q
|
---|
13 | START ;BEGINS THE PRINT OF THE DAILY JOURNAL
|
---|
14 | N ESPJOU1
|
---|
15 | S ESPJOU1=1
|
---|
16 | D START^ESPJOU
|
---|
17 | Q
|
---|
18 | ;
|
---|
19 | ;
|
---|
20 | SORT ;Sorts Daily Journal in Time Sequence
|
---|
21 | N ESPTIME,ESPTIME2,ESPT,%T
|
---|
22 | ;
|
---|
23 | ; Are start and end times for the journal defined? If so, use them.
|
---|
24 | ;
|
---|
25 | S ESPT=$G(^ESP(916,ESPID,1))
|
---|
26 | I ESPT S ESPT=$P($P(ESPT,"^"),"-",4)
|
---|
27 | I ESPT,ESPT?4N,+ESPT>0&+ESPT<2401 D
|
---|
28 | .S ESPTIME=""
|
---|
29 | .F S ESPTIME=$O(^ESP(916,ESPID,4,"B",ESPTIME)) Q:ESPTIME="" D
|
---|
30 | ..S ESPN=""
|
---|
31 | ..F S ESPN=$O(^ESP(916,ESPID,4,"B",ESPTIME,ESPN)) Q:ESPN="" D
|
---|
32 | ...S ESPTIME2=ESPTIME
|
---|
33 | ...I +ESPTIME2<ESPT S ESPTIME2=ESPTIME2+2400
|
---|
34 | ...I $L(ESPTIME2)<4 S ESPTIME2="0"_ESPTIME2
|
---|
35 | ...S ^TMP($J,"ESP",DT_ESPTIME2_$E("0000",1,4-$L(ESPN))_ESPN)=ESPN
|
---|
36 | ;
|
---|
37 | ; If start/end times for journal not defined, assume 0001-2400
|
---|
38 | ;
|
---|
39 | E D
|
---|
40 | .F ESPN=0:0 S ESPN=$O(^ESP(916,ESPID,4,ESPN)) Q:ESPN'>0 D
|
---|
41 | .. S ESPTIME=$P(^ESP(916,ESPID,4,ESPN,0),U),^TMP($J,"ESP"," "_ESPTIME_ESPN)=ESPN
|
---|
42 | Q
|
---|