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

LEXDFST.m

Go to the documentation of this file.
  1. LEXDFST ;ISL/KER - Default Filter - Semantic Types ;04/21/2014
  1. ;;2.0;LEXICON UTILITY;**80**;Sep 23, 1996;Build 10
  1. ;
  1. ; Global Variables
  1. ; None
  1. ;
  1. ; External References
  1. ; ^DIR ICR 10026
  1. ;
  1. ; Entry: S X=$$EN^LEXDFST
  1. ;
  1. ; LEXFIL Filter (executable)
  1. ; LEXNAM Filter Name
  1. ; LEXPRO Y/N response to proceed with building filter
  1. ; LEXSTR Filter parameters (string)
  1. ; LEXX Filter returned
  1. ;
  1. EN(LEXX) ; Entry point S X=$$EN^LEXDFST
  1. N LEXFIL,LEXPRO S LEXFIL=0 D INTRO S LEXPRO=$$PRO
  1. Q:LEXPRO["^" LEXPRO Q:LEXPRO'=1 "^No filter selected"
  1. S LEXX=$$EN^LEXDFSB Q:LEXX["^^" "^^"
  1. Q:$P(LEXX,"^",1)="" "^No filter selected"
  1. D:$P(LEXX,"^",1)'="" ASSEM
  1. Q LEXX
  1. INTRO ; Introduction/Proceed
  1. W @IOF
  1. W !!,"You will be provided with ",($P(^LEX(757.11,0),U,4))-1," semantic classes. By selecting a semantic"
  1. W !,"class, each term which is found during a search of the Lexicon, and belongs"
  1. W !,"to that class will be displayed for your selection. Additionally, each"
  1. W !,"semantic class contains semantic types (or sub-category) which may be excluded"
  1. W !,"during the search. Terms belonging to an ""included"" semantic class will be"
  1. W !,"displayed unless they also belong to an ""excluded"" semantic type."
  1. Q
  1. PRO(LEXX) ; OK to proceed Y/N
  1. N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT W !!
  1. S DIR("A")="Do you wish to continue: ",DIR("B")="YES"
  1. S DIR("?")="Answer Yes or No",DIR("??")="^D PROH^LEXDFST"
  1. S DIR(0)="YAO" D ^DIR S LEXX=Y Q LEXX
  1. PROH ; Proceed help
  1. W !!,?2,"Answer"
  1. W !!,?4,"Yes Continue to build a filter based on Semantic Types"
  1. W !,?4,"No Exit without building a filter",! Q
  1. ASSEM ; Assemble the return value FILTER^NAME
  1. N LEXNAM,LEXFIL S (LEXNAM,LEXFIL)="",LEXFIL=$P(LEXX,"^",1)
  1. I $L($G(LEXFIL)) S LEXFIL="I $$SC^LEXU(Y,"_""""_LEXFIL_""""_")"
  1. I LEXFIL[U S LEXNAM=$$NAME^LEXDM3 I LEXNAM="^^" S LEXX="^^"
  1. S:LEXX["^^" LEXFIL="",LEXNAM="^" S LEXX=LEXFIL_"^"_LEXNAM Q