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

YSMTI7.m

Go to the documentation of this file.
YSMTI7 ;ALB/ASF MULTIPLE TEST SCORING ;4/18/01  17:57
 ;;5.01;MENTAL HEALTH;**71**;Dec 30, 1994
 Q
NEOPI ; ASF 4/18/01
 N X,Y,YSKK,YSMX,YSIT,YSTL,YSXK
 K S,R  S R="",S="",YSXK="",YSMX=5
 D RD Q:$L($E(X,1,240),"X")>42  ;---> OUT
 D SCOR,STND
 Q
RD S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)_^YTD(601.2,YSDFN,1,YSET,1,YSED,2) Q
SCOR ;
 F YSKK=1:1:30 S Y=^YTT(601,YSTEST,"S",YSKK,"K",1,0),YSTL=0,YSTX=0 D KK S R=R_YSTL_U,YSXK=YSXK_YSTX_U
 Q
KK F I=1:2:15 S YSIT=$P(Y,U,I),A=$P(Y,U,I+1),B=$E(X,YSIT),YSTL=YSTL+$S(B="X":2,A="D":B-1,1:YSMX-B) S:B="X" YSTX=YSTX+1
 Q
STND ;stanard T scores
 F J=1:1:30 S A=$P(R,U,J) S X=^YTT(601,YSTEST,"S",J,YSSX),S(J)=$J((A-$P(X,U)/$P(X,U,2)*10+50),0,0),S=S_S(J)_U
 D NF^YTNEOPI
 Q