[613] | 1 | DGMTSCU1 ;ALB/RMO/CAW - Means Test Screen Display Utilities ;21 JAN 1992 8:00 pm
|
---|
| 2 | ;;5.3;Registration;**166**;Aug 13, 1993
|
---|
| 3 | ;
|
---|
| 4 | YN(X) ;Output Yes/No
|
---|
| 5 | ; Input -- X 1, 0 or ""
|
---|
| 6 | ; Output -- YES, NO or UNANSWERED
|
---|
| 7 | N Y
|
---|
| 8 | S Y=$S(X:"YES",X="":"UNANSWERED",1:"NO")
|
---|
| 9 | Q $G(Y)
|
---|
| 10 | ;
|
---|
| 11 | AMT(X) ;Output Dollar Amount
|
---|
| 12 | ; Input -- X Amount
|
---|
| 13 | ; Output -- Dollar amount
|
---|
| 14 | N Y
|
---|
| 15 | I X]"" S $P(X,".",2)=$E($P(X,".",2)_"00",1,2)
|
---|
| 16 | S Y=$S(X]"":"$"_X,1:"-")
|
---|
| 17 | Q $G(Y)
|
---|
| 18 | ;
|
---|
| 19 | DATE(X) ;Output Date
|
---|
| 20 | ; Input -- X Date
|
---|
| 21 | ; Output -- Date
|
---|
| 22 | N Y
|
---|
| 23 | S Y=$$FMTE^XLFDT(X,"5DF") I Y]"" S Y=$TR(Y," ","0")
|
---|
| 24 | Q $G(Y)
|
---|
| 25 | ;
|
---|
| 26 | LYR(X) ;Last Year
|
---|
| 27 | ; Input -- X Date
|
---|
| 28 | ; Output -- Last Year
|
---|
| 29 | N Y
|
---|
| 30 | S Y=$E(X,1,3)-1_"0000"
|
---|
| 31 | Q $G(Y)
|
---|
| 32 | ;
|
---|
| 33 | TOT(X,R1,R2) ;Compute Total
|
---|
| 34 | ; Input -- X String to total
|
---|
| 35 | ; R1 Beginning of range
|
---|
| 36 | ; R2 End of Range
|
---|
| 37 | ; Output -- Total
|
---|
| 38 | N I,Y
|
---|
| 39 | S Y=0 F I=R1:1:R2 S Y=Y+$P(X,"^",I)
|
---|
| 40 | Q $G(Y)
|
---|
| 41 | ;
|
---|
| 42 | UL(X,L) ;Underline
|
---|
| 43 | ; Input -- X Underline Character
|
---|
| 44 | ; Output -- Underline String
|
---|
| 45 | W ?131,$C(13) W:X["-" !
|
---|
| 46 | Q $G(L)
|
---|
| 47 | ;
|
---|
| 48 | HIGH(Z,ACT) ; Highlight certain text
|
---|
| 49 | ; Input -- Z Character(s) to highlight
|
---|
| 50 | ; ACT MT action
|
---|
| 51 | ; Ouput -- Hightlighted character
|
---|
| 52 | W ! S Z=$S(ACT="VEW":"<"_Z_">",1:"["_Z_"]")
|
---|
| 53 | I ACT="VEW" W Z Q
|
---|
| 54 | I ACT'="VEW"!($E(Z)="[") W DGVI,Z,DGVO
|
---|
| 55 | Q
|
---|