source: FOIAVistA/trunk/r/HEALTH_SUMMARY-GMTS/GMTSXA.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: 4.3 KB
Line 
1GMTSXA ; SLC/KER - List Parameters ; 02/27/2002
2 ;;2.7;Health Summary;**47,49**;Oct 20, 1995
3 Q
4 ;
5 ; External References in GMTSXA
6 ;
7 ; DBIA 2336 EDITPAR^XPAREDIT
8 ; DBIA 2336 EDIT^XPAREDIT
9 ; DBIA 2343 $$ACTIVE^XUSER
10 ; DBIA 10086 HOME^%ZIS
11 ;
12DISP ; Display User Defaults
13 G:+($G(DUZ))=.5 DS N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
14 S GMTSMGR=$$MGR^GMTSXAW3
15 D:+GMTSMGR>0&(+($G(DUZ))>.9) DM D:+GMTSMGR'>0&(+($G(DUZ))>.9) DU Q
16DU ; Display - User Entry Point
17 N GMTSENV S GMTSENV=$$ENV Q:+GMTSENV'>0 D EN^GMTSXAD Q
18DM ; Display - Manager Entry Point
19 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
20 S GMTSMGR=$$MGR^GMTSXAW3 Q:GMTSMGR'>0
21 S GMTSUSR=$$USR^GMTSXAW3("Display defaults for user: ")
22 W:+GMTSUSR>0 ! D:+GMTSUSR>0 EN2^GMTSXAD(GMTSUSR) Q
23DS ; Display - Manager Entry Point
24 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0 S GMTSUSR=.5 W !
25 D EN3^GMTSXAD Q
26 ;
27PREC ; Set Precedence
28 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
29 S GMTSMGR=$$MGR^GMTSXAW3 D:+GMTSMGR>0 PM D:+GMTSMGR'>0 PU Q
30PU ; Precedence - User Entry Point
31 N GMTSENV S GMTSENV=$$ENV Q:+GMTSENV'>0 D EN^GMTSXAP Q
32PM ; Precedence - Manager Entry Point
33 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
34 S GMTSMGR=$$MGR^GMTSXAW3 Q:GMTSMGR'>0
35 S GMTSUSR=$$USR^GMTSXAW3("Set Health Summary Precedence for user: ")
36 W:+GMTSUSR>0 ! D:+GMTSUSR>0 EN2^GMTSXAP(GMTSUSR) Q
37PS ; Precedence - Site
38 D ADED^GMTSXAR Q
39RS ; Resequence Site Precedence
40 D EN^GMTSXAR Q
41 ;
42METH ; Set Method of Building List
43 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
44 S GMTSMGR=$$MGR^GMTSXAW3 D:+GMTSMGR>0 MM D:+GMTSMGR'>0 MU Q
45MU ; Method - User Entry Point
46 N GMTSENV S GMTSENV=$$ENV Q:+GMTSENV'>0 D EN^GMTSXAO Q
47MM ; Method - Manager Entry Point
48 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
49 S GMTSMGR=$$MGR^GMTSXAW3 Q:GMTSMGR'>0
50 S GMTSUSR=$$USR^GMTSXAW3("Set Method of Building list for user: ")
51 W:+GMTSUSR>0 ! D:+GMTSUSR>0 EN2^GMTSXAO(GMTSUSR) Q
52MS ; Method - Default for Site Wide
53 N GMTSUSR S GMTSUSR=.5 D EN3^GMTSXAO Q
54 ;
55EDIT ; Edit Type List
56 N GMTSENV,GMTSMGR S GMTSENV=$$ENV Q:+GMTSENV'>0
57 S GMTSMGR=$$MGR^GMTSXAW3 D:+GMTSMGR>0 EM D:+GMTSMGR'>0 EU Q
58EU ; Edit List - User Entry Point
59 N GMTSENV S GMTSENV=$$ENV Q:+GMTSENV'>0 D EL(+($G(DUZ))) Q
60EM ; Edit List - Manager Entry Point
61 N GMTSENV,GMTSMGR,GMTSLST S GMTSENV=$$ENV Q:+GMTSENV'>0
62 S GMTSMGR=$$MGR^GMTSXAW3 Q:GMTSMGR'>0
63 W ! D EDITPAR^XPAREDIT("ORWRP HEALTH SUMMARY TYPE LIST")
64 Q
65EL(X) ; Edit List
66 N GMTSENT,GMTSVEN,GMTSPAR,GMTSUSR,GMTSACT S GMTSUSR=+($G(X))
67 Q:'$L($$UNM^GMTSXAW3(+($G(GMTSUSR))))
68 S GMTSACT=$$ACTIVE^XUSER(+GMTSUSR)
69 D:+GMTSACT'>0 DP^GMTSXAP2(+GMTSUSR) Q:+GMTSACT'>0
70 S GMTSPAR=$$PDI^GMTSXAW3("ORWRP HEALTH SUMMARY TYPE LIST")
71 Q:+GMTSPAR'>0 S GMTSENT=$$ETI^GMTSXAW3("USR") Q:+GMTSENT'>0
72 S GMTSVEN=$$UVP^GMTSXAW3(+($G(GMTSUSR)))
73 W !!,"Edit the CPRS Health Summary Types list on the reports tab"
74 D EDIT^XPAREDIT(GMTSVEN,(+GMTSPAR_"^GUI Health Summary Type List")) W !
75 Q
76 ;
77 ; Miscellaneous
78ENV(X) ; Environment check
79 D HOME^%ZIS S U="^" Q:'$L($$UNM^GMTSXAW3(+($G(DUZ)))) 0
80 Q 1
81LP ; List Preferences
82 N GMTSN,GMTSS,GMTSI,GMTSM,GMTSP,GMTSC,GMTSNUM S GMTSN="",GMTSC=0
83 F S GMTSN=$O(^GMT(142.98,"AB",GMTSN)) Q:GMTSN="" D
84 . S GMTSI=0 F S GMTSI=$O(^GMT(142.98,"AB",GMTSN,GMTSI)) Q:+GMTSI=0 D
85 . . S GMTSM=$G(^GMT(142.98,+GMTSI,1)),GMTSP=$P(GMTSM,"^",2)
86 . . S GMTSM=$S(+GMTSM=1:"Append ",1:"Overwrite")
87 . . S GMTSNUM=$$NUM^GMTSXAL(+GMTSI) S GMTSC=GMTSC+1 I GMTSC=1 D
88 . . . W !!,"Health Summary Preferences",!!," Name ",?24," Method"
89 . . . W ?36," Precedence",?59," Types"
90 . . . W !," --------------------",?24," ---------"
91 . . . W ?36," -------------------",?59," -----"
92 . . . S GMTSD=$$DEF^GMTSXAW
93 . . . I $L(GMTSD) D
94 . . . . W !," <default>",?24," Append",?36," ",GMTSD,?59," <all>"
95 . . W !,?2,$E(GMTSN,1,20),?24," ",GMTSM,?36," ",GMTSP
96 . . W ?59," ",$J(+GMTSNUM,2)
97 W !
98 Q
99TRIM(X,Y,I) ; Trim Character
100 S X=$G(X),Y=$G(Y),I=+($G(I)) Q:'$L(X) X
101 S:'$L(Y) Y=" " S:I=0 I=3 F Q:$E(X,1)'=Y S X=$E(X,2,$L(X))
102 I +I>1 F Q:$E(X,$L(X))'=Y S X=$E(X,1,($L(X)-1))
103 I I>2 F Q:X'[(Y_Y) S X=$P(X,(Y_Y),1)_Y_$P(X,(Y_Y),2,229)
104 Q X
105UP(X) ; Uppercase
106 Q $TR($G(X),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
Note: See TracBrowser for help on using the repository browser.