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

YTPSI.m

Go to the documentation of this file.
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