source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXSET5.m@ 1710

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

initial load of WorldVistAEHR

File size: 4.7 KB
RevLine 
[613]1LEXSET5 ; ISL Setup Appl/User Defaults for Look-up ; 05/25/1998
2 ;;2.0;LEXICON UTILITY;**6,11**;Sep 23, 1996;Build 1
3 ;
4EN ; Set variables
5 D:+($G(LEXQ))=0 MTLU
6 D:+($G(LEXQ))=1 QUIET
7 K LEXD
8 Q
9QUIET ;
10 N LEXMP S LEXMP="" D DIC0
11 I $L($G(LEXD("DF","LEXAP"))) S ^TMP("LEXSCH",$J,"APP",0)=LEXD("DF","LEXAP"),^TMP("LEXSCH",$J,"APP",1)=$$APPN^LEXDFN(LEXD("DF","LEXAP"))
12 I $L($G(LEXD("DF","DIS"))) S ^TMP("LEXSCH",$J,"DIS",0)=LEXD("DF","DIS"),^TMP("LEXSCH",$J,"DIS",1)=$$DISN^LEXDFN(LEXD("DF","DIS"))
13 I $L($G(LEXD("DF","FIL"))) S ^TMP("LEXSCH",$J,"FIL",0)=LEXD("DF","FIL"),^TMP("LEXSCH",$J,"FIL",1)=$$FILN^LEXDFN(LEXD("DF","FIL"))
14 I $L($G(LEXD("DF","GBL"))) S (DIC,^TMP("LEXSCH",$J,"GBL",0))=LEXD("DF","GBL"),^TMP("LEXSCH",$J,"GBL",1)=$$GBLN^LEXDFN(LEXD("DF","GBL"))
15 I $L($G(LEXD("DF","IDX"))) S ^TMP("LEXSCH",$J,"IDX",0)=LEXD("DF","IDX"),^TMP("LEXSCH",$J,"IDX",1)=$$IDXN^LEXDFN(LEXD("DF","IDX"))
16 I $L($G(LEXD("DF","OVR"))) S ^TMP("LEXSCH",$J,"OVR",0)=LEXD("DF","OVR"),^TMP("LEXSCH",$J,"OVR",1)=$$OVRN^LEXDFN(LEXD("DF","OVR"))
17 I $L($G(LEXD("DF","SCT"))) S ^TMP("LEXSCH",$J,"SCT",0)=LEXD("DF","SCT"),^TMP("LEXSCH",$J,"SCT",1)=$$SCTN^LEXDFN(LEXD("DF","SCT"))
18 I $L($G(LEXD("DF","UNR"))) S ^TMP("LEXSCH",$J,"UNR",0)=LEXD("DF","UNR"),^TMP("LEXSCH",$J,"UNR",1)=$$UNRN^LEXDFN(LEXD("DF","UNR"))
19 ; Modifiers PCH 6
20 I $L($G(LEXD("DF","MOD"))) S ^TMP("LEXSCH",$J,"MOD",0)=LEXD("DF","MOD"),^TMP("LEXSCH",$J,"MOD",1)=$$MODI^LEXDFN(LEXD("DF","MOD"))
21 I $L($G(LEXD("DF","VOC"))) S ^TMP("LEXSCH",$J,"VOC",0)=LEXD("DF","VOC"),^TMP("LEXSCH",$J,"VOC",1)=$$VOCN^LEXDFN(LEXD("DF","VOC"))
22 I '$L($G(LEXD("DF","VOC"))),$L($G(LEXD("DF","SUB"))) S ^TMP("LEXSCH",$J,"VOC",0)=LEXD("DF","SUB"),^TMP("LEXSCH",$J,"VOC",1)=$$VOCN^LEXDFN(LEXD("DF","SUB"))
23 I $L($G(LEXD("DF","FLN"))) S ^TMP("LEXSCH",$J,"FLN",0)=LEXD("DF","FLN"),^TMP("LEXSCH",$J,"FLN",1)="File Number"
24 I +($G(LEXLL))>0 S ^TMP("LEXSCH",$J,"LEN",0)=+LEXLL
25 I +($G(LEXLL))'>0 S ^TMP("LEXSCH",$J,"LEN",0)=5
26 S ^TMP("LEXSCH",$J,"LEN",1)="List Length"
27 N LEXLOC,LEXSVC S (LEXLOC,LEXSVC)=""
28 S DUZ=+($G(DUZ)) I DUZ>0,$D(^VA(200,DUZ)) D
29 . S LEXLOC=$P($G(^VA(200,DUZ,100.1)),U,7) S:+($G(LEXLOC))=0 LEXLOC=""
30 . S:$L($G(LEXLOC))&(+($G(LEXLOC))>0) LEXLOC=$P($G(^SC(LEXLOC,0)),U,1)
31 . S LEXSVC=$P($G(^VA(200,DUZ,5)),U,1) S:+($G(LEXSVC))=0 LEXSVC=""
32 . S:$L($G(LEXSVC))&(+($G(LEXSVC))>0) LEXSVC=$P($G(^DIC(49,LEXSVC,0)),U,1)
33 S ^TMP("LEXSCH",$J,"LOC",0)=$E(LEXLOC,1,40),^TMP("LEXSCH",$J,"LOC",1)="User Hospital Location"
34 S ^TMP("LEXSCH",$J,"SVC",0)=$E(LEXSVC,1,40),^TMP("LEXSCH",$J,"SVC",1)="User Service"
35 S ^TMP("LEXSCH",$J,"USR",0)=+($G(DUZ)),^TMP("LEXSCH",$J,"USR",1)="User"
36 Q
37 Q
38MTLU ; MTLU Defaults
39 K LEXSHOW,LEXSUB,XTLKGBL,XTLKKSCH S DIC=""
40 S:$L($G(LEXD("DF","GBL"))) (DIC,XTLKGBL,XTLKKSCH("GBL"))=LEXD("DF","GBL")
41 S:$L($G(LEXD("DF","DSP"))) XTLKKSCH("DSPLY")=LEXD("DF","DSP")
42 S:$L($G(LEXD("DF","IDX"))) XTLKKSCH("INDEX")=LEXD("DF","IDX")
43 S:$L($G(LEXD("DF","HLP"))) XTLKHLP=LEXD("DF","HLP")
44 S:$L($G(LEXD("DF","LEXAP"))) LEXAP=LEXD("DF","LEXAP")
45 S:$L($G(LEXD("DF","UNR"))) LEXUN=LEXD("DF","UNR")
46 S:$L($G(LEXD("DF","DIS"))) LEXSHOW=LEXD("DF","DIS")
47 S:$L($G(LEXD("DF","SUB"))) LEXSUB=LEXD("DF","SUB")
48 S:$L($G(LEXD("DF","FIL"))) DIC("S")=LEXD("DF","FIL")
49 I DIC=""!('$D(LEXSUB)) D
50 . S (DIC,XTLKGBL,XTLKKSCH("GBL"))="^LEX(757.01,"
51 . S XTLKKSCH("INDEX")="AWRD",XTLKKSCH("DSPLY")="XTLK^LEXPRNT"
52 . S XTLKHLP="D XTLK^LEXHLP",LEXAP=1,LEXLL=5,LEXUN=0
53 . S:$L($G(^LEXT(757.2,1,200,+($G(DUZ)),1))) DIC("S")=$G(^LEXT(757.2,1,200,+($G(DUZ)),1))
54 . S LEXSUB="WRD",LEXSHOW="ICD/CPT"
55 . S:$L($G(^LEXT(757.2,1,200,+($G(DUZ)),2))) LEXSHOW=$G(^LEXT(757.2,1,200,+($G(DUZ)),2))
56 S XTLKSAY=0 D DIC0 S:$L($G(X)) XTLKX=X
57 Q
58DIC0 S:'$L($G(DIC(0))) DIC(0)="EQM"
59 S:'$L($G(X))&(DIC(0)'["A") DIC(0)="A"_DIC(0)
60 S:DIC(0)["L" DIC(0)=$P(DIC(0),"L",1)_$P(DIC(0),"L",2)
61 S:DIC(0)["I" DIC(0)=$P(DIC(0),"I",1)_$P(DIC(0),"L",2)
62 Q
63XTLK ; MTLU
64 N LEXQ S LEXQ=0 D MTLU
65 I '$D(X)!($G(X)[U)!($G(X)="")!($G(X)=" ") S X=$$TERM
66 Q:X=""!(X["^") S XTLKX=X D ^XTLKKWL
67 K DIC,LEXAP,LEXLL,LEXSHOW,LEXSUB,LEXUN
68 K XTLKKSCH,XTLKSAY,XTLKWD2,XTLKX,XTLKHLP S:+Y'>0 X=""
69 Q
70TERM(X) ; Expression
71 N DIR,Y S DIR("A")="Enter an expression: "
72 S DIR("?")=" "_$$SQ^LEXHLP ; PCH 11
73 S DIR("??")="^D TERMHLP^LEXSET5" N Y S DIR(0)="FAO^2:245" D ^DIR
74 S DIC="^LEX(757.01," S:X[U&(X'["^^") X=U S:X["^^" X="^^" Q:X[U "^"
75 I X=" ",+($G(^DISV(DUZ,DIC)))>0 S X=@(DIC_+($G(^DISV(DUZ,DIC)))_",0)") W " ",X
76 F Q:$E(X,1)'=" " S X=$E(X,2,$L(X))
77 W:$D(DTOUT) !,"Try later.",! S:$D(DTOUT) X=""
78 S:X[U DUOUT=1 K DIR,DIRUT,DIROUT Q X
79TERMHLP ; Help PCH 11
80 N X S X="" S:$L($G(DIR("?"))) X=$G(DIR("?")) S:'$L(X) X=" "_$$SQ^LEXHLP
81 W:$L(X) !!,X,!
82 W !," Best results occur using one to three full or partial words without"
83 W !," a suffix (i.e., ""DIABETES"",""DIAB MELL"",""DIAB MELL INSUL"") or"
84 W !," a classification code (ICD, CPT, HCPCS, etc)"
85 Q
Note: See TracBrowser for help on using the repository browser.