| 1 | PRCFYN ;WISC@ALTOONA/CTB-UTILITY YES/NO READER AND WAIT ;10 Sep 89  3:08 PM [11/13/98 4:19pm]
 | 
|---|
| 2 | V ;;5.1;IFCAP;;Oct 20, 2000
 | 
|---|
| 3 |  ;Per VHA Directive 10-93-142, this routine should not be modified.
 | 
|---|
| 4 | YN ;
 | 
|---|
| 5 |  K DTOUT S U="^" S:'$D(%)#2 %=3 S %S=% I %=3 S %=""
 | 
|---|
| 6 |  I '$D(%A(0)) S %A(0)=""
 | 
|---|
| 7 |  W:%A(0)["!" ! W:$D(%A)#2 !,%A
 | 
|---|
| 8 |  F %I=0:0 S %I=$O(%A(%I)) Q:'%I  Q:'$D(%A(%I))  W !,%A(%I)
 | 
|---|
| 9 |  W:%A(0)["*" $C(7)
 | 
|---|
| 10 |  W "? ",$P("YES// ^NO// ^<YES/NO> ",U,%S)
 | 
|---|
| 11 | RX R %Y:$S($D(DTIME):DTIME,1:300) E  S DTOUT=1,%Y=U W $C(7)
 | 
|---|
| 12 |  S:%Y]""!'% %=$A(%Y),%=$S(%=89:1,%=121:1,%=78:2,%=110:2,%=94:-1,1:0)
 | 
|---|
| 13 |  I '%,%Y'["?" G Q1
 | 
|---|
| 14 |  W:$X>73 ! W $P("  (YES)^  (NO)",U,%)
 | 
|---|
| 15 |  G:%'=0 Q I $D(%B),%B]"" W !!,%B D C G:'$D(%A) Q S %=%S G YN
 | 
|---|
| 16 |  I $D(%B),%B="" G Q1
 | 
|---|
| 17 |  I $D(%A),'$D(%B) S %=%S G YN
 | 
|---|
| 18 | Q K %Y,%A,%B,%S,%I Q
 | 
|---|
| 19 | Q1 W:'%&(%Y'["?") $C(7) W !,"You must enter a 'Yes' or a 'No', or you may enter an '^' to Quit",! S %=%S G YN
 | 
|---|
| 20 |  Q
 | 
|---|
| 21 | C F %I=0:0 S %I=$O(%B(%I)) Q:'%I  Q:'$D(%B(%I))  W !,%B(%I)
 | 
|---|
| 22 |  W ! Q
 | 
|---|
| 23 | WAIT ;
 | 
|---|
| 24 |  W !,"..."
 | 
|---|
| 25 |  W $P("Whoops,^Hmmm,^Excuse me,^Sorry,^Alright already!^OK! OK!^Alright, I'm tired.","^",$R(7)+1),"  "
 | 
|---|
| 26 |  W $P($T(LIST+$R(8)),";",3)_"..."
 | 
|---|
| 27 | LIST ;;This may take a few moments
 | 
|---|
| 28 |  ;;Let me put you on 'HOLD' for a second
 | 
|---|
| 29 |  ;;Please hold on
 | 
|---|
| 30 |  ;;Just a moment, please
 | 
|---|
| 31 |  ;;I'm working as fast as I can
 | 
|---|
| 32 |  ;;Let me think about this for a moment
 | 
|---|
| 33 |  ;;I'm just having one of those days...
 | 
|---|
| 34 |  ;;Is it lunchtime yet?...
 | 
|---|
| 35 |  ;
 | 
|---|
| 36 |  ;  ** VARIABLE DEFINITIONS **
 | 
|---|
| 37 |  ;  Inputs
 | 
|---|
| 38 |  ;    % = default response as 1=Yes  2=No   3=Yes/No
 | 
|---|
| 39 |  ;    %A = Prompt Text array (optional)
 | 
|---|
| 40 |  ;    %B = Help text array (optional)
 | 
|---|
| 41 |  ;  Output
 | 
|---|
| 42 |  ;    % as 1=Yes  2=No  -1=abort (^)  0=none of the above
 | 
|---|
| 43 |  ; 
 | 
|---|
| 44 |  ;  NOTES
 | 
|---|
| 45 |  ;    If %A(0) contains "!", a linefeed precedes the prompt(s)
 | 
|---|
| 46 |  ;    If %A(0) contains "*", the bell sounds after the prompt(s)
 | 
|---|