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

YTBECK.m

Go to the documentation of this file.
YTBECK ;SLC/DKG-TEST PKG: BECK DEPRESSION SCALE ; 10/19/88  17:17 ;
 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
 ;
 S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1),R=0 F I=1:1:21 S R=$S($E(X,I)'="X":R+$E(X,I)-1,1:R)
 D DTA^YTREPT W !!?21,$P(^YTT(601,YSTEST,"P"),U),!!,^YTT(601,YSTEST,"G",1,1,1,0),R,"."
 I R<11 W ! F I=2,3 W !,^YTT(601,YSTEST,"G",I,1,1,0)
 I R<11 G NX
 I R<15 W ! F I=4,5 W !,^YTT(601,YSTEST,"G",I,1,1,0)
 I R<15 G NX
 W !!,"THIS SCORE IS CONSISTENT WITH A "
 W $S(R<20:"MILD",R<23:"MILD TO MODERATE",R<26:"MODERATE",R<31:"MODERATE TO SEVERE",1:"SEVERE")," LEVEL OF DEPRESSION."
NX ;
 S H=6 F L=4:-1:2 S YSLFT=0 D SY Q:YSLFT
 W ! K H,I,L,R,X,Y Q
SY ;
 I X'[L G S1
 S Y=^YTT(601,YSTEST,"G",H,1,1,0) D:IOST?1"C-".E WAIT Q:YSLFT  W !!?(72-$L(Y)\2),Y,!
 F I=1:1:21 I $E(X,I)=L D:IOST?1"C-".E WAIT:$Y>(IOSL-4) Q:YSLFT  W !,^YTT(601,YSTEST,"G",I+H,1,1,0)
S1 ;
 S H=H+22 Q
WAIT ;
 ;  Added 5/6/94 LJA
 N A,B,B1,C,D,E,E1,F,F1,G,G1,H,I,J,J1,J2,J3,J4,K,L,L1,L2,M,N
 N N1,N2,N3,N4,P,P0,P1,P3,R,R1,S,S1,T,T1,T2,TT,V,V1,V2,V3
 N V4,V5,V6,W,X,X0,X1,X2,X3,X4,X7,X8,X9,Y,Y1,Y2,Z,Z1,Z3
 ;
 F I0=1:1:(IOSL-$Y-2) W !
 N DTOUT,DUOUT,DIRUT
 S DIR(0)="E" D ^DIR K DIR S YSTOUT=$D(DTOUT),YSUOUT=$D(DUOUT),YSLFT=$D(DIRUT)
 W @IOF Q