depscale 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/README.md +46 -0
- data/depscale.gemspec +28 -0
- data/lib/depression.qm +59 -0
- data/lib/depscale.rb +50 -0
- data/lib/quizm.rb +30 -0
- metadata +55 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZGRiMjNmNWI2YTcxNmRmMzgwMmRjYzQxMjIxYjQ3ODIwNjFjZWQwOA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTY5ODI4MzJiODIzNmVjMTc5Mzk1ZDZlY2U4NzQ1M2QyZjEyMTRlMA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NWZlYTdlOGI4NDUwYTA0NDY0MjMwZDIyZWE4MDVkNTdmYjExMDU2YmEyM2Y2
|
10
|
+
MGI5MjdkZDRmN2YyM2IyOWM1ZjliMTA3ZWIwNmE3OTRhYTFkYTZlYTQ2YTJl
|
11
|
+
OTk4MDE1NGI0ZjJhNTRlZDczMThlMDM5NzVmNjQ4OTAzNWFjODc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTQ4NThhMTU0NTUyZTYyZjhmN2JjZjRiMjQ2MWFjMjg2ODc4ZTFjZThlYmJj
|
14
|
+
NTdmM2I2OTNlYzU4MjRkNTM3NGM2N2VjNjY4NDIzYjRhNmMwM2U0MGIwMTEz
|
15
|
+
Mzk1OGQzMDNiYzNhODY1NDIyZjcyYzA3Njg0NmY5MzhkZmRhMzk=
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
Depscale is a Depression Screening tool which can be used on older people. It is adapted from an example of DSL in Ruby by Russ Olsen. The Tool is an example of the use of DSL to administer a list of questions and counting the score and giving back a judgement.
|
2
|
+
|
3
|
+
Usage:
|
4
|
+
======
|
5
|
+
To start the test type "require 'depscale', depscale" at the prompt.
|
6
|
+
|
7
|
+
Technical Medical Stuff:
|
8
|
+
========================
|
9
|
+
The Geriatric Depression Scale (GDS)
|
10
|
+
------------------------------------
|
11
|
+
Depression is common in late life, affecting nearly 5 million of the 31 million Americans aged 65 and older with clinically significant depressive symptoms reaching 13% in older adults aged 80 and older (Blazer, 2009). Major depression is reported in 8-16% of community dwelling older adults, 5-10% of older medical outpatients seeing a primary care provider, 10-12% of medical-surgical hospitalized older adults with 23% more experiencing significant depressive symptoms (Blazer, 2009).
|
12
|
+
|
13
|
+
Depression is often reversible with prompt recognition and appropriate treatment. However, if left untreated, depression may result in the onset of physical, cognitive, functional, and social impairment, as well as decreased quality of life,
|
14
|
+
delayed recovery from medical illness and surgery, increased health care utilization, and suicide.
|
15
|
+
|
16
|
+
While there are many instruments available to measure depression, the Geriatric Depression Scale (GDS), first created by Yesavage, et al., has been tested and used extensively with the older population. The GDS Long Form is a brief, 30-item questionnaire in which participants are asked to respond by answering yes or no in reference to how they felt over the past week. A Short Form GDS consisting of
|
17
|
+
15 questions was developed in 1986. Questions from the Long Form GDS which had the highest correlation with depressive symptoms in validation studies were selected for the short version. Of the 15 items, 10 indicated the presence of depression when answered positively, while the rest (question numbers 1, 5, 7, 11, 13) indicated depression when answered negatively. Scores of 0-4 are considered normal, depending on
|
18
|
+
age, education, and complaints; 5-8 indicate mild depression; 9-11 indicate moderate depression; and 12-15 indicate severe depression.
|
19
|
+
|
20
|
+
The Short Form is more easily used by physically ill and mildly to moderately demented patients who have short attention spans and/or feel easily fatigued. It takes about 5 to 7 minutes to complete.
|
21
|
+
|
22
|
+
TARGET POPULATION:
|
23
|
+
-----------------
|
24
|
+
The GDS may be used with healthy, medically ill and mild to moderately cognitively impaired older adults. It has
|
25
|
+
been extensively used in community, acute and long-term care settings.
|
26
|
+
|
27
|
+
VALIDITY AND RELIABILITY:
|
28
|
+
-------------------------
|
29
|
+
The GDS was found to have a 92% sensitivity and a 89% specificity when evaluated against diagnostic criteria. The validity and reliability of the tool have been supported through both clinical practice and research. In a validation study comparing the Long and Short Forms of the GDS for self-rating of symptoms of depression, both were successful in differentiating depressed from non-depressed adults with a high correlation (r = .84, p < .001) (Sheikh & Yesavage, 1986).
|
30
|
+
|
31
|
+
STRENGTHS AND LIMITATIONS:
|
32
|
+
--------------------------
|
33
|
+
The GDS is not a substitute for a diagnostic interview by mental health professionals. It is a useful screening tool in the clinical setting to facilitate assessment of depression in older adults especially when baseline measurements are
|
34
|
+
compared to subsequent scores. It does not assess for suicidality.
|
35
|
+
|
36
|
+
FOLLOW-UP:
|
37
|
+
---------
|
38
|
+
The presence of depression warrants prompt intervention and treatment. The GDS may be used to monitor depression over
|
39
|
+
time in all clinical settings. Any positive score above 5 on the GDS Short Form should prompt an in-depth psychological assessment and evaluation for suicidality.
|
40
|
+
|
41
|
+
sources :
|
42
|
+
=========
|
43
|
+
The Geriatric Depression Scale can be found at this link
|
44
|
+
[The Geriatric Depression Scale (GDS)](http://consultgerirn.org/uploads/File/trythis/try_this_4.pdf)
|
45
|
+
|
46
|
+
The script code was adapted from the excellent post by Russ Olsen on Building a DSL in Ruby - Part I, which you can find at :[Building a DSL in Ruby - Part I](http://jroller.com/rolsen/entry/building_a_dsl_in_ruby)
|
data/depscale.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "depscale"
|
5
|
+
s.version = "0.1.0"
|
6
|
+
s.licenses = ['MIT']
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Sabry Abdel Fattah"]
|
9
|
+
s.date = "2015-03-07"
|
10
|
+
s.description = "A screening tool for Clinical Depression in Older People using a DSL example"
|
11
|
+
s.email = "sabryabdelfattah@gmail.com"
|
12
|
+
s.extra_rdoc_files = ["README.md"]
|
13
|
+
s.files = ["depscale.gemspec", "lib/depscale.rb", "lib/quizm.rb", "lib/depression.qm"]
|
14
|
+
s.homepage = "http://sabryfattah.com"
|
15
|
+
s.rdoc_options = ["--main", "README.md"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubygems_version = "1.8.29"
|
18
|
+
s.summary = "The Geriatric Depression Scale is a screening tool for depression in older population. This Ruby DSL script uses the scale in the form of questions presented to the user on the screen which are answered by yes or no. The Score is calculated and an advise is given at the end of the test"
|
19
|
+
|
20
|
+
if s.respond_to? :specification_version then
|
21
|
+
s.specification_version = 3
|
22
|
+
|
23
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
24
|
+
else
|
25
|
+
end
|
26
|
+
else
|
27
|
+
end
|
28
|
+
end
|
data/lib/depression.qm
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
question "Are you basically satisfied with your life?"
|
2
|
+
wrong "YES"
|
3
|
+
right "NO"
|
4
|
+
|
5
|
+
question "Have you dropped many of your activities and interests?"
|
6
|
+
right "YES"
|
7
|
+
wrong "NO"
|
8
|
+
|
9
|
+
question "Do you feel that your life is empty?"
|
10
|
+
right "YES"
|
11
|
+
wrong "NO"
|
12
|
+
|
13
|
+
question "Do you often get bored?"
|
14
|
+
right "YES"
|
15
|
+
wrong "NO"
|
16
|
+
|
17
|
+
question "Are you in good spirits most of the time?"
|
18
|
+
wrong "YES"
|
19
|
+
right "NO"
|
20
|
+
|
21
|
+
question "Are you afraid that something bad is going to happen to you?"
|
22
|
+
right "YES"
|
23
|
+
wrong "NO"
|
24
|
+
|
25
|
+
question "Do you feel happy most of the time?"
|
26
|
+
wrong "YES"
|
27
|
+
right "NO"
|
28
|
+
|
29
|
+
question "Do you often feel helpless?"
|
30
|
+
right "YES"
|
31
|
+
wrong "NO"
|
32
|
+
|
33
|
+
question "Do you prefer to stay at home, rather than going out and doing new things?"
|
34
|
+
right "YES"
|
35
|
+
wrong "NO"
|
36
|
+
|
37
|
+
question "Do you feel you have more problems with memory than most?"
|
38
|
+
right "YES"
|
39
|
+
wrong "NO"
|
40
|
+
|
41
|
+
question "Do you think it is wonderful to be alive now?"
|
42
|
+
wrong "YES"
|
43
|
+
right "NO"
|
44
|
+
|
45
|
+
question "Do you feel pretty worthless the way you are now?"
|
46
|
+
right "YES"
|
47
|
+
wrong "NO"
|
48
|
+
|
49
|
+
question "Do you feel full of energy?"
|
50
|
+
wrong "YES"
|
51
|
+
right "NO"
|
52
|
+
|
53
|
+
question "Do you feel that your situation is hopeless?"
|
54
|
+
right "YES"
|
55
|
+
wrong "NO"
|
56
|
+
|
57
|
+
question "Do you think that most people are better off than you are?"
|
58
|
+
right "YES"
|
59
|
+
wrong "NO"
|
data/lib/depscale.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
require_relative 'quizm'
|
4
|
+
require 'singleton'
|
5
|
+
|
6
|
+
class Quiz
|
7
|
+
include Singleton
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@questions = []
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_question(question)
|
14
|
+
@questions << question
|
15
|
+
end
|
16
|
+
|
17
|
+
def last_question
|
18
|
+
@questions.last
|
19
|
+
end
|
20
|
+
|
21
|
+
def run_quiz
|
22
|
+
count=0
|
23
|
+
@questions.each { |q| count += 1 if q.ask }
|
24
|
+
puts "You got a score of #{count} \n"
|
25
|
+
case count
|
26
|
+
when 1..5
|
27
|
+
puts "You are in good mood , there is no evidence of depression"
|
28
|
+
when 6..10
|
29
|
+
puts "Your answers are suggestive of depression \n There is a need for more assessment"
|
30
|
+
when 11..20
|
31
|
+
puts "Your answers are indicative of depression, you need to seek psychiatric consultation"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def question(text)
|
37
|
+
Quiz.instance.add_question Question.new(text)
|
38
|
+
end
|
39
|
+
|
40
|
+
def right(text)
|
41
|
+
Quiz.instance.last_question.add_answer Answer.new(text,true)
|
42
|
+
end
|
43
|
+
|
44
|
+
def wrong(text)
|
45
|
+
Quiz.instance.last_question.add_answer Answer.new(text,false)
|
46
|
+
end
|
47
|
+
|
48
|
+
load 'depression.qm'
|
49
|
+
|
50
|
+
Quiz.instance.run_quiz
|
data/lib/quizm.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
class Question
|
2
|
+
|
3
|
+
def initialize( text )
|
4
|
+
@text = text
|
5
|
+
@answers = []
|
6
|
+
end
|
7
|
+
|
8
|
+
def add_answer(answer)
|
9
|
+
@answers << answer
|
10
|
+
end
|
11
|
+
|
12
|
+
def ask
|
13
|
+
puts ""
|
14
|
+
puts "Question: #{@text}"
|
15
|
+
@answers.size.times do |i|
|
16
|
+
puts "#{i+1} - #{@answers[i].text}"
|
17
|
+
end
|
18
|
+
print "Enter answer: "
|
19
|
+
answer = gets.to_i - 1
|
20
|
+
return @answers[answer].correct
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class Answer
|
25
|
+
attr_reader :text, :correct
|
26
|
+
def initialize( text, correct )
|
27
|
+
@text = text
|
28
|
+
@correct = correct
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: depscale
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sabry Abdel Fattah
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A screening tool for Clinical Depression in Older People using a DSL
|
14
|
+
example
|
15
|
+
email: sabryabdelfattah@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files:
|
19
|
+
- README.md
|
20
|
+
files:
|
21
|
+
- README.md
|
22
|
+
- depscale.gemspec
|
23
|
+
- lib/depression.qm
|
24
|
+
- lib/depscale.rb
|
25
|
+
- lib/quizm.rb
|
26
|
+
homepage: http://sabryfattah.com
|
27
|
+
licenses:
|
28
|
+
- MIT
|
29
|
+
metadata: {}
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options:
|
32
|
+
- --main
|
33
|
+
- README.md
|
34
|
+
require_paths:
|
35
|
+
- lib
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
requirements: []
|
47
|
+
rubyforge_project:
|
48
|
+
rubygems_version: 2.4.5
|
49
|
+
signing_key:
|
50
|
+
specification_version: 3
|
51
|
+
summary: The Geriatric Depression Scale is a screening tool for depression in older
|
52
|
+
population. This Ruby DSL script uses the scale in the form of questions presented
|
53
|
+
to the user on the screen which are answered by yes or no. The Score is calculated
|
54
|
+
and an advise is given at the end of the test
|
55
|
+
test_files: []
|