51 lines
3.5 KiB
Mathematica
51 lines
3.5 KiB
Mathematica
YTMMP2 ;SLC/DKG-TEST PKG: MMPI SCALES (CONT.) ; 7/13/89 14:59 ;
|
|
;;5.01;MENTAL HEALTH;;Dec 30, 1994
|
|
;
|
|
S H=YSHS+YSHY\2,YSSH=YSSC+YSPA\2,YSRH=YSHS+YSHY+YSPT+D\4,YSAU=D+YSPT\2,Z=YSMA+YSPD\2
|
|
S YSIS=YSHS-YSHY I YSIS'<0,YSHS>60 S N=$S(YSHS<71:"110^P10",YSHS<81:"108^P10",YSHS<91:"105^P20",1:"102^P20") D GET
|
|
S YSIS=YSHY-YSHS I YSIS>0,YSHY>70 S N=$S(YSHY<81:"118^P10",YSHY<91:"115^P20",1:"112^P20") D GET
|
|
I YSHY>60,YSHY<71,YSIS>0,YSIS<11 S N=120 D PR
|
|
S YSIS=H-YSSH I YSIS'<0,H>79 S N=$S(H<90:"121^P20",1:"124^P20") D GET
|
|
S YSIS=D-YSMA I YSIS'<0 S N=$S(D<51:155,D<61:"153^P10",D<66:"150^P20",D<71:"147^P20",D<76:"143^P30",D<81:"139^P30",D<91:"132^P35",1:"127^P40") D GET
|
|
S YSIS=YSMA-D I YSIS>0 S N=$S(YSMA<51:170,YSMA<61:169,YSMA<71:"167^P10",YSMA<81:"164^P20",YSMA<91:"160^P30",1:"156^P30") D GET
|
|
S YSIS=H-YSSH I YSIS'<0,H<80 S N=$S(H<60:"177^P10",H<70:"174^P20",1:"171^P20") D GET
|
|
S YSIS=YSHY-YSPA I YSIS'<0,YSHY>60 S N=$S(YSHY<71:"191^P20",YSHY<81:"188^P20",YSHY<91:"184^P30",1:"179^P40") D GET
|
|
I YSHY>50,YSHY<61,YSPD<65,YSMF<65,YSSC<65,YSMA<65 S N="194^P10" D GET
|
|
S YSIS=YSPD-YSPT I YSIS>0 S N=$S(YSPD<60:"216^P10",YSPD<70:"213^P20",YSPD<75:"209^P30",YSPD<80:"203^P32",YSPD<90:"200^P31",1:"196^P30") D GET
|
|
G NX:H=Z,HGZ:H>Z
|
|
I YSMF>64,YSMF<70,H<61,YSSH<61,YSAU<61,YSRH<61,Z<70 S N=$S(Z<60:234,1:233) D PR G NX
|
|
S YSIS=Z I YSMF>69 S N=$S(YSMF<76:"226^T79",1:"218^T82") D GET G NX
|
|
HGZ S YSIS=H I H>59,YSMF>64 S N=$S(YSMF<70:"235^T82",YSMF<76:"230^T80",1:"223^T82") D GET
|
|
NX I YSMF<65,Z<51,H<51,YSSH<51,YSRH<51,YSAU<51 S N=238 D PR
|
|
S YSIS=YSPD-YSSI I YSIS>0,YSPA>60 S N=$S(YSPA<71:"250^P20",YSPA<81:"247^P20",YSPA<91:"243^P30",1:"239^P36") D GET
|
|
I YSPA>50,YSPA<61,YSIS<6,YSIS>0 S N=253 D PR
|
|
I YSPA<61,YSIS>6 S N=254 D PR
|
|
S YSIS=YSPT-YSPD I YSIS'<0 S N=$S(YSPT<50:276,YSPT<60:"274^P10",YSPT<65:"272^P10",YSPT<70:"270^P10",YSPT<80:"267^P20",YSPT<90:"260^P34",1:"255^P40") D GET
|
|
S YSIS=YSSH-H I YSIS>0,YSSH>59 S N=$S(YSSH<70:"305^P10",YSSH<80:"302^P20",YSSH<90:"298^P30",1:"294^P30") D GET
|
|
I YSSH<60,YSIS>0,YSIS<16,D<65,YSPT<65,YSMA<65 S N=307 D PR
|
|
S YSIS=Z-YSAU I YSIS>0 S N=$S(Z<51:323,Z<61:"321^P10",Z<71:"319^P10",Z<81:"316^P26",Z<91:"312^P37",1:"308^P45") D GET
|
|
S YSIS=YSSI-YSPD I YSIS'<0 S N=$S(YSSI<50:338,YSSI<60:"336^P10",YSSI<70:"334^P10",YSSI<80:"331^P20",YSSI<90:"328^P20",1:"324^P30") D GET
|
|
S YSIS=YSPD-YSSI I YSIS>0 S N=$S(YSPD<50:357,YSPD<60:"355^P10",YSPD<70:"352^P20",YSPD<80:"345^P35",YSPD<90:"342^P31",1:"339^P27") D GET
|
|
S YSIS=YSAU-Z I YSIS'<0 S N=$S(YSAU<51:373,YSAU<61:"371^P10",YSAU<71:"369^P10",YSAU<81:"366^P26",YSAU<91:"362^P37",1:"358^P45") D GET
|
|
G ^YTMMP3
|
|
GET S X=$P(N,U,2),N=+N D:X'="" @X
|
|
PR I $Y>51 D DTA^YTREPT W !!
|
|
F YSJJ=1:1 Q:'$D(^YTT(601,YSMMPI,YSSX,N,1,YSJJ,0)) W !,^(0)
|
|
W ! K YSHY,YSPA Q
|
|
P10 S N=N+$S(YSIS<11:0,1:1) Q
|
|
P20 S N=N+$S(YSIS<11:0,YSIS<21:1,1:2) Q
|
|
P30 S N=N+$S(YSIS<11:0,YSIS<21:1,YSIS<31:2,1:3) Q
|
|
P40 S N=N+$S(YSIS<11:0,YSIS<21:1,YSIS<31:2,YSIS<41:3,1:4) Q
|
|
P35 S N=N+$S(YSIS<6:0,YSIS<11:1,YSIS<16:2,YSIS<21:3,YSIS<26:4,YSIS<31:5,1:6) Q
|
|
P36 S N=N+$S(YSIS<16:0,YSIS<26:1,YSIS<36:2,1:3) Q
|
|
P45 S N=N+$S(YSIS<11:0,YSIS<26:1,YSIS<46:2,1:3) Q
|
|
P26 S N=N+$S(YSIS<11:0,YSIS<26:1,1:2) Q
|
|
P27 S N=N+$S(YSIS<16:0,YSIS<26:1,1:2) Q
|
|
P31 S N=N+$S(YSIS<16:0,YSIS<31:1,1:2) Q
|
|
P32 S N=N+$S(YSIS<6:0,YSIS<11:1,YSIS<16:2,YSIS<21:3,YSIS<31:4,1:5) Q
|
|
P34 S N=N+$S(YSIS<5:0,YSIS<10:1,YSIS<15:2,YSIS<20:3,YSIS<25:4,YSIS<29:5,1:6) Q
|
|
P37 S N=N+$S(YSIS<11:0,YSIS<21:1,YSIS<36:2,1:3) Q
|
|
T79 S N=N+$S(YSIS>79:0,YSIS>70:1,YSIS>60:2,1:3) Q
|
|
T80 S N=N+$S(YSIS>80:0,YSIS>69:1,1:2) Q
|
|
T82 S N=N+$S(YSIS>79:0,YSIS>69:1,YSIS>59:2,YSIS>54:3,1:4) Q
|