source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSMTI7.m@ 724

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

initial load of WorldVistAEHR

File size: 705 bytes
Line 
1YSMTI7 ;ALB/ASF MULTIPLE TEST SCORING ;4/18/01 17:57
2 ;;5.01;MENTAL HEALTH;**71**;Dec 30, 1994
3 Q
4NEOPI ; ASF 4/18/01
5 N X,Y,YSKK,YSMX,YSIT,YSTL,YSXK
6 K S,R S R="",S="",YSXK="",YSMX=5
7 D RD Q:$L($E(X,1,240),"X")>42 ;---> OUT
8 D SCOR,STND
9 Q
10RD S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)_^YTD(601.2,YSDFN,1,YSET,1,YSED,2) Q
11SCOR ;
12 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
13 Q
14KK 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
15 Q
16STND ;stanard T scores
17 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
18 D NF^YTNEOPI
19 Q
Note: See TracBrowser for help on using the repository browser.