source: FOIAVistA/trunk/r/NOIS-FSC/FSCEUD.m@ 949

Last change on this file since 949 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1FSCEUD ;SLC/STAFF-NOIS Edit User Defaults ;1/10/96 11:46
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4MOD(USER) ; $$(user) -> preferred module default
5 N ACTION,DEF,VALUE S DEF=""
6 D DEFAULT(USER,"MOD",.ACTION,.VALUE)
7 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
8 D
9 .I '$D(VALUE) S VALUE=DEF Q
10 .I '$L(VALUE) S VALUE=DEF Q
11 .I '$O(^FSC("MOD","B",VALUE,0)) S ACTION="P" Q
12 I ACTION="S",VALUE="" S ACTION="P"
13 Q ACTION_U_VALUE
14 ;
15SPEC(USER) ; $$(user) -> preferred specialist default
16 N ACTION,DEF,VALUE S DEF=USER
17 D DEFAULT(USER,"SPEC",.ACTION,.VALUE)
18 S ACTION=$G(ACTION,"S") I '$L(ACTION) S ACTION="P"
19 S VALUE=DEF
20 Q ACTION_U_VALUE
21 ;
22SUBJECT(USER) ; $$(user) -> preferred subject default
23 N ACTION,DEF,VALUE S DEF=""
24 D DEFAULT(USER,"SUBJECT",.ACTION,.VALUE)
25 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
26 D
27 .I '$D(VALUE) S VALUE=DEF Q
28 .I '$L(VALUE) S VALUE=DEF Q
29 I ACTION="S",VALUE="" S ACTION="P"
30 Q ACTION_U_VALUE
31 ;
32CONTACT(SITE0,USER) ; $$(site zero node,user) -> preferred site contact default
33 N ACTION,DEF,VALUE S DEF=$$VALUE^FSCGET($P(SITE0,U,6),7100,2.1)
34 D DEFAULT(USER,"IRM",.ACTION,.VALUE)
35 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
36 S VALUE=DEF
37 Q ACTION_U_VALUE
38 ;
39PHONE(SITE0,USER) ; $$(site zero node,user) -> preferred site phone default
40 N ACTION,DEF,VALUE S DEF=$S($P(SITE0,U,7):$P(SITE0,U,7),1:$P(SITE0,U,8))
41 D DEFAULT(USER,"PHONE",.ACTION,.VALUE)
42 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
43 S VALUE=DEF
44 I ACTION="S",VALUE="" S ACTION="P"
45 Q ACTION_U_VALUE
46 ;
47PRIORITY(USER) ; $$(user) -> preferred edit
48 N ACTION,DEF,VALUE S DEF="ROUTINE"
49 D DEFAULT(USER,"PRI",.ACTION,.VALUE)
50 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
51 D
52 .I '$D(VALUE) S VALUE=DEF Q
53 .I '$L(VALUE) S VALUE=DEF Q
54 .I '$O(^FSC("PRI","B",VALUE,0)) S ACTION="P" Q
55 I ACTION="S",VALUE="" S ACTION="P"
56 Q ACTION_U_VALUE
57 ;
58PATCH(USER) ; $$(user) -> preferred patch default (prompt or not)
59 N ACTION,DEF,VALUE S DEF=""
60 D DEFAULT(USER,"PATCH",.ACTION,.VALUE)
61 Q $S($L($G(ACTION)):"P",1:"")
62 ;
63SUB(USER) ; $$(user) -> preferred subcomponent default (prompt or not)
64 N ACTION,DEF,VALUE S DEF=""
65 D DEFAULT(USER,"DEVSUB",.ACTION,.VALUE)
66 Q $S($L($G(ACTION)):"P",1:"")
67 ;
68KEYWORDS(USER) ; $$(user) -> preferred keywords default (prompt or not)
69 N ACTION,DEF,VALUE S DEF=""
70 D DEFAULT(USER,"KEYWORDS",.ACTION,.VALUE)
71 Q $S($L($G(ACTION)):"P",1:"")
72 ;
73WKLD(USER) ; $$(user) -> 1 to prompt hrs on editing else 0
74 I $L($P($G(^FSC("SPEC",USER,0)),U,21)) Q $P(^(0),U,21)
75 Q +$P($G(^FSC("PARAM",1,0)),U,9)
76 ;
77CDATE(USER) ; $$(user) -> preferred close date default
78 N ACTION,DEF,VALUE S DEF="TODAY"
79 D DEFAULT(USER,"DATEC",.ACTION,.VALUE)
80 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
81 D
82 .I '$D(VALUE) S VALUE=DEF Q
83 .I '$L(VALUE) S VALUE=DEF Q
84 .N X,Y S X=VALUE D ^%DT I Y=-1 S ACTION="P" Q
85 I ACTION="S",VALUE="" S ACTION="P"
86 Q ACTION_U_VALUE
87 ;
88FUNC(USER) ; $$(user) -> preferred functional area default
89 N ACTION,DEF,VALUE S DEF=$S($P($G(^FSC("SPEC",USER,0)),U,4):$$VALUE^FSCGET($P(^(0),U,4),7105.2,4),1:"SUPPORT")
90 D DEFAULT(USER,"FUNC",.ACTION,.VALUE)
91 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
92 D
93 .I '$D(VALUE) S VALUE=DEF Q
94 .I '$L(VALUE) S VALUE=DEF Q
95 .I '$O(^FSC("FUNC","B",VALUE,0)) S ACTION="P" Q
96 I ACTION="S",VALUE="" S ACTION="P"
97 Q ACTION_U_VALUE
98 ;
99TASK(USER) ; $$(user) -> preferred task default
100 N ACTION,DEF,VALUE S DEF="PROBLEM RESOLUTION"
101 D DEFAULT(USER,"TASK",.ACTION,.VALUE)
102 S ACTION=$G(ACTION,"P") I '$L(ACTION) S ACTION="P"
103 D
104 .I '$D(VALUE) S VALUE=DEF Q
105 .I '$L(VALUE) S VALUE=DEF Q
106 .I '$O(^FSC("TASK","B",VALUE,0)) S ACTION="P" Q
107 I ACTION="S",VALUE="" S ACTION="P"
108 Q ACTION_U_VALUE
109 ;
110DEFAULT(USER,FIELD,ACTION,VALUE) ;
111 N FLD,NUM
112 S FLD=+$O(^FSC("FLD","AC",FIELD,0)) I 'FLD Q
113 S NUM=+$O(^FSC("SPEC",USER,50,"B",FLD,0)) I 'NUM Q
114 S ACTION=$P($G(^FSC("SPEC",USER,50,NUM,0)),U,2),VALUE=$P($G(^(0)),U,3)
115 I ACTION="I",FIELD'="SPEC" S ACTION="P" ; *** kludge to allow 'ignore' only on specialist
116 Q
Note: See TracBrowser for help on using the repository browser.