VistA-FOIAVistA/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSCEN14.m

30 lines
1.4 KiB
Mathematica

YSCEN14 ;ALB/ASF-READER ; 10/28/88 11:26 ;
;;5.01;MENTAL HEALTH;;Dec 30, 1994
;
; Called from the top by routines YSCEN1, YSCEN13, YSCEN2, YSCEN21
; YSCEN22, YSCEN23, YSCEN35, YSCEN39, YSCEN4, YSCEN51, YSCEN55
; YSCEN61, YSCEN7, YSECN8
A ;
;S YSR5=0,YSR11=@YSR1 I YSR11="^"!('$T) S @YSR1=-1 G END
S YSR5=0,YSR11=@YSR1 I YSTOUT!YSR11="^" S @YSR1=-1 G END
I YSR2?1N.N,YSR11="" S YSR11=YSR2
I YSR11'?1N.N,YSR3'?1"?".E S YSR11=$E(YSR11_$S($D(YSR2):YSR2,1:"?")) S:YSR11?1L YSR11=$C($A(YSR11)-32)
I YSR3'?1"?".E,YSR3?.E1AP.E,YSR3[YSR11 S @YSR1=YSR11 G END
I YSR3?1"?".E,@(YSR1_YSR3) S @YSR1=YSR11 G END
I YSR11?1N.N S YSR11=YSR11\1 I YSR11>0&(YSR11'>+YSR3) S @YSR1=YSR11 G END
S YSR5=$S(@YSR1?1"?".E:0,1:1),@YSR1="?"
2 ;
I $D(YSR4),$D(^DIC(9.2,"B",$E(YSR4,1,30))) S XQH=YSR4 D EN^XQH G END
I $D(YSR4) W ! F YSR99=1:1:$L(YSR4,"!") W $P(YSR4,"!",YSR99),!
I '$D(YSR4)&(YSR3?1N.N) W !,"Please enter a number from 1 to ",YSR3
I '$D(YSR4)&(YSR3="YN") W !,"Please enter YES or NO " G END
I '$D(YSR4)&(YSR3?.E1A.E) W !,"Please enter " F YSR99=1:1:$L(YSR3) W $S(YSR99=1:"",YSR99=$L(YSR3):" or ",1:", "),"'",$E(YSR3,YSR99),"'"
END ;
W:YSR5 $C(7) K YSR1,YSR2,YSR3,YSR4,YSR5,YSR11,YSR99 Q
TEST ;
S YSR1="YS" W !,"VARIABLE= ",YSR1 R !,"ANSWER= ",@YSR1:300
R !,"DEFAULT= ",YSR2:300
R !,"SET OF CORRECT ANSWERS= ",YSR3:300
R !,"HELP= ",YSR4:300 K:YSR4=-1 YSR4
D A W !,"VARIABLE YS= ",YS,! I 1 G TEST