DGMTU23 ;ALB/CAW/LD,LBD - Display means test information 12/20/01
;;5.3;Registration;**33,182,254,272,420,435,456,624,1015**;Aug 13, 1993;Build 21
;
;
DISPLAY(DGMTI,DGMTYPT) ;Display means test data
; Input: DGMTI - IEN of MT
; DGMTYPT - Type of Test
; Output: None
N DGFCOL,DGSCOL,DGMTDIS,DGMTDI2,DGMTWP,WP,X,X1,Y,Y1,Z,DGSOURCE
S (DGMTWP,WP)=0,DGFCOL=24,DGSCOL=65
S DGMTDIS=^DGMT(408.31,DGMTI,0) I $D(^("C")) F S DGMTWP=$O(^DGMT(408.31,DGMTI,"C",DGMTWP)) Q:'DGMTWP S DGMTDIS(DGMTWP)=^(DGMTWP,0)
S X="",X=$$SETSTR^VALM1("Patient:",X,15,8)
S X=$$SETSTR^VALM1($P(^DPT($P(DGMTDIS,U,2),0),U),X,DGFCOL,25)
S X=$$SETSTR^VALM1("Date of Test:",X,51,13)
S X=$$SETSTR^VALM1($$FTIME^DGMTUTL($P(DGMTDIS,U)),X,DGSCOL,15)
W !!,X
S X="",X=$$SETSTR^VALM1("Total Dependents:",X,6,17)
S X=$$SETSTR^VALM1($P(DGMTDIS,U,18),X,DGFCOL,25)
S X=$$SETSTR^VALM1("Type Of Test:",X,51,13)
S X=$$SETSTR^VALM1($P($G(^DG(408.33,+$P(DGMTDIS,U,19),0)),U),X,DGSCOL,15)
W !,X
S X="",X=$$SETSTR^VALM1("Status:",X,16,7)
S X=$$SETSTR^VALM1($P(^DG(408.32,$P(DGMTDIS,U,3),0),U),X,DGFCOL,25)
S X=$$SETSTR^VALM1("Date/Time Completed:",X,44,20)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,7)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,7)),1:""),X,DGSCOL,15)
W !,X
S X="",X=$$SETSTR^VALM1("Primary Test For Year:",X,1,22)
S X1=$G(^DGMT(408.31,DGMTI,"PRIM")),X=$$SETSTR^VALM1($S(X1=1:"YES",X1=0:"NO",1:"UNKNOWN"),X,DGFCOL,25)
S X=$$SETSTR^VALM1("Source Of Test:",X,49,15)
S DGSOURCE=$$SR^DGMTAUD1(DGMTDIS)
I DGSOURCE="OTHER FACILITY" S DGSOURCE=$P($G(^DGMT(408.31,DGMTI,2)),"^",5)
S X=$$SETSTR^VALM1(DGSOURCE,X,DGSCOL,15)
W !,X
S X="",X=$$SETSTR^VALM1("Income:",X,16,7)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,4)'="":"$"_$P(DGMTDIS,U,4),1:""),X,DGFCOL,25)
S X=$$SETSTR^VALM1("Completed By:",X,51,13)
S X=$$SETSTR^VALM1($P($G(^VA(200,+$P(DGMTDIS,U,6),0)),U),X,DGSCOL,15)
W !,X
S X=""
I DGMTYPT=1 D
.S X=$$SETSTR^VALM1("Net Worth:",X,13,10)
.S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,5)'="":"$"_$P(DGMTDIS,U,5),1:""),X,DGFCOL,25)
.S X=$$SETSTR^VALM1("Date/Time Category Changed:",X,37,28)
.S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,9)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,9)),1:""),X,DGSCOL,15)
.W !,X
S X=""
S X=$$SETSTR^VALM1("Deductible Expenses:",X,3,20)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,15)'="":$$AMT^DGMTSCU1($P(DGMTDIS,U,15)),1:""),X,DGFCOL,25)
I DGMTYPT=1 D
.S X=$$SETSTR^VALM1("Category Changed By:",X,44,25)
.S X=$$SETSTR^VALM1($P($G(^VA(200,+$P(DGMTDIS,U,8),0)),U),X,DGSCOL,15)
W !,X
S X=""
I DGMTYPT=1 D
.S X=$$SETSTR^VALM1("Agreed to Pay Deduct.:",X,1,22)
.S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,11)=1:"YES",$P(DGMTDIS,U,11)=0:"NO",1:""),X,DGFCOL,25)
.S X=$$SETSTR^VALM1("Adjudicated Date/Time:",X,42,28)
.S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,10)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,10)),1:""),X,DGSCOL,15)
.W !,X
S X=""
S X=$$SETSTR^VALM1("Declines Income Info:",X,2,21)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,14)=1:"YES",$P(DGMTDIS,U,14)=0:"NO",1:""),X,DGFCOL,25)
S Y=$S(DGMTYPT=1:"No Longer Required Date:",1:"No Longer Applicable Date:"),Z=$S(DGMTYPT=1:40,1:38)
S X=$$SETSTR^VALM1(Y,X,Z,28)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,17)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,17)),1:""),X,DGSCOL,15)
W !,X
S (X,Y)=""
I DGMTYPT=1 D
.S X=$$SETSTR^VALM1("MT Threshold:",X,10,13)
.S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,12)'="":"$"_$P(DGMTDIS,U,12),1:""),X,DGFCOL,25)
.I $P(DGMTDIS,U,20) D
..S X=$$SETSTR^VALM1("Hardship Review Date:",X,43,21)
..S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,21)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,21)),1:""),X,DGSCOL,15)
.W !,X
;
S X=""
S X=$$SETSTR^VALM1("GMT Threshold:",X,9,14)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,27)'="":"$"_$P(DGMTDIS,U,27),1:""),X,DGFCOL,25)
W !,X
;
S X=""
S X=$$SETSTR^VALM1("Date Vet Signed Test:",X,2,21)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,24)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,24)),1:""),X,DGFCOL,25)
I $G(^DGMT(408.31,DGMTI,"PURGE"))'="" D
.S X=$$SETSTR^VALM1("Income Data Purged:",X,45,19)
.S X1=^DGMT(408.31,DGMTI,"PURGE")
.S X=$$SETSTR^VALM1($$FTIME^DGMTUTL(X1),X,DGSCOL,15)
W !,X
;
S X=""
S X=$$SETSTR^VALM1("Means Test Signed?:",X,4,19)
S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,29)=1:"YES",$P(DGMTDIS,U,29)=0:"NO",$P(DGMTDIS,U,29)=9:"DELETED",1:""),X,DGFCOL,25)
W !,X
;
S (X,Y,Y1,Z)=""
I DGMTYPT=1 D
.I $P($G(^DG(408.34,+$P(DGMTDIS,U,23),0)),U)="IVM" D
..;S X=$$SETSTR^VALM1("Date Vet Signed Test:",X,2,21)
..;S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,24)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,24)),1:""),X,DGFCOL,25)
..S Y=$$SETSTR^VALM1("Refused to Sign:",Y,7,16)
..S Y=$$SETSTR^VALM1($S($P(DGMTDIS,U,26)=1:"YES",$P(DGMTDIS,U,26)=0:"NO",1:""),Y,DGFCOL,25)
..S Z=$$SETSTR^VALM1("Date IVM MT Completed:",Z,1,22)
..S Z=$$SETSTR^VALM1($S($P(DGMTDIS,U,25)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,25)),1:""),Z,DGFCOL,25)
.I $P(DGMTDIS,U,21) D
..S DGMTDI2=$G(^DGMT(408.31,DGMTI,2))
..S X=$$SETSTR^VALM1("Hardship Approved By:",X,43,21)
..I +$P(DGMTDI2,U,4)=$$INST^DGENU() D
...S X=$$SETSTR^VALM1($P($G(^VA(200,+$P(DGMTDIS,U,22),0)),U),X,DGSCOL,15)
..E S X=$$SETSTR^VALM1("OTHER VAMC",X,DGSCOL,15)
..S Y=$$SETSTR^VALM1("Hardship Review Site:",Y,43,21)
..S Y=$$SETSTR^VALM1($P($G(^DIC(4,+$P(DGMTDI2,"^",4),0)),"^"),Y,DGSCOL,15)
..S Y1=$$SETSTR^VALM1("Hardship Reason:",Y1,7,16)
..S Y1=$$SETSTR^VALM1($P(DGMTDI2,U,9),Y1,DGFCOL,80)
.W !,X,!,Y,!,Y1,!,Z
W !,"COMMENT(S):" F S WP=$O(DGMTDIS(WP)) Q:'WP D
.W !,DGMTDIS(WP)
Q
DGMTU23 ;ALB/CAW/LD,LBD - Display means test information 12/20/01
+1 ;;5.3;Registration;**33,182,254,272,420,435,456,624,1015**;Aug 13, 1993;Build 21
+2 ;
+3 ;
DISPLAY(DGMTI,DGMTYPT) ;Display means test data
+1 ; Input: DGMTI - IEN of MT
+2 ; DGMTYPT - Type of Test
+3 ; Output: None
+4 NEW DGFCOL,DGSCOL,DGMTDIS,DGMTDI2,DGMTWP,WP,X,X1,Y,Y1,Z,DGSOURCE
+5 SET (DGMTWP,WP)=0
SET DGFCOL=24
SET DGSCOL=65
+6 SET DGMTDIS=^DGMT(408.31,DGMTI,0)
IF $DATA(^("C"))
FOR
SET DGMTWP=$ORDER(^DGMT(408.31,DGMTI,"C",DGMTWP))
IF 'DGMTWP
QUIT
SET DGMTDIS(DGMTWP)=^(DGMTWP,0)
+7 SET X=""
SET X=$$SETSTR^VALM1("Patient:",X,15,8)
+8 SET X=$$SETSTR^VALM1($PIECE(^DPT($PIECE(DGMTDIS,U,2),0),U),X,DGFCOL,25)
+9 SET X=$$SETSTR^VALM1("Date of Test:",X,51,13)
+10 SET X=$$SETSTR^VALM1($$FTIME^DGMTUTL($PIECE(DGMTDIS,U)),X,DGSCOL,15)
+11 WRITE !!,X
+12 SET X=""
SET X=$$SETSTR^VALM1("Total Dependents:",X,6,17)
+13 SET X=$$SETSTR^VALM1($PIECE(DGMTDIS,U,18),X,DGFCOL,25)
+14 SET X=$$SETSTR^VALM1("Type Of Test:",X,51,13)
+15 SET X=$$SETSTR^VALM1($PIECE($GET(^DG(408.33,+$PIECE(DGMTDIS,U,19),0)),U),X,DGSCOL,15)
+16 WRITE !,X
+17 SET X=""
SET X=$$SETSTR^VALM1("Status:",X,16,7)
+18 SET X=$$SETSTR^VALM1($PIECE(^DG(408.32,$PIECE(DGMTDIS,U,3),0),U),X,DGFCOL,25)
+19 SET X=$$SETSTR^VALM1("Date/Time Completed:",X,44,20)
+20 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,7)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,7)),1:""),X,DGSCOL,15)
+21 WRITE !,X
+22 SET X=""
SET X=$$SETSTR^VALM1("Primary Test For Year:",X,1,22)
+23 SET X1=$GET(^DGMT(408.31,DGMTI,"PRIM"))
SET X=$$SETSTR^VALM1($SELECT(X1=1:"YES",X1=0:"NO",1:"UNKNOWN"),X,DGFCOL,25)
+24 SET X=$$SETSTR^VALM1("Source Of Test:",X,49,15)
+25 SET DGSOURCE=$$SR^DGMTAUD1(DGMTDIS)
+26 IF DGSOURCE="OTHER FACILITY"
SET DGSOURCE=$PIECE($GET(^DGMT(408.31,DGMTI,2)),"^",5)
+27 SET X=$$SETSTR^VALM1(DGSOURCE,X,DGSCOL,15)
+28 WRITE !,X
+29 SET X=""
SET X=$$SETSTR^VALM1("Income:",X,16,7)
+30 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,4)'="":"$"_$PIECE(DGMTDIS,U,4),1:""),X,DGFCOL,25)
+31 SET X=$$SETSTR^VALM1("Completed By:",X,51,13)
+32 SET X=$$SETSTR^VALM1($PIECE($GET(^VA(200,+$PIECE(DGMTDIS,U,6),0)),U),X,DGSCOL,15)
+33 WRITE !,X
+34 SET X=""
+35 IF DGMTYPT=1
Begin DoDot:1
+36 SET X=$$SETSTR^VALM1("Net Worth:",X,13,10)
+37 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,5)'="":"$"_$PIECE(DGMTDIS,U,5),1:""),X,DGFCOL,25)
+38 SET X=$$SETSTR^VALM1("Date/Time Category Changed:",X,37,28)
+39 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,9)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,9)),1:""),X,DGSCOL,15)
+40 WRITE !,X
End DoDot:1
+41 SET X=""
+42 SET X=$$SETSTR^VALM1("Deductible Expenses:",X,3,20)
+43 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,15)'="":$$AMT^DGMTSCU1($PIECE(DGMTDIS,U,15)),1:""),X,DGFCOL,25)
+44 IF DGMTYPT=1
Begin DoDot:1
+45 SET X=$$SETSTR^VALM1("Category Changed By:",X,44,25)
+46 SET X=$$SETSTR^VALM1($PIECE($GET(^VA(200,+$PIECE(DGMTDIS,U,8),0)),U),X,DGSCOL,15)
End DoDot:1
+47 WRITE !,X
+48 SET X=""
+49 IF DGMTYPT=1
Begin DoDot:1
+50 SET X=$$SETSTR^VALM1("Agreed to Pay Deduct.:",X,1,22)
+51 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,11)=1:"YES",$PIECE(DGMTDIS,U,11)=0:"NO",1:""),X,DGFCOL,25)
+52 SET X=$$SETSTR^VALM1("Adjudicated Date/Time:",X,42,28)
+53 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,10)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,10)),1:""),X,DGSCOL,15)
+54 WRITE !,X
End DoDot:1
+55 SET X=""
+56 SET X=$$SETSTR^VALM1("Declines Income Info:",X,2,21)
+57 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,14)=1:"YES",$PIECE(DGMTDIS,U,14)=0:"NO",1:""),X,DGFCOL,25)
+58 SET Y=$SELECT(DGMTYPT=1:"No Longer Required Date:",1:"No Longer Applicable Date:")
SET Z=$SELECT(DGMTYPT=1:40,1:38)
+59 SET X=$$SETSTR^VALM1(Y,X,Z,28)
+60 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,17)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,17)),1:""),X,DGSCOL,15)
+61 WRITE !,X
+62 SET (X,Y)=""
+63 IF DGMTYPT=1
Begin DoDot:1
+64 SET X=$$SETSTR^VALM1("MT Threshold:",X,10,13)
+65 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,12)'="":"$"_$PIECE(DGMTDIS,U,12),1:""),X,DGFCOL,25)
+66 IF $PIECE(DGMTDIS,U,20)
Begin DoDot:2
+67 SET X=$$SETSTR^VALM1("Hardship Review Date:",X,43,21)
+68 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,21)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,21)),1:""),X,DGSCOL,15)
End DoDot:2
+69 WRITE !,X
End DoDot:1
+70 ;
+71 SET X=""
+72 SET X=$$SETSTR^VALM1("GMT Threshold:",X,9,14)
+73 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,27)'="":"$"_$PIECE(DGMTDIS,U,27),1:""),X,DGFCOL,25)
+74 WRITE !,X
+75 ;
+76 SET X=""
+77 SET X=$$SETSTR^VALM1("Date Vet Signed Test:",X,2,21)
+78 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,24)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,24)),1:""),X,DGFCOL,25)
+79 IF $GET(^DGMT(408.31,DGMTI,"PURGE"))'=""
Begin DoDot:1
+80 SET X=$$SETSTR^VALM1("Income Data Purged:",X,45,19)
+81 SET X1=^DGMT(408.31,DGMTI,"PURGE")
+82 SET X=$$SETSTR^VALM1($$FTIME^DGMTUTL(X1),X,DGSCOL,15)
End DoDot:1
+83 WRITE !,X
+84 ;
+85 SET X=""
+86 SET X=$$SETSTR^VALM1("Means Test Signed?:",X,4,19)
+87 SET X=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,29)=1:"YES",$PIECE(DGMTDIS,U,29)=0:"NO",$PIECE(DGMTDIS,U,29)=9:"DELETED",1:""),X,DGFCOL,25)
+88 WRITE !,X
+89 ;
+90 SET (X,Y,Y1,Z)=""
+91 IF DGMTYPT=1
Begin DoDot:1
+92 IF $PIECE($GET(^DG(408.34,+$PIECE(DGMTDIS,U,23),0)),U)="IVM"
Begin DoDot:2
+93 ;S X=$$SETSTR^VALM1("Date Vet Signed Test:",X,2,21)
+94 ;S X=$$SETSTR^VALM1($S($P(DGMTDIS,U,24)'="":$$FTIME^DGMTUTL($P(DGMTDIS,U,24)),1:""),X,DGFCOL,25)
+95 SET Y=$$SETSTR^VALM1("Refused to Sign:",Y,7,16)
+96 SET Y=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,26)=1:"YES",$PIECE(DGMTDIS,U,26)=0:"NO",1:""),Y,DGFCOL,25)
+97 SET Z=$$SETSTR^VALM1("Date IVM MT Completed:",Z,1,22)
+98 SET Z=$$SETSTR^VALM1($SELECT($PIECE(DGMTDIS,U,25)'="":$$FTIME^DGMTUTL($PIECE(DGMTDIS,U,25)),1:""),Z,DGFCOL,25)
End DoDot:2
+99 IF $PIECE(DGMTDIS,U,21)
Begin DoDot:2
+100 SET DGMTDI2=$GET(^DGMT(408.31,DGMTI,2))
+101 SET X=$$SETSTR^VALM1("Hardship Approved By:",X,43,21)
+102 IF +$PIECE(DGMTDI2,U,4)=$$INST^DGENU()
Begin DoDot:3
+103 SET X=$$SETSTR^VALM1($PIECE($GET(^VA(200,+$PIECE(DGMTDIS,U,22),0)),U),X,DGSCOL,15)
End DoDot:3
+104 IF '$TEST
SET X=$$SETSTR^VALM1("OTHER VAMC",X,DGSCOL,15)
+105 SET Y=$$SETSTR^VALM1("Hardship Review Site:",Y,43,21)
+106 SET Y=$$SETSTR^VALM1($PIECE($GET(^DIC(4,+$PIECE(DGMTDI2,"^",4),0)),"^"),Y,DGSCOL,15)
+107 SET Y1=$$SETSTR^VALM1("Hardship Reason:",Y1,7,16)
+108 SET Y1=$$SETSTR^VALM1($PIECE(DGMTDI2,U,9),Y1,DGFCOL,80)
End DoDot:2
+109 WRITE !,X,!,Y,!,Y1,!,Z
End DoDot:1
+110 WRITE !,"COMMENT(S):"
FOR
SET WP=$ORDER(DGMTDIS(WP))
IF 'WP
QUIT
Begin DoDot:1
+111 WRITE !,DGMTDIS(WP)
End DoDot:1
+112 QUIT