Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: YTMMP1

YTMMP1.m

Go to the documentation of this file.
YTMMP1 ;SLC/DKG-TEST PKG: MMPI PROFILE INTERPRETATION ; 7/13/89  15:50 ;
 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
 ;
 D DTA^YTREPT W !!?21,"--- PROFILE INTERPRETATION ---",!
 W !,"THE FOLLOWING MMPI INTERPRETATION SHOULD BE VIEWED AS A SERIES OF",!,"HYPOTHESES WHICH MAY REQUIRE FURTHER INVESTIGATION.",!
 S YSFC="HS,D,HY,PD,MF,PA,PT,SC,MA,SI,L,F,K",YSMMPI=$O(^YTT(601,"B","MMPI",0))
 F I=1:1:13 S @$P(YSFC,",",I)=$P(S,U,I)
 S YSMX=0 F I=1:1:4,6:1:10 S A=$P(S,U,I) S:A>YSMX YSMX=A
 S YSIS=L-K I YSIS<0 G F1
 I L>69 S N=$S(YSIS<5:1,YSIS<13:2,YSIS<20:3,1:4) G LPR
 I L>64 S N=$S(YSIS<5:5,(YSIS<10)&(F<70):6,YSIS<10:7,YSIS<15:8,F<70:9,1:10) G LPR
 I L>59 S N=$S(YSIS<5:11,(YSIS<10)&(F<70):12,YSIS<10:13,1:14) G LPR
 I L>54 S N=$S(YSIS<5:15,YSIS<10:16,1:17) G LPR
 I L>49 S N=$S((YSIS<11)&(F<60):18,(YSIS<11)&(F>70):19,YSIS>10:20,(F<70)&(F>59)&(F-K>20)&(F-K<31)&(YSMX<70):19,1:0) G LPR
 I L>44 S N=$S(YSIS<6:21,1:22) G LPR
 I L>39,YSIS>0 S N=$S(L-F>5:23,F>L:24,L-F<6:24,1:0) G LPR
 I K<40,YSIS>0,L'=F S N=$S(L>F:25,1:26) G LPR
 G F1
LPR ;
 D:N PR
F1 ;
 S YSIS=F-K I YSIS<0 G K1
 I F>89 S N=$S(YSIS<11:26,YSIS<21:27,YSIS<31:29,YSIS<41:31,YSIS<51:33,YSIS<61:35,1:37) D:(N>28)&(YSMX<70) PR S N=N+1 G FPR
 I F>79 S N=$S(YSIS<15:39,YSIS<21:41,YSIS<31:43,YSIS<41:45,YSIS<51:47,YSIS<61:49,1:51) D:YSMX<70 PR S N=N+1 G FPR
 I F>69 S N=$S(YSIS<15:52,YSIS<21:53,YSIS<31:55,YSIS<41:57,YSIS<51:59,1:61) D:(N>54)&(YSMX<70) PR S N=N+1 G FPR
 I F>59 S N=$S((YSIS<15)&(YSMX<70):63,YSIS<15:0,YSIS<21:64,YSIS<31:65,1:66) G FPR
 I F>49,YSMX<61 S N=$S(YSIS<15:67,YSIS<21:68,YSIS<31:69,1:70) G FPR
 I F<50,YSMX<61 S N=$S(YSIS<15:71,1:72) G FPR
 G K1
FPR ;
 D:N PR
K1 ;
 S YSIS=K-L I YSIS<1 G K2
 I K>69 S N=$S(YSIS<6:73,YSIS<11:74,YSIS<16:75,1:76) G K1PR
 I K>64 S N=$S(YSIS<11:80,(YSIS<21)&(K>F):81,YSIS<21:0,1:82) G K1PR
 I K>59 S N=$S((YSIS<11)&(K>F):86,YSIS<11:0,YSIS<20:87,1:88) G K1PR
 I K>50 S N=$S(YSIS>10:91,K'>F:0,YSIS<6:89,1:90) G K1PR
 I K>45 S N=$S(YSIS<6:94,1:95) G K1PR
 I K>40 S N=$S(YSIS>5:97,K>F:96,1:0) G K1PR
 S N=100
K1PR ;
 D:N PR
K2 ;
 S YSIS=K-F I YSIS<0 G END
 I K>69 S N=$S(YSIS<11:77,YSIS<21:78,1:79) G K3
 I (YSMX>60)!(L'<K) G END
 I K>59 S N=$S(YSIS<11:83,YSIS<21:84,1:85) G K3
 I K>49 S N=$S(YSIS<11:92,1:93) G K3
 I K>39 S N=$S(YSIS<11:98,1:99) G K3
 S N=101
K3 ;
 D:N PR
END ;
 G ^YTMMP2
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 ! Q