source: FOIAVistA/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDFSO.m@ 711

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1LEXDFSO ; ISL Default Filter - Sources ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996
3 ;
4 ; Entry: S X=$$EN^LEXDFSO
5 ;
6 ; LEXFIL Filter (executable)
7 ; LEXNAM Filter Name
8 ; LEXPRO Y/N response to proceed with building filter
9 ; LEXSTR Filter parameters (string)
10 ; LEXX Filter returned
11 ;
12EN(LEXX) ; Entry point S X=$$EN^LEXDFSO
13 N LEXFIL,LEXPRO S LEXFIL=0 D INTRO S LEXPRO=$$PRO
14 Q:LEXPRO["^" LEXPRO Q:LEXPRO'=1 "^No filter selected"
15 S LEXX=$$EN^LEXDCCC S:LEXX="^" LEXX="^^"
16 Q:LEXX["^^" "^^"
17 Q:$P(LEXX,"^",1)="" "^No filter selected"
18 D:$P(LEXX,"^",1)'="" ASSEM
19 Q LEXX
20INTRO ; Introduction/Proceed
21 N LEXSAB D SAB
22 W !!,"You will be provided with ",LEXSAB," classifications systems to either include"
23 W !,"or exclude during Lexicon look-up. If you select a classification system"
24 W !,"(i.e., ICD) to be included, any terms which qualify during the search and are"
25 W !,"linked to an ""included"" classification code (example ICD code) will be "
26 W !,"included in the selection list."
27 Q
28SAB N LEXI S LEXI="",LEXSAB=0
29 F S LEXI=$O(^LEX(757.03,"B",LEXI)) Q:LEXI="" D
30 . Q:'$D(^LEX(757.02,"ASRC",$E(LEXI,1,3)))
31 . S:'$D(^TMP("LEXTSAB",$J,$E(LEXI,1,3))) ^TMP("LEXTSAB",$J,$E(LEXI,1,3))="",LEXSAB=LEXSAB+1
32 K ^TMP("LEXTSAB",$J)
33 Q
34PRO(LEXX) ; OK to proceed Y/N
35 N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT W !!
36 S DIR("A")="Do you wish to continue: ",DIR("B")="YES"
37 S DIR("?")="Answer Yes or No",DIR("??")="^D PROH^LEXDFSO"
38 S DIR(0)="YAO" D ^DIR S LEXX=Y Q LEXX
39PROH ; Proceed help
40 W !!,?2,"Answer"
41 W !!,?4,"Yes Continue to build a filter based on Classification Codes"
42 W !,?4,"No Exit without building a filter",! Q
43ASSEM ; Assemble the return value FILTER^NAME
44 N LEXNAM,LEXFIL S (LEXNAM,LEXFIL)="",LEXFIL=$P(LEXX,"^",1)
45 I $L($G(LEXFIL)) S LEXFIL="I $$SO^LEXU(Y,"_""""_LEXFIL_""""_")"
46 I LEXFIL[U S LEXNAM=$$NAME^LEXDM3 I LEXNAM="^^" S LEXX="^^"
47 S:LEXX["^^" LEXFIL="",LEXNAM="^" S LEXX=LEXFIL_"^"_LEXNAM Q
Note: See TracBrowser for help on using the repository browser.