source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSMTI5.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: 2.2 KB
Line 
1YSMTI5 ;ALBANY/ASF PSYCH TEST DOWNLOAD SF36 ;7/16/99 10:09
2 ;;5.01;MENTAL HEALTH;**53**;Dec 30, 1994
3 N YSX
4SCOR ;GET RESPONSES
5 S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
6 ;ARRAY SET
7 F I=1:1:36 S YSX(I)=$E(X,I)
8RV ;REVERSE SCORE 10 ITEMS
9 F I=21,22,1,34,36,23,27,20,26,30 I YSX(I)'="X" S YSMX=$P(^YTT(601,YSTEST,"Q",I,0),U,2),YSMX=$E(YSMX,$L(YSMX)-1)+1,YSX(I)=YSMX-YSX(I)
10 ;RECODE 3 ITEMS
11 S YSX(1)=YSX(1)+$S($E(X,1)=2:.4,$E(X,1)=3:.4,1:0)
12 S:YSX(21)'="X" YSX(21)=YSX(21)+$S($E(X,21)=2:.4,$E(X,21)=3:.2,$E(X,21)=4:.1,$E(X,21)=5:.2,1:0)
13 I ($E(X,22)=1)&($E(X,21)=1) S YSX(22)=6
14 I $E(X,21)="X"&(YSX(22)'="X") S YSX(22)=YSX(22)+$S($E(X,22)=1:1,$E(X,22)=2:.75,$E(X,22)=3:.5,$E(X,22)=4:.25,1:0)
15RAWER ;RAW CALCULATIONS
16 K S S R="" F J=1:1:9 S YSN=0,YSXN=0 D RAW1 D:YSXN>0 MISS
17 G STND Q
18RAW1 S YSKK=^YTT(601,YSTEST,"S",J,"K",1,0)
19 F I=1:2 S A=$P(YSKK,U,I) Q:A="" D RAW2
20 Q
21RAW2 S $P(R,U,J)=$P(R,U,J)+YSX(A)
22 I YSX(A)="X" S YSXN=YSXN+1
23 S YSN=YSN+1
24 Q
25MISS ;MISSING ITEM RECODE BY MEANS
26 S B=$P("10^4^2^5^4^2^3^5^1",U,J)
27 I YSXN/B>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