LEXSET3 ; ISL Overwrite/Merge Appl/User Defaults   ; 10-15-97
 ;;2.0;LEXICON UTILITY;**6**;Sep 23, 1996
 ;
OVER ;
 N LEXT
 S:LEXM=0&(LEXL=LEXS) LEXT="AP"
 S:LEXM=0&(LEXL'=LEXS) LEXT="SS"
 I LEXM>0 S:LEXM>0 LEXT="SS"
 I $L($G(LEXD("AP","DEF"))),+($G(LEXD("AP","DEF")))=0 S LEXT="AP"
 S:$L($G(LEXD(LEXT,"DIS"))) LEXD("DF","DIS")=LEXD(LEXT,"DIS")
 S:$L($G(LEXD(LEXT,"DSP"))) LEXD("DF","DSP")=LEXD(LEXT,"DSP")
 S:$L($G(LEXD(LEXT,"FIL"))) LEXD("DF","FIL")=LEXD(LEXT,"FIL")
 S:$L($G(LEXD(LEXT,"GBL"))) LEXD("DF","GBL")=LEXD(LEXT,"GBL")
 S:$L($G(LEXD(LEXT,"HLP"))) LEXD("DF","HLP")=LEXD(LEXT,"HLP")
 S:$L($G(LEXD(LEXT,"IDX"))) LEXD("DF","IDX")=LEXD(LEXT,"IDX")
 ; Modifiers     PCH 6
 S:$L($G(LEXD(LEXT,"MOD"))) LEXD("DF","MOD")=LEXD(LEXT,"MOD")
 S:'$D(LEXD(LEXT,"IDX")) LEXD(LEXT,"IDX")="AWRD",LEXD(LEXT,"GBL")="^LEX(757.01,"
 I '$D(LEXD(LEXT,"GBL")) D
 . I $D(^LEX(757.01,LEXD(LEXT,"IDX"))) S LEXD(LEXT,"GBL")="^LEX(757.01," Q
 . I $D(^LEX(757.21,LEXD(LEXT,"IDX"))) S LEXD(LEXT,"GBL")="^LEX(757.21," Q
 . S LEXD(LEXT,"IDX")="AWRD",LEXD(LEXT,"GBL")="^LEX(757.01,"
 S:$L($G(LEXD(LEXT,"NAM"))) LEXD("DF","NAM")=LEXD(LEXT,"NAM")
 S LEXD("DF","SUB")=$E($G(LEXD(LEXT,"IDX")),2,$L($G(LEXD(LEXT,"IDX"))))
 S LEXD("DF","FLN")=$P($P($G(LEXD(LEXT,"GBL")),"(",2),",",1)
 I 'LEXD("DF","FLN") D
 . S LEXD("DF","FLN")=757.01,LEXD("DF","GBL")="^LEX(757.01,"
 . S LEXD("DF","IDX")="AWRD",LEXD("DF","SUB")="WRD"
 S:$L($G(LEXD(LEXT,"SCT"))) LEXD("DF","SCT")=LEXD(LEXT,"SCT")
 Q
USER ;
 N LEXT
 S:LEXM=0&(LEXL=LEXS) LEXT="AP"
 S:LEXM=0&(LEXL'=LEXS) LEXT="SS"
 S:LEXM>0&(LEXM=LEXA) LEXT="AP"
 S:LEXM>0&(LEXM'=LEXA) LEXT="SS"
 S:$L($G(LEXD(LEXT,"DIS"))) LEXD("DF","DIS")=LEXD(LEXT,"DIS")
 S:$L($G(LEXD(LEXT,"DSP"))) LEXD("DF","DSP")=LEXD(LEXT,"DSP")
 S:$L($G(LEXD(LEXT,"FIL"))) LEXD("DF","FIL")=LEXD(LEXT,"FIL")
 S:$L($G(LEXD(LEXT,"GBL"))) LEXD("DF","GBL")=LEXD(LEXT,"GBL")
 S:$L($G(LEXD(LEXT,"HLP"))) LEXD("DF","HLP")=LEXD(LEXT,"HLP")
 S:$L($G(LEXD(LEXT,"IDX"))) LEXD("DF","IDX")=LEXD(LEXT,"IDX")
 ; Modifiers     PCH 6
 S:$L($G(LEXD(LEXT,"MOD"))) LEXD("DF","MOD")=LEXD(LEXT,"MOD")
 S:'$D(LEXD(LEXT,"IDX")) LEXD(LEXT,"IDX")="AWRD",LEXD(LEXT,"GBL")="^LEX(757.01,"
 I '$D(LEXD(LEXT,"GBL")) D
 . I $D(^LEX(757.01,LEXD(LEXT,"IDX"))) S LEXD(LEXT,"GBL")="^LEX(757.01," Q
 . I $D(^LEX(757.21,LEXD(LEXT,"IDX"))) S LEXD(LEXT,"GBL")="^LEX(757.21," Q
 . S LEXD(LEXT,"IDX")="AWRD",LEXD(LEXT,"GBL")="^LEX(757.01,"
 S:$L($G(LEXD(LEXT,"NAM"))) LEXD("DF","NAM")=LEXD(LEXT,"NAM")
 S LEXD("DF","SUB")=$E($G(LEXD(LEXT,"IDX")),2,$L($G(LEXD(LEXT,"IDX"))))
 S LEXD("DF","FLN")=$P($P($G(LEXD(LEXT,"GBL")),"(",2),",",1)
 I LEXD("DF","FLN")="" D
 . S LEXD("DF","FLN")=757.01,LEXD("DF","GBL")="^LEX(757.01,"
 . S LEXD("DF","IDX")="AWRD",LEXD("DF","SUB")="WRD"
 S:$L($G(LEXD("UD","DIS"))) LEXD("DF","DIS")=LEXD("UD","DIS")
 S:$L($G(LEXD("UD","SCT"))) LEXD("DF","SCT")=LEXD("UD","SCT")
 I LEXT="AP" D
 . S:$L($G(LEXD("UD","FIL"))) LEXD("DF","FIL")=LEXD("UD","FIL")
 . S:$L($G(LEXD("UD","DSP"))) LEXD("DF","DSP")=LEXD("UD","DSP")
 . S:$L($G(LEXD("UD","HLP"))) LEXD("DF","HLP")=LEXD("UD","HLP")
 . S:$L($G(LEXD("UD","IDX"))) LEXD("DF","IDX")=LEXD("UD","IDX")
 . S:$L($G(LEXD("UD","SUB"))) LEXD("DF","SUB")=LEXD("UD","SUB")
 I $L($G(LEXD("DF","IDX"))),$D(^LEX(757.01,LEXD("DF","IDX"))) S LEXD("DF","GBL")="^LEX(757.01,",LEXD("DF","FLN")="757.01"
 I $L($G(LEXD("DF","IDX"))),$D(^LEX(757.21,LEXD("DF","IDX"))) S LEXD("DF","GBL")="^LEX(757.21,",LEXD("DF","FLN")="757.21"
 Q
