LEXDMGS ;ISL/KER - Defaults - Manager/Search Threshold ;04/21/2014
;;2.0;LEXICON UTILITY;**80**;Sep 23, 1996;Build 10
;
; Global Variables
; None
;
; External References
; ^DIC ICR 10006
; ^DIE ICR 10018
;
Q
EN ;
W !!," Coding System Search Threshold Edit",!
W !," This is the default number of records that should be inspected"
W !," during a search before the user is prompted to either continue"
W !," or refine the search. The search threshold is set for a coding"
W !," system. The use of this default parameter is optional.",!
N LEXCS,LEXN,LEXNM,LEXO,X,Y
S LEXCS=$$CS I +LEXCS'>0 W !!," Coding System not selected" Q
S LEXNM=$P($G(^LEX(757.03,+LEXCS,0)),"^",2)
S LEXO=$P($G(^LEX(757.03,+LEXCS,2)),"^",2) D ST(LEXCS)
S LEXN=$P($G(^LEX(757.03,+LEXCS,2)),"^",2)
I '$L(LEXO),+LEXN>0 W !!," Search Threshold added" W:$L(LEXNM) " for ",LEXNM W ! Q
I +LEXO>0,+LEXN>0,LEXN'=LEXO W !!," Search Threshold changed" W:$L(LEXNM) " for ",LEXNM W ! Q
I $L(LEXO),'$L(LEXN) W !!," Search Threshold deleted" W:$L(LEXNM) " for ",LEXNM W ! Q
I $L(LEXO)=$L(LEXN) W !!," Search Threshold no change made" W:$L(LEXNM) " for ",LEXNM W ! Q
Q
ST(X) ; Edit Search Threshold
N DIE,DA,DIC,DR
S DIE="^LEX(757.03,",DA=+($G(X)) Q:'$D(^LEX(757.03,+DA,0))
S DIE("A")=" SEARCH THRESHOLD: "
S DR="12//20000" W ! D ^DIE
Q
CS(X) ; Coding System
N DIC,DTOUT,DUOUT
S DIC="^LEX(757.03,",DIC("A")=" Select a Coding System: ",DIC(0)="AEQM"
S DIC("W")="W ?29,"" "",$P($G(^LEX(757.03,+Y,0)),""^"",2),?51,$S($L($P($G(^LEX(757.03,+Y,2)),""^"",2)):"" THRESHOLD:"",1:""""),$J($P($G(^LEX(757.03,+Y,2)),""^"",2),7)"
D ^DIC
Q Y
W !,"W ?51,$S($L($P($G(^LEX(757.03,+Y,2)),""^"",2)):"" THRESHOLD:"",1:""""),$J($P($G(^LEX(757.03,+Y,2)),""^"",2),7)"
W ?51,$S($L($P($G(^LEX(757.03,+Y,2)),"^",2)):" THRESHOLD:",1:""),$J($P($G(^LEX(757.03,+Y,2)),"^",2),7)
W ?51," THRESHOLD:",$J($P($G(^LEX(757.03,+Y,2)),"^",2),7)
LEXDMGS ;ISL/KER - Defaults - Manager/Search Threshold ;04/21/2014
+1 ;;2.0;LEXICON UTILITY;**80**;Sep 23, 1996;Build 10
+2 ;
+3 ; Global Variables
+4 ; None
+5 ;
+6 ; External References
+7 ; ^DIC ICR 10006
+8 ; ^DIE ICR 10018
+9 ;
+10 QUIT
EN ;
+1 WRITE !!," Coding System Search Threshold Edit",!
+2 WRITE !," This is the default number of records that should be inspected"
+3 WRITE !," during a search before the user is prompted to either continue"
+4 WRITE !," or refine the search. The search threshold is set for a coding"
+5 WRITE !," system. The use of this default parameter is optional.",!
+6 NEW LEXCS,LEXN,LEXNM,LEXO,X,Y
+7 SET LEXCS=$$CS
IF +LEXCS'>0
WRITE !!," Coding System not selected"
QUIT
+8 SET LEXNM=$PIECE($GET(^LEX(757.03,+LEXCS,0)),"^",2)
+9 SET LEXO=$PIECE($GET(^LEX(757.03,+LEXCS,2)),"^",2)
DO ST(LEXCS)
+10 SET LEXN=$PIECE($GET(^LEX(757.03,+LEXCS,2)),"^",2)
+11 IF '$LENGTH(LEXO)
IF +LEXN>0
WRITE !!," Search Threshold added"
IF $LENGTH(LEXNM)
WRITE " for ",LEXNM
WRITE !
QUIT
+12 IF +LEXO>0
IF +LEXN>0
IF LEXN'=LEXO
WRITE !!," Search Threshold changed"
IF $LENGTH(LEXNM)
WRITE " for ",LEXNM
WRITE !
QUIT
+13 IF $LENGTH(LEXO)
IF '$LENGTH(LEXN)
WRITE !!," Search Threshold deleted"
IF $LENGTH(LEXNM)
WRITE " for ",LEXNM
WRITE !
QUIT
+14 IF $LENGTH(LEXO)=$LENGTH(LEXN)
WRITE !!," Search Threshold no change made"
IF $LENGTH(LEXNM)
WRITE " for ",LEXNM
WRITE !
QUIT
+15 QUIT
ST(X) ; Edit Search Threshold
+1 NEW DIE,DA,DIC,DR
+2 SET DIE="^LEX(757.03,"
SET DA=+($GET(X))
IF '$DATA(^LEX(757.03,+DA,0))
QUIT
+3 SET DIE("A")=" SEARCH THRESHOLD: "
+4 SET DR="12//20000"
WRITE !
DO ^DIE
+5 QUIT
CS(X) ; Coding System
+1 NEW DIC,DTOUT,DUOUT
+2 SET DIC="^LEX(757.03,"
SET DIC("A")=" Select a Coding System: "
SET DIC(0)="AEQM"
+3 SET DIC("W")="W ?29,"" "",$P($G(^LEX(757.03,+Y,0)),""^"",2),?51,$S($L($P($G(^LEX(757.03,+Y,2)),""^"",2)):"" THRESHOLD:"",1:""""),$J($P($G(^LEX(757.03,+Y,2)),""^"",2),7)"
+4 DO ^DIC
+5 QUIT Y
+6 WRITE !,"W ?51,$S($L($P($G(^LEX(757.03,+Y,2)),""^"",2)):"" THRESHOLD:"",1:""""),$J($P($G(^LEX(757.03,+Y,2)),""^"",2),7)"
+7 WRITE ?51,$SELECT($LENGTH($PIECE($GET(^LEX(757.03,+Y,2)),"^",2)):" THRESHOLD:",1:""),$JUSTIFY($PIECE($GET(^LEX(757.03,+Y,2)),"^",2),7)
+8 WRITE ?51," THRESHOLD:",$JUSTIFY($PIECE($GET(^LEX(757.03,+Y,2)),"^",2),7)