source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSMTI3.m@ 1093

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1YSMTI3 ;ALB/ASF-PSYCH TEST DOWNLOAD MMPI2 ;6/20/03 13:32
2 ;;5.01;MENTAL HEALTH;**53,71,76,70**;Dec 30, 1994
3 S J=1,(YSTR,YSFR,YSQR)=0 F I=1:1:3 I $D(^YTD(601.2,YSDFN,1,YSET,1,YSED,I)) S X=^(I),L=$L(X) F K=1:1:L S:$E(X,K)="X" YSQR=YSQR+1 S:$E(X,K)="T" YSTR=YSTR+1 S:$E(X,K)="F" YSFR=YSFR+1
4T0 S L=200,M=0,YSKK=1,YSTL=0 D RD
5T01X I '$D(^YTT(601,YSTEST,"S",J,"K",YSKK,0)) S A(J)=YSTL,J=J+1 G T0:J<14,RD1
6 S Y=^YTT(601,YSTEST,"S",J,"K",YSKK,0),P=1
7T03X S YSIT=$P(Y,"^",P) I YSIT="" S YSKK=YSKK+1 G T01X
8 S B=$P(Y,"^",P+1),P=P+2
9T3 I YSIT>L S L=L+200,M=M+200 D RD G T3
10 S:$E(X,YSIT-M)=B YSTL=YSTL+1 G T03X
11RD S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,L\200) Q
12RD1 ;
13MF ;SCALE 5 FIX
14 S YSND=$S(YSSX="F":"FK",1:"MK"),Y=^YTT(601,YSTEST,"S",8,YSND)
15 F P=1,3,5,7 S YSIT=$P(Y,U,P),B=$P(Y,U,P+1) S X=$S(YSIT>200:$E(^YTD(601.2,YSDFN,1,YSET,1,YSED,2),YSIT-200),1:$E(^YTD(601.2,YSDFN,1,YSET,1,YSED,1),YSIT)) S:X=B A(8)=A(8)+1
16 S R="" F I=1:1:13 S R=R_A(I)_U
17 K A
18K ;CORRECTION SCALE MODIFIER
19 S NONKR=R
20 S X=$P(R,U,3) S $P(R,U,4)=$P(R,U,4)+$J(X*.5,0,0) S $P(R,U,7)=$P(R,U,7)+$J(X*.4,0,0) S $P(R,U,10)=$P(R,U,10)+X S $P(R,U,11)=$P(R,U,11)+X S $P(R,U,12)=$P(R,U,12)+$J(X*.2,0,0)
21ST S S="",J=1,P=YSSX
22LK S A=$P(R,"^",J) G:A="" K0 S L1=$P(^YTT(601,YSTEST,"S",J,P),"^",1) I A<L1 S YSTVL=$P(^(P),"^",2) G LK1
23 S YSTVL=$P(^YTT(601,YSTEST,"S",J,P),"^",A+2-L1) I YSTVL="" S YSTVL=$P(^(P),"^",$L(^(P),"^"))
24LK1 S S=S_YSTVL_"^",J=J+1 G LK
25K0 K YSTVL S (YSSCALEB,YSSCALE)=S,YSRAW=NONKR,S(1)=S,R(1)=NONKR
26 G:YSTN="MMP2S" END
27SUP ;SUPPLEMENTARY SCALES
28 K A S (R,S)="" F J=14:1:17,20:1:28 D T0^YTMMPI2A
29 D TRIN^YTMMPI2A,STS^YTMMPI2A S S(2)=S,R(2)=R
30CNTNT ;CONTENT SCALES
31 K A S (R,S)="" F J=29:1:43 D T0^YTMMPI2A
32 D STC^YTMMPI2A S S(3)=S,R(3)=R
33HL1 ;HARIS LINGOS #1 D THRU PD
34 S (R,S)="" F J=44:1:58 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A
35 K A,YSTVL S YSSCALE=S,YSRAW=R,S(4)=S,R(4)=R
36HL2 ;HARRIS LINGOS #2 PA THRU MA
37 S (R,S)="" F J=59:1:71 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A
38 K A,YSTVL S YSSCALE=S,YSRAW=R,S(5)=S,R(5)=R
39SI ;SOCIAL INTOVERSION/ OBVIOUS SUBTLE
40 S (R,S)="" F J=72:1:84 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A
41 K A,YSTVL S YSSCALE=S,YSRAW=R,S(6)=S,R(6)=R,(R,S)=""
42PLACER1 ;PLACE HOLDERS
43 S (R,S)="" F J=85:1:100 S R=R_"0"_U,S=S_"0"_U
44 S YSSCALE=S,YSRAW=R,S(7)=S,R(7)=R,(R,S)=""
45NONK ;non K-CORRECTED
46 ;S (R,S)="" F J=101:1:105 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A
47 S (R,S)="",K=100 F J=4,7,10,11,12 S K=K+1 D T0^YTMMPI2A S A(K)=A(J) K A(J)
48 F J=101:1:105 S P=YSSX D LK^YTMMPI2A
49 K A,YSTVL S YSSCALE=S,YSRAW=R,S(8)=S,R(8)=R,(R,S)=""
50PLACER2 ;
51 S R="0^",S=R,S(9)=S,R(9)=R,YSSCALE=S,YSRAW=R,(R,S)="" ;105
52ADDED ;ADDITIONAL SUPLEMENTARY SCORES '### ASF 1/11/01
53 S (R,S)="" F J=107:1:113 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A ;113 on 4/18/01 by ASF
54 K A,YSTVL S YSSCALE=S,YSRAW=R,S(10)=S,R(10)=R,(R,S)=""
55PSY5 ;PSY-5 SCALES ADDED 8/29/02 ### ASF
56 S (R,S)="" F J=114:1:118 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A ;113 on 4/18/01 by ASF
57 K A,YSTVL S YSSCALE=S,YSRAW=R,S(11)=S,R(11)=R,(R,S)=""
58RCCLIN ;resturctured clinical ; added 6/20/03
59 S (R,S)="" F J=119:1:127 D T0^YTMMPI2A S P=YSSX D LK^YTMMPI2A
60 K A,YSTVL S YSSCALE=S,YSRAW=R,S(12)=S,R(12)=R,(R,S)=""
61END K A,B,C,G,H,I,J,K,L,L1,M,N,P,V,X,X1,X2,X3,Y,YSAST,YSB1,YSB2,YSBV,YSCNT,YSF,YSFR,YSHS,YSINC,YSIN2,YSIT,YSIT1,YSIT2,YSKK,YSKY,YSLE,YSLL,YSLM,YSLV,YSND,YSNS,YSOFF,YSQR,YSRAW,YSSCALE,YSSCALEB,NONKR
62 K YSSK,YSSNM,YSSNM1,YSTL,YSTR,YSTV,YSTVL,YSULON,YSULOF,YSVS Q
Note: See TracBrowser for help on using the repository browser.