YTDOMR ;ALB/ASF-DEPRESSION OUTCOME MODULE REPORT ; 5/7/07 10:39am
;;5.01;MENTAL HEALTH;**31,85**;Dec 30, 1994;Build 48
EN81 ;
D ^YTDOMR1
S (YSCR,YSDEP,YSPA,YSPB,YSSEV,YSNOT)=0
S R=^YTD(601.2,YSDFN,1,YSTEST,1,YSED,1)
;PART A SAD-NOFUN
I $E(R,49)>2!($E(R,50)>2) S YSPA=1
;PART B DEPRESSIVE SYMPTOMS 4 WEEKS
I $E(R,49)>2 S YSCR=YSCR+1
I $E(R,50)>2 S YSCR=YSCR+1
I $E(R,51)>2!($E(R,52)>2) S YSCR=YSCR+1
I $E(R,53)>2 S YSCR=YSCR+1
I $E(R,54)>2 S YSCR=YSCR+1
I $E(R,55)>2 S YSCR=YSCR+1
I $E(R,56)>2 S YSCR=YSCR+1
I $E(R,57)>2 S YSCR=YSCR+1
I $E(R,58)>2!($E(R,59)="Y") S YSCR=YSCR+1
I YSCR>4 S YSPB=1
;MISSING
S YSMISS=$L($E(R,49,59),"X")-1
I ((YSCR<5)&((YSMISS+YSCR)>4))!(YSMISS>4) S YSPB=""
I YSPA,YSPB S YSDEP=1
I YSPB="" S YSDEP=""
I $E(R,25)="Y" S YSNOT=1
F I=49:1:59 S X=$E(R,I) S X=$S(X="Y":3,X="N":0,X?1N:X-1,1:0) S YSSEV=YSSEV+X
S YSSEV=YSSEV/(11-YSMISS)*33.33
I YSMISS>1 S YSSEV=""
OUT81 ;
S I1="",$P(I1,"_",79)="" W !!,I1
W !,"Scoring: By self report,"
W:YSDEP'="" !,"The patient "_$S(YSDEP:"DOES",1:"DOES NOT")_" meet DSM IV Criterion A for Major Depressive Episode."
W:YSDEP="" !,"Diagnosis not available due to "_YTMISS_" missing items"
I YSNOT W !,"However a recent death is reported."
W !?15,"DOM severity score= "
W $S(YSSEV="":" not scoreable due to missing items",1:$J(YSSEV,3,0))
W !,"There are no normative data for interpreting the severity score, but changes"
W !,"between this score and the score on the DOM Patient Follow-Up Assessment",!,"(Form 8.3) may reflect changes in the severity of the patient's symptoms."
W !,I1
Q
EN82 ;
D ^YTDOMR1
S (YSCR,YSDEP,YSPA,YSPB,YSSEV,YSNOT)=0
S R=^YTD(601.2,YSDFN,1,YSTEST,1,YSED,1)
I $E(R,4)="Y"!($E(R,5)="Y") S YSPA=1
F I=4:1:12 S:$E(R,I)="Y" YSCR=YSCR+1
S:YSCR>4 YSPB=1
I YSPA&YSPB S YSDEP=1
F I=13,14,15,18,20,21,22 S:$E(R,I)="Y" YSNOT=1
;
OUT82 ;
S I1="",$P(I1,"_",79)="" W !!,I1
W !,"Scoring:"
S X=$E(R,1)
W !,"Clinician reports: "
W $S(X=1:"MAJOR DEPRESSION (SINGLE EPISODE OR RECURRENT)",X=2:"Mood Disorder secondary to a general medical condition",X=3:"Posttraumatic Stress Disorder",X=4:"Substance use disorder(s)",X=5:"NO MAJOR DEPRESSION",1:"??")
W !,"The patient "_$S(YSDEP:"DOES",1:"DOES NOT")_" meet DSM IV criteria for major depression."
I YSNOT W !,"However exclusionary features are reported."
W !,I1
Q
EN80 ;
D ^YTDOMR1
S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
S X1=0
S:$E(X,1)="Y" X1=1
S:($E(X,2)="Y")&($E(X,3)="Y")&($E(X,4)>1) X1=1
W:(X1=1) !!,"This screen is positive, and the possibility of a mood disorder",!,"should be evaluated further."
W:(X1=0) !!,"This screen for mood disorder is negative."
Q
ENG ;geriatric screen
S YSHDR=$E(YSHDR,1,43)_" "_YSSEX_" AGE "_$J(YSAGE,2,0)
W @IOF,YSHDR,?53,$$FMTE^XLFDT(DT,"5ZD"),?64,$$FMTE^XLFDT(YSHD,"5ZD")
W !,?53,"PRINTED",?64,"ENTERED",!
W !!,?3,"*** Geriatric Depression Screen ***",!!
W !,"The patient was questioned about mood in the past week.",!
W !,"Felt could not shake off blues: " S YSI=1 D ENGQ
W !,"Felt depressed: " S YSI=2 D ENGQ
W !,"Felt fearful: " S YSI=3 D ENGQ
W !,"Sleep was restless: " S YSI=4 D ENGQ
W !,"Felt hopeless about the future: " S YSI=5 D ENGQ
S X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
S (YSMISS,YSDEP)=0 F I=1:1:4 S YSDEP=YSDEP+$E(X,I) S:$E(X,I)="X" YSMISS=YSMISS+1 ; ASF 10/20/06
S:$E(X,5)?1N YSDEP=YSDEP+(3-$E(X,5)) S:$E(X,5)="X" YSMISS=YSMISS+1
I YSMISS=1 S YSDEP=YSDEP+(YSDEP/4)
I YSMISS>1 W !!,"The validity of this test is compromised as "_YSMISS_" of the 5 questions",!,"were not answered." Q
W !!,"Score: "_YSDEP
W:(YSDEP>3.9) !,"This screen is positive, and the possibility of a mood disorder",!,"should be evaluated further."
W:(YSDEP<4) !,"This screen for mood disorder is negative."
Q
ENGQ ;
S Y1=$E(^YTD(601.2,YSDFN,1,YSET,1,YSED,1),YSI)
I YSI<5 W $S(Y1=0:"rarely",Y1=1:"some of the time",Y1=2:"much of the time",Y1=3:"most of the time",1:"question not answered")
I YSI=5 W $S(Y1=3:"rarely",Y1=2:"some of the time",Y1=1:"much of the time",Y1=0:"most of the time",1:"question not answered")
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYTDOMR 4127 printed Nov 22, 2024@17:27:14 Page 2
YTDOMR ;ALB/ASF-DEPRESSION OUTCOME MODULE REPORT ; 5/7/07 10:39am
+1 ;;5.01;MENTAL HEALTH;**31,85**;Dec 30, 1994;Build 48
EN81 ;
+1 DO ^YTDOMR1
+2 SET (YSCR,YSDEP,YSPA,YSPB,YSSEV,YSNOT)=0
+3 SET R=^YTD(601.2,YSDFN,1,YSTEST,1,YSED,1)
+4 ;PART A SAD-NOFUN
+5 IF $EXTRACT(R,49)>2!($EXTRACT(R,50)>2)
SET YSPA=1
+6 ;PART B DEPRESSIVE SYMPTOMS 4 WEEKS
+7 IF $EXTRACT(R,49)>2
SET YSCR=YSCR+1
+8 IF $EXTRACT(R,50)>2
SET YSCR=YSCR+1
+9 IF $EXTRACT(R,51)>2!($EXTRACT(R,52)>2)
SET YSCR=YSCR+1
+10 IF $EXTRACT(R,53)>2
SET YSCR=YSCR+1
+11 IF $EXTRACT(R,54)>2
SET YSCR=YSCR+1
+12 IF $EXTRACT(R,55)>2
SET YSCR=YSCR+1
+13 IF $EXTRACT(R,56)>2
SET YSCR=YSCR+1
+14 IF $EXTRACT(R,57)>2
SET YSCR=YSCR+1
+15 IF $EXTRACT(R,58)>2!($EXTRACT(R,59)="Y")
SET YSCR=YSCR+1
+16 IF YSCR>4
SET YSPB=1
+17 ;MISSING
+18 SET YSMISS=$LENGTH($EXTRACT(R,49,59),"X")-1
+19 IF ((YSCR<5)&((YSMISS+YSCR)>4))!(YSMISS>4)
SET YSPB=""
+20 IF YSPA
IF YSPB
SET YSDEP=1
+21 IF YSPB=""
SET YSDEP=""
+22 IF $EXTRACT(R,25)="Y"
SET YSNOT=1
+23 FOR I=49:1:59
SET X=$EXTRACT(R,I)
SET X=$SELECT(X="Y":3,X="N":0,X?1N:X-1,1:0)
SET YSSEV=YSSEV+X
+24 SET YSSEV=YSSEV/(11-YSMISS)*33.33
+25 IF YSMISS>1
SET YSSEV=""
OUT81 ;
+1 SET I1=""
SET $PIECE(I1,"_",79)=""
WRITE !!,I1
+2 WRITE !,"Scoring: By self report,"
+3 if YSDEP'=""
WRITE !,"The patient "_$SELECT(YSDEP:"DOES",1:"DOES NOT")_" meet DSM IV Criterion A for Major Depressive Episode."
+4 if YSDEP=""
WRITE !,"Diagnosis not available due to "_YTMISS_" missing items"
+5 IF YSNOT
WRITE !,"However a recent death is reported."
+6 WRITE !?15,"DOM severity score= "
+7 WRITE $SELECT(YSSEV="":" not scoreable due to missing items",1:$JUSTIFY(YSSEV,3,0))
+8 WRITE !,"There are no normative data for interpreting the severity score, but changes"
+9 WRITE !,"between this score and the score on the DOM Patient Follow-Up Assessment",!,"(Form 8.3) may reflect changes in the severity of the patient's symptoms."
+10 WRITE !,I1
+11 QUIT
EN82 ;
+1 DO ^YTDOMR1
+2 SET (YSCR,YSDEP,YSPA,YSPB,YSSEV,YSNOT)=0
+3 SET R=^YTD(601.2,YSDFN,1,YSTEST,1,YSED,1)
+4 IF $EXTRACT(R,4)="Y"!($EXTRACT(R,5)="Y")
SET YSPA=1
+5 FOR I=4:1:12
if $EXTRACT(R,I)="Y"
SET YSCR=YSCR+1
+6 if YSCR>4
SET YSPB=1
+7 IF YSPA&YSPB
SET YSDEP=1
+8 FOR I=13,14,15,18,20,21,22
if $EXTRACT(R,I)="Y"
SET YSNOT=1
+9 ;
OUT82 ;
+1 SET I1=""
SET $PIECE(I1,"_",79)=""
WRITE !!,I1
+2 WRITE !,"Scoring:"
+3 SET X=$EXTRACT(R,1)
+4 WRITE !,"Clinician reports: "
+5 WRITE $SELECT(X=1:"MAJOR DEPRESSION (SINGLE EPISODE OR RECURRENT)",X=2:"Mood Disorder secondary to a general medical condition",X=3:"Posttraumatic Stress Disorder",X=4:"Substance use disorder(s)",X=5:"NO MAJOR DEPRESSION",1:"??")
+6 WRITE !,"The patient "_$SELECT(YSDEP:"DOES",1:"DOES NOT")_" meet DSM IV criteria for major depression."
+7 IF YSNOT
WRITE !,"However exclusionary features are reported."
+8 WRITE !,I1
+9 QUIT
EN80 ;
+1 DO ^YTDOMR1
+2 SET X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
+3 SET X1=0
+4 if $EXTRACT(X,1)="Y"
SET X1=1
+5 if ($EXTRACT(X,2)="Y")&($EXTRACT(X,3)="Y")&($EXTRACT(X,4)>1)
SET X1=1
+6 if (X1=1)
WRITE !!,"This screen is positive, and the possibility of a mood disorder",!,"should be evaluated further."
+7 if (X1=0)
WRITE !!,"This screen for mood disorder is negative."
+8 QUIT
ENG ;geriatric screen
+1 SET YSHDR=$EXTRACT(YSHDR,1,43)_" "_YSSEX_" AGE "_$JUSTIFY(YSAGE,2,0)
+2 WRITE @IOF,YSHDR,?53,$$FMTE^XLFDT(DT,"5ZD"),?64,$$FMTE^XLFDT(YSHD,"5ZD")
+3 WRITE !,?53,"PRINTED",?64,"ENTERED",!
+4 WRITE !!,?3,"*** Geriatric Depression Screen ***",!!
+5 WRITE !,"The patient was questioned about mood in the past week.",!
+6 WRITE !,"Felt could not shake off blues: "
SET YSI=1
DO ENGQ
+7 WRITE !,"Felt depressed: "
SET YSI=2
DO ENGQ
+8 WRITE !,"Felt fearful: "
SET YSI=3
DO ENGQ
+9 WRITE !,"Sleep was restless: "
SET YSI=4
DO ENGQ
+10 WRITE !,"Felt hopeless about the future: "
SET YSI=5
DO ENGQ
+11 SET X=^YTD(601.2,YSDFN,1,YSET,1,YSED,1)
+12 ; ASF 10/20/06
SET (YSMISS,YSDEP)=0
FOR I=1:1:4
SET YSDEP=YSDEP+$EXTRACT(X,I)
if $EXTRACT(X,I)="X"
SET YSMISS=YSMISS+1
+13 if $EXTRACT(X,5)?1N
SET YSDEP=YSDEP+(3-$EXTRACT(X,5))
if $EXTRACT(X,5)="X"
SET YSMISS=YSMISS+1
+14 IF YSMISS=1
SET YSDEP=YSDEP+(YSDEP/4)
+15 IF YSMISS>1
WRITE !!,"The validity of this test is compromised as "_YSMISS_" of the 5 questions",!,"were not answered."
QUIT
+16 WRITE !!,"Score: "_YSDEP
+17 if (YSDEP>3.9)
WRITE !,"This screen is positive, and the possibility of a mood disorder",!,"should be evaluated further."
+18 if (YSDEP<4)
WRITE !,"This screen for mood disorder is negative."
+19 QUIT
ENGQ ;
+1 SET Y1=$EXTRACT(^YTD(601.2,YSDFN,1,YSET,1,YSED,1),YSI)
+2 IF YSI<5
WRITE $SELECT(Y1=0:"rarely",Y1=1:"some of the time",Y1=2:"much of the time",Y1=3:"most of the time",1:"question not answered")
+3 IF YSI=5
WRITE $SELECT(Y1=3:"rarely",Y1=2:"some of the time",Y1=1:"much of the time",Y1=0:"most of the time",1:"question not answered")