GMTSXPS2 ; SLC/KER - Health Summary Status ; 08/27/2002
;;2.7;Health Summary;**35,56**;Oct 20, 1995
;
; External References
; DBIA 10048 ^DIC(9.4,
; DBIA 10006 IX^DIC
; DBIA 2056 $$GET1^DIQ (file 9.4)
;
Q
INS ; Get Installations
N GMTS0,GMTSDT,GMTSEQ,GMTSI,GMTSIENS,GMTSIN,GMTSN,GMTSNM,GMTSP
N GMTSPAT,GMTSPD,GMTSPDE,GMTSPI,GMTSST,GMTSTDT,GMTSTN,GMTSTNM
N GMTSV,GMTSVD,GMTSVDE,GMTSVDS,GMTSVI,GMTSNX,X,DIC,X,Y,DTOUT
N DUOUT,DLAYGO,DINUM S GMTSI=$$PKGI Q:+GMTSI=0 S GMTSV=2.7
S GMTSVI=$$VERI(GMTSI,GMTSV) Q:GMTSVI=0
S GMTSIENS=GMTSVI_","_GMTSI_","
S GMTSVDE=$$GET1^DIQ(9.49,GMTSIENS,2,"I")
S GMTSVDS=$$GET1^DIQ(9.49,GMTSIENS,1,"I")
S GMTSVD="" S:+GMTSVDE>0 GMTSVD=+GMTSVDE
S:+GMTSVD=0&(+GMTSVDS>0) GMTSVD=+GMTSVDS S:+GMTSVD>0&(+GMTSVDE>+GMTSVD) GMTSVD=+GMTSVDE Q:+GMTSVD=0
S GMTSVDE=$$EDT^GMTSXPS1($P(GMTSVD,".",1)) K GMTSVDS S GMTSIN(1,1)="Health Summary "_GMTSV_"^"_GMTSVDE
S GMTSPI=0 F S GMTSPI=$O(^DIC(9.4,GMTSI,22,GMTSVI,"PAH",GMTSPI)) Q:+GMTSPI=0 D
. S GMTSIENS=GMTSPI_","_GMTSVI_","_GMTSI_","
. S GMTSP=$$GET1^DIQ(9.4901,GMTSIENS,.01) Q:'$L(GMTSP) Q:+GMTSP=0
. S GMTSPD=$$GET1^DIQ(9.4901,GMTSIENS,.02,"I") Q:+GMTSPD=0
. S GMTSEQ="Test" S:GMTSP["SEQ #" GMTSEQ=+($P(GMTSP,"SEQ #",2)) S:+($G(GMTSEQ))=0 GMTSEQ="Test"
. S GMTSPAT=+GMTSP,GMTSPDE=$$EDT^GMTSXPS1(GMTSPD) Q:'$L(GMTSPDE)
. S GMTSIN(2,GMTSPAT,GMTSEQ)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
. S:$L(GMTSEQ)&(+GMTSEQ>0) GMTSIN(2,"SEQ",GMTSEQ,GMTSPAT)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
. S:$L(GMTSEQ)&(GMTSEQ["Test") GMTSIN(2,"SEQT",GMTSEQ,GMTSPAT)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
; Package
S GMTSN=GMTSIN(1,1),GMTSNM=$P(GMTSN,"^",1),GMTSDT=$P(GMTSN,"^",2),GMTSST="" D HD,SI
; Patches Installed in Sequence
S GMTSEQ=0 F S GMTSEQ=$O(GMTSIN(2,"SEQ",GMTSEQ)) Q:+GMTSEQ=0 D
. S GMTSP=0 F S GMTSP=$O(GMTSIN(2,"SEQ",GMTSEQ,GMTSP)) Q:+GMTSP=0 D
. . S GMTSN=$G(GMTSIN(2,GMTSP,GMTSEQ)) Q:'$L(GMTSN)
. . S GMTSNM=$P(GMTSN,"^",1) Q:'$L(GMTSNM)
. . S GMTSDT=$P(GMTSN,"^",2) Q:'$L(GMTSDT)
. . S GMTSST=""
. . I $D(GMTSIN(2,"SEQT","Test",GMTSP)) D
. . . N GMTSTN,GMTSTNM,GMTSTDT S GMTSTN=$G(GMTSIN(2,GMTSP,"Test")) I '$L(GMTSTN) K GMTSIN(2,"SEQT","Test",GMTSP) Q
. . . S GMTSTNM=$P(GMTSTN,"^",1) I '$L(GMTSTNM) K GMTSIN(2,"SEQT","Test",GMTSP) Q
. . . S GMTSTDT=$P(GMTSTN,"^",2) I '$L(GMTSTDT) K GMTSIN(2,"SEQT","Test",GMTSP) Q
. . . N GMTSNM,GMTSDT,GMTSST S GMTSNM=GMTSTNM,GMTSDT=GMTSTDT,GMTSST="Test"
. . . D SI K GMTSIN(2,"SEQT","Test",GMTSP)
. . D SI
; Other Patches Installed (test patches)
I $D(GMTSIN(2,"SEQT")) D
. N GMTSP,GMTSTN,GMTSTNM,GMTSTDT
. S GMTSP=0 F S GMTSP=$O(GMTSIN(2,"SEQT","Test",GMTSP)) Q:+GMTSP=0 D
. . S GMTSTN=$G(GMTSIN(2,GMTSP,"Test")) I '$L(GMTSTN) K GMTSIN(2,"SEQT","Test",GMTSP) Q
. . S GMTSTNM=$P(GMTSTN,"^",1) I '$L(GMTSTNM) K GMTSIN(2,"SEQT","Test",GMTSP) Q
. . S GMTSTDT=$P(GMTSTN,"^",2) I '$L(GMTSTDT) K GMTSIN(2,"SEQT","Test",GMTSP) Q
. . S GMTSNM=GMTSTNM,GMTSDT=GMTSTDT,GMTSST="Test"
. . D SI K GMTSIN(2,"SEQT","Test",GMTSP)
D BL^GMTSXPS1
Q
PKGI(X) ; Package
N D,Y,DIC,DTOUT,DUOUT S DIC(0)="I",D="C"
S X="GMTS",DIC="^DIC(9.4,"
D IX^DIC S X=0 S:+Y>0 X=+Y Q X
VERI(X,Y) ; Version
N DA,D,DIC,DTOUT,DUOUT S DIC(0)="I",D="B" S DA(1)=+($G(X))
Q:DA(1)=0 0 S X=+($G(Y)) Q:X=0 0 S DIC="^DIC(9.4,"_DA(1)_",22,"
D IX^DIC S X=0 S:+Y>0 X=+Y Q X
; Report
HD ; Header
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)
Q
SI ; Site Installs
S GMTSNM=$G(GMTSNM) Q:'$L(GMTSNM) S GMTSDT=$G(GMTSDT) Q:'$L(GMTSDT) S GMTSST=$G(GMTSST)
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)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSXPS2 3769 printed Nov 22, 2024@17:11:09 Page 2
GMTSXPS2 ; SLC/KER - Health Summary Status ; 08/27/2002
+1 ;;2.7;Health Summary;**35,56**;Oct 20, 1995
+2 ;
+3 ; External References
+4 ; DBIA 10048 ^DIC(9.4,
+5 ; DBIA 10006 IX^DIC
+6 ; DBIA 2056 $$GET1^DIQ (file 9.4)
+7 ;
+8 QUIT
INS ; Get Installations
+1 NEW GMTS0,GMTSDT,GMTSEQ,GMTSI,GMTSIENS,GMTSIN,GMTSN,GMTSNM,GMTSP
+2 NEW GMTSPAT,GMTSPD,GMTSPDE,GMTSPI,GMTSST,GMTSTDT,GMTSTN,GMTSTNM
+3 NEW GMTSV,GMTSVD,GMTSVDE,GMTSVDS,GMTSVI,GMTSNX,X,DIC,X,Y,DTOUT
+4 NEW DUOUT,DLAYGO,DINUM
SET GMTSI=$$PKGI
if +GMTSI=0
QUIT
SET GMTSV=2.7
+5 SET GMTSVI=$$VERI(GMTSI,GMTSV)
if GMTSVI=0
QUIT
+6 SET GMTSIENS=GMTSVI_","_GMTSI_","
+7 SET GMTSVDE=$$GET1^DIQ(9.49,GMTSIENS,2,"I")
+8 SET GMTSVDS=$$GET1^DIQ(9.49,GMTSIENS,1,"I")
+9 SET GMTSVD=""
if +GMTSVDE>0
SET GMTSVD=+GMTSVDE
+10 if +GMTSVD=0&(+GMTSVDS>0)
SET GMTSVD=+GMTSVDS
if +GMTSVD>0&(+GMTSVDE>+GMTSVD)
SET GMTSVD=+GMTSVDE
if +GMTSVD=0
QUIT
+11 SET GMTSVDE=$$EDT^GMTSXPS1($PIECE(GMTSVD,".",1))
KILL GMTSVDS
SET GMTSIN(1,1)="Health Summary "_GMTSV_"^"_GMTSVDE
+12 SET GMTSPI=0
FOR
SET GMTSPI=$ORDER(^DIC(9.4,GMTSI,22,GMTSVI,"PAH",GMTSPI))
if +GMTSPI=0
QUIT
Begin DoDot:1
+13 SET GMTSIENS=GMTSPI_","_GMTSVI_","_GMTSI_","
+14 SET GMTSP=$$GET1^DIQ(9.4901,GMTSIENS,.01)
if '$LENGTH(GMTSP)
QUIT
if +GMTSP=0
QUIT
+15 SET GMTSPD=$$GET1^DIQ(9.4901,GMTSIENS,.02,"I")
if +GMTSPD=0
QUIT
+16 SET GMTSEQ="Test"
if GMTSP["SEQ #"
SET GMTSEQ=+($PIECE(GMTSP,"SEQ #",2))
if +($GET(GMTSEQ))=0
SET GMTSEQ="Test"
+17 SET GMTSPAT=+GMTSP
SET GMTSPDE=$$EDT^GMTSXPS1(GMTSPD)
if '$LENGTH(GMTSPDE)
QUIT
+18 SET GMTSIN(2,GMTSPAT,GMTSEQ)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
+19 if $LENGTH(GMTSEQ)&(+GMTSEQ>0)
SET GMTSIN(2,"SEQ",GMTSEQ,GMTSPAT)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
+20 if $LENGTH(GMTSEQ)&(GMTSEQ["Test")
SET GMTSIN(2,"SEQT",GMTSEQ,GMTSPAT)="GMTS*"_GMTSV_"*"_GMTSP_"^"_GMTSPDE
End DoDot:1
+21 ; Package
+22 SET GMTSN=GMTSIN(1,1)
SET GMTSNM=$PIECE(GMTSN,"^",1)
SET GMTSDT=$PIECE(GMTSN,"^",2)
SET GMTSST=""
DO HD
DO SI
+23 ; Patches Installed in Sequence
+24 SET GMTSEQ=0
FOR
SET GMTSEQ=$ORDER(GMTSIN(2,"SEQ",GMTSEQ))
if +GMTSEQ=0
QUIT
Begin DoDot:1
+25 SET GMTSP=0
FOR
SET GMTSP=$ORDER(GMTSIN(2,"SEQ",GMTSEQ,GMTSP))
if +GMTSP=0
QUIT
Begin DoDot:2
+26 SET GMTSN=$GET(GMTSIN(2,GMTSP,GMTSEQ))
if '$LENGTH(GMTSN)
QUIT
+27 SET GMTSNM=$PIECE(GMTSN,"^",1)
if '$LENGTH(GMTSNM)
QUIT
+28 SET GMTSDT=$PIECE(GMTSN,"^",2)
if '$LENGTH(GMTSDT)
QUIT
+29 SET GMTSST=""
+30 IF $DATA(GMTSIN(2,"SEQT","Test",GMTSP))
Begin DoDot:3
+31 NEW GMTSTN,GMTSTNM,GMTSTDT
SET GMTSTN=$GET(GMTSIN(2,GMTSP,"Test"))
IF '$LENGTH(GMTSTN)
KILL GMTSIN(2,"SEQT","Test",GMTSP)
QUIT
+32 SET GMTSTNM=$PIECE(GMTSTN,"^",1)
IF '$LENGTH(GMTSTNM)
KILL GMTSIN(2,"SEQT","Test",GMTSP)
QUIT
+33 SET GMTSTDT=$PIECE(GMTSTN,"^",2)
IF '$LENGTH(GMTSTDT)
KILL GMTSIN(2,"SEQT","Test",GMTSP)
QUIT
+34 NEW GMTSNM,GMTSDT,GMTSST
SET GMTSNM=GMTSTNM
SET GMTSDT=GMTSTDT
SET GMTSST="Test"
+35 DO SI
KILL GMTSIN(2,"SEQT","Test",GMTSP)
End DoDot:3
+36 DO SI
End DoDot:2
End DoDot:1
+37 ; Other Patches Installed (test patches)
+38 IF $DATA(GMTSIN(2,"SEQT"))
Begin DoDot:1
+39 NEW GMTSP,GMTSTN,GMTSTNM,GMTSTDT
+40 SET GMTSP=0
FOR
SET GMTSP=$ORDER(GMTSIN(2,"SEQT","Test",GMTSP))
if +GMTSP=0
QUIT
Begin DoDot:2
+41 SET GMTSTN=$GET(GMTSIN(2,GMTSP,"Test"))
IF '$LENGTH(GMTSTN)
KILL GMTSIN(2,"SEQT","Test",GMTSP)
QUIT
+42 SET GMTSTNM=$PIECE(GMTSTN,"^",1)
IF '$LENGTH(GMTSTNM)
KILL GMTSIN(2,"SEQT","Test",GMTSP)
QUIT
+43 SET GMTSTDT=$PIECE(GMTSTN,"^",2)
IF '$LENGTH(GMTSTDT)
KILL GMTSIN(2,"SEQT","Test",GMTSP)
QUIT
+44 SET GMTSNM=GMTSTNM
SET GMTSDT=GMTSTDT
SET GMTSST="Test"
+45 DO SI
KILL GMTSIN(2,"SEQT","Test",GMTSP)
End DoDot:2
End DoDot:1
+46 DO BL^GMTSXPS1
+47 QUIT
PKGI(X) ; Package
+1 NEW D,Y,DIC,DTOUT,DUOUT
SET DIC(0)="I"
SET D="C"
+2 SET X="GMTS"
SET DIC="^DIC(9.4,"
+3 DO IX^DIC
SET X=0
if +Y>0
SET X=+Y
QUIT X
VERI(X,Y) ; Version
+1 NEW DA,D,DIC,DTOUT,DUOUT
SET DIC(0)="I"
SET D="B"
SET DA(1)=+($GET(X))
+2 if DA(1)=0
QUIT 0
SET X=+($GET(Y))
if X=0
QUIT 0
SET DIC="^DIC(9.4,"_DA(1)_",22,"
+3 DO IX^DIC
SET X=0
if +Y>0
SET X=+Y
QUIT X
+4 ; Report
HD ; Header
+1 NEW X
SET X=" Install Name"
SET X=X_$JUSTIFY("",28-$LENGTH(X))_"Date"
DO TL^GMTSXPS1(X)
SET X=""
SET $PIECE(X,"-",42)="-"
SET X=" "_X
DO TL^GMTSXPS1(X)
+2 QUIT
SI ; Site Installs
+1 SET GMTSNM=$GET(GMTSNM)
if '$LENGTH(GMTSNM)
QUIT
SET GMTSDT=$GET(GMTSDT)
if '$LENGTH(GMTSDT)
QUIT
SET GMTSST=$GET(GMTSST)
+2 NEW X
SET X=" "_GMTSNM
SET X=X_$JUSTIFY("",28-$LENGTH(X))_GMTSDT
if $LENGTH(GMTSST)
SET X=X_$JUSTIFY("",40-$LENGTH(X))_GMTSST
DO TL^GMTSXPS1(X)
+3 QUIT