Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCQCA

FSCQCA.m

Go to the documentation of this file.
  1. FSCQCA ;SLC/STAFF-NOIS Query Criteria Ask ;4/22/94 11:54
  1. ;;1.1;NOIS;;Sep 06, 1998
  1. ;
  1. OPER ; from FSCQB
  1. N DIR,Y K DIR
  1. I LISTCNT S DIR(0)="SAM^ADD:ADD;REMOVE:REMOVE;SELECT:SELECT;"_$S(DEFINE:"DEFINE:DEFINE",1:"LIST:LIST")
  1. I 'LISTCNT S DIR(0)="SAM^ADD:ADD;"_$S(DEFINE:"DEFINE:DEFINE",1:"LIST:LIST")
  1. S DIR("A",1)=""
  1. I LISTCNT S DIR("A")="Select (A)dd, (R)emove, (S)elect, "_$S(DEFINE:"(D)efine: ",1:"(L)ist: ")
  1. I 'LISTCNT S DIR("A")="Select (A)dd, "_$S(DEFINE:"(D)efine: ",1:"(L)ist: ")
  1. S DIR("B")=$S(LISTCNT:FINISH,1:"Add")
  1. S DIR("?",1)="You may change the list by using ADD, REMOVE, or SELECT."
  1. S DIR("?",2)="'Select' will allow only those calls meeting your specifications to remain"
  1. S DIR("?",3)="on the list. Changes are made by entering a search criteria which include"
  1. S DIR("?",4)="a FIELD, CONDITION, and VALUE. Multiple criteria can be specified by using"
  1. S DIR("?",5)="ANDs and ORs. "_$S(DEFINE:"DEFINE will store the definition.",1:"LIST will return to reviewing the calls.")
  1. S DIR("?",6)="Enter 'A', 'R', 'S', "_$S(DEFINE:"'D'",1:"'L'")_", '^' to exit, or '??' for more help."
  1. S DIR("?")="^D HELP^FSCU(.DIR)"
  1. S DIR("??")="FSC U1 NOIS"
  1. D ^DIR K DIR
  1. S OPER=$S(Y="ADD":"Add",Y="REMOVE":"Remove",Y="SELECT":"Select",Y="DEFINE":"Define",Y="LIST":"List",1:Y)
  1. Q
  1. ANDOR ; from FSCQB
  1. N DIR,Y K DIR
  1. S DIR(0)="SAMO^AND:AND;OR:OR"
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="Continue this criteria with (A)nd or (O)r, otherwise enter return to complete"
  1. S DIR("A",3)="the search criteria."
  1. S DIR("A")="Select (A)nd, (O)r else <return>: "
  1. S DIR("?",1)="'AND' will add additional criteria for each NOIS call."
  1. S DIR("?",2)="'OR' will include criteria for any NOIS call."
  1. S DIR("?",3)="Ex: SITE = DENVER and PRIORITY = URGENT"
  1. S DIR("?",4)="Note: AND has precedence over OR"
  1. S DIR("?",5)="SITE = BOISE or SITE = DENVER and PRIORITY = URGENT"
  1. S DIR("?",6)="is interpreted as:"
  1. S DIR("?",7)="SITE = BOISE or (SITE = DENVER and PRIORITY = URGENT)"
  1. S DIR("?",8)="Enter <return> search for the criteria."
  1. S DIR("?")="^D HELP^FSCQD"
  1. S DIR("??")="FSC U1 NOIS"
  1. D ^DIR K DIR
  1. S ANDOR=$S(Y="AND":"and",Y="OR":"or",1:Y)
  1. Q
  1. FIELD ; from FSCLMPME, FSCQB
  1. N DIC,DIR
  1. S DIC=7107.2,DIC(0)="EMOQZ",DIC("A")="Select Field: "
  1. S DIR("?",1)="Select the Field you wish to search on."
  1. S DIR("?")="^D HELP^FSCQD"
  1. D LOOK^FSCQU(.DIC,.DIR)
  1. S FIELD=+Y_U_Y(0)
  1. Q
  1. COND(TYPE) ; from FSCLMPME, FSCQB
  1. N DIC,DIR
  1. S DIC=7107.4,DIC(0)="EMOQZ",DIC("A")="Select Condition: ",DIC("S")="I $P(^(0),U,3)[$E(TYPE)"
  1. I $E(TYPE)="F"!($E(TYPE)="W") S DIC("B")="CONTAINS"
  1. I $E(TYPE)="P" S DIC("B")="EQUALS"
  1. S DIR("?",1)="Select the condition for this field."
  1. S DIR("?")="^D HELP^FSCQD"
  1. D LOOK^FSCQU(.DIC,.DIR)
  1. S COND=+Y_U_Y(0)
  1. Q