psytools 0.3.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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +189 -0
  3. package/dist/cjs/assessment.d.ts +58 -0
  4. package/dist/cjs/assessment.js +233 -0
  5. package/dist/cjs/errors.d.ts +5 -0
  6. package/dist/cjs/errors.js +13 -0
  7. package/dist/cjs/evaluation.d.ts +10 -0
  8. package/dist/cjs/evaluation.js +102 -0
  9. package/dist/cjs/i18n.d.ts +10 -0
  10. package/dist/cjs/i18n.js +35 -0
  11. package/dist/cjs/index.d.ts +8 -0
  12. package/dist/cjs/index.js +23 -0
  13. package/dist/cjs/inventories/common.d.ts +8 -0
  14. package/dist/cjs/inventories/common.js +47 -0
  15. package/dist/cjs/inventories/dass21.d.ts +11 -0
  16. package/dist/cjs/inventories/dass21.js +288 -0
  17. package/dist/cjs/inventories/gad7.d.ts +10 -0
  18. package/dist/cjs/inventories/gad7.js +121 -0
  19. package/dist/cjs/inventories/index.d.ts +15 -0
  20. package/dist/cjs/inventories/index.js +33 -0
  21. package/dist/cjs/inventories/phq9.d.ts +11 -0
  22. package/dist/cjs/inventories/phq9.js +156 -0
  23. package/dist/cjs/package.json +3 -0
  24. package/dist/cjs/response.d.ts +77 -0
  25. package/dist/cjs/response.js +231 -0
  26. package/dist/cjs/types.d.ts +219 -0
  27. package/dist/cjs/types.js +10 -0
  28. package/dist/esm/assessment.d.ts +58 -0
  29. package/dist/esm/assessment.js +228 -0
  30. package/dist/esm/errors.d.ts +5 -0
  31. package/dist/esm/errors.js +9 -0
  32. package/dist/esm/evaluation.d.ts +10 -0
  33. package/dist/esm/evaluation.js +99 -0
  34. package/dist/esm/i18n.d.ts +10 -0
  35. package/dist/esm/i18n.js +31 -0
  36. package/dist/esm/index.d.ts +8 -0
  37. package/dist/esm/index.js +6 -0
  38. package/dist/esm/inventories/common.d.ts +8 -0
  39. package/dist/esm/inventories/common.js +44 -0
  40. package/dist/esm/inventories/dass21.d.ts +11 -0
  41. package/dist/esm/inventories/dass21.js +285 -0
  42. package/dist/esm/inventories/gad7.d.ts +10 -0
  43. package/dist/esm/inventories/gad7.js +118 -0
  44. package/dist/esm/inventories/index.d.ts +15 -0
  45. package/dist/esm/inventories/index.js +25 -0
  46. package/dist/esm/inventories/phq9.d.ts +11 -0
  47. package/dist/esm/inventories/phq9.js +153 -0
  48. package/dist/esm/response.d.ts +77 -0
  49. package/dist/esm/response.js +227 -0
  50. package/dist/esm/types.d.ts +219 -0
  51. package/dist/esm/types.js +9 -0
  52. package/package.json +64 -0
  53. package/schema/assessment-definition.schema.json +129 -0
  54. package/src/assessment.ts +266 -0
  55. package/src/errors.ts +10 -0
  56. package/src/evaluation.ts +140 -0
  57. package/src/i18n.ts +40 -0
  58. package/src/index.ts +43 -0
  59. package/src/inventories/common.ts +47 -0
  60. package/src/inventories/dass21.ts +291 -0
  61. package/src/inventories/gad7.ts +121 -0
  62. package/src/inventories/index.ts +31 -0
  63. package/src/inventories/phq9.ts +156 -0
  64. package/src/response.ts +263 -0
  65. package/src/types.ts +250 -0
