source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCULOOK.m@ 1009

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1FSCULOOK ;SLC/STAFF-NOIS Utilities Lookup ;1/11/98 18:55
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4LOOKUP(ITEM,DEFAULT,PARAM,OK,SCREEN) ; from FSCLMPC, FSCLMPQU, FSCOPT, FSCRPTS, FSCUEDIT, FSCUX
5 N DIC,DLAYGO,Y K DIC,Y
6 S DEFAULT=$G(DEFAULT),SCREEN=$G(SCREEN)
7 D LOOK(ITEM,DEFAULT,PARAM,SCREEN,.DIC,.OK)
8 I 'OK Q
9 I DIC(0)["L" S DLAYGO=DIC
10 D ^DIC K DIC
11 D VALUE(.DEFAULT,.Y,.OK)
12 Q
13 ;
14LOOK(ITEM,DEFAULT,PARAM,SCREEN,DIC,OK) ;
15 S OK=1
16 S DIC(0)=PARAM
17 I $L(DEFAULT) S DIC("B")=DEFAULT
18 I $L(SCREEN) S DIC("S")=SCREEN
19 I ITEM="CALL" S DIC=7100,DIC("A")="Select Call: " Q
20 I ITEM="LIST" S DIC=7107.1,DIC("A")="Select List: " Q
21 I ITEM="PARAM" S DIC=7109,DIC("A")="Select Parameter: " Q
22 I ITEM="RPT" S DIC=7107.5,DIC("A")="Select Report: " Q
23 I ITEM="MOD" S DIC=7105.4,DIC("A")="Select Module/Version: " Q
24 I ITEM="SITE" S DIC=7105.1,DIC("A")="Select "_$$NAME(ITEM)_": " Q
25 I ITEM="SPEC" S DIC=7105.2,DIC("A")="Select Specialist: " Q
26 I ITEM="FORMAT" S DIC=7107.6,DIC("A")="Select Format: " Q
27 I ITEM="FTYPE" S DIC=7107.7,DIC("A")="Select Display Format: " Q
28 I ITEM="ISC" S DIC=7105.3,DIC("A")="Select "_$$NAME(ITEM)_": " Q
29 I ITEM="PRI" S DIC=7106.2,DIC("A")="Select Priority: " Q
30 I ITEM="PARAM" S DIC=7109,DIC("A")="Select Parameter: ",DIC("S")="I Y=1"
31 I ITEM="SUB" S DIC=7105.6,DIC("A")="Select Subcomponent: " Q
32 I ITEM="TASK" S DIC=7106.3,DIC("A")="Select Task: " Q
33 I ITEM="FUNC" S DIC=7106.4,DIC("A")="Select Functional Area: " Q
34 I ITEM="PACK" S DIC=7105.5,DIC("A")="Select Package: " Q
35 I ITEM="WORK" S DIC=7103.5,DIC("A")="Select Workload: " Q
36 I ITEM="STATUS" S DIC=7100.5,DIC("A")="Select Status History: " Q
37 K DIC S OK=0
38 Q
39 ;
40VALUE(DEFAULT,Y,OK) ;
41 S DEFAULT=Y
42 I $D(Y(0)) S DEFAULT(0)=Y(0)
43 I Y<1 S OK=0
44 Q
45 ;
46NAME(ABBREV) ; $$(abbreviation) -> text of field
47 N FLD
48 S FLD=+$O(^FSC("FLD","AC",ABBREV,0))
49 Q:'$D(^FSC("FLD",FLD,0)) "" Q $P(^(0),U,2)
50 ;
51LIST(LIST,RESTRICT,OK) ; from FSCLMPC, FSCLMPQU, FSCOPT, FSCRPTS, FSCUM
52 N DEFAULT,X
53 S DEFAULT=$G(LIST)
54 F D Q:$D(OK)
55 .S RESTRICT=0
56 .W !,"Select List: "_$S($L(DEFAULT):DEFAULT_"// ",1:"") R X:DTIME S:$L(DEFAULT)&'$L(X) X=DEFAULT I '$T S OK=0 Q
57 .I X[U!'$L(X) S LIST=-1,OK=0 Q
58 .I $E(X,1,2)="R."!($E(X,1,2)="r.") S RESTRICT=1,X=$E(X,3,245) I '$L(X) S X="?"
59 .D LOOKUP("LIST",.LIST,"EMOQ",.OK) I 'OK K OK Q
60 .I 'RESTRICT,$$ASK^FSCLIMIT(LIST) S RESTRICT=1
61 .I RESTRICT D RESTRICT^FSCLIMIT(.RESTRICT) I '$L(RESTRICT) K OK
62 Q
Note: See TracBrowser for help on using the repository browser.