GMTS2 ;SLC/SBW - Health Summary Driver Cont. ; 02/11/2003
;;2.7;Health Summary;**2,58,62**;Oct 20, 1995
;
TDISBLD ; Temporarily Disabled Components
D CKP^GMTSUP Q:$D(GMTSQIT) W "Temporarily disabled",!
I GMOOTXT]"" D CKP^GMTSUP Q:$D(GMTSQIT) W GMOOTXT,!
Q
PDISBLD ; Permanently Disabled Components
D CKP^GMTSUP Q:$D(GMTSQIT) W "Permanently disabled",!
I GMOOTXT]"" D CKP^GMTSUP Q:$D(GMTSQIT) W GMOOTXT,!
Q
NOMATCH ; User doesn't hold Security Key
D CKP^GMTSUP Q:$D(GMTSQIT)
W "This component is locked with security key "_GMTSLOCK_".",!
Q
NOSELECT ; No Selection Items
; Handles cases where components that require
; selection items have no selection items defined.
D CKP^GMTSUP Q:$D(GMTSQIT)
W "No selection items chosen for this component.",!
Q
NODATA ; No Data
; This will display "No Data Available" for commponents
; components that retrieve no data.
N SELNAME I $D(GMTSQIT),(GMTSQIT="") Q
Q:GMTSWRIT=0 I $G(GMSUPRES)="Y" K:$D(GMTSOBJ) GMTSEG(+($G(GMTSEGN)))
I $E(IOST,1)'="C" Q:$G(GMSUPRES)="Y"
I GMSEL]"" D GETSEL,DISPSEL Q
D CKP^GMTSUP Q:$D(GMTSQIT) W:'$D(GMTSOBJ) !
D CKP^GMTSUP Q:$D(GMTSQIT) W " No data available",!
Q
GETSEL ; Get Selection Items
N GMX,GMI,GMDA,GMFROOT,GMROOT,GMNODE
S GMFROOT=$G(GMTSEG(GMTSEGN,GMSEL,0))
Q:GMFROOT=""
S (GMX,GMI)=0
F S GMI=$O(GMTSEG(GMTSEGN,GMSEL,GMI)) Q:GMI'>0 D
. S GMDA=$G(GMTSEG(GMTSEGN,GMSEL,GMI))
. S GMROOT=GMFROOT_GMDA_",0)"
. S GMNODE=$G(@GMROOT)
. I GMDA]"",GMROOT]"" S GMX=GMX+1,SELNAME(GMX)=$P(GMNODE,U)
Q
DISPSEL ; Display selection items
N GMI,GMX
D CKP^GMTSUP Q:$D(GMTSQIT) W " No data available for "
S (GMI,GMX)=0
F S GMI=$O(SELNAME(GMI)) Q:GMI'>0 D
. S GMX=GMX+1
. W:GMX>1 "; "
. W:(77)'>($X+$L(SELNAME(GMI))) !
. D CKP^GMTSUP Q:$D(GMTSQIT) W SELNAME(GMI)
W !
Q
GMTS2 ;SLC/SBW - Health Summary Driver Cont. ; 02/11/2003
+1 ;;2.7;Health Summary;**2,58,62**;Oct 20, 1995
+2 ;
TDISBLD ; Temporarily Disabled Components
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE "Temporarily disabled",!
+2 IF GMOOTXT]""
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE GMOOTXT,!
+3 QUIT
PDISBLD ; Permanently Disabled Components
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE "Permanently disabled",!
+2 IF GMOOTXT]""
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE GMOOTXT,!
+3 QUIT
NOMATCH ; User doesn't hold Security Key
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
+2 WRITE "This component is locked with security key "_GMTSLOCK_".",!
+3 QUIT
NOSELECT ; No Selection Items
+1 ; Handles cases where components that require
+2 ; selection items have no selection items defined.
+3 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
+4 WRITE "No selection items chosen for this component.",!
+5 QUIT
NODATA ; No Data
+1 ; This will display "No Data Available" for commponents
+2 ; components that retrieve no data.
+3 NEW SELNAME
IF $DATA(GMTSQIT)
IF (GMTSQIT="")
QUIT
+4 IF GMTSWRIT=0
QUIT
IF $GET(GMSUPRES)="Y"
IF $DATA(GMTSOBJ)
KILL GMTSEG(+($GET(GMTSEGN)))
+5 IF $EXTRACT(IOST,1)'="C"
IF $GET(GMSUPRES)="Y"
QUIT
+6 IF GMSEL]""
DO GETSEL
DO DISPSEL
QUIT
+7 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
IF '$DATA(GMTSOBJ)
WRITE !
+8 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE " No data available",!
+9 QUIT
GETSEL ; Get Selection Items
+1 NEW GMX,GMI,GMDA,GMFROOT,GMROOT,GMNODE
+2 SET GMFROOT=$GET(GMTSEG(GMTSEGN,GMSEL,0))
+3 IF GMFROOT=""
QUIT
+4 SET (GMX,GMI)=0
+5 FOR
SET GMI=$ORDER(GMTSEG(GMTSEGN,GMSEL,GMI))
IF GMI'>0
QUIT
Begin DoDot:1
+6 SET GMDA=$GET(GMTSEG(GMTSEGN,GMSEL,GMI))
+7 SET GMROOT=GMFROOT_GMDA_",0)"
+8 SET GMNODE=$GET(@GMROOT)
+9 IF GMDA]""
IF GMROOT]""
SET GMX=GMX+1
SET SELNAME(GMX)=$PIECE(GMNODE,U)
End DoDot:1
+10 QUIT
DISPSEL ; Display selection items
+1 NEW GMI,GMX
+2 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE " No data available for "
+3 SET (GMI,GMX)=0
+4 FOR
SET GMI=$ORDER(SELNAME(GMI))
IF GMI'>0
QUIT
Begin DoDot:1
+5 SET GMX=GMX+1
+6 IF GMX>1
WRITE "; "
+7 IF (77)'>($X+$LENGTH(SELNAME(GMI)))
WRITE !
+8 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE SELNAME(GMI)
End DoDot:1
+9 WRITE !
+10 QUIT