source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTSCU1.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: 1.3 KB
Line 
1DGMTSCU1 ;ALB/RMO/CAW - Means Test Screen Display Utilities ;21 JAN 1992 8:00 pm
2 ;;5.3;Registration;**166**;Aug 13, 1993
3 ;
4YN(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 ;
11AMT(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 ;
19DATE(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 ;
26LYR(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 ;
33TOT(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 ;
42UL(X,L) ;Underline
43 ; Input -- X Underline Character
44 ; Output -- Underline String
45 W ?131,$C(13) W:X["-" !
46 Q $G(L)
47 ;
48HIGH(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
Note: See TracBrowser for help on using the repository browser.