VistA-FOIAVistA/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YTATQ.m

9 lines
444 B
Mathematica

YTATQ ;SLC/DKG-TEST PKG: SCORING FOR AUTOMATIC THOUGHTS QUESTIONNAIRE ; 10/20/88 12:38 ;
;;5.01;MENTAL HEALTH;;Dec 30, 1994
;
S YSRR=^YTD(601.2,YSDFN,1,YSET,1,YSED,1),R=0
F J=1:1 Q:$E(YSRR,J)="" S R=R+$E(YSRR,J)
S F(1)="7^10^14^20^26",F(2)="2^3^9^21^23^24^28^",F(3)="17^18",F(4)="29^30",YSAN=0
F J=1:1:4 S YSAD=F(J) F K=1:1 S YSEX=$P(YSAD,U,K) S:YSEX="" R=R_U_YSAN,YSAN=0 Q:YSEX="" S YSAN=YSAN+$E(YSRR,YSEX)
K F,YSAD,YSAN,YSEX,YSRR Q