Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LROPT

LROPT.m

Go to the documentation of this file.
LROPT ;SLC/BA- HELP FRAME INFO ON LAB OPTIONS ;2/19/91  11:09 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
 ;
BEGIN S (LRSTOP,LREND,LRCONT)=0,U="^",DTIME=$S($D(DTIME):DTIME,1:999) W ! F I=0:0 D OPTION Q:LREND  K LRDIS,LRHELP,LRHF,LRHREF,LRHTYPE,LRLINE,LROPTN S LRSTOP=0
END K %,DIC,I,LRCHOICE,LRCNT,LRCONT,LRDIS,LREND,LRHELP,LRHF,LRHN,LRHREF,LRHTYPE,LRLINE,LRMAR,LROPT,LROPTN,LROPTT,LRSTOP,POP,X,Y
 Q
OPTION S DIC=19,DIC(0)="AEMQ",DIC("A")="Select Lab Option: ",DIC("S")="I $E(^(0),1,2)=""LR""" D ^DIC S:Y<1 LREND=1 Q:LREND  S LROPT=+Y,LRHELP=$P(^DIC(19,LROPT,0),U,7),LROPTN=$P(^(0),U),LROPTT=$P(^(0),U,2)
 I '$L(LRHELP) F I=0:0 W !,"No help frames are available on this option.",!,"Do you wish to display the option description" S %=1 D YN^DICN Q:%  W !,"Answer 'Y'es or 'N'o"
 I '$L(LRHELP) S:%<0 LREND=1 Q:%=2!LREND  S LRCHOICE=2 D QUE Q
 W !!!,?5,"1 All documentation",!?5,"2 Option description" S LRHREF=0,LRCNT=2 F I=0:0 S LRHREF=$O(^DIC(9.2,LRHELP,2,LRHREF)) Q:LRHREF<1  S LRHTYPE=^(LRHREF,0),LRCNT=LRCNT+1,LRHF(LRCNT)=LRHTYPE W !,?5,LRCNT," ",$P(^(0),U)
 F I=0:0 R !,"Choose: 1// ",X:DTIME Q:X=""!(X[U)!(X>0&(X-1<LRCNT)&(X?1N.N))  W !,"Enter the number of the option you wish to display."
 S:'$L(X) X=1 I X[U S LREND=1 Q
 S LRCHOICE=X I X>2 S LRHREF=X,LRHELP=$P(LRHF(LRHREF),U,2),LRHN=$P(LRHF(LRHREF),U)
QUE S ZTRTN="DQ^LROPT",%ZIS="MQ" D IO^LRWU
 Q
DQ S:$D(ZTQUEUED) ZTREQ="@" U IO
X S LRHN="Option Description",LRMAR=$S($E(IOST,1,2)'="C-":2,1:0) D HDR
 I LRCHOICE=1 D OPT Q:LRSTOP  S LRHREF=0 F I=0:0 S LRHREF=$O(LRHF(LRHREF)) Q:LRHREF=""  S LRHELP=LRHF(LRHREF),LRHELP=$P(LRHELP,U,2),LRHN=$P(LRHF(LRHREF),U) I $L(LRHELP) D HELP Q:LRSTOP
 I LRCHOICE=1 Q
 I LRCHOICE=2 D OPT Q
 S LRHN=$P(LRHF(LRCHOICE),U) D HELP
 Q
OPT Q:'$O(^DIC(19,LROPT,1,0))  W !!?LRMAR,LRHN,!! S LRLINE=0 F I=0:0 S LRLINE=$O(^DIC(19,LROPT,1,LRLINE)) Q:LRLINE<1  S LRDIS=^(LRLINE,0) W ?(LRMAR+3),LRDIS,! D:$O(^DIC(19,LROPT,1,LRLINE)) CHECK Q:LRSTOP
 Q
HELP Q:'$O(^DIC(9.2,LRHELP,1,0))  W !!?LRMAR,LRHN,!! S LRLINE=0 F I=0:0 S LRLINE=$O(^DIC(9.2,LRHELP,1,LRLINE)) Q:LRLINE<1  S LRDIS=^(LRLINE,0) W ?(LRMAR+3),LRDIS,! D:$O(^DIC(9.2,LRHELP,1,LRLINE)) CHECK Q:LRSTOP
 Q
CHECK I $Y+4>IOSL,$E(IOST,1,2)'="C-" S LRCONT=1 D HDR S LRCONT=0 Q
 I $Y+4>IOSL D WAIT Q:LRSTOP  S LRCONT=1 D HDR S LRCONT=0
 Q
WAIT W !,"Press return to continue or ""^"" to escape " R X:DTIME S:X="" X=1 S LRSTOP=$S("^"[X:1,1:0)
 Q
HDR W @IOF W:$E(IOST,1,2)'="C-" !! W !?(IOM/2)-($L(LROPTT)/2),LROPTT,!?(IOM/2)-($L(LROPTN)/2),LROPTN,!
 I LRCONT W !!,LRHN," (continued)",!!
 Q
ALL S ZTRTN="BIG^LROPT",%ZIS="MQ" D IO^LRWU
 D END
 Q
BIG S:$D(ZTQUEUED) ZTREQ="@" U IO
 S DTIME=999,LRCHOICE=1,LRSTOP=0,LRCONT=0,U="^"
 S LROPTN="LRACC2" F I=0:0 S LROPTN=$O(^DIC(19,"B",LROPTN)) Q:LROPTN]"LRYZZZ"  S LROPT=$O(^DIC(19,"B",LROPTN,0)),LROPTT=$P(^DIC(19,LROPT,0),U,2),LRHELP=$P(^(0),U,7) D A,X Q:LRSTOP  H 15
 Q
A Q:'$L(LRHELP)  K LRDIS,LRHF,LRLINE S LRHREF=0 F I=0:0 S LRHREF=$O(^DIC(9.2,LRHELP,2,LRHREF)) Q:LRHREF<1  S LRHTYPE=^(LRHREF,0),LRHF(LRHREF)=LRHTYPE
 Q