source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCLMPME.m@ 841

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1FSCLMPME ;SLC/STAFF-NOIS List Manager Protocol Modify Edit ;4/22/94 11:04
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4GETDEF(LIST,ARRAY) ; from FSCLMPM
5 ; returns array of list definition
6 N CNT,LINE
7 S (CNT,LINE)=0 F S LINE=$O(^FSC("LIST",LIST,1,LINE)) Q:LINE<1 S CNT=CNT+1,ARRAY(CNT)=^(LINE,0)
8 Q
9 ;
10EDIT(LINE,OPER,OK) ; from FSCLMPM
11 N COND,EXT,FIELD,VALUE
12 S (EXT,FIELD,COND,VALUE)="",OK=0
13 I $L(OPER) W !,OPER," using:"
14 I '$L(OPER) D OPER(.OPER) I '$L(OPER)!$D(DUOUT)!$D(DTOUT) Q
15 I OPER="and"!(OPER="or") S EXT=$S(OPER="and":"A",1:"O"),OPER=""
16 S OPER=$E(OPER)
17 D FIELD^FSCQCA I 'FIELD!$D(DUOUT)!$D(DTOUT) Q
18 D COND^FSCQCA($P(FIELD,U,4)) I 'COND!$D(DUOUT)!$D(DTOUT) Q
19 D VALUE^FSCQCAV(COND,$P(FIELD,U,4)) I $D(DUOUT)!$D(DTOUT) Q
20 S FIELD=+FIELD,COND=+COND,VALUE=$P(VALUE,U)
21 S LINE=OPER_U_EXT_U_FIELD_U_COND_U_VALUE
22 S OK=1
23 Q
24 ;
25OPER(OPER) ;
26 N DIR,X,Y K DIR
27 S DIR(0)="SAMO^ADD:ADD;REMOVE:REMOVE;SELECT:SELECT;AND:AND;OR:OR"
28 S DIR("A")="Select (ADD), (R)emove, (S)elect, (AND), (O)r, else (return): "
29 S DIR("?",1)="You are putting a new line into the query definition."
30 S DIR("?",2)="Your entry should be consistent with the preceding and following entries."
31 S DIR("?",3)="Enter ADD, REMOVE, or SELECT to begin a query statement."
32 S DIR("?",4)="Enter AND or OR to continue a query statement."
33 S DIR("?",5)="Enter 'return' to stop editing the query."
34 S DIR("?")="^D HELP^FSCU(.DIR)"
35 S DIR("??")="FSC U1 NOIS"
36 D ^DIR K DIR
37 S OPER=$S(Y="ADD":"Add",Y="REMOVE":"Remove",Y="SELECT":"Select",Y="AND":"and",Y="OR":"or",1:"")
38 Q
Note: See TracBrowser for help on using the repository browser.