@@ -0,0 +1,291 @@
1
+ import type { AssessmentDefinition, ScoreBand } from "../types.ts";
2
+
3
+ const depressionBands: ScoreBand[] = [
4
+ { id: "normal", min: 0, max: 9, label: { en: "Normal", tr: "Normal", de: "Normal" } },
5
+ { id: "mild", min: 10, max: 13, label: { en: "Mild", tr: "Hafif", de: "Leicht" } },
6
+ { id: "moderate", min: 14, max: 20, label: { en: "Moderate", tr: "Orta", de: "Moderat" } },
7
+ { id: "severe", min: 21, max: 27, label: { en: "Severe", tr: "Şiddetli", de: "Schwer" } },
8
+ { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer" } },
9
+ ];
10
+
11
+ const anxietyBands: ScoreBand[] = [
12
+ { id: "normal", min: 0, max: 7, label: { en: "Normal", tr: "Normal", de: "Normal" } },
13
+ { id: "mild", min: 8, max: 9, label: { en: "Mild", tr: "Hafif", de: "Leicht" } },
14
+ { id: "moderate", min: 10, max: 14, label: { en: "Moderate", tr: "Orta", de: "Moderat" } },
15
+ { id: "severe", min: 15, max: 19, label: { en: "Severe", tr: "Şiddetli", de: "Schwer" } },
16
+ { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer" } },
17
+ ];
18
+
19
+ const stressBands: ScoreBand[] = [
20
+ { id: "normal", min: 0, max: 14, label: { en: "Normal", tr: "Normal", de: "Normal" } },
21
+ { id: "mild", min: 15, max: 18, label: { en: "Mild", tr: "Hafif", de: "Leicht" } },
22
+ { id: "moderate", min: 19, max: 25, label: { en: "Moderate", tr: "Orta", de: "Moderat" } },
23
+ { id: "severe", min: 26, max: 33, label: { en: "Severe", tr: "Şiddetli", de: "Schwer" } },
24
+ { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer" } },
25
+ ];
26
+
27
+ /**
28
+ * DASS-21 — Depression Anxiety Stress Scales, short form.
29
+ *
30
+ * 21 items, 0–3 applicability scale, three subscales (depression, anxiety,
31
+ * stress) of 7 items each. Subscale sums are multiplied by 2 so severity
32
+ * cutoffs match the full DASS-42. The DASS is in the public domain
33
+ * (Lovibond & Lovibond, 1995). Translations follow published validated
34
+ * versions — verify against the official wording before clinical use.
35
+ */
36
+ export const dass21: AssessmentDefinition = {
37
+ id: "dass21",
38
+ version: "1.0.0",
39
+ title: {
40
+ en: "Depression Anxiety Stress Scales (DASS-21)",
41
+ tr: "Depresyon Anksiyete Stres Ölçeği (DASS-21)",
42
+ de: "Depressions-Angst-Stress-Skalen (DASS-21)",
43
+ },
44
+ description: {
45
+ en: "A 21-item self-report questionnaire measuring depression, anxiety, and stress over the past week.",
46
+ tr: "Geçtiğimiz hafta boyunca depresyon, anksiyete ve stresi ölçen 21 maddelik bir öz bildirim ölçeği.",
47
+ de: "Ein Selbstbeurteilungsfragebogen mit 21 Items zur Messung von Depression, Angst und Stress in der vergangenen Woche.",
48
+ },
49
+ instructions: {
50
+ en: "Please read each statement and select the option which indicates how much the statement applied to you over the past week. There are no right or wrong answers. Do not spend too much time on any statement.",
51
+ tr: "Lütfen her ifadeyi okuyun ve geçtiğimiz hafta boyunca ifadenin size ne kadar uyduğunu gösteren seçeneği işaretleyin. Doğru ya da yanlış cevap yoktur. Herhangi bir ifade üzerinde çok fazla zaman harcamayın.",
52
+ de: "Bitte lesen Sie jede Aussage und wählen Sie die Option, die angibt, wie sehr die Aussage in der vergangenen Woche auf Sie zutraf. Es gibt keine richtigen oder falschen Antworten. Verbringen Sie nicht zu viel Zeit mit einer Aussage.",
53
+ },
54
+ defaultLocale: "en",
55
+ options: [
56
+ {
57
+ value: 0,
58
+ label: {
59
+ en: "Did not apply to me at all",
60
+ tr: "Bana hiç uymadı",
61
+ de: "Traf gar nicht auf mich zu",
62
+ },
63
+ },
64
+ {
65
+ value: 1,
66
+ label: {
67
+ en: "Applied to me to some degree, or some of the time",
68
+ tr: "Bana biraz uydu ya da zaman zaman uydu",
69
+ de: "Traf bis zu einem gewissen Grad oder manchmal auf mich zu",
70
+ },
71
+ },
72
+ {
73
+ value: 2,
74
+ label: {
75
+ en: "Applied to me to a considerable degree, or a good part of the time",
76
+ tr: "Bana oldukça uydu ya da zamanın büyük bölümünde uydu",
77
+ de: "Traf in beträchtlichem Maße oder einen guten Teil der Zeit auf mich zu",
78
+ },
79
+ },
80
+ {
81
+ value: 3,
82
+ label: {
83
+ en: "Applied to me very much, or most of the time",
84
+ tr: "Bana çok uydu ya da hemen hemen her zaman uydu",
85
+ de: "Traf sehr stark oder die meiste Zeit auf mich zu",
86
+ },
87
+ },
88
+ ],
89
+ questions: [
90
+ {
91
+ id: "dass21-1",
92
+ text: {
93
+ en: "I found it hard to wind down",
94
+ tr: "Sakinleşip yatışmakta zorlandım",
95
+ de: "Ich fand es schwer, mich zu beruhigen",
96
+ },
97
+ },
98
+ {
99
+ id: "dass21-2",
100
+ text: {
101
+ en: "I was aware of dryness of my mouth",
102
+ tr: "Ağzımın kuruduğunu fark ettim",
103
+ de: "Ich bemerkte, dass mein Mund trocken war",
104
+ },
105
+ },
106
+ {
107
+ id: "dass21-3",
108
+ text: {
109
+ en: "I couldn't seem to experience any positive feeling at all",
110
+ tr: "Hiç olumlu duygu yaşayamadığımı fark ettim",
111
+ de: "Ich konnte überhaupt keine positiven Gefühle mehr erleben",
112
+ },
113
+ },
114
+ {
115
+ id: "dass21-4",
116
+ text: {
117
+ en: "I experienced breathing difficulty (e.g. excessively rapid breathing, breathlessness in the absence of physical exertion)",
118
+ tr: "Nefes almada zorluk yaşadım (örneğin, fiziksel çaba göstermediğim hâlde aşırı hızlı nefes alma, nefessiz kalma)",
119
+ de: "Ich hatte Atemprobleme (z. B. übermäßig schnelle Atmung, Atemlosigkeit ohne körperliche Anstrengung)",
120
+ },
121
+ },
122
+ {
123
+ id: "dass21-5",
124
+ text: {
125
+ en: "I found it difficult to work up the initiative to do things",
126
+ tr: "Bir işe başlamak için gereken isteği kendimde bulmakta zorlandım",
127
+ de: "Es fiel mir schwer, die Initiative zu ergreifen, um Dinge zu erledigen",
128
+ },
129
+ },
130
+ {
131
+ id: "dass21-6",
132
+ text: {
133
+ en: "I tended to over-react to situations",
134
+ tr: "Olaylara aşırı tepki verme eğiliminde oldum",
135
+ de: "Ich neigte dazu, auf Situationen überzureagieren",
136
+ },
137
+ },
138
+ {
139
+ id: "dass21-7",
140
+ text: {
141
+ en: "I experienced trembling (e.g. in the hands)",
142
+ tr: "Titreme yaşadım (örneğin ellerde)",
143
+ de: "Ich hatte Zittern (z. B. in den Händen)",
144
+ },
145
+ },
146
+ {
147
+ id: "dass21-8",
148
+ text: {
149
+ en: "I felt that I was using a lot of nervous energy",
150
+ tr: "Sinirsel enerjimin çok fazla olduğunu hissettim",
151
+ de: "Ich fühlte, dass ich viel nervöse Energie verbrauchte",
152
+ },
153
+ },
154
+ {
155
+ id: "dass21-9",
156
+ text: {
157
+ en: "I was worried about situations in which I might panic and make a fool of myself",
158
+ tr: "Panikleyip kendimi gülünç duruma düşürebileceğim durumlar nedeniyle endişelendim",
159
+ de: "Ich machte mir Sorgen über Situationen, in denen ich in Panik geraten und mich blamieren könnte",
160
+ },
161
+ },
162
+ {
163
+ id: "dass21-10",
164
+ text: {
165
+ en: "I felt that I had nothing to look forward to",
166
+ tr: "Dört gözle beklediğim hiçbir şey olmadığını hissettim",
167
+ de: "Ich hatte das Gefühl, mich auf nichts mehr freuen zu können",
168
+ },
169
+ },
170
+ {
171
+ id: "dass21-11",
172
+ text: {
173
+ en: "I found myself getting agitated",
174
+ tr: "Giderek huzursuzlandığımı fark ettim",
175
+ de: "Ich merkte, dass ich unruhig wurde",
176
+ },
177
+ },
178
+ {
179
+ id: "dass21-12",
180
+ text: {
181
+ en: "I found it difficult to relax",
182
+ tr: "Gevşeyip rahatlamakta zorlandım",
183
+ de: "Es fiel mir schwer, mich zu entspannen",
184
+ },
185
+ },
186
+ {
187
+ id: "dass21-13",
188
+ text: {
189
+ en: "I felt down-hearted and blue",
190
+ tr: "Kendimi üzgün ve karamsar hissettim",
191
+ de: "Ich fühlte mich niedergeschlagen und traurig",
192
+ },
193
+ },
194
+ {
195
+ id: "dass21-14",
196
+ text: {
197
+ en: "I was intolerant of anything that kept me from getting on with what I was doing",
198
+ tr: "Yaptığım işi sürdürmeme engel olan şeylere tahammül edemedim",
199
+ de: "Ich konnte es nicht ertragen, von dem, was ich gerade tat, abgehalten zu werden",
200
+ },
201
+ },
202
+ {
203
+ id: "dass21-15",
204
+ text: {
205
+ en: "I felt I was close to panic",
206
+ tr: "Panik olmaya yakın olduğumu hissettim",
207
+ de: "Ich fühlte mich einer Panik nahe",
208
+ },
209
+ },
210
+ {
211
+ id: "dass21-16",
212
+ text: {
213
+ en: "I was unable to become enthusiastic about anything",
214
+ tr: "Hiçbir şeye karşı heves duyamadım",
215
+ de: "Ich konnte mich für nichts mehr begeistern",
216
+ },
217
+ },
218
+ {
219
+ id: "dass21-17",
220
+ text: {
221
+ en: "I felt I wasn't worth much as a person",
222
+ tr: "Kişi olarak fazla bir değerimin olmadığını hissettim",
223
+ de: "Ich hatte das Gefühl, als Person nicht viel wert zu sein",
224
+ },
225
+ },
226
+ {
227
+ id: "dass21-18",
228
+ text: {
229
+ en: "I felt that I was rather touchy",
230
+ tr: "Oldukça alıngan olduğumu hissettim",
231
+ de: "Ich fühlte, dass ich ziemlich empfindlich war",
232
+ },
233
+ },
234
+ {
235
+ id: "dass21-19",
236
+ text: {
237
+ en: "I was aware of the action of my heart in the absence of physical exertion (e.g. sense of heart rate increase, heart missing a beat)",
238
+ tr: "Fiziksel çaba göstermediğim hâlde kalbimin hareketlerini fark ettim (örneğin, kalp atışının hızlanması, kalbin bir atışı atlaması)",
239
+ de: "Ich nahm meinen Herzschlag wahr, ohne mich körperlich angestrengt zu haben (z. B. Gefühl von Herzrasen oder Herzstolpern)",
240
+ },
241
+ },
242
+ {
243
+ id: "dass21-20",
244
+ text: {
245
+ en: "I felt scared without any good reason",
246
+ tr: "Geçerli bir neden olmadığı hâlde korktuğumu hissettim",
247
+ de: "Ich fühlte mich ohne triftigen Grund ängstlich",
248
+ },
249
+ },
250
+ {
251
+ id: "dass21-21",
252
+ text: {
253
+ en: "I felt that life was meaningless",
254
+ tr: "Yaşamın anlamsız olduğunu hissettim",
255
+ de: "Ich hatte das Gefühl, dass das Leben sinnlos ist",
256
+ },
257
+ },
258
+ ],
259
+ scoring: {
260
+ kind: "subscales",
261
+ subscales: [
262
+ {
263
+ id: "depression",
264
+ label: { en: "Depression", tr: "Depresyon", de: "Depression" },
265
+ questionIds: ["dass21-3", "dass21-5", "dass21-10", "dass21-13", "dass21-16", "dass21-17", "dass21-21"],
266
+ multiplier: 2,
267
+ bands: depressionBands,
268
+ },
269
+ {
270
+ id: "anxiety",
271
+ label: { en: "Anxiety", tr: "Anksiyete", de: "Angst" },
272
+ questionIds: ["dass21-2", "dass21-4", "dass21-7", "dass21-9", "dass21-15", "dass21-19", "dass21-20"],
273
+ multiplier: 2,
274
+ bands: anxietyBands,
275
+ },
276
+ {
277
+ id: "stress",
278
+ label: { en: "Stress", tr: "Stres", de: "Stress" },
279
+ questionIds: ["dass21-1", "dass21-6", "dass21-8", "dass21-11", "dass21-12", "dass21-14", "dass21-18"],
280
+ multiplier: 2,
281
+ bands: stressBands,
282
+ },
283
+ ],
284
+ },
285
+ meta: {
286
+ reference:
287
+ "Lovibond, S. H., & Lovibond, P. F. (1995). Manual for the Depression Anxiety Stress Scales (2nd ed.). Sydney: Psychology Foundation.",
288
+ license: "Public domain",
289
+ timeframe: "past week",
290
+ },
291
+ };
@@ -0,0 +1,121 @@
1
+ import type { AssessmentDefinition } from "../types.ts";
2
+ import { twoWeekFrequencyOptions, twoWeekInstructions } from "./common.ts";
3
+
4
+ /**
5
+ * GAD-7 — Generalized Anxiety Disorder-7 (anxiety screening).
6
+ *
7
+ * 7 items, 0–3 frequency scale, total score 0–21. The GAD-7 is in the
8
+ * public domain (Spitzer, Kroenke, Williams & Löwe, 2006; developed with a
9
+ * grant from Pfizer Inc.). Translations follow published validated
10
+ * versions — verify against the official wording before clinical use.
11
+ */
12
+ export const gad7: AssessmentDefinition = {
13
+ id: "gad7",
14
+ version: "1.0.0",
15
+ title: {
16
+ en: "Generalized Anxiety Disorder Scale (GAD-7)",
17
+ tr: "Yaygın Anksiyete Bozukluğu Ölçeği (GAD-7)",
18
+ de: "Generalisierte Angststörung Skala (GAD-7)",
19
+ },
20
+ description: {
21
+ en: "A 7-item self-report questionnaire for screening and measuring the severity of generalized anxiety.",
22
+ tr: "Yaygın anksiyeteyi taramak ve şiddetini ölçmek için kullanılan 7 maddelik bir öz bildirim ölçeği.",
23
+ de: "Ein Selbstbeurteilungsfragebogen mit 7 Items zum Screening und zur Schweregradmessung generalisierter Angst.",
24
+ },
25
+ instructions: twoWeekInstructions,
26
+ defaultLocale: "en",
27
+ options: twoWeekFrequencyOptions,
28
+ questions: [
29
+ {
30
+ id: "gad7-1",
31
+ text: {
32
+ en: "Feeling nervous, anxious, or on edge",
33
+ tr: "Sinirli, kaygılı ya da çok gergin hissetme",
34
+ de: "Nervosität, Ängstlichkeit oder Anspannung",
35
+ },
36
+ },
37
+ {
38
+ id: "gad7-2",
39
+ text: {
40
+ en: "Not being able to stop or control worrying",
41
+ tr: "Endişelenmeyi durduramama ya da kontrol edememe",
42
+ de: "Nicht in der Lage sein, Sorgen zu stoppen oder zu kontrollieren",
43
+ },
44
+ },
45
+ {
46
+ id: "gad7-3",
47
+ text: {
48
+ en: "Worrying too much about different things",
49
+ tr: "Farklı konular hakkında çok fazla endişelenme",
50
+ de: "Übermäßige Sorgen bezüglich verschiedener Angelegenheiten",
51
+ },
52
+ },
53
+ {
54
+ id: "gad7-4",
55
+ text: {
56
+ en: "Trouble relaxing",
57
+ tr: "Gevşeyip rahatlamada güçlük",
58
+ de: "Schwierigkeiten, sich zu entspannen",
59
+ },
60
+ },
61
+ {
62
+ id: "gad7-5",
63
+ text: {
64
+ en: "Being so restless that it is hard to sit still",
65
+ tr: "Yerinde duramayacak kadar huzursuz olma",
66
+ de: "Rastlosigkeit, sodass das Stillsitzen schwerfällt",
67
+ },
68
+ },
69
+ {
70
+ id: "gad7-6",
71
+ text: {
72
+ en: "Becoming easily annoyed or irritable",
73
+ tr: "Çabuk kızma ya da kolayca sinirlenir olma",
74
+ de: "Schnelle Verärgerung oder Gereiztheit",
75
+ },
76
+ },
77
+ {
78
+ id: "gad7-7",
79
+ text: {
80
+ en: "Feeling afraid, as if something awful might happen",
81
+ tr: "Sanki çok kötü bir şey olacakmış gibi korkuya kapılma",
82
+ de: "Angstgefühl, als könnte etwas Schlimmes passieren",
83
+ },
84
+ },
85
+ ],
86
+ scoring: {
87
+ kind: "sum",
88
+ bands: [
89
+ {
90
+ id: "minimal",
91
+ min: 0,
92
+ max: 4,
93
+ label: { en: "Minimal anxiety", tr: "Minimal anksiyete", de: "Minimale Angst" },
94
+ },
95
+ {
96
+ id: "mild",
97
+ min: 5,
98
+ max: 9,
99
+ label: { en: "Mild anxiety", tr: "Hafif anksiyete", de: "Leichte Angst" },
100
+ },
101
+ {
102
+ id: "moderate",
103
+ min: 10,
104
+ max: 14,
105
+ label: { en: "Moderate anxiety", tr: "Orta düzeyde anksiyete", de: "Mittelgradige Angst" },
106
+ },
107
+ {
108
+ id: "severe",
109
+ min: 15,
110
+ max: 21,
111
+ label: { en: "Severe anxiety", tr: "Şiddetli anksiyete", de: "Schwere Angst" },
112
+ },
113
+ ],
114
+ },
115
+ meta: {
116
+ reference:
117
+ "Spitzer, R. L., Kroenke, K., Williams, J. B., & Löwe, B. (2006). A brief measure for assessing generalized anxiety disorder: the GAD-7. Archives of Internal Medicine, 166(10), 1092-1097.",
118
+ license: "Public domain",
119
+ timeframe: "past 2 weeks",
120
+ },
121
+ };
@@ -0,0 +1,31 @@
1
+ import type { AssessmentDefinition } from "../types.ts";
2
+ import { Assessment } from "../assessment.ts";
3
+ import { PsytoolsError } from "../errors.ts";
4
+ import { phq9 } from "./phq9.ts";
5
+ import { gad7 } from "./gad7.ts";
6
+ import { dass21 } from "./dass21.ts";
7
+
8
+ export { phq9, gad7, dass21 };
9
+ export { twoWeekFrequencyOptions, twoWeekInstructions } from "./common.ts";
10
+
11
+ /** All predefined inventory definitions shipped with psytools, by id. */
12
+ export const inventories: Readonly<Record<string, AssessmentDefinition>> = {
13
+ phq9,
14
+ gad7,
15
+ dass21,
16
+ };
17
+
18
+ export type InventoryId = "phq9" | "gad7" | "dass21";
19
+
20
+ /**
21
+ * Instantiates a predefined inventory as an `Assessment`.
22
+ * @throws PsytoolsError `unknown_inventory`
23
+ */
24
+ export function loadInventory(id: InventoryId | string): Assessment {
25
+ const definition = inventories[id];
26
+ if (!definition) {
27
+ const known = Object.keys(inventories).join(", ");
28
+ throw new PsytoolsError("unknown_inventory", `Unknown inventory "${id}" (available: ${known})`);
29
+ }
30
+ return new Assessment(definition);
31
+ }
@@ -0,0 +1,156 @@
1
+ import type { AssessmentDefinition } from "../types.ts";
2
+ import { twoWeekFrequencyOptions, twoWeekInstructions } from "./common.ts";
3
+
4
+ /**
5
+ * PHQ-9 — Patient Health Questionnaire-9 (depression screening).
6
+ *
7
+ * 9 items, 0–3 frequency scale, total score 0–27. Item 9 raises a
8
+ * `suicidality` flag when answered above 0. The PHQ-9 is in the public
9
+ * domain (Kroenke, Spitzer & Williams, 2001; developed with a grant from
10
+ * Pfizer Inc.). Translations follow published validated versions — verify
11
+ * against the official wording before clinical use.
12
+ */
13
+ export const phq9: AssessmentDefinition = {
14
+ id: "phq9",
15
+ version: "1.0.0",
16
+ title: {
17
+ en: "Patient Health Questionnaire (PHQ-9)",
18
+ tr: "Hasta Sağlığı Anketi (PHQ-9)",
19
+ de: "Gesundheitsfragebogen für Patienten (PHQ-9)",
20
+ },
21
+ description: {
22
+ en: "A 9-item self-report questionnaire for screening and measuring the severity of depression.",
23
+ tr: "Depresyonu taramak ve şiddetini ölçmek için kullanılan 9 maddelik bir öz bildirim ölçeği.",
24
+ de: "Ein Selbstbeurteilungsfragebogen mit 9 Items zum Screening und zur Schweregradmessung von Depression.",
25
+ },
26
+ instructions: twoWeekInstructions,
27
+ defaultLocale: "en",
28
+ options: twoWeekFrequencyOptions,
29
+ questions: [
30
+ {
31
+ id: "phq9-1",
32
+ text: {
33
+ en: "Little interest or pleasure in doing things",
34
+ tr: "İşleri yapmaya karşı çok az ilgi ya da zevk duyma",
35
+ de: "Wenig Interesse oder Freude an Ihren Tätigkeiten",
36
+ },
37
+ },
38
+ {
39
+ id: "phq9-2",
40
+ text: {
41
+ en: "Feeling down, depressed, or hopeless",
42
+ tr: "Kendini kederli, çökkün ya da umutsuz hissetme",
43
+ de: "Niedergeschlagenheit, Schwermut oder Hoffnungslosigkeit",
44
+ },
45
+ },
46
+ {
47
+ id: "phq9-3",
48
+ text: {
49
+ en: "Trouble falling or staying asleep, or sleeping too much",
50
+ tr: "Uykuya dalmada ya da uykuyu sürdürmede güçlük ya da çok fazla uyuma",
51
+ de: "Schwierigkeiten ein- oder durchzuschlafen oder vermehrter Schlaf",
52
+ },
53
+ },
54
+ {
55
+ id: "phq9-4",
56
+ text: {
57
+ en: "Feeling tired or having little energy",
58
+ tr: "Kendini yorgun hissetme ya da çok az enerjiye sahip olma",
59
+ de: "Müdigkeit oder Gefühl, keine Energie zu haben",
60
+ },
61
+ },
62
+ {
63
+ id: "phq9-5",
64
+ text: {
65
+ en: "Poor appetite or overeating",
66
+ tr: "İştahsızlık ya da aşırı yeme",
67
+ de: "Verminderter Appetit oder übermäßiges Bedürfnis zu essen",
68
+ },
69
+ },
70
+ {
71
+ id: "phq9-6",
72
+ text: {
73
+ en: "Feeling bad about yourself — or that you are a failure or have let yourself or your family down",
74
+ tr: "Kendiniz hakkında kötü hissetme — kendinizi başarısız biri olarak görme ya da kendinizi veya ailenizi hayal kırıklığına uğrattığınızı düşünme",
75
+ de: "Schlechte Meinung von sich selbst; Gefühl, ein Versager zu sein oder die Familie enttäuscht zu haben",
76
+ },
77
+ },
78
+ {
79
+ id: "phq9-7",
80
+ text: {
81
+ en: "Trouble concentrating on things, such as reading the newspaper or watching television",
82
+ tr: "Gazete okumak ya da televizyon seyretmek gibi işlere konsantre olmada güçlük",
83
+ de: "Schwierigkeiten, sich auf etwas zu konzentrieren, z. B. beim Zeitunglesen oder Fernsehen",
84
+ },
85
+ },
86
+ {
87
+ id: "phq9-8",
88
+ text: {
89
+ en: "Moving or speaking so slowly that other people could have noticed? Or the opposite — being so fidgety or restless that you have been moving around a lot more than usual",
90
+ tr: "Diğer insanların fark edebileceği kadar yavaş hareket etme ya da yavaş konuşma? Ya da tam tersi — her zamankinden çok daha fazla hareket edecek kadar kıpır kıpır ya da huzursuz olma",
91
+ de: "Waren Ihre Bewegungen oder Ihre Sprache so verlangsamt, dass es auch anderen auffallen würde? Oder waren Sie im Gegenteil „zappelig“ oder ruhelos und hatten dadurch einen stärkeren Bewegungsdrang als sonst?",
92
+ },
93
+ },
94
+ {
95
+ id: "phq9-9",
96
+ text: {
97
+ en: "Thoughts that you would be better off dead or of hurting yourself in some way",
98
+ tr: "Ölmüş olmanın ya da kendinize bir şekilde zarar vermenin daha iyi olacağına dair düşünceler",
99
+ de: "Gedanken, dass Sie lieber tot wären oder sich Leid zufügen möchten",
100
+ },
101
+ },
102
+ ],
103
+ scoring: {
104
+ kind: "sum",
105
+ bands: [
106
+ {
107
+ id: "minimal",
108
+ min: 0,
109
+ max: 4,
110
+ label: { en: "Minimal depression", tr: "Minimal depresyon", de: "Minimale Depression" },
111
+ },
112
+ {
113
+ id: "mild",
114
+ min: 5,
115
+ max: 9,
116
+ label: { en: "Mild depression", tr: "Hafif depresyon", de: "Leichte Depression" },
117
+ },
118
+ {
119
+ id: "moderate",
120
+ min: 10,
121
+ max: 14,
122
+ label: { en: "Moderate depression", tr: "Orta düzeyde depresyon", de: "Mittelgradige Depression" },
123
+ },
124
+ {
125
+ id: "moderately-severe",
126
+ min: 15,
127
+ max: 19,
128
+ label: { en: "Moderately severe depression", tr: "Orta-şiddetli düzeyde depresyon", de: "Mittelschwere Depression" },
129
+ },
130
+ {
131
+ id: "severe",
132
+ min: 20,
133
+ max: 27,
134
+ label: { en: "Severe depression", tr: "Şiddetli depresyon", de: "Schwere Depression" },
135
+ },
136
+ ],
137
+ flags: [
138
+ {
139
+ id: "suicidality",
140
+ questionId: "phq9-9",
141
+ minValue: 1,
142
+ label: {
143
+ en: "Self-harm or suicidal ideation reported (item 9) — requires clinical attention",
144
+ tr: "Kendine zarar verme ya da intihar düşüncesi bildirildi (9. madde) — klinik değerlendirme gerektirir",
145
+ de: "Selbstverletzungs- oder Suizidgedanken angegeben (Item 9) — erfordert klinische Abklärung",
146
+ },
147
+ },
148
+ ],
149
+ },
150
+ meta: {
151
+ reference:
152
+ "Kroenke, K., Spitzer, R. L., & Williams, J. B. (2001). The PHQ-9: validity of a brief depression severity measure. Journal of General Internal Medicine, 16(9), 606-613.",
153
+ license: "Public domain",
154
+ timeframe: "past 2 weeks",
155
+ },
156
+ };