source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQHLP.m@ 794

Last change on this file since 794 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1XQHLP ;SEA/MJM - Menu Helper ;04/13/98 13:59
2 ;;8.0;KERNEL;**46**;Jul 10, 1995
3 ;
4PAUSE R !!," **> Press 'RETURN' to continue, '^' to stop, or '?[option text]' for more",!?25,"help: ",XQL:DTIME D:XQL?1"?"1AN.ANP HELP S XQL=$S(XQL[U:-1,1:XQLN) W @IOF Q
5 ;
6PAUSE1 R !!," **> Press 'RETURN' to continue, '^' to stop: ",XQL:DTIME S XQL=$S(XQL[U:-1,1:XQLN) W @IOF Q
7 ;
8SHOW F S XQX=$O(^XUTL("XQO",XQDIC,XQX)) Q:XQX=U!(XQL<0)!(XQX="") I $P(^(XQX),U,2) D
9 .S XQHY=^(XQX)
10 .D PRNT
11 .Q ;G SHOW
12 Q
13 ;
14PRNT ;Print out the description of the option XQHY
15 I '$L($P(XQHY,U,2))!'$D(^DIC(19,+XQHY,0)) Q
16 I XQL<5 D PAUSE Q:XQL<0
17 S XQHY0=^XUTL("XQO",XQDIC,"^",+XQHY) W !!,"'"_$P(XQHY0,U,3)_"' Option name: ",$P(XQHY0,U,2) S XQL=XQL-2 S %=$P(XQHY0,U) I %]"" W " Synonym: ",%
18 I '$D(XQHLP),$P(XQHY0,U,8)'="" S %=$P($P(XQHY0,U,3)," "),%=$S($L(%)>3:%,1:$P($P(XQHY0,U,3)," ",1,2)) W !," **> Extended help available. Type ","""","?"_%,""""," to see it." S XQL=XQL-1
19 F XQNXTOP=0:0 S XQNXTOP=$O(^DIC(19,+XQHY,1,XQNXTOP)) Q:XQNXTOP="" S XQA=^(XQNXTOP,0) W !?5,XQA S XQL=XQL-1 D PAUSE:'XQL
20 Q
21 ;
22HELP ;Display a help screen
23 N XQHY,XQX S XQHSV=XQY_U_XQDIC_U_XQY0,XQUR=$P(XQL,"?",2) D DIC^XQ71
24 I XQY<0 W " ??",*7 S XQY=+XQHSV,XQDIC=$P(XQHSV,U,2),XQY0=$P(XQHSV,U,3,99) Q
25 S XQH=$P(XQY0,U,7) I '$L(XQH) W !!,"**> Sorry, no help text available for this option." S XQY=+XQHSV,XQDIC=$P(XQHSV,U,2),XQY0=$P(XQHSV,U,3,99) Q
26 D EN^XQH S XQY=+XQHSV,XQDIC=$P(XQHSV,U,2),XQY0=$P(XQHSV,U,3,99),XQL=0
27 Q
28 ;
29EN ;Show descriptions from Option File Entry point from EN^XQ2
30 ;S XQHSV=XQY_U_XQDIC_U_XQY0
31 S XQX=0,(XQL,XQLN)=$S($D(IOSL):IOSL-2,1:22),XQSAV=XQDIC D:$S('($D(^XUTL("XQO",XQDIC,0))#2):1,'$D(^DIC(19,XQDIC,99)):1,1:^DIC(19,XQDIC,99)'=$P(^XUTL("XQO",XQDIC,0),U,2)) ^XQSET D SHOW W !! G:XQL<0 OUT
32 S DIR(0)="Y",DIR("A")=" Shall I show you your secondary menus too",DIR("B")="No" D ^DIR G:$D(DUOUT) OUT
33 I Y W @IOF S XQDIC="U"_DUZ D:$S('($D(^XUTL("XQO",XQDIC,0))#2):1,'$D(^VA(200,DUZ,203.1)):1,1:^VA(200,DUZ,203.1)'=$P(^XUTL("XQO",XQDIC,0),U,2)) ^XQSET S XQL=XQLN,XQX=0 W ?25,"**> Your secondary options <**",!! D SHOW W !!
34 G:XQL<0 OUT
35 S DIR(0)="Y",DIR("A")=" Would you like to see the Common Options",DIR("B")="No" D ^DIR G:$D(DUOUT) OUT
36 I Y W @IOF S XQL=XQLN,XQX=0,XQDIC=$O(^DIC(19,"B","XUCOMMAND",0))
37 I Y D:$S('($D(^XUTL("XQO",XQDIC,0))#2):1,'$D(^DIC(19,XQDIC,99)):1,1:^DIC(19,XQDIC,99)'=$P(^XUTL("XQO",XQDIC,0),U,2)) ^XQSET W ?17,"**> The Common Options, options available to everyone <**",!! D SHOW
38 ;
39OUT ;Exit here
40 W !!
41 ;S:$D(XQSAV) XQDIC=XQSAV
42 K DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,XQA,XQHLP,XQHSV,XQHY,XQHY0,XQNXTOP,XQL,XQLN,XQN,XQSAV,XQX,Y
43 I $D(XQHLP) K XQHLP Q
44 G M2^XQ
45 ;
46OPT ;Respond to a user entering "?Option_text"
47 ;Enter with XQUR from XQ. Find option, show help, return to XQ
48 S XQHSV=XQY_U_XQDIC_U_XQY0
49 S (XQL,XQLN)=$S($D(IOSL):IOSL-2,1:22)
50 I XQUR["?" F S XQUR=$P(XQUR,"?",2) Q:XQUR'["?"
51 S XQHLP="" ;Set a flag so we know it isn't a jump
52 D S^XQ75
53 I XQY>0 D
54 .W @IOF W !!!
55 .S XQHY=XQY_U_XQY0
56 .D PRNT,PAUSE1
57 .I $P(XQY0,U,7)'="" D
58 ..S XQH=$P(XQY0,U,7) D EN^XQH
59 ..Q
60 .Q
61 S (XQY,XQDIC)=$P(XQHSV,U),XQY0=$P(XQHSV,U,3,99)
62 G OUT
63 Q
Note: See TracBrowser for help on using the repository browser.