source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCQCA.m@ 1766

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1FSCQCA ;SLC/STAFF-NOIS Query Criteria Ask ;4/22/94 11:54
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4OPER ; from FSCQB
5 N DIR,Y K DIR
6 I LISTCNT S DIR(0)="SAM^ADD:ADD;REMOVE:REMOVE;SELECT:SELECT;"_$S(DEFINE:"DEFINE:DEFINE",1:"LIST:LIST")
7 I 'LISTCNT S DIR(0)="SAM^ADD:ADD;"_$S(DEFINE:"DEFINE:DEFINE",1:"LIST:LIST")
8 S DIR("A",1)=""
9 I LISTCNT S DIR("A")="Select (A)dd, (R)emove, (S)elect, "_$S(DEFINE:"(D)efine: ",1:"(L)ist: ")
10 I 'LISTCNT S DIR("A")="Select (A)dd, "_$S(DEFINE:"(D)efine: ",1:"(L)ist: ")
11 S DIR("B")=$S(LISTCNT:FINISH,1:"Add")
12 S DIR("?",1)="You may change the list by using ADD, REMOVE, or SELECT."
13 S DIR("?",2)="'Select' will allow only those calls meeting your specifications to remain"
14 S DIR("?",3)="on the list. Changes are made by entering a search criteria which include"
15 S DIR("?",4)="a FIELD, CONDITION, and VALUE. Multiple criteria can be specified by using"
16 S DIR("?",5)="ANDs and ORs. "_$S(DEFINE:"DEFINE will store the definition.",1:"LIST will return to reviewing the calls.")
17 S DIR("?",6)="Enter 'A', 'R', 'S', "_$S(DEFINE:"'D'",1:"'L'")_", '^' to exit, or '??' for more help."
18 S DIR("?")="^D HELP^FSCU(.DIR)"
19 S DIR("??")="FSC U1 NOIS"
20 D ^DIR K DIR
21 S OPER=$S(Y="ADD":"Add",Y="REMOVE":"Remove",Y="SELECT":"Select",Y="DEFINE":"Define",Y="LIST":"List",1:Y)
22 Q
23ANDOR ; from FSCQB
24 N DIR,Y K DIR
25 S DIR(0)="SAMO^AND:AND;OR:OR"
26 S DIR("A",1)=" "
27 S DIR("A",2)="Continue this criteria with (A)nd or (O)r, otherwise enter return to complete"
28 S DIR("A",3)="the search criteria."
29 S DIR("A")="Select (A)nd, (O)r else <return>: "
30 S DIR("?",1)="'AND' will add additional criteria for each NOIS call."
31 S DIR("?",2)="'OR' will include criteria for any NOIS call."
32 S DIR("?",3)="Ex: SITE = DENVER and PRIORITY = URGENT"
33 S DIR("?",4)="Note: AND has precedence over OR"
34 S DIR("?",5)="SITE = BOISE or SITE = DENVER and PRIORITY = URGENT"
35 S DIR("?",6)="is interpreted as:"
36 S DIR("?",7)="SITE = BOISE or (SITE = DENVER and PRIORITY = URGENT)"
37 S DIR("?",8)="Enter <return> search for the criteria."
38 S DIR("?")="^D HELP^FSCQD"
39 S DIR("??")="FSC U1 NOIS"
40 D ^DIR K DIR
41 S ANDOR=$S(Y="AND":"and",Y="OR":"or",1:Y)
42 Q
43FIELD ; from FSCLMPME, FSCQB
44 N DIC,DIR
45 S DIC=7107.2,DIC(0)="EMOQZ",DIC("A")="Select Field: "
46 S DIR("?",1)="Select the Field you wish to search on."
47 S DIR("?")="^D HELP^FSCQD"
48 D LOOK^FSCQU(.DIC,.DIR)
49 S FIELD=+Y_U_Y(0)
50 Q
51COND(TYPE) ; from FSCLMPME, FSCQB
52 N DIC,DIR
53 S DIC=7107.4,DIC(0)="EMOQZ",DIC("A")="Select Condition: ",DIC("S")="I $P(^(0),U,3)[$E(TYPE)"
54 I $E(TYPE)="F"!($E(TYPE)="W") S DIC("B")="CONTAINS"
55 I $E(TYPE)="P" S DIC("B")="EQUALS"
56 S DIR("?",1)="Select the condition for this field."
57 S DIR("?")="^D HELP^FSCQD"
58 D LOOK^FSCQU(.DIC,.DIR)
59 S COND=+Y_U_Y(0)
60 Q
Note: See TracBrowser for help on using the repository browser.