LEXA2 ;ISL/KER - Look-up (Loud) Select ;04/21/2014
;;2.0;LEXICON UTILITY;**38,80**;Sep 23, 1996;Build 1
;
SELECT ; Select from List
; Display Help DH^LEXA3
D DH^LEXA3
; Display List DL^LEXA3
D DL^LEXA3
; Display Prompt DP^LEXA3
D DP^LEXA3
; Ask user for selection ASK^LEXA2
D ASK
; Interpret user response EN^LEXAR(user response)
D EN^LEXAR(LEXUR,$G(LEXVDT))
Q
ASK ; Get users response
R LEXUR:300 I '$T S LEXUR="^"
I $L($G(DIC("B"))),LEXUR="" D
. S LEXUR=DIC("B") W " ",LEXUR
. I +($G(LEX))=1,$D(LEX("LIST",1)) D
. . W:'$D(LEXQUIET) " ",$P(LEX("LIST",1),"^",2) S LEXUR=1
. I +LEXUR K DIC("B")
. K DIC("B")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLEXA2 713 printed Nov 22, 2024@17:16:56 Page 2
LEXA2 ;ISL/KER - Look-up (Loud) Select ;04/21/2014
+1 ;;2.0;LEXICON UTILITY;**38,80**;Sep 23, 1996;Build 1
+2 ;
SELECT ; Select from List
+1 ; Display Help DH^LEXA3
+2 DO DH^LEXA3
+3 ; Display List DL^LEXA3
+4 DO DL^LEXA3
+5 ; Display Prompt DP^LEXA3
+6 DO DP^LEXA3
+7 ; Ask user for selection ASK^LEXA2
+8 DO ASK
+9 ; Interpret user response EN^LEXAR(user response)
+10 DO EN^LEXAR(LEXUR,$GET(LEXVDT))
+11 QUIT
ASK ; Get users response
+1 READ LEXUR:300
IF '$TEST
SET LEXUR="^"
+2 IF $LENGTH($GET(DIC("B")))
IF LEXUR=""
Begin DoDot:1
+3 SET LEXUR=DIC("B")
WRITE " ",LEXUR
+4 IF +($GET(LEX))=1
IF $DATA(LEX("LIST",1))
Begin DoDot:2
+5 if '$DATA(LEXQUIET)
WRITE " ",$PIECE(LEX("LIST",1),"^",2)
SET LEXUR=1
End DoDot:2
+6 IF +LEXUR
KILL DIC("B")
+7 KILL DIC("B")
End DoDot:1
+8 QUIT