source: FOIAVistA/trunk/r/CAPACITY_MANAGEMENT_TOOLS-KMPD-KMPL/KMPDBD01.m@ 1327

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1KMPDBD01 ;OAK/RAK - CM Tools Background Driver ;2/17/04 08:55
2 ;;2.0;CAPACITY MANAGEMENT TOOLS;**2**;Mar 22, 2002
3 ;
4EN ;-entry point for background driver
5 ;
6 S:'$G(DT) DT=$$DT^XLFDT
7 ;
8 N DAILY,STR
9 ;
10 ; update cpu data in file #8973 (CP PARAMETERS)
11 D CPUSET^KMPDUTL6(1)
12 ;
13 ; hl7
14 ;compile and store daily stats in file 8973.1 (CM HL7 DATA)
15 S STR=$$NOW^XLFDT,DAILY=$$FMADD^XLFDT(DT,-1)
16 D DAILY^KMPDHU02(DAILY,DAILY)
17 ; store start, stop and delta times for daily background job
18 D STRSTP^KMPDUTL2(3,1,1,STR)
19 ;
20 ; timing
21 ; compile and store timing stats in file 8973.2 (CP TIMING)
22 S STR=$$NOW^XLFDT
23 D DAILY^KMPDTU02
24 ; store start, stop and delta times for daily background job
25 D STRSTP^KMPDUTL2(4,1,1,STR)
26 ;
27 ; transmit 'yesterdays' daily stats to national database
28 S STR=$$NOW^XLFDT,DAILY=$$FMADD^XLFDT(DT,-1)
29 D DAILY^KMPDTU01(DAILY)
30 ; store start, stop and delta times for daily background job
31 D STRSTP^KMPDUTL2(4,2,1,STR)
32 ;
33 ;
34 ; if sunday
35 D:'$$DOW^XLFDT(DT,1) SUNDAY
36 ;
37 Q
38 ;
39SUNDAY ;-- weekly
40 ;
41 N STR
42 ;
43 S:'$G(DT) DT=$$DT^XLFDT
44 ;
45 ; hl7 - compress & transmit hl7 data to cm national
46 ; database, and purge file #8973.1 (CM HL7 DATA) of old data
47 S STR=$$NOW^XLFDT
48 D WEEKLY^KMPDHU01(DT,1)
49 ; store start, stop and delta times for weekly background job
50 D STRSTP^KMPDUTL2(3,2,1,STR)
51 ;
52 ; purge entries from file 8973.2 (CP TIMING)
53 S STR=$$NOW^XLFDT
54 D PURGE1^KMPDUTL3
55 D STRSTP^KMPDUTL2(4,2,2,STR)
56 ;
57 Q
Note: See TracBrowser for help on using the repository browser.