source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YTMILL.m@ 949

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1YTMILL ;SLC/DKG-TEST PKG: MILLON SCALES ; 6/29/89 15:40 ;
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3MILL ;
4 S YSTY="TL" D ^YTREPT,YSSRT
5 S K=+$E(YSSR),YSAD=$S(K=4:10,K=7:15,K=2:-10,K=8:-10,1:0)
6 S K=$E(YSSR,1,2) I K="28"!(K="82") S YSAD=-15
7 I YSAD F J=9:1:14 S YSRR(J)=YSRR(J)+YSAD
8 G BOTH
9MCMI ;
10 S YSTY="TL" D ^YTREPT,YSSRT
11 I $E(YSSR)=4!($E(YSSR,1,2)["7") F J=9:1:13,15 S YSRR(J)=YSRR(J)+$S(J=9!(J=11):8,J=10:16,1:28)
12 I $E(YSSR,1,2)["2"!($E(YSSR,1,2)["8") F J=9:1:11 S YSRR(J)=YSRR(J)-9
13 S K=0 F J=1:1:8 S K=K+$P(R,U,J)
14 S YSAD=$S(K<110:110-K,K<132:0,1:131-K/3) S:YSAD#1 YSAD=YSAD\1+1
15 I YSAD F J=9:1:20 S YSRR(J)=YSRR(J)+YSAD
16BOTH ;
17 S S="" F J=1:1:21 S S=S_YSRR(J)_"^"
18 S YSII="I I I I I I"
19 S YSXX="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
20 S X=$P(^YTT(601,YSTEST,"P"),U) D DTA^YTREPT W !!?(72-$L(X)\2),X,!!
21 S K=$P(R,U,21) W "VALIDIY SCORE = ",K I K W ?20,"*** THIS PROFILE IS ",$S(K=1:"UNRELIABLE",1:"INVALID")," ***",!
22 W !?7,"S C A L E",?23,"RAW BR",?42,"PROFILE OF BR SCORES",!?30,"20 35 60 75 85 100",!?31,YSII,!
23 S YSLFT=0 F YSSC=1:1:20 D YSSCL Q:YSLFT
24END ;
25 K A,B,I,R,J,K,S,YSAD,YSBR,YSII,YSIT,YSKK,YSRR,YSRS,YSSC,YSSR,YSTY,YSXR,YSXX Q
26RLN ;
27 W ?1 F YSKK=1:1:K W $J(YSIT,3,0)," ",$E(X,YSIT)," " S YSIT=YSIT+1
28 W ! Q
29YSSRT ;
30 F J=1:1:21 S YSRR(J)=$P(S,U,J)
31 K YSRS F J=1:1:8 S K=130-YSRR(J) S:'$D(YSRS(K)) YSRS(K)="" S YSRS(K)=YSRS(K)_J
32 S YSSR="",K=0 F S K=$O(YSRS(K)) Q:'K S YSSR=YSSR_YSRS(K)
33 K YSRS Q
34YSSCL ;
35 S YSBR=$P(S,U,YSSC),YSRS=$P(R,U,YSSC),YSNAM=$P(^YTT(601,YSTEST,"S",YSSC,0),U,2)
36 S YSXR=$S(YSBR<20:20,YSBR<101:YSBR,1:100),YSXR=YSXR-19\2+1
37 D:IOST?1"C-".E WAIT:$Y>(IOSL-4) Q:YSLFT W !,YSNAM,?24,$J(YSRS,2,0),$J(YSBR,4,0)," ",$E(YSXX,1,YSXR),$E(YSII,YSXR+1,41)
38 W:YSSC=8!($P(^YTT(601,YSTEST,0),U)="MCMI"&(YSSC=11))!($P(^(0),U)="MILL"&((YSSC=14)!(YSSC=17))) !?31,YSII Q
39WAIT ;
40 ; Added 5/6/94 LJA
41 N A,B,B1,C,D,E,E1,F,F1,G,G1,H,I,J,J1,J2,J3,J4,K,L,L1,L2,M,N
42 N N1,N2,N3,N4,P,P0,P1,P3,R,R1,S,S1,T,T1,T2,TT,V,V1,V2,V3
43 N V4,V5,V6,W,X,X0,X1,X2,X3,X4,X7,X8,X9,Y,Y1,Y2,Z,Z1,Z3
44 ;
45 F I0=1:1:(IOSL-$Y-2) W !
46 N DTOUT,DUOUT,DIRUT
47 S DIR(0)="E" D ^DIR K DIR S YSTOUT=$D(DTOUT),YSUOUT=$D(DUOUT),YSLFT=$D(DIRUT)
48 W @IOF Q
Note: See TracBrowser for help on using the repository browser.