YTPSI ;SLC/DKG-TEST PKG: PSYCH. SCREENING INV. ; 10/21/88 17:13 ;
;;5.01;MENTAL HEALTH;;Dec 30, 1994
;
S YSLFT=0 W !!?21,"--- PROFILE INTERPRETATION ---",!!
S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
S YSRA=0 F YSJJ=10,15,27,43,49,71,77,96,98,103,110,122 S:$E(X,YSJJ)="T" YSRA=YSRA+1
F YSJJ=2,17,25,28,32,34,41,45,54,69,72,75,76,81,82,85,107,108 S:$E(X,YSJJ)="F" YSRA=YSRA+1
I YSRA>12 S K=1 D PR G:YSLFT END
S YSLS=0 F I=1:1:3 S:$P(S,U,I)>59 YSLS=YSLS+1
I $P(S,U,5)>64 S K=2 D PR G:YSLFT END S K=$S('YSLS:3,1:4) D PR G:YSLFT END
I $P(S,U,5)<36 S K=5 D PR G:YSLFT END S K=$S('YSLS:7,1:6) D PR G:YSLFT END
S A=$P(S,U) I A>64 S K=$S(A>69:8,1:9) D PR G:YSLFT END
S L=10 F J=2:1:4 S A=$P(S,U,J),K=$S(A<41:L+4,A<46:L+3,A<55:L+2,A<65:L+1,1:L) D PR G:YSLFT END S L=L+5
END ;
K A,I,J,YSJJ,K,L,YSLS,M,YSRA,S,X Q
PR ;
F M=1:1 Q:'$D(^YTT(601,YSTEST,"G",K,1,M,0)) D:IOST?1"C-".E WAIT:$Y>(IOSL-4) Q:YSLFT W !,^(0)
W ! 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
;
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[HYTPSI 1262 printed Dec 13, 2024@02:18:02 Page 2
YTPSI ;SLC/DKG-TEST PKG: PSYCH. SCREENING INV. ; 10/21/88 17:13 ;
+1 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
+2 ;
+3 SET YSLFT=0
WRITE !!?21,"--- PROFILE INTERPRETATION ---",!!
+4 SET X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
+5 SET YSRA=0
FOR YSJJ=10,15,27,43,49,71,77,96,98,103,110,122
if $EXTRACT(X,YSJJ)="T"
SET YSRA=YSRA+1
+6 FOR YSJJ=2,17,25,28,32,34,41,45,54,69,72,75,76,81,82,85,107,108
if $EXTRACT(X,YSJJ)="F"
SET YSRA=YSRA+1
+7 IF YSRA>12
SET K=1
DO PR
if YSLFT
GOTO END
+8 SET YSLS=0
FOR I=1:1:3
if $PIECE(S,U,I)>59
SET YSLS=YSLS+1
+9 IF $PIECE(S,U,5)>64
SET K=2
DO PR
if YSLFT
GOTO END
SET K=$SELECT('YSLS:3,1:4)
DO PR
if YSLFT
GOTO END
+10 IF $PIECE(S,U,5)<36
SET K=5
DO PR
if YSLFT
GOTO END
SET K=$SELECT('YSLS:7,1:6)
DO PR
if YSLFT
GOTO END
+11 SET A=$PIECE(S,U)
IF A>64
SET K=$SELECT(A>69:8,1:9)
DO PR
if YSLFT
GOTO END
+12 SET L=10
FOR J=2:1:4
SET A=$PIECE(S,U,J)
SET K=$SELECT(A<41:L+4,A<46:L+3,A<55:L+2,A<65:L+1,1:L)
DO PR
if YSLFT
GOTO END
SET L=L+5
END ;
+1 KILL A,I,J,YSJJ,K,L,YSLS,M,YSRA,S,X
QUIT
PR ;
+1 FOR M=1:1
if '$DATA(^YTT(601,YSTEST,"G",K,1,M,0))
QUIT
if IOST?1"C-".E
if $Y>(IOSL-4)
DO WAIT
if YSLFT
QUIT
WRITE !,^(0)
+2 WRITE !
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 NEW DTOUT,DUOUT,DIRUT
+7 SET DIR(0)="E"
DO ^DIR
KILL DIR
SET YSTOUT=$DATA(DTOUT)
SET YSUOUT=$DATA(DUOUT)
SET YSLFT=$DATA(DIRUT)
WRITE @IOF
+8 QUIT