psytools 0.3.0 → 0.3.2
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.
- package/README.md +37 -16
- package/SOURCES.md +81 -0
- package/dist/cjs/assessment.d.ts +3 -2
- package/dist/cjs/assessment.js +13 -3
- package/dist/cjs/evaluation.d.ts +5 -3
- package/dist/cjs/evaluation.js +49 -8
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/inventories/aq10.d.ts +12 -0
- package/dist/cjs/inventories/aq10.js +183 -0
- package/dist/cjs/inventories/asrs6.d.ts +11 -0
- package/dist/cjs/inventories/asrs6.js +130 -0
- package/dist/cjs/inventories/audit.d.ts +10 -0
- package/dist/cjs/inventories/audit.js +231 -0
- package/dist/cjs/inventories/dass21.js +3 -1
- package/dist/cjs/inventories/gad7.js +3 -1
- package/dist/cjs/inventories/index.d.ts +7 -2
- package/dist/cjs/inventories/index.js +16 -1
- package/dist/cjs/inventories/mini-ipip.d.ts +11 -0
- package/dist/cjs/inventories/mini-ipip.js +272 -0
- package/dist/cjs/inventories/phq9.js +3 -1
- package/dist/cjs/inventories/who5.d.ts +11 -0
- package/dist/cjs/inventories/who5.js +152 -0
- package/dist/cjs/types.d.ts +24 -2
- package/dist/esm/assessment.d.ts +3 -2
- package/dist/esm/assessment.js +13 -3
- package/dist/esm/evaluation.d.ts +5 -3
- package/dist/esm/evaluation.js +49 -8
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/inventories/aq10.d.ts +12 -0
- package/dist/esm/inventories/aq10.js +180 -0
- package/dist/esm/inventories/asrs6.d.ts +11 -0
- package/dist/esm/inventories/asrs6.js +127 -0
- package/dist/esm/inventories/audit.d.ts +10 -0
- package/dist/esm/inventories/audit.js +228 -0
- package/dist/esm/inventories/dass21.js +3 -1
- package/dist/esm/inventories/gad7.js +3 -1
- package/dist/esm/inventories/index.d.ts +7 -2
- package/dist/esm/inventories/index.js +11 -1
- package/dist/esm/inventories/mini-ipip.d.ts +11 -0
- package/dist/esm/inventories/mini-ipip.js +269 -0
- package/dist/esm/inventories/phq9.js +3 -1
- package/dist/esm/inventories/who5.d.ts +11 -0
- package/dist/esm/inventories/who5.js +149 -0
- package/dist/esm/types.d.ts +24 -2
- package/package.json +14 -3
- package/schema/assessment-definition.schema.json +27 -1
- package/src/assessment.ts +14 -3
- package/src/evaluation.ts +55 -9
- package/src/index.ts +7 -0
- package/src/inventories/aq10.ts +185 -0
- package/src/inventories/asrs6.ts +132 -0
- package/src/inventories/audit.ts +234 -0
- package/src/inventories/dass21.ts +4 -1
- package/src/inventories/gad7.ts +4 -1
- package/src/inventories/index.ts +20 -2
- package/src/inventories/mini-ipip.ts +274 -0
- package/src/inventories/phq9.ts +4 -1
- package/src/inventories/who5.ts +153 -0
- package/src/types.ts +26 -2
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mini-IPIP — 20-item short form of the International Personality Item
|
|
3
|
+
* Pool Five-Factor Model measure (Donnellan et al., 2006).
|
|
4
|
+
*
|
|
5
|
+
* Measures the Big Five personality traits with 4 items each on a 1–5
|
|
6
|
+
* accuracy scale; half the items are reverse-keyed. Trait scores are
|
|
7
|
+
* descriptive (4–20 per trait, higher = more of the trait) — there are no
|
|
8
|
+
* clinical cutoffs, so no bands are defined. IPIP items are public domain.
|
|
9
|
+
*/
|
|
10
|
+
export const miniIpip = {
|
|
11
|
+
id: "mini-ipip",
|
|
12
|
+
version: "1.0.0",
|
|
13
|
+
title: {
|
|
14
|
+
en: "Mini-IPIP Big Five Personality Scale",
|
|
15
|
+
tr: "Mini-IPIP Beş Faktör Kişilik Ölçeği",
|
|
16
|
+
de: "Mini-IPIP Big-Five-Persönlichkeitsskala",
|
|
17
|
+
},
|
|
18
|
+
description: {
|
|
19
|
+
en: "A 20-item public-domain measure of the Big Five personality traits (extraversion, agreeableness, conscientiousness, neuroticism, openness), drawn from the International Personality Item Pool.",
|
|
20
|
+
tr: "Uluslararası Kişilik Madde Havuzu'ndan (IPIP) türetilmiş, Beş Faktör kişilik özelliklerini (dışadönüklük, uyumluluk, sorumluluk, duygusal dengesizlik, deneyime açıklık) ölçen 20 maddelik kamu malı bir ölçek.",
|
|
21
|
+
de: "Ein gemeinfreies 20-Item-Instrument zur Messung der Big-Five-Persönlichkeitsmerkmale (Extraversion, Verträglichkeit, Gewissenhaftigkeit, Neurotizismus, Offenheit) aus dem International Personality Item Pool.",
|
|
22
|
+
},
|
|
23
|
+
instructions: {
|
|
24
|
+
en: "Describe yourself as you generally are now, not as you wish to be in the future. Indicate how accurately each statement describes you.",
|
|
25
|
+
tr: "Kendinizi gelecekte olmak istediğiniz gibi değil, şu anda genel olarak olduğunuz gibi tanımlayın. Her ifadenin sizi ne kadar doğru tanımladığını belirtin.",
|
|
26
|
+
de: "Beschreiben Sie sich so, wie Sie im Allgemeinen jetzt sind, nicht wie Sie in Zukunft sein möchten. Geben Sie an, wie zutreffend jede Aussage Sie beschreibt.",
|
|
27
|
+
},
|
|
28
|
+
defaultLocale: "en",
|
|
29
|
+
options: [
|
|
30
|
+
{
|
|
31
|
+
value: 1,
|
|
32
|
+
label: { en: "Very inaccurate", tr: "Bana hiç uymuyor", de: "Trifft überhaupt nicht zu" },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: 2,
|
|
36
|
+
label: { en: "Moderately inaccurate", tr: "Bana pek uymuyor", de: "Trifft eher nicht zu" },
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: 3,
|
|
40
|
+
label: {
|
|
41
|
+
en: "Neither accurate nor inaccurate",
|
|
42
|
+
tr: "Ne uyuyor ne uymuyor",
|
|
43
|
+
de: "Weder zutreffend noch unzutreffend",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: 4,
|
|
48
|
+
label: { en: "Moderately accurate", tr: "Bana oldukça uyuyor", de: "Trifft eher zu" },
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: 5,
|
|
52
|
+
label: { en: "Very accurate", tr: "Bana tamamen uyuyor", de: "Trifft voll und ganz zu" },
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
questions: [
|
|
56
|
+
{
|
|
57
|
+
id: "mini-ipip-1",
|
|
58
|
+
text: {
|
|
59
|
+
en: "I am the life of the party",
|
|
60
|
+
tr: "Bulunduğum ortamın neşe kaynağıyımdır",
|
|
61
|
+
de: "Ich bin der Mittelpunkt jeder Party",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "mini-ipip-2",
|
|
66
|
+
text: {
|
|
67
|
+
en: "I sympathize with others' feelings",
|
|
68
|
+
tr: "Başkalarının duygularını paylaşırım",
|
|
69
|
+
de: "Ich fühle mit anderen mit",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "mini-ipip-3",
|
|
74
|
+
text: {
|
|
75
|
+
en: "I get chores done right away",
|
|
76
|
+
tr: "Günlük işlerimi hemen hallederim",
|
|
77
|
+
de: "Ich erledige anstehende Aufgaben sofort",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "mini-ipip-4",
|
|
82
|
+
text: {
|
|
83
|
+
en: "I have frequent mood swings",
|
|
84
|
+
tr: "Ruh halim sık sık değişir",
|
|
85
|
+
de: "Meine Stimmung schwankt häufig",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "mini-ipip-5",
|
|
90
|
+
text: {
|
|
91
|
+
en: "I have a vivid imagination",
|
|
92
|
+
tr: "Canlı bir hayal gücüm vardır",
|
|
93
|
+
de: "Ich habe eine lebhafte Fantasie",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "mini-ipip-6",
|
|
98
|
+
text: {
|
|
99
|
+
en: "I don't talk a lot",
|
|
100
|
+
tr: "Çok konuşmam",
|
|
101
|
+
de: "Ich rede nicht viel",
|
|
102
|
+
},
|
|
103
|
+
reverseScored: true,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "mini-ipip-7",
|
|
107
|
+
text: {
|
|
108
|
+
en: "I am not interested in other people's problems",
|
|
109
|
+
tr: "Başkalarının sorunlarıyla ilgilenmem",
|
|
110
|
+
de: "Die Probleme anderer Menschen interessieren mich nicht",
|
|
111
|
+
},
|
|
112
|
+
reverseScored: true,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "mini-ipip-8",
|
|
116
|
+
text: {
|
|
117
|
+
en: "I often forget to put things back in their proper place",
|
|
118
|
+
tr: "Eşyaları yerine koymayı sık sık unuturum",
|
|
119
|
+
de: "Ich vergesse oft, Dinge an ihren Platz zurückzulegen",
|
|
120
|
+
},
|
|
121
|
+
reverseScored: true,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "mini-ipip-9",
|
|
125
|
+
text: {
|
|
126
|
+
en: "I am relaxed most of the time",
|
|
127
|
+
tr: "Çoğu zaman rahat ve sakinimdir",
|
|
128
|
+
de: "Ich bin die meiste Zeit entspannt",
|
|
129
|
+
},
|
|
130
|
+
reverseScored: true,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "mini-ipip-10",
|
|
134
|
+
text: {
|
|
135
|
+
en: "I am not interested in abstract ideas",
|
|
136
|
+
tr: "Soyut fikirlerle ilgilenmem",
|
|
137
|
+
de: "Ich interessiere mich nicht für abstrakte Ideen",
|
|
138
|
+
},
|
|
139
|
+
reverseScored: true,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "mini-ipip-11",
|
|
143
|
+
text: {
|
|
144
|
+
en: "I talk to a lot of different people at parties",
|
|
145
|
+
tr: "Sosyal ortamlarda birçok farklı insanla konuşurum",
|
|
146
|
+
de: "Auf Partys spreche ich mit vielen verschiedenen Leuten",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "mini-ipip-12",
|
|
151
|
+
text: {
|
|
152
|
+
en: "I feel others' emotions",
|
|
153
|
+
tr: "Başkalarının duygularını hissederim",
|
|
154
|
+
de: "Ich spüre die Gefühle anderer",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "mini-ipip-13",
|
|
159
|
+
text: {
|
|
160
|
+
en: "I like order",
|
|
161
|
+
tr: "Düzeni severim",
|
|
162
|
+
de: "Ich mag Ordnung",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: "mini-ipip-14",
|
|
167
|
+
text: {
|
|
168
|
+
en: "I get upset easily",
|
|
169
|
+
tr: "Kolayca keyfim kaçar",
|
|
170
|
+
de: "Ich rege mich leicht auf",
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: "mini-ipip-15",
|
|
175
|
+
text: {
|
|
176
|
+
en: "I have difficulty understanding abstract ideas",
|
|
177
|
+
tr: "Soyut fikirleri anlamakta zorlanırım",
|
|
178
|
+
de: "Es fällt mir schwer, abstrakte Ideen zu verstehen",
|
|
179
|
+
},
|
|
180
|
+
reverseScored: true,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "mini-ipip-16",
|
|
184
|
+
text: {
|
|
185
|
+
en: "I keep in the background",
|
|
186
|
+
tr: "Arka planda kalmayı tercih ederim",
|
|
187
|
+
de: "Ich halte mich im Hintergrund",
|
|
188
|
+
},
|
|
189
|
+
reverseScored: true,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: "mini-ipip-17",
|
|
193
|
+
text: {
|
|
194
|
+
en: "I am not really interested in others",
|
|
195
|
+
tr: "Başkalarıyla pek ilgilenmem",
|
|
196
|
+
de: "Ich interessiere mich nicht wirklich für andere",
|
|
197
|
+
},
|
|
198
|
+
reverseScored: true,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: "mini-ipip-18",
|
|
202
|
+
text: {
|
|
203
|
+
en: "I make a mess of things",
|
|
204
|
+
tr: "Ortalığı dağınık bırakırım",
|
|
205
|
+
de: "Bei mir geht alles drunter und drüber",
|
|
206
|
+
},
|
|
207
|
+
reverseScored: true,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: "mini-ipip-19",
|
|
211
|
+
text: {
|
|
212
|
+
en: "I seldom feel blue",
|
|
213
|
+
tr: "Nadiren hüzünlenirim",
|
|
214
|
+
de: "Ich fühle mich selten niedergeschlagen",
|
|
215
|
+
},
|
|
216
|
+
reverseScored: true,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: "mini-ipip-20",
|
|
220
|
+
text: {
|
|
221
|
+
en: "I do not have a good imagination",
|
|
222
|
+
tr: "İyi bir hayal gücüm yoktur",
|
|
223
|
+
de: "Ich habe keine gute Vorstellungskraft",
|
|
224
|
+
},
|
|
225
|
+
reverseScored: true,
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
scoring: {
|
|
229
|
+
kind: "subscales",
|
|
230
|
+
subscales: [
|
|
231
|
+
{
|
|
232
|
+
id: "extraversion",
|
|
233
|
+
label: { en: "Extraversion", tr: "Dışadönüklük", de: "Extraversion" },
|
|
234
|
+
questionIds: ["mini-ipip-1", "mini-ipip-6", "mini-ipip-11", "mini-ipip-16"],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: "agreeableness",
|
|
238
|
+
label: { en: "Agreeableness", tr: "Uyumluluk", de: "Verträglichkeit" },
|
|
239
|
+
questionIds: ["mini-ipip-2", "mini-ipip-7", "mini-ipip-12", "mini-ipip-17"],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: "conscientiousness",
|
|
243
|
+
label: { en: "Conscientiousness", tr: "Sorumluluk", de: "Gewissenhaftigkeit" },
|
|
244
|
+
questionIds: ["mini-ipip-3", "mini-ipip-8", "mini-ipip-13", "mini-ipip-18"],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "neuroticism",
|
|
248
|
+
label: { en: "Neuroticism", tr: "Duygusal Dengesizlik", de: "Neurotizismus" },
|
|
249
|
+
questionIds: ["mini-ipip-4", "mini-ipip-9", "mini-ipip-14", "mini-ipip-19"],
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: "openness",
|
|
253
|
+
label: {
|
|
254
|
+
en: "Openness (Intellect/Imagination)",
|
|
255
|
+
tr: "Deneyime Açıklık",
|
|
256
|
+
de: "Offenheit (Intellekt/Vorstellungskraft)",
|
|
257
|
+
},
|
|
258
|
+
questionIds: ["mini-ipip-5", "mini-ipip-10", "mini-ipip-15", "mini-ipip-20"],
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
meta: {
|
|
263
|
+
reference: "Donnellan, M. B., Oswald, F. L., Baird, B. M., & Lucas, R. E. (2006). The Mini-IPIP scales: tiny-yet-effective measures of the Big Five factors of personality. Psychological Assessment, 18(2), 192-203.",
|
|
264
|
+
license: "Free — public domain (International Personality Item Pool, ipip.ori.org), created explicitly to be free of copyright restrictions",
|
|
265
|
+
licenseFlag: "free",
|
|
266
|
+
translationProvenance: "en: reproduced from the original. tr/de: AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
|
|
267
|
+
note: "Descriptive personality traits, not a clinical screen — no cutoff bands are defined.",
|
|
268
|
+
},
|
|
269
|
+
};
|
|
@@ -147,7 +147,9 @@ export const phq9 = {
|
|
|
147
147
|
},
|
|
148
148
|
meta: {
|
|
149
149
|
reference: "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.",
|
|
150
|
-
license: "
|
|
150
|
+
license: "Free — no permission required to reproduce, translate, display or distribute (Pfizer educational grant)",
|
|
151
|
+
licenseFlag: "free",
|
|
152
|
+
translationProvenance: "en: reproduced from the original. tr/de: AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
|
|
151
153
|
timeframe: "past 2 weeks",
|
|
152
154
|
},
|
|
153
155
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AssessmentDefinition } from "../types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* WHO-5 — World Health Organization Well-Being Index.
|
|
4
|
+
*
|
|
5
|
+
* 5 positively worded items, 0–5 frequency scale over the past two weeks.
|
|
6
|
+
* The raw sum (0–25) is multiplied by 4 and reported as a 0–100 percentage;
|
|
7
|
+
* higher scores mean better well-being. A score of 50 or below indicates
|
|
8
|
+
* reduced well-being and warrants screening for depression; 28 or below
|
|
9
|
+
* indicates likely depression (Topp et al., 2015). Free to use.
|
|
10
|
+
*/
|
|
11
|
+
export declare const who5: AssessmentDefinition;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHO-5 — World Health Organization Well-Being Index.
|
|
3
|
+
*
|
|
4
|
+
* 5 positively worded items, 0–5 frequency scale over the past two weeks.
|
|
5
|
+
* The raw sum (0–25) is multiplied by 4 and reported as a 0–100 percentage;
|
|
6
|
+
* higher scores mean better well-being. A score of 50 or below indicates
|
|
7
|
+
* reduced well-being and warrants screening for depression; 28 or below
|
|
8
|
+
* indicates likely depression (Topp et al., 2015). Free to use.
|
|
9
|
+
*/
|
|
10
|
+
export const who5 = {
|
|
11
|
+
id: "who5",
|
|
12
|
+
version: "1.0.0",
|
|
13
|
+
title: {
|
|
14
|
+
en: "WHO-5 Well-Being Index",
|
|
15
|
+
tr: "WHO-5 İyilik Hali İndeksi",
|
|
16
|
+
de: "WHO-5-Index zum Wohlbefinden",
|
|
17
|
+
},
|
|
18
|
+
description: {
|
|
19
|
+
en: "A 5-item self-report scale measuring subjective psychological well-being over the past two weeks. Higher scores mean better well-being.",
|
|
20
|
+
tr: "Son iki hafta içindeki öznel psikolojik iyilik halini ölçen 5 maddelik bir öz bildirim ölçeği. Yüksek puan daha iyi bir iyilik haline işaret eder.",
|
|
21
|
+
de: "Eine Selbstbeurteilungsskala mit 5 Items zur Messung des subjektiven psychischen Wohlbefindens in den letzten zwei Wochen. Höhere Werte bedeuten besseres Wohlbefinden.",
|
|
22
|
+
},
|
|
23
|
+
instructions: {
|
|
24
|
+
en: "Please indicate for each of the five statements which is closest to how you have been feeling over the last two weeks.",
|
|
25
|
+
tr: "Lütfen aşağıdaki beş ifadenin her biri için, son iki hafta içinde kendinizi nasıl hissettiğinize en yakın olan seçeneği işaretleyin.",
|
|
26
|
+
de: "Bitte geben Sie für jede der fünf Aussagen an, welche Antwort Ihrem Befinden in den letzten zwei Wochen am nächsten kommt.",
|
|
27
|
+
},
|
|
28
|
+
defaultLocale: "en",
|
|
29
|
+
options: [
|
|
30
|
+
{
|
|
31
|
+
value: 0,
|
|
32
|
+
label: { en: "At no time", tr: "Hiçbir zaman", de: "Zu keinem Zeitpunkt" },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: 1,
|
|
36
|
+
label: { en: "Some of the time", tr: "Bazen", de: "Ab und zu" },
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: 2,
|
|
40
|
+
label: {
|
|
41
|
+
en: "Less than half of the time",
|
|
42
|
+
tr: "Zamanın yarısından az",
|
|
43
|
+
de: "Etwas weniger als die Hälfte der Zeit",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: 3,
|
|
48
|
+
label: {
|
|
49
|
+
en: "More than half of the time",
|
|
50
|
+
tr: "Zamanın yarısından çok",
|
|
51
|
+
de: "Etwas mehr als die Hälfte der Zeit",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: 4,
|
|
56
|
+
label: { en: "Most of the time", tr: "Çoğu zaman", de: "Meistens" },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: 5,
|
|
60
|
+
label: { en: "All of the time", tr: "Her zaman", de: "Die ganze Zeit" },
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
questions: [
|
|
64
|
+
{
|
|
65
|
+
id: "who5-1",
|
|
66
|
+
text: {
|
|
67
|
+
en: "I have felt cheerful and in good spirits",
|
|
68
|
+
tr: "Kendimi neşeli ve keyifli hissettim",
|
|
69
|
+
de: "Ich war froh und guter Laune",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "who5-2",
|
|
74
|
+
text: {
|
|
75
|
+
en: "I have felt calm and relaxed",
|
|
76
|
+
tr: "Kendimi sakin ve rahatlamış hissettim",
|
|
77
|
+
de: "Ich habe mich ruhig und entspannt gefühlt",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "who5-3",
|
|
82
|
+
text: {
|
|
83
|
+
en: "I have felt active and vigorous",
|
|
84
|
+
tr: "Kendimi aktif ve dinç hissettim",
|
|
85
|
+
de: "Ich habe mich energisch und aktiv gefühlt",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "who5-4",
|
|
90
|
+
text: {
|
|
91
|
+
en: "I woke up feeling fresh and rested",
|
|
92
|
+
tr: "Uyandığımda kendimi dinlenmiş ve zinde hissettim",
|
|
93
|
+
de: "Ich habe mich beim Aufwachen frisch und ausgeruht gefühlt",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "who5-5",
|
|
98
|
+
text: {
|
|
99
|
+
en: "My daily life has been filled with things that interest me",
|
|
100
|
+
tr: "Günlük yaşamım ilgimi çeken şeylerle doluydu",
|
|
101
|
+
de: "Mein Alltag war voller Dinge, die mich interessieren",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
scoring: {
|
|
106
|
+
kind: "sum",
|
|
107
|
+
multiplier: 4,
|
|
108
|
+
bands: [
|
|
109
|
+
{
|
|
110
|
+
id: "low",
|
|
111
|
+
min: 0,
|
|
112
|
+
max: 28,
|
|
113
|
+
label: {
|
|
114
|
+
en: "Low well-being — indicates likely depression, assessment recommended",
|
|
115
|
+
tr: "Düşük iyilik hali — olası depresyona işaret eder, değerlendirme önerilir",
|
|
116
|
+
de: "Niedriges Wohlbefinden — Hinweis auf wahrscheinliche Depression, Abklärung empfohlen",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: "reduced",
|
|
121
|
+
min: 29,
|
|
122
|
+
max: 50,
|
|
123
|
+
label: {
|
|
124
|
+
en: "Reduced well-being — screening for depression recommended",
|
|
125
|
+
tr: "Azalmış iyilik hali — depresyon taraması önerilir",
|
|
126
|
+
de: "Vermindertes Wohlbefinden — Depressionsscreening empfohlen",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "good",
|
|
131
|
+
min: 51,
|
|
132
|
+
max: 100,
|
|
133
|
+
label: {
|
|
134
|
+
en: "Good well-being",
|
|
135
|
+
tr: "İyi düzeyde iyilik hali",
|
|
136
|
+
de: "Gutes Wohlbefinden",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
meta: {
|
|
142
|
+
reference: "Topp, C. W., Østergaard, S. D., Søndergaard, S., & Bech, P. (2015). The WHO-5 Well-Being Index: a systematic review of the literature. Psychotherapy and Psychosomatics, 84(3), 167-176.",
|
|
143
|
+
license: "Free — may be used without permission (WHO Regional Office for Europe / Psychiatric Research Unit, Hillerød)",
|
|
144
|
+
licenseFlag: "free",
|
|
145
|
+
translationProvenance: "en: reproduced from the original. tr/de: AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
|
|
146
|
+
timeframe: "past 2 weeks",
|
|
147
|
+
note: "Positively worded: higher scores mean better well-being.",
|
|
148
|
+
},
|
|
149
|
+
};
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -60,7 +60,9 @@ export interface ScoreFlag {
|
|
|
60
60
|
/** Sums all answers into a single total score (PHQ-9, GAD-7, ...). */
|
|
61
61
|
export interface SumScoring {
|
|
62
62
|
kind: "sum";
|
|
63
|
-
/**
|
|
63
|
+
/** Multiplier applied to the raw sum (WHO-5 reports raw x 4 as 0-100). */
|
|
64
|
+
multiplier?: number;
|
|
65
|
+
/** Severity bands the (multiplied) total is matched against. */
|
|
64
66
|
bands?: ScoreBand[];
|
|
65
67
|
flags?: ScoreFlag[];
|
|
66
68
|
}
|
|
@@ -81,8 +83,28 @@ export interface SubscaleScoring {
|
|
|
81
83
|
subscales: SubscaleDefinition[];
|
|
82
84
|
flags?: ScoreFlag[];
|
|
83
85
|
}
|
|
86
|
+
/** One item of a `count` scoring: when it counts as screen-positive. */
|
|
87
|
+
export interface CountScoringItem {
|
|
88
|
+
questionId: string;
|
|
89
|
+
/**
|
|
90
|
+
* The item counts as positive when its answer value is >= this.
|
|
91
|
+
* `reverseScored` questions are inverted against their scale first.
|
|
92
|
+
*/
|
|
93
|
+
minValue: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Counts how many items cross their per-item threshold (ASRS v1.1,
|
|
97
|
+
* AQ-10, ...). The score is the number of positive items.
|
|
98
|
+
*/
|
|
99
|
+
export interface CountScoring {
|
|
100
|
+
kind: "count";
|
|
101
|
+
items: CountScoringItem[];
|
|
102
|
+
/** Bands the positive-item count is matched against. */
|
|
103
|
+
bands?: ScoreBand[];
|
|
104
|
+
flags?: ScoreFlag[];
|
|
105
|
+
}
|
|
84
106
|
/** Declarative, serializable scoring rules built into psytools. */
|
|
85
|
-
export type ScoringDefinition = SumScoring | SubscaleScoring;
|
|
107
|
+
export type ScoringDefinition = SumScoring | SubscaleScoring | CountScoring;
|
|
86
108
|
/**
|
|
87
109
|
* The complete, serializable description of an assessment.
|
|
88
110
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psytools",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Zero-dependency toolkit for psychological assessments: data models, response validation, scoring, and predefined inventories (PHQ-9, GAD-7, DASS-21) in multiple languages.",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Zero-dependency toolkit for psychological assessments: data models, response validation, scoring, and predefined inventories (PHQ-9, GAD-7, DASS-21, WHO-5, ASRS, AQ-10, AUDIT, Mini-IPIP) in multiple languages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"psychology",
|
|
7
7
|
"assessment",
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
"phq-9",
|
|
11
11
|
"gad-7",
|
|
12
12
|
"dass-21",
|
|
13
|
+
"who-5",
|
|
14
|
+
"asrs",
|
|
15
|
+
"aq-10",
|
|
16
|
+
"audit",
|
|
17
|
+
"ipip",
|
|
18
|
+
"big-five",
|
|
19
|
+
"personality",
|
|
20
|
+
"adhd",
|
|
21
|
+
"autism",
|
|
22
|
+
"well-being",
|
|
13
23
|
"mental-health",
|
|
14
24
|
"therapy",
|
|
15
25
|
"screening",
|
|
@@ -43,7 +53,8 @@
|
|
|
43
53
|
"files": [
|
|
44
54
|
"dist",
|
|
45
55
|
"src",
|
|
46
|
-
"schema"
|
|
56
|
+
"schema",
|
|
57
|
+
"SOURCES.md"
|
|
47
58
|
],
|
|
48
59
|
"sideEffects": false,
|
|
49
60
|
"engines": {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"scoring": {
|
|
27
27
|
"oneOf": [
|
|
28
28
|
{ "$ref": "#/$defs/sumScoring" },
|
|
29
|
-
{ "$ref": "#/$defs/subscaleScoring" }
|
|
29
|
+
{ "$ref": "#/$defs/subscaleScoring" },
|
|
30
|
+
{ "$ref": "#/$defs/countScoring" }
|
|
30
31
|
]
|
|
31
32
|
},
|
|
32
33
|
"meta": { "type": "object" }
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
"additionalProperties": false,
|
|
92
93
|
"properties": {
|
|
93
94
|
"kind": { "const": "sum" },
|
|
95
|
+
"multiplier": { "type": "number" },
|
|
94
96
|
"bands": { "type": "array", "items": { "$ref": "#/$defs/scoreBand" } },
|
|
95
97
|
"flags": { "type": "array", "items": { "$ref": "#/$defs/scoreFlag" } }
|
|
96
98
|
}
|
|
@@ -111,6 +113,30 @@
|
|
|
111
113
|
"bands": { "type": "array", "items": { "$ref": "#/$defs/scoreBand" } }
|
|
112
114
|
}
|
|
113
115
|
},
|
|
116
|
+
"countScoringItem": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"required": ["questionId", "minValue"],
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"properties": {
|
|
121
|
+
"questionId": { "type": "string", "minLength": 1 },
|
|
122
|
+
"minValue": { "type": "number" }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"countScoring": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"required": ["kind", "items"],
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"properties": {
|
|
130
|
+
"kind": { "const": "count" },
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"minItems": 1,
|
|
134
|
+
"items": { "$ref": "#/$defs/countScoringItem" }
|
|
135
|
+
},
|
|
136
|
+
"bands": { "type": "array", "items": { "$ref": "#/$defs/scoreBand" } },
|
|
137
|
+
"flags": { "type": "array", "items": { "$ref": "#/$defs/scoreFlag" } }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
114
140
|
"subscaleScoring": {
|
|
115
141
|
"type": "object",
|
|
116
142
|
"required": ["kind", "subscales"],
|
package/src/assessment.ts
CHANGED
|
@@ -83,7 +83,17 @@ export function validateDefinition(input: unknown): ValidationResult {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
if (scoring.kind === "count" && Array.isArray(scoring.items)) {
|
|
87
|
+
for (const item of scoring.items) {
|
|
88
|
+
if (!seen.has(item.questionId)) {
|
|
89
|
+
issues.push({ code: "unknown_question", message: `count scoring references unknown question "${item.questionId}"`, questionId: item.questionId });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const flags =
|
|
94
|
+
scoring.kind === "sum" || scoring.kind === "subscales" || scoring.kind === "count"
|
|
95
|
+
? scoring.flags ?? []
|
|
96
|
+
: [];
|
|
87
97
|
for (const flag of flags) {
|
|
88
98
|
if (!seen.has(flag.questionId)) {
|
|
89
99
|
issues.push({ code: "unknown_question", message: `flag "${flag.id}" references unknown question "${flag.questionId}"`, questionId: flag.questionId });
|
|
@@ -210,9 +220,10 @@ export class Assessment {
|
|
|
210
220
|
*
|
|
211
221
|
* When given an `AssessmentResponse`, its status must be `complete` or
|
|
212
222
|
* `submitted` — pass `allowIncomplete` to score partial responses anyway.
|
|
213
|
-
* Raw answer maps
|
|
223
|
+
* Raw answer maps skip the completeness check, but their values are
|
|
224
|
+
* still validated against the option scales.
|
|
214
225
|
*
|
|
215
|
-
* @throws PsytoolsError `incomplete_response` | `no_scoring`
|
|
226
|
+
* @throws PsytoolsError `incomplete_response` | `unknown_question` | `invalid_value` | `no_scoring`
|
|
216
227
|
*/
|
|
217
228
|
evaluate(
|
|
218
229
|
response: AssessmentResponse | Record<string, number>,
|