source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YTMMP2.m@ 1297

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

initial load of WorldVistAEHR

File size: 3.5 KB
RevLine 
[613]1YTMMP2 ;SLC/DKG-TEST PKG: MMPI SCALES (CONT.) ; 7/13/89 14:59 ;
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4 S H=YSHS+YSHY\2,YSSH=YSSC+YSPA\2,YSRH=YSHS+YSHY+YSPT+D\4,YSAU=D+YSPT\2,Z=YSMA+YSPD\2
5 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
6 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
7 I YSHY>60,YSHY<71,YSIS>0,YSIS<11 S N=120 D PR
8 S YSIS=H-YSSH I YSIS'<0,H>79 S N=$S(H<90:"121^P20",1:"124^P20") D GET
9 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
10 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
11 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
12 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
13 I YSHY>50,YSHY<61,YSPD<65,YSMF<65,YSSC<65,YSMA<65 S N="194^P10" D GET
14 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
15 G NX:H=Z,HGZ:H>Z
16 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
17 S YSIS=Z I YSMF>69 S N=$S(YSMF<76:"226^T79",1:"218^T82") D GET G NX
18HGZ S YSIS=H I H>59,YSMF>64 S N=$S(YSMF<70:"235^T82",YSMF<76:"230^T80",1:"223^T82") D GET
19NX I YSMF<65,Z<51,H<51,YSSH<51,YSRH<51,YSAU<51 S N=238 D PR
20 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
21 I YSPA>50,YSPA<61,YSIS<6,YSIS>0 S N=253 D PR
22 I YSPA<61,YSIS>6 S N=254 D PR
23 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
24 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
25 I YSSH<60,YSIS>0,YSIS<16,D<65,YSPT<65,YSMA<65 S N=307 D PR
26 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
27 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
28 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
29 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
30 G ^YTMMP3
31GET S X=$P(N,U,2),N=+N D:X'="" @X
32PR I $Y>51 D DTA^YTREPT W !!
33 F YSJJ=1:1 Q:'$D(^YTT(601,YSMMPI,YSSX,N,1,YSJJ,0)) W !,^(0)
34 W ! K YSHY,YSPA Q
35P10 S N=N+$S(YSIS<11:0,1:1) Q
36P20 S N=N+$S(YSIS<11:0,YSIS<21:1,1:2) Q
37P30 S N=N+$S(YSIS<11:0,YSIS<21:1,YSIS<31:2,1:3) Q
38P40 S N=N+$S(YSIS<11:0,YSIS<21:1,YSIS<31:2,YSIS<41:3,1:4) Q
39P35 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
40P36 S N=N+$S(YSIS<16:0,YSIS<26:1,YSIS<36:2,1:3) Q
41P45 S N=N+$S(YSIS<11:0,YSIS<26:1,YSIS<46:2,1:3) Q
42P26 S N=N+$S(YSIS<11:0,YSIS<26:1,1:2) Q
43P27 S N=N+$S(YSIS<16:0,YSIS<26:1,1:2) Q
44P31 S N=N+$S(YSIS<16:0,YSIS<31:1,1:2) Q
45P32 S N=N+$S(YSIS<6:0,YSIS<11:1,YSIS<16:2,YSIS<21:3,YSIS<31:4,1:5) Q
46P34 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
47P37 S N=N+$S(YSIS<11:0,YSIS<21:1,YSIS<36:2,1:3) Q
48T79 S N=N+$S(YSIS>79:0,YSIS>70:1,YSIS>60:2,1:3) Q
49T80 S N=N+$S(YSIS>80:0,YSIS>69:1,1:2) Q
50T82 S N=N+$S(YSIS>79:0,YSIS>69:1,YSIS>59:2,YSIS>54:3,1:4) Q
Note: See TracBrowser for help on using the repository browser.