LEXDDSS ;ISL/KER - Display Defaults - Single User Save ;04/21/2014
;;2.0;LEXICON UTILITY;**80**;Sep 23, 1996;Build 1
;
; Global Variables
; None
;
; External References
; None
;
; Saves default elements into the local array LEX
;
BLB(LEXX) ; General blank - line - blank
N LEXS S LEXS=LEXX D BL,TL,BL Q
LB(LEXX) ; General line - blank
N LEXS S LEXS=LEXX D TL,BL Q
NAME(LEXX) ; Name
N LEXS S LEXS="User defaults for: "_LEXX D BL,TL,BL Q
VOC(LEXX) ; Vocabulary name
N LEXS S LEXS="1. Vocabulary: "_LEXX D TL,BL Q
DIS(LEXX) ; Display name
N LEXS S LEXS="2. Display: "_LEXX D TL,BL Q
DISE(LEXX) ; Display element
N LEXS,LEXCTL,LEXN S LEXCTL=LEXX Q:'$L(LEXCTL)
S LEXN=$O(^LEX(757.03,"B",LEXCTL,0))
S:+LEXN'>0 LEXN=$O(^LEX(757.03,"ASAB",$E(LEXCTL,1,3),0))
Q:LEXN'>0 S LEXN=$E($P($G(^LEX(757.03,LEXN,0)),"^",3),1,63)
S LEXS=" "_LEXX_" "_LEXN D TL
Q
FIL(LEXX) ; Filter name
N LEXS S LEXS="3. Filter: "_LEXX D TL,BL Q
FIE(LEXI,LEXE) ; Filter element (include/exclude)
N LEXS,LEXSPC S LEXSPC=" "
S LEXS=" "_$G(LEXI)
I $L($G(LEXE)) S LEXS=LEXS_$E(LEXSPC,$L(LEXS),$L(LEXSPC))_LEXXE
D TL Q
CON(LEXX) ; Shortcut Context name
N LEXS S LEXS="4. Shortcuts: "_LEXX D TL,BL Q
TL Q:'$D(LEXS) N LEXLN S LEXLN=+($G(LEX(0))),LEXLN=LEXLN+1,LEX(LEXLN)=LEXS,LEX(0)=LEXLN Q
BL N LEXLN S LEXLN=+($G(LEX(0))),LEXLN=LEXLN+1,LEX(LEXLN)="",LEX(0)=LEXLN Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLEXDDSS 1501 printed Dec 13, 2024@02:07:29 Page 2
LEXDDSS ;ISL/KER - Display Defaults - Single User Save ;04/21/2014
+1 ;;2.0;LEXICON UTILITY;**80**;Sep 23, 1996;Build 1
+2 ;
+3 ; Global Variables
+4 ; None
+5 ;
+6 ; External References
+7 ; None
+8 ;
+9 ; Saves default elements into the local array LEX
+10 ;
BLB(LEXX) ; General blank - line - blank
+1 NEW LEXS
SET LEXS=LEXX
DO BL
DO TL
DO BL
QUIT
LB(LEXX) ; General line - blank
+1 NEW LEXS
SET LEXS=LEXX
DO TL
DO BL
QUIT
NAME(LEXX) ; Name
+1 NEW LEXS
SET LEXS="User defaults for: "_LEXX
DO BL
DO TL
DO BL
QUIT
VOC(LEXX) ; Vocabulary name
+1 NEW LEXS
SET LEXS="1. Vocabulary: "_LEXX
DO TL
DO BL
QUIT
DIS(LEXX) ; Display name
+1 NEW LEXS
SET LEXS="2. Display: "_LEXX
DO TL
DO BL
QUIT
DISE(LEXX) ; Display element
+1 NEW LEXS,LEXCTL,LEXN
SET LEXCTL=LEXX
if '$LENGTH(LEXCTL)
QUIT
+2 SET LEXN=$ORDER(^LEX(757.03,"B",LEXCTL,0))
+3 if +LEXN'>0
SET LEXN=$ORDER(^LEX(757.03,"ASAB",$EXTRACT(LEXCTL,1,3),0))
+4 if LEXN'>0
QUIT
SET LEXN=$EXTRACT($PIECE($GET(^LEX(757.03,LEXN,0)),"^",3),1,63)
+5 SET LEXS=" "_LEXX_" "_LEXN
DO TL
+6 QUIT
FIL(LEXX) ; Filter name
+1 NEW LEXS
SET LEXS="3. Filter: "_LEXX
DO TL
DO BL
QUIT
FIE(LEXI,LEXE) ; Filter element (include/exclude)
+1 NEW LEXS,LEXSPC
SET LEXSPC=" "
+2 SET LEXS=" "_$GET(LEXI)
+3 IF $LENGTH($GET(LEXE))
SET LEXS=LEXS_$EXTRACT(LEXSPC,$LENGTH(LEXS),$LENGTH(LEXSPC))_LEXXE
+4 DO TL
QUIT
CON(LEXX) ; Shortcut Context name
+1 NEW LEXS
SET LEXS="4. Shortcuts: "_LEXX
DO TL
DO BL
QUIT
TL if '$DATA(LEXS)
QUIT
NEW LEXLN
SET LEXLN=+($GET(LEX(0)))
SET LEXLN=LEXLN+1
SET LEX(LEXLN)=LEXS
SET LEX(0)=LEXLN
QUIT
BL NEW LEXLN
SET LEXLN=+($GET(LEX(0)))
SET LEXLN=LEXLN+1
SET LEX(LEXLN)=""
SET LEX(0)=LEXLN
QUIT