source: FOIAVistA/trunk/r/HEALTH_SUMMARY-GMTS/GMTSXPS2.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1GMTSXPS2 ; SLC/KER - Health Summary Status ; 08/27/2002
2 ;;2.7;Health Summary;**35,56**;Oct 20, 1995
3 ;
4 ; External References
5 ; DBIA 10048 ^DIC(9.4,
6 ; DBIA 10006 IX^DIC
7 ; DBIA 2056 $$GET1^DIQ (file 9.4)
8 ;
9 Q
10INS ; Get Installations
11 N GMTS0,GMTSDT,GMTSEQ,GMTSI,GMTSIENS,GMTSIN,GMTSN,GMTSNM,GMTSP
12 N GMTSPAT,GMTSPD,GMTSPDE,GMTSPI,GMTSST,GMTSTDT,GMTSTN,GMTSTNM
13 N GMTSV,GMTSVD,GMTSVDE,GMTSVDS,GMTSVI,GMTSNX,X,DIC,X,Y,DTOUT
14 N DUOUT,DLAYGO,DINUM S GMTSI=$$PKGI Q:+GMTSI=0 S GMTSV=2.7
15 S GMTSVI=$$VERI(GMTSI,GMTSV) Q:GMTSVI=0
16 S GMTSIENS=GMTSVI_","_GMTSI_","
17 S GMTSVDE=$$GET1^DIQ(9.49,GMTSIENS,2,"I")
18 S GMTSVDS=$$GET1^DIQ(9.49,GMTSIENS,1,"I")
19 S GMTSVD="" S:+GMTSVDE>0 GMTSVD=+GMTSVDE
20 S:+GMTSVD=0&(+GMTSVDS>0) GMTSVD=+GMTSVDS S:+GMTSVD>0&(+GMTSVDE>+GMTSVD) GMTSVD=+GMTSVDE Q:+GMTSVD=0
21 S GMTSVDE=$$EDT^GMTSXPS1($P(GMTSVD,".",1)) K GMTSVDS S GMTSIN(1,1)="Health Summary "_GMTSV_"^"_GMTSVDE
22 S GMTSPI=0 F S GMTSPI=$O(^DIC(9.4,GMTSI,22,GMTSVI,"PAH",GMTSPI)) Q:+GMTSPI=0 D
23 . S GMTSIENS=GMTSPI_","_GMTSVI_","_GMTSI_","
24 . S GMTSP=$$GET1^DIQ(9.4901,GMTSIENS,.01) Q:'$L(GMTSP) Q:+GMTSP=0
25 . S GMTSPD=$$GET1^DIQ(9.4901,GMTSIENS,.02,"I") Q:+GMTSPD=0
26 . S GMTSEQ="Test" S:GMTSP["SEQ #" GMTSEQ=+($P(GMTSP,"SEQ #",2)) S:+($G(GMTSEQ))=0 GMTSEQ="Test"
27 . S GMTSPAT=+GMTSP,GMTSPDE=$$EDT^GMTSXPS1(GMTSPD) Q:'$L(GMTSPDE)
28 . S GMTSIN(2,GMTSPAT,GMTSEQ)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
29 . S:$L(GMTSEQ)&(+GMTSEQ>0) GMTSIN(2,"SEQ",GMTSEQ,GMTSPAT)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
30 . S:$L(GMTSEQ)&(GMTSEQ["Test") GMTSIN(2,"SEQT",GMTSEQ,GMTSPAT)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
31 ; Package
32 S GMTSN=GMTSIN(1,1),GMTSNM=$P(GMTSN,"^",1),GMTSDT=$P(GMTSN,"^",2),GMTSST="" D HD,SI
33 ; Patches Installed in Sequence
34 S GMTSEQ=0 F S GMTSEQ=$O(GMTSIN(2,"SEQ",GMTSEQ)) Q:+GMTSEQ=0 D
35 . S GMTSP=0 F S GMTSP=$O(GMTSIN(2,"SEQ",GMTSEQ,GMTSP)) Q:+GMTSP=0 D
36 . . S GMTSN=$G(GMTSIN(2,GMTSP,GMTSEQ)) Q:'$L(GMTSN)
37 . . S GMTSNM=$P(GMTSN,"^",1) Q:'$L(GMTSNM)
38 . . S GMTSDT=$P(GMTSN,"^",2) Q:'$L(GMTSDT)
39 . . S GMTSST=""
40 . . I $D(GMTSIN(2,"SEQT","Test",GMTSP)) D
41 . . . N GMTSTN,GMTSTNM,GMTSTDT S GMTSTN=$G(GMTSIN(2,GMTSP,"Test")) I '$L(GMTSTN) K GMTSIN(2,"SEQT","Test",GMTSP) Q
42 . . . S GMTSTNM=$P(GMTSTN,"^",1) I '$L(GMTSTNM) K GMTSIN(2,"SEQT","Test",GMTSP) Q
43 . . . S GMTSTDT=$P(GMTSTN,"^",2) I '$L(GMTSTDT) K GMTSIN(2,"SEQT","Test",GMTSP) Q
44 . . . N GMTSNM,GMTSDT,GMTSST S GMTSNM=GMTSTNM,GMTSDT=GMTSTDT,GMTSST="Test"
45 . . . D SI K GMTSIN(2,"SEQT","Test",GMTSP)
46 . . D SI
47 ; Other Patches Installed (test patches)
48 I $D(GMTSIN(2,"SEQT")) D
49 . N GMTSP,GMTSTN,GMTSTNM,GMTSTDT
50 . S GMTSP=0 F S GMTSP=$O(GMTSIN(2,"SEQT","Test",GMTSP)) Q:+GMTSP=0 D
51 . . S GMTSTN=$G(GMTSIN(2,GMTSP,"Test")) I '$L(GMTSTN) K GMTSIN(2,"SEQT","Test",GMTSP) Q
52 . . S GMTSTNM=$P(GMTSTN,"^",1) I '$L(GMTSTNM) K GMTSIN(2,"SEQT","Test",GMTSP) Q
53 . . S GMTSTDT=$P(GMTSTN,"^",2) I '$L(GMTSTDT) K GMTSIN(2,"SEQT","Test",GMTSP) Q
54 . . S GMTSNM=GMTSTNM,GMTSDT=GMTSTDT,GMTSST="Test"
55 . . D SI K GMTSIN(2,"SEQT","Test",GMTSP)
56 D BL^GMTSXPS1
57 Q
58PKGI(X) ; Package
59 N D,Y,DIC,DTOUT,DUOUT S DIC(0)="I",D="C"
60 S X="GMTS",DIC="^DIC(9.4,"
61 D IX^DIC S X=0 S:+Y>0 X=+Y Q X
62VERI(X,Y) ; Version
63 N DA,D,DIC,DTOUT,DUOUT S DIC(0)="I",D="B" S DA(1)=+($G(X))
64 Q:DA(1)=0 0 S X=+($G(Y)) Q:X=0 0 S DIC="^DIC(9.4,"_DA(1)_",22,"
65 D IX^DIC S X=0 S:+Y>0 X=+Y Q X
66 ; Report
67HD ; Header
68 N X S X=" Install Name",X=X_$J("",28-$L(X))_"Date" D TL^GMTSXPS1(X) S X="" S $P(X,"-",42)="-",X=" "_X D TL^GMTSXPS1(X)
69 Q
70SI ; Site Installs
71 S GMTSNM=$G(GMTSNM) Q:'$L(GMTSNM) S GMTSDT=$G(GMTSDT) Q:'$L(GMTSDT) S GMTSST=$G(GMTSST)
72 N X S X=" "_GMTSNM,X=X_$J("",28-$L(X))_GMTSDT S:$L(GMTSST) X=X_$J("",40-$L(X))_GMTSST D TL^GMTSXPS1(X)
73 Q
Note: See TracBrowser for help on using the repository browser.