[613] | 1 | YSMTI6 ;ALB/ASF-MULTIPLE PSYCH TESTS NEW ;4/18/01 17:27
|
---|
| 2 | ;;5.01;MENTAL HEALTH;**62,71**;Dec 30, 1994
|
---|
| 3 | Q
|
---|
| 4 | AUDIT ;
|
---|
| 5 | N I,X,N,X1
|
---|
| 6 | S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
|
---|
| 7 | S R=0 F I=1:1:8 S R=R+$E(X,I)
|
---|
| 8 | S X1=$S($E(X,9)=1:2,$E(X,9)=2:4,1:0) S R=R+X1
|
---|
| 9 | S X1=$S($E(X,10)=1:2,$E(X,10)=2:4,1:0) S R=R+X1
|
---|
| 10 | Q
|
---|
| 11 | DOMG ;
|
---|
| 12 | N I,X,YSMISS,YSDEP
|
---|
| 13 | S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
|
---|
| 14 | S (YSMISS,YSDEP)=0 F I=1:1:5 S YSDEP=YSDEP+$E(X,I) S:$E(X,I)="X" YSMISS=YSMISS+1
|
---|
| 15 | I YSMISS=1 S YSDEP=YSDEP+(YSDEP/4)
|
---|
| 16 | I YSMISS>1 S S="invalid"
|
---|
| 17 | S R=YSDEP
|
---|
| 18 | Q
|
---|
| 19 | PAI ; ASF 4/18/01
|
---|
| 20 | N A,B,J,YSICN,YSKK,YSMX,YSNUMX,YSTL
|
---|
| 21 | S (R,S)="^",YSMX=4
|
---|
| 22 | D RD
|
---|
| 23 | Q:$L(X,"X")>18
|
---|
| 24 | D SCOR,STND
|
---|
| 25 | Q ;--> OUT
|
---|
| 26 | RD S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)_^YTD(601.2,YSDFN,1,YSET,1,YSED,2) Q
|
---|
| 27 | SCOR ;
|
---|
| 28 | F YSKK=2:1:53 I $D(^YTT(601,YSTEST,"S",YSKK,"K")) S Y=^YTT(601,YSTEST,"S",YSKK,"K",1,0),YSTL=0 D KK S $P(R,U,YSKK)=YSTL
|
---|
| 29 | FS ;full scales
|
---|
| 30 | F I=5,9,13,17,21,25,29,33,38,44 S $P(R,U,I)=$P(R,U,I+1)+$P(R,U,I+2)+$P(R,U,I+3) S:I=33 $P(R,U,I)=$P(R,U,I)+$P(R,U,I+4)
|
---|
| 31 | ICNR ;score ICN
|
---|
| 32 | S YSICN=0
|
---|
| 33 | S Y=(5-$E(X,75))-(5-$E(X,115)) D A
|
---|
| 34 | S Y=$E(X,4)-$E(X,44) D A
|
---|
| 35 | S Y=$E(X,60)-$E(X,100) D A
|
---|
| 36 | S Y=$E(X,145)-(5-$E(X,185)) D A
|
---|
| 37 | S Y=$E(X,65)-(5-$E(X,246)) D A
|
---|
| 38 | S Y=$E(X,102)-(5-$E(X,103)) D A
|
---|
| 39 | S Y=$E(X,22)-(5-$E(X,142)) D A
|
---|
| 40 | S Y=(5-$E(X,301))-$E(X,140) D A
|
---|
| 41 | S Y=5-(5-$E(X,270))-$E(X,53) D A
|
---|
| 42 | S Y=5-(5-$E(X,190))-$E(X,13) D A
|
---|
| 43 | S $P(R,U,1)=YSICN
|
---|
| 44 | S X=^YTT(601,YSTEST,"S",1,"M"),$P(S,U,1)=$J((YSICN-$P(X,U)/$P(X,U,2)*10+50),0,0)
|
---|
| 45 | Q
|
---|
| 46 | A ;icn absolutes
|
---|
| 47 | S:Y<0 Y=-Y S YSICN=YSICN+Y Q
|
---|
| 48 | KK S YSNUMX=0
|
---|
| 49 | F I=1:2 Q:$P(Y,U,I)="" S YSIT=$P(Y,U,I),A=$P(Y,U,I+1),B=$E(X,YSIT),YSTL=YSTL+$S(B="X":0,A="D":B-1,1:YSMX-B) S:B="X" YSNUMX=YSNUMX+1
|
---|
| 50 | I (YSNUMX/(I-1))>.2 S YSTL="X"
|
---|
| 51 | Q
|
---|
| 52 | STND ;stanard T scores
|
---|
| 53 | F J=2:1:53 S A=$P(R,U,J) S:A?.N X=^YTT(601,YSTEST,"S",J,"M"),S(J)=$J((A-$P(X,U)/$P(X,U,2)*10+50),0,0) S:A="X" S(J)="X" S S=S_S(J)_U
|
---|
| 54 | Q
|
---|