source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSMTI4.m@ 711

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1YSMTI4 ;ALB/ASF PSYCH TEST DOWNLOAD MCMI2 ;7/23/99 09:42
2 ;;5.01;MENTAL HEALTH;**53**;Dec 30, 1994
3 D DEM^VADPT S YSSEX=$P(VADM(5),U) K VADM
4F0 S R="",J=1
5T0 S L=200,M=0,YSKK=1,YSTL=0 G:J=27 STND D RD
6T1 I '$D(^YTT(601,YSTEST,"S",J,"K",YSKK,0)) S R=R_YSTL_"^",J=J+1 G T0
7 S Y=^YTT(601,YSTEST,"S",J,"K",YSKK,0),P=1
8T2 S YSIT=$P(Y,"^",P) I YSIT="" S YSKK=YSKK+1 G T1
9 S A=$P(Y,"^",P+1),P=P+2
10 S:$E(X,+YSIT-M)=A YSTL=YSTL+(+$P(YSIT,"(",2)) G T2
11RD S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,L\200) Q
12STND S X=($P(R,U,7)*1.5)+($P(R,U,12)*1.5)+($P(R,U,4)*1.6)+($P(R,U,5)*1.6)+($P(R,U,6)*1.6)+($P(R,U,13)*1.6)+$P(R,U,8)+$P(R,U,9)+$P(R,U,10)+$P(R,U,11),X=$J(X,3,0)
13 S Y=^YTT(601,201,"S",1,YSSEX) F I=1:1 I X'>(+$P(Y,U,I)) S S=$P($P(Y,U,I),",",2) Q
14 S S=S_"^",$P(R,U,1)=X F J=2:1:25 S X=^YTT(601,YSTEST,"S",J,YSSX),A=$P(R,U,J),S1=$P(X,U,A+1) S:S1="" S1=$P(X,U,$L(X,U)) S S=S_S1_U
15DC ;DIS C
16 S X=+R I X<145!(X>590)!((X>249)&(X<401)) G HDAA
17 I X>144,X<250 S YSCF=250-X\10 S:250-X/10#1 YSCF=YSCF+1 F I=4:1:25 S YSCF1=$S(I=14:.5,I=15:.5,I=16:.5,I=23:.5,I=24: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_I_U S:$D(YSS2(I)) YSS2=YSS2_I_U
36 I YSSEX="F" F I=9,4,10,8,5,12,13,11,7,6 S:$D(YSS1(I)) YSS1=YSS1_I_U S:$D(YSS2(I)) YSS2=YSS2_I_U
37 S YSS=YSS1_YSS2
38 I +YSS=7!(+YSS=8)!(+YSS=11)!($P(YSS,U,2)=11) F I=14,15,16,17,20,18 S Y1=$S(I<16:4,I=16:2,I=18:13,1:15) S $P(S,U,I)=$P(S,U,I)+Y1
39 I +YSS=13!(+YSS=5)!($P(YSS,U,2)=5) F I=15,16,14,17,18,20 S Y1=$S(I=14:2,I<17:6,I=17:7,1:5) S $P(S,U,I)=$P(S,U,I)-Y1
40SCP ; LAST COR
41 I YSIO="I",YSEP=1 F I="23,8","24,10","25,4" S $P(S,U,+I)=$P(S,U,+I)+$P(I,",",2)
42 I YSIO="I",(YSEP=2!(YSEP=0)) F I="23,5","24,7","25,2" S $P(S,U,+I)=$P(S,U,+I)+$P(I,",",2)
43 K Y,Y1,^TMP("YT1",$J) S S(1)=$P(S,U,1,13),S(2)=$P(S,U,14,26),R(1)=$P(R,U,1,13),R(2)=$P(R,U,14,26),(S,R)=""
44 K YSTY,X,Y,A,B,K,YSKK,L,L1,L2,M,J,YSIT,YSRS,YSSS,I,P,YSMX,YSTL,YSTTL Q
Note: See TracBrowser for help on using the repository browser.