1 | FSCU ;SLC/STAFF-NOIS Utilities ;10/18/96 09:56
|
---|
2 | ;;1.1;NOIS;;Sep 06, 1998
|
---|
3 | ;
|
---|
4 | CONST ; tempoary use (called when options or protocol actions are disabled)
|
---|
5 | W !,"UNDER CONSTRUCTION",! H 2
|
---|
6 | Q
|
---|
7 | ;
|
---|
8 | DATE(X) ; $$(date in external format) -> FM format
|
---|
9 | N Y D ^%DT Q Y
|
---|
10 | ;
|
---|
11 | PAUSE(OK) ; from FSCFORMP, FSCLMPO, FSCLMPOC, FSCLMPOE, FSCLMPON, FSCLMPOW, FSCRUDQ, FSCRX, FSCUEDIT, FSCUEDS
|
---|
12 | N DIR,X,Y K DIR S OK=1
|
---|
13 | S DIR(0)="E"
|
---|
14 | S DIR("?")="^D HELP^FSCU(.DIR)"
|
---|
15 | S DIR("??")="FSC U1 NOIS"
|
---|
16 | D ^DIR K DIR
|
---|
17 | I Y<1 S OK=0
|
---|
18 | Q
|
---|
19 | ;
|
---|
20 | DEFLIST(USER) ; $$(user) -> user's default list
|
---|
21 | N LIST
|
---|
22 | S LIST=+$P($G(^FSC("SPEC",+$O(^FSC("SPEC","B",USER,0)),0)),U,9)
|
---|
23 | I 'LIST S LIST=+$O(^FSC("LIST","B","EMPTY",0))
|
---|
24 | I 'LIST Q ""
|
---|
25 | Q LIST_U_$$VALUE^FSCGET(LIST,7105.2,9)
|
---|
26 | ;
|
---|
27 | VIDEOOFF ; from FSCFORM, FSCLMPC, FSCLMPCC, FSCLMV
|
---|
28 | Q:'$D(VALMCC) N LINE
|
---|
29 | D KILL^VALM10(.LINE)
|
---|
30 | Q
|
---|
31 | ;
|
---|
32 | USERDEF(USER) ; $$(user) -> defaults
|
---|
33 | N DEF
|
---|
34 | S DEF=$$UP^XLFSTR($P($G(^FSC("SPEC",+USER,0)),U,11))
|
---|
35 | I '$L(DEF) S DEF="SM"
|
---|
36 | Q DEF
|
---|
37 | ;
|
---|
38 | CAP(TYPE,STYLE,LISTNUM) ; $$(type,style,list number) -> caption
|
---|
39 | N CAPTION,FORMAT,VALUES
|
---|
40 | I TYPE="L",'$L($G(FSCUD)) Q " # Call ID Call Subject "
|
---|
41 | I TYPE="L" D Q CAPTION
|
---|
42 | .S CAPTION=" # Call ID "
|
---|
43 | .I FSCUD["S" S CAPTION=$$SETSTR^VALM1("Status",CAPTION,$L(CAPTION)+1,6)
|
---|
44 | .I FSCUD["M" S CAPTION=$$SETSTR^VALM1("Mod",CAPTION,$L(CAPTION)+2,3)
|
---|
45 | .I FSCUD["U" S CAPTION=$$SETSTR^VALM1("Spec",CAPTION,$L(CAPTION)+4,4)
|
---|
46 | .I FSCUD["R" S CAPTION=$$SETSTR^VALM1("Ref",CAPTION,$L(CAPTION)+4,4)
|
---|
47 | .I FSCUD["P" S CAPTION=$$SETSTR^VALM1("Pri",CAPTION,$L(CAPTION)+3,3)
|
---|
48 | .S CAPTION=$$SETSTR^VALM1("Call Subject",CAPTION,$L(CAPTION)+8,60)
|
---|
49 | S VALUES=$G(^TMP("FSC SELECT",$J,$S(TYPE="E":"EVALUES",1:"VVALUES")))
|
---|
50 | S CAPTION=$S(VALUES=+VALUES:" Call "_VALUES,1:$S($G(LISTNUM):" Call "_LISTNUM_" of",1:" Calls")_" ("_VALUES_")")
|
---|
51 | I '$O(^TMP("FSC LIST CALLS",$J,0)) S CAPTION=" "
|
---|
52 | S STYLE=$G(STYLE,"BRIEF")
|
---|
53 | S FORMAT=$S(STYLE="BRIEF":"Brief Format ",STYLE="DETAIL":"Detailed Format ",STYLE="FORMAT":$S($G(STYLE("F")):$P(STYLE("F"),U,2),1:" ")_" Format ",STYLE="STAT":"Statistic Format ",1:"Fields Format ")
|
---|
54 | Q $$SETSTR^VALM1(FORMAT,CAPTION,62,$L(FORMAT))
|
---|
55 | ;
|
---|
56 | STYLE(STYLE) ; $$(style) -> style name
|
---|
57 | Q $S(STYLE="B":"BRIEF",STYLE="D":"DETAIL",STYLE="F":"FORMAT",STYLE="S":"STAT",STYLE="C":"CUSTOM",STYLE="FM":"FM",1:"")
|
---|
58 | ;
|
---|
59 | ACCESS(USER,ACCESS) ; $$(user,access) -> 1 or 0
|
---|
60 | ; access uses hierarchy of user, spec, super
|
---|
61 | I '$L(ACCESS) Q 1
|
---|
62 | I ACCESS="USER" Q 1
|
---|
63 | N USERACC
|
---|
64 | S USERACC=$$PRIV(USER)
|
---|
65 | I ACCESS="SUPER",USERACC="SUPER" Q 1
|
---|
66 | I ACCESS="SPEC",USERACC="SUPER" Q 1
|
---|
67 | I ACCESS="SPEC",USERACC="SPEC" Q 1
|
---|
68 | Q 0
|
---|
69 | ;
|
---|
70 | PRIV(USER) ; -> $$(user) -> user, spec, or super
|
---|
71 | Q:'$D(^FSC("SPEC",+USER,0)) "USER" Q:$P(^(0),U,2) "USER" Q:$P(^(0),U,7) "SUPER" Q "SPEC"
|
---|
72 | ;
|
---|
73 | HELP(DIR) ;
|
---|
74 | N CNT
|
---|
75 | W !
|
---|
76 | S CNT=0 F S CNT=$O(DIR("?",CNT)) Q:CNT<1 W !?5,DIR("?",CNT)
|
---|
77 | I $G(DIR("?",+$O(DIR("?","A"),-1)))'["??" W !?5,"Enter '^' to exit, '??' for additional help."
|
---|
78 | Q
|
---|