source: WorldVistAEHR/trunk/r/POLICE_AND_SECURITY-ES/ESPJOU1.m@ 1297

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1ESPJOU1 ;DALISC/RWW - ENHANCED/MODIFIED PRINT DAILY OPERATIONS JOURNAL ;3/93
2 ;;1.0;POLICE & SECURITY;**1,7,12,14,18,32**;Mar 31, 1994
3EN ;
4 D DT^DICRW
5JOU 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
10Q 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
12EXIT Q
13START ;BEGINS THE PRINT OF THE DAILY JOURNAL
14 N ESPJOU1
15 S ESPJOU1=1
16 D START^ESPJOU
17 Q
18 ;
19 ;
20SORT ;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
Note: See TracBrowser for help on using the repository browser.