YTMILL ;SLC/DKG-TEST PKG: MILLON SCALES ; 6/29/89 15:40 ;
;;5.01;MENTAL HEALTH;;Dec 30, 1994
MILL ;
S YSTY="TL" D ^YTREPT,YSSRT
S K=+$E(YSSR),YSAD=$S(K=4:10,K=7:15,K=2:-10,K=8:-10,1:0)
S K=$E(YSSR,1,2) I K="28"!(K="82") S YSAD=-15
I YSAD F J=9:1:14 S YSRR(J)=YSRR(J)+YSAD
G BOTH
MCMI ;
S YSTY="TL" D ^YTREPT,YSSRT
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)
I $E(YSSR,1,2)["2"!($E(YSSR,1,2)["8") F J=9:1:11 S YSRR(J)=YSRR(J)-9
S K=0 F J=1:1:8 S K=K+$P(R,U,J)
S YSAD=$S(K<110:110-K,K<132:0,1:131-K/3) S:YSAD#1 YSAD=YSAD\1+1
I YSAD F J=9:1:20 S YSRR(J)=YSRR(J)+YSAD
BOTH ;
S S="" F J=1:1:21 S S=S_YSRR(J)_"^"
S YSII="I I I I I I"
S YSXX="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
S X=$P(^YTT(601,YSTEST,"P"),U) D DTA^YTREPT W !!?(72-$L(X)\2),X,!!
S K=$P(R,U,21) W "VALIDIY SCORE = ",K I K W ?20,"*** THIS PROFILE IS ",$S(K=1:"UNRELIABLE",1:"INVALID")," ***",!
W !?7,"S C A L E",?23,"RAW BR",?42,"PROFILE OF BR SCORES",!?30,"20 35 60 75 85 100",!?31,YSII,!
S YSLFT=0 F YSSC=1:1:20 D YSSCL Q:YSLFT
END ;
K A,B,I,R,J,K,S,YSAD,YSBR,YSII,YSIT,YSKK,YSRR,YSRS,YSSC,YSSR,YSTY,YSXR,YSXX Q
RLN ;
W ?1 F YSKK=1:1:K W $J(YSIT,3,0)," ",$E(X,YSIT)," " S YSIT=YSIT+1
W ! Q
YSSRT ;
F J=1:1:21 S YSRR(J)=$P(S,U,J)
K YSRS F J=1:1:8 S K=130-YSRR(J) S:'$D(YSRS(K)) YSRS(K)="" S YSRS(K)=YSRS(K)_J
S YSSR="",K=0 F S K=$O(YSRS(K)) Q:'K S YSSR=YSSR_YSRS(K)
K YSRS Q
YSSCL ;
S YSBR=$P(S,U,YSSC),YSRS=$P(R,U,YSSC),YSNAM=$P(^YTT(601,YSTEST,"S",YSSC,0),U,2)
S YSXR=$S(YSBR<20:20,YSBR<101:YSBR,1:100),YSXR=YSXR-19\2+1
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)
W:YSSC=8!($P(^YTT(601,YSTEST,0),U)="MCMI"&(YSSC=11))!($P(^(0),U)="MILL"&((YSSC=14)!(YSSC=17))) !?31,YSII Q
WAIT ;
; Added 5/6/94 LJA
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
N N1,N2,N3,N4,P,P0,P1,P3,R,R1,S,S1,T,T1,T2,TT,V,V1,V2,V3
N V4,V5,V6,W,X,X0,X1,X2,X3,X4,X7,X8,X9,Y,Y1,Y2,Z,Z1,Z3
;
F I0=1:1:(IOSL-$Y-2) W !
N DTOUT,DUOUT,DIRUT
S DIR(0)="E" D ^DIR K DIR S YSTOUT=$D(DTOUT),YSUOUT=$D(DUOUT),YSLFT=$D(DIRUT)
W @IOF Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYTMILL 2246 printed Nov 22, 2024@17:27:39 Page 2
YTMILL ;SLC/DKG-TEST PKG: MILLON SCALES ; 6/29/89 15:40 ;
+1 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
MILL ;
+1 SET YSTY="TL"
DO ^YTREPT
DO YSSRT
+2 SET K=+$EXTRACT(YSSR)
SET YSAD=$SELECT(K=4:10,K=7:15,K=2:-10,K=8:-10,1:0)
+3 SET K=$EXTRACT(YSSR,1,2)
IF K="28"!(K="82")
SET YSAD=-15
+4 IF YSAD
FOR J=9:1:14
SET YSRR(J)=YSRR(J)+YSAD
+5 GOTO BOTH
MCMI ;
+1 SET YSTY="TL"
DO ^YTREPT
DO YSSRT
+2 IF $EXTRACT(YSSR)=4!($EXTRACT(YSSR,1,2)["7")
FOR J=9:1:13,15
SET YSRR(J)=YSRR(J)+$SELECT(J=9!(J=11):8,J=10:16,1:28)
+3 IF $EXTRACT(YSSR,1,2)["2"!($EXTRACT(YSSR,1,2)["8")
FOR J=9:1:11
SET YSRR(J)=YSRR(J)-9
+4 SET K=0
FOR J=1:1:8
SET K=K+$PIECE(R,U,J)
+5 SET YSAD=$SELECT(K<110:110-K,K<132:0,1:131-K/3)
if YSAD#1
SET YSAD=YSAD\1+1
+6 IF YSAD
FOR J=9:1:20
SET YSRR(J)=YSRR(J)+YSAD
BOTH ;
+1 SET S=""
FOR J=1:1:21
SET S=S_YSRR(J)_"^"
+2 SET YSII="I I I I I I"
+3 SET YSXX="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
+4 SET X=$PIECE(^YTT(601,YSTEST,"P"),U)
DO DTA^YTREPT
WRITE !!?(72-$LENGTH(X)\2),X,!!
+5 SET K=$PIECE(R,U,21)
WRITE "VALIDIY SCORE = ",K
IF K
WRITE ?20,"*** THIS PROFILE IS ",$SELECT(K=1:"UNRELIABLE",1:"INVALID")," ***",!
+6 WRITE !?7,"S C A L E",?23,"RAW BR",?42,"PROFILE OF BR SCORES",!?30,"20 35 60 75 85 100",!?31,YSII,!
+7 SET YSLFT=0
FOR YSSC=1:1:20
DO YSSCL
if YSLFT
QUIT
END ;
+1 KILL A,B,I,R,J,K,S,YSAD,YSBR,YSII,YSIT,YSKK,YSRR,YSRS,YSSC,YSSR,YSTY,YSXR,YSXX
QUIT
RLN ;
+1 WRITE ?1
FOR YSKK=1:1:K
WRITE $JUSTIFY(YSIT,3,0)," ",$EXTRACT(X,YSIT)," "
SET YSIT=YSIT+1
+2 WRITE !
QUIT
YSSRT ;
+1 FOR J=1:1:21
SET YSRR(J)=$PIECE(S,U,J)
+2 KILL YSRS
FOR J=1:1:8
SET K=130-YSRR(J)
if '$DATA(YSRS(K))
SET YSRS(K)=""
SET YSRS(K)=YSRS(K)_J
+3 SET YSSR=""
SET K=0
FOR
SET K=$ORDER(YSRS(K))
if 'K
QUIT
SET YSSR=YSSR_YSRS(K)
+4 KILL YSRS
QUIT
YSSCL ;
+1 SET YSBR=$PIECE(S,U,YSSC)
SET YSRS=$PIECE(R,U,YSSC)
SET YSNAM=$PIECE(^YTT(601,YSTEST,"S",YSSC,0),U,2)
+2 SET YSXR=$SELECT(YSBR<20:20,YSBR<101:YSBR,1:100)
SET YSXR=YSXR-19\2+1
+3 if IOST?1"C-".E
if $Y>(IOSL-4)
DO WAIT
if YSLFT
QUIT
WRITE !,YSNAM,?24,$JUSTIFY(YSRS,2,0),$JUSTIFY(YSBR,4,0)," ",$EXTRACT(YSXX,1,YSXR),$EXTRACT(YSII,YSXR+1,41)
+4 if YSSC=8!($PIECE(^YTT(601,YSTEST,0),U)="MCMI"&(YSSC=11))!($PIECE(^(0),U)="MILL"&((YSSC=14)!(YSSC=17)))
WRITE !?31,YSII
QUIT
WAIT ;
+1 ; Added 5/6/94 LJA
+2 NEW A,B,B1,C,D,E,E1,F,F1,G,G1,H,I,J,J1,J2,J3,J4,K,L,L1,L2,M,N
+3 NEW N1,N2,N3,N4,P,P0,P1,P3,R,R1,S,S1,T,T1,T2,TT,V,V1,V2,V3
+4 NEW V4,V5,V6,W,X,X0,X1,X2,X3,X4,X7,X8,X9,Y,Y1,Y2,Z,Z1,Z3
+5 ;
+6 FOR I0=1:1:(IOSL-$Y-2)
WRITE !
+7 NEW DTOUT,DUOUT,DIRUT
+8 SET DIR(0)="E"
DO ^DIR
KILL DIR
SET YSTOUT=$DATA(DTOUT)
SET YSUOUT=$DATA(DUOUT)
SET YSLFT=$DATA(DIRUT)
+9 WRITE @IOF
QUIT