psytools 0.4.0 → 0.5.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 (216) hide show
  1. package/README.md +27 -4
  2. package/SOURCES.md +3 -1
  3. package/dist/cjs/errors.d.ts +1 -1
  4. package/dist/cjs/i18n.d.ts +21 -1
  5. package/dist/cjs/i18n.js +136 -0
  6. package/dist/cjs/index.d.ts +4 -2
  7. package/dist/cjs/index.js +19 -14
  8. package/dist/cjs/inventories/aq10.js +4 -64
  9. package/dist/cjs/inventories/asrs6.js +5 -49
  10. package/dist/cjs/inventories/audit.js +8 -116
  11. package/dist/cjs/inventories/common.js +0 -20
  12. package/dist/cjs/inventories/dass21.js +18 -130
  13. package/dist/cjs/inventories/gad7.js +4 -40
  14. package/dist/cjs/inventories/index.d.ts +11 -2
  15. package/dist/cjs/inventories/index.js +22 -3
  16. package/dist/cjs/inventories/mini-ipip.js +0 -132
  17. package/dist/cjs/inventories/phq9.js +5 -53
  18. package/dist/cjs/inventories/who5.js +4 -56
  19. package/dist/cjs/locales/de/aq10.d.ts +4 -0
  20. package/dist/cjs/locales/de/aq10.js +53 -0
  21. package/dist/cjs/locales/de/asrs6.d.ts +4 -0
  22. package/dist/cjs/locales/de/asrs6.js +42 -0
  23. package/dist/cjs/locales/de/audit.d.ts +4 -0
  24. package/dist/cjs/locales/de/audit.js +80 -0
  25. package/dist/cjs/locales/de/dass21.d.ts +4 -0
  26. package/dist/cjs/locales/de/dass21.js +114 -0
  27. package/dist/cjs/locales/de/gad7.d.ts +4 -0
  28. package/dist/cjs/locales/de/gad7.js +46 -0
  29. package/dist/cjs/locales/de/mini-ipip.d.ts +4 -0
  30. package/dist/cjs/locales/de/mini-ipip.js +97 -0
  31. package/dist/cjs/locales/de/phq9.d.ts +4 -0
  32. package/dist/cjs/locales/de/phq9.js +56 -0
  33. package/dist/cjs/locales/de/who5.d.ts +4 -0
  34. package/dist/cjs/locales/de/who5.js +41 -0
  35. package/dist/cjs/locales/es/aq10.d.ts +4 -0
  36. package/dist/cjs/locales/es/aq10.js +53 -0
  37. package/dist/cjs/locales/es/asrs6.d.ts +4 -0
  38. package/dist/cjs/locales/es/asrs6.js +42 -0
  39. package/dist/cjs/locales/es/audit.d.ts +4 -0
  40. package/dist/cjs/locales/es/audit.js +80 -0
  41. package/dist/cjs/locales/es/dass21.d.ts +4 -0
  42. package/dist/cjs/locales/es/dass21.js +114 -0
  43. package/dist/cjs/locales/es/gad7.d.ts +4 -0
  44. package/dist/cjs/locales/es/gad7.js +46 -0
  45. package/dist/cjs/locales/es/mini-ipip.d.ts +4 -0
  46. package/dist/cjs/locales/es/mini-ipip.js +97 -0
  47. package/dist/cjs/locales/es/phq9.d.ts +4 -0
  48. package/dist/cjs/locales/es/phq9.js +56 -0
  49. package/dist/cjs/locales/es/who5.d.ts +4 -0
  50. package/dist/cjs/locales/es/who5.js +41 -0
  51. package/dist/cjs/locales/index.d.ts +12 -0
  52. package/dist/cjs/locales/index.js +63 -0
  53. package/dist/cjs/locales/tr/aq10.d.ts +4 -0
  54. package/dist/cjs/locales/tr/aq10.js +53 -0
  55. package/dist/cjs/locales/tr/asrs6.d.ts +4 -0
  56. package/dist/cjs/locales/tr/asrs6.js +42 -0
  57. package/dist/cjs/locales/tr/audit.d.ts +4 -0
  58. package/dist/cjs/locales/tr/audit.js +80 -0
  59. package/dist/cjs/locales/tr/dass21.d.ts +4 -0
  60. package/dist/cjs/locales/tr/dass21.js +114 -0
  61. package/dist/cjs/locales/tr/gad7.d.ts +4 -0
  62. package/dist/cjs/locales/tr/gad7.js +46 -0
  63. package/dist/cjs/locales/tr/mini-ipip.d.ts +4 -0
  64. package/dist/cjs/locales/tr/mini-ipip.js +97 -0
  65. package/dist/cjs/locales/tr/phq9.d.ts +4 -0
  66. package/dist/cjs/locales/tr/phq9.js +56 -0
  67. package/dist/cjs/locales/tr/who5.d.ts +4 -0
  68. package/dist/cjs/locales/tr/who5.js +41 -0
  69. package/dist/cjs/locales/zh/aq10.d.ts +4 -0
  70. package/dist/cjs/locales/zh/aq10.js +53 -0
  71. package/dist/cjs/locales/zh/asrs6.d.ts +4 -0
  72. package/dist/cjs/locales/zh/asrs6.js +42 -0
  73. package/dist/cjs/locales/zh/audit.d.ts +4 -0
  74. package/dist/cjs/locales/zh/audit.js +80 -0
  75. package/dist/cjs/locales/zh/dass21.d.ts +4 -0
  76. package/dist/cjs/locales/zh/dass21.js +114 -0
  77. package/dist/cjs/locales/zh/gad7.d.ts +4 -0
  78. package/dist/cjs/locales/zh/gad7.js +46 -0
  79. package/dist/cjs/locales/zh/mini-ipip.d.ts +4 -0
  80. package/dist/cjs/locales/zh/mini-ipip.js +97 -0
  81. package/dist/cjs/locales/zh/phq9.d.ts +4 -0
  82. package/dist/cjs/locales/zh/phq9.js +56 -0
  83. package/dist/cjs/locales/zh/who5.d.ts +4 -0
  84. package/dist/cjs/locales/zh/who5.js +41 -0
  85. package/dist/cjs/types.d.ts +30 -0
  86. package/dist/esm/errors.d.ts +1 -1
  87. package/dist/esm/i18n.d.ts +21 -1
  88. package/dist/esm/i18n.js +134 -0
  89. package/dist/esm/index.d.ts +4 -2
  90. package/dist/esm/index.js +2 -1
  91. package/dist/esm/inventories/aq10.js +4 -64
  92. package/dist/esm/inventories/asrs6.js +5 -49
  93. package/dist/esm/inventories/audit.js +8 -116
  94. package/dist/esm/inventories/common.js +0 -20
  95. package/dist/esm/inventories/dass21.js +18 -130
  96. package/dist/esm/inventories/gad7.js +4 -40
  97. package/dist/esm/inventories/index.d.ts +11 -2
  98. package/dist/esm/inventories/index.js +22 -3
  99. package/dist/esm/inventories/mini-ipip.js +0 -132
  100. package/dist/esm/inventories/phq9.js +5 -53
  101. package/dist/esm/inventories/who5.js +4 -56
  102. package/dist/esm/locales/de/aq10.d.ts +4 -0
  103. package/dist/esm/locales/de/aq10.js +51 -0
  104. package/dist/esm/locales/de/asrs6.d.ts +4 -0
  105. package/dist/esm/locales/de/asrs6.js +40 -0
  106. package/dist/esm/locales/de/audit.d.ts +4 -0
  107. package/dist/esm/locales/de/audit.js +78 -0
  108. package/dist/esm/locales/de/dass21.d.ts +4 -0
  109. package/dist/esm/locales/de/dass21.js +112 -0
  110. package/dist/esm/locales/de/gad7.d.ts +4 -0
  111. package/dist/esm/locales/de/gad7.js +44 -0
  112. package/dist/esm/locales/de/mini-ipip.d.ts +4 -0
  113. package/dist/esm/locales/de/mini-ipip.js +95 -0
  114. package/dist/esm/locales/de/phq9.d.ts +4 -0
  115. package/dist/esm/locales/de/phq9.js +54 -0
  116. package/dist/esm/locales/de/who5.d.ts +4 -0
  117. package/dist/esm/locales/de/who5.js +39 -0
  118. package/dist/esm/locales/es/aq10.d.ts +4 -0
  119. package/dist/esm/locales/es/aq10.js +51 -0
  120. package/dist/esm/locales/es/asrs6.d.ts +4 -0
  121. package/dist/esm/locales/es/asrs6.js +40 -0
  122. package/dist/esm/locales/es/audit.d.ts +4 -0
  123. package/dist/esm/locales/es/audit.js +78 -0
  124. package/dist/esm/locales/es/dass21.d.ts +4 -0
  125. package/dist/esm/locales/es/dass21.js +112 -0
  126. package/dist/esm/locales/es/gad7.d.ts +4 -0
  127. package/dist/esm/locales/es/gad7.js +44 -0
  128. package/dist/esm/locales/es/mini-ipip.d.ts +4 -0
  129. package/dist/esm/locales/es/mini-ipip.js +95 -0
  130. package/dist/esm/locales/es/phq9.d.ts +4 -0
  131. package/dist/esm/locales/es/phq9.js +54 -0
  132. package/dist/esm/locales/es/who5.d.ts +4 -0
  133. package/dist/esm/locales/es/who5.js +39 -0
  134. package/dist/esm/locales/index.d.ts +12 -0
  135. package/dist/esm/locales/index.js +59 -0
  136. package/dist/esm/locales/tr/aq10.d.ts +4 -0
  137. package/dist/esm/locales/tr/aq10.js +51 -0
  138. package/dist/esm/locales/tr/asrs6.d.ts +4 -0
  139. package/dist/esm/locales/tr/asrs6.js +40 -0
  140. package/dist/esm/locales/tr/audit.d.ts +4 -0
  141. package/dist/esm/locales/tr/audit.js +78 -0
  142. package/dist/esm/locales/tr/dass21.d.ts +4 -0
  143. package/dist/esm/locales/tr/dass21.js +112 -0
  144. package/dist/esm/locales/tr/gad7.d.ts +4 -0
  145. package/dist/esm/locales/tr/gad7.js +44 -0
  146. package/dist/esm/locales/tr/mini-ipip.d.ts +4 -0
  147. package/dist/esm/locales/tr/mini-ipip.js +95 -0
  148. package/dist/esm/locales/tr/phq9.d.ts +4 -0
  149. package/dist/esm/locales/tr/phq9.js +54 -0
  150. package/dist/esm/locales/tr/who5.d.ts +4 -0
  151. package/dist/esm/locales/tr/who5.js +39 -0
  152. package/dist/esm/locales/zh/aq10.d.ts +4 -0
  153. package/dist/esm/locales/zh/aq10.js +51 -0
  154. package/dist/esm/locales/zh/asrs6.d.ts +4 -0
  155. package/dist/esm/locales/zh/asrs6.js +40 -0
  156. package/dist/esm/locales/zh/audit.d.ts +4 -0
  157. package/dist/esm/locales/zh/audit.js +78 -0
  158. package/dist/esm/locales/zh/dass21.d.ts +4 -0
  159. package/dist/esm/locales/zh/dass21.js +112 -0
  160. package/dist/esm/locales/zh/gad7.d.ts +4 -0
  161. package/dist/esm/locales/zh/gad7.js +44 -0
  162. package/dist/esm/locales/zh/mini-ipip.d.ts +4 -0
  163. package/dist/esm/locales/zh/mini-ipip.js +95 -0
  164. package/dist/esm/locales/zh/phq9.d.ts +4 -0
  165. package/dist/esm/locales/zh/phq9.js +54 -0
  166. package/dist/esm/locales/zh/who5.d.ts +4 -0
  167. package/dist/esm/locales/zh/who5.js +39 -0
  168. package/dist/esm/types.d.ts +30 -0
  169. package/package.json +21 -1
  170. package/src/errors.ts +1 -0
  171. package/src/i18n.ts +176 -1
  172. package/src/index.ts +4 -1
  173. package/src/inventories/aq10.ts +4 -64
  174. package/src/inventories/asrs6.ts +5 -49
  175. package/src/inventories/audit.ts +8 -116
  176. package/src/inventories/common.ts +0 -20
  177. package/src/inventories/dass21.ts +18 -130
  178. package/src/inventories/gad7.ts +4 -40
  179. package/src/inventories/index.ts +27 -3
  180. package/src/inventories/mini-ipip.ts +0 -132
  181. package/src/inventories/phq9.ts +5 -53
  182. package/src/inventories/who5.ts +4 -56
  183. package/src/locales/de/aq10.ts +54 -0
  184. package/src/locales/de/asrs6.ts +43 -0
  185. package/src/locales/de/audit.ts +81 -0
  186. package/src/locales/de/dass21.ts +115 -0
  187. package/src/locales/de/gad7.ts +47 -0
  188. package/src/locales/de/mini-ipip.ts +98 -0
  189. package/src/locales/de/phq9.ts +57 -0
  190. package/src/locales/de/who5.ts +42 -0
  191. package/src/locales/es/aq10.ts +54 -0
  192. package/src/locales/es/asrs6.ts +43 -0
  193. package/src/locales/es/audit.ts +81 -0
  194. package/src/locales/es/dass21.ts +115 -0
  195. package/src/locales/es/gad7.ts +47 -0
  196. package/src/locales/es/mini-ipip.ts +98 -0
  197. package/src/locales/es/phq9.ts +57 -0
  198. package/src/locales/es/who5.ts +42 -0
  199. package/src/locales/index.ts +64 -0
  200. package/src/locales/tr/aq10.ts +54 -0
  201. package/src/locales/tr/asrs6.ts +43 -0
  202. package/src/locales/tr/audit.ts +81 -0
  203. package/src/locales/tr/dass21.ts +115 -0
  204. package/src/locales/tr/gad7.ts +47 -0
  205. package/src/locales/tr/mini-ipip.ts +98 -0
  206. package/src/locales/tr/phq9.ts +57 -0
  207. package/src/locales/tr/who5.ts +42 -0
  208. package/src/locales/zh/aq10.ts +54 -0
  209. package/src/locales/zh/asrs6.ts +43 -0
  210. package/src/locales/zh/audit.ts +81 -0
  211. package/src/locales/zh/dass21.ts +115 -0
  212. package/src/locales/zh/gad7.ts +47 -0
  213. package/src/locales/zh/mini-ipip.ts +98 -0
  214. package/src/locales/zh/phq9.ts +57 -0
  215. package/src/locales/zh/who5.ts +42 -0
  216. package/src/types.ts +25 -0
@@ -1,27 +1,27 @@
1
1
  import type { AssessmentDefinition, ScoreBand } from "../types.ts";
2
2
 
3
3
  const depressionBands: ScoreBand[] = [
4
- { id: "normal", min: 0, max: 9, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
5
- { id: "mild", min: 10, max: 13, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
6
- { id: "moderate", min: 14, max: 20, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
7
- { id: "severe", min: 21, max: 27, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
8
- { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
4
+ { id: "normal", min: 0, max: 9, label: { en: "Normal" } },
5
+ { id: "mild", min: 10, max: 13, label: { en: "Mild" } },
6
+ { id: "moderate", min: 14, max: 20, label: { en: "Moderate" } },
7
+ { id: "severe", min: 21, max: 27, label: { en: "Severe" } },
8
+ { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe" } },
9
9
  ];
10
10
 
11
11
  const anxietyBands: ScoreBand[] = [
12
- { id: "normal", min: 0, max: 7, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
13
- { id: "mild", min: 8, max: 9, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
14
- { id: "moderate", min: 10, max: 14, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
15
- { id: "severe", min: 15, max: 19, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
16
- { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
12
+ { id: "normal", min: 0, max: 7, label: { en: "Normal" } },
13
+ { id: "mild", min: 8, max: 9, label: { en: "Mild" } },
14
+ { id: "moderate", min: 10, max: 14, label: { en: "Moderate" } },
15
+ { id: "severe", min: 15, max: 19, label: { en: "Severe" } },
16
+ { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe" } },
17
17
  ];
18
18
 
19
19
  const stressBands: ScoreBand[] = [
20
- { id: "normal", min: 0, max: 14, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
21
- { id: "mild", min: 15, max: 18, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
22
- { id: "moderate", min: 19, max: 25, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
23
- { id: "severe", min: 26, max: 33, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
24
- { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
20
+ { id: "normal", min: 0, max: 14, label: { en: "Normal" } },
21
+ { id: "mild", min: 15, max: 18, label: { en: "Mild" } },
22
+ { id: "moderate", min: 19, max: 25, label: { en: "Moderate" } },
23
+ { id: "severe", min: 26, max: 33, label: { en: "Severe" } },
24
+ { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe" } },
25
25
  ];
26
26
 
27
27
  /**
@@ -38,24 +38,12 @@ export const dass21: AssessmentDefinition = {
38
38
  version: "1.0.0",
39
39
  title: {
40
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
- zh: "抑郁-焦虑-压力量表(DASS-21)",
44
- es: "Escalas de Depresión, Ansiedad y Estrés (DASS-21)",
45
41
  },
46
42
  description: {
47
43
  en: "A 21-item self-report questionnaire measuring depression, anxiety, and stress over the past week.",
48
- tr: "Geçtiğimiz hafta boyunca depresyon, anksiyete ve stresi ölçen 21 maddelik bir öz bildirim ölçeği.",
49
- de: "Ein Selbstbeurteilungsfragebogen mit 21 Items zur Messung von Depression, Angst und Stress in der vergangenen Woche.",
50
- zh: "一份包含21个条目的自评问卷,用于测量过去一周的抑郁、焦虑和压力水平。",
51
- es: "Un cuestionario de autoinforme de 21 ítems que mide la depresión, la ansiedad y el estrés durante la última semana.",
52
44
  },
53
45
  instructions: {
54
46
  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.",
55
- 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.",
56
- 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.",
57
- zh: "请阅读每一条陈述,并选择最能表明过去一周该陈述在多大程度上适用于您的选项。答案没有对错之分。请不要在任何一条陈述上花费太多时间。",
58
- es: "Por favor, lea cada frase y seleccione la opción que indique en qué medida la frase se aplicó a usted durante la última semana. No hay respuestas correctas ni incorrectas. No dedique demasiado tiempo a ninguna frase.",
59
47
  },
60
48
  defaultLocale: "en",
61
49
  options: [
@@ -63,40 +51,24 @@ export const dass21: AssessmentDefinition = {
63
51
  value: 0,
64
52
  label: {
65
53
  en: "Did not apply to me at all",
66
- tr: "Bana hiç uymadı",
67
- de: "Traf gar nicht auf mich zu",
68
- zh: "完全不适用于我",
69
- es: "No se aplicó a mí en absoluto",
70
54
  },
71
55
  },
72
56
  {
73
57
  value: 1,
74
58
  label: {
75
59
  en: "Applied to me to some degree, or some of the time",
76
- tr: "Bana biraz uydu ya da zaman zaman uydu",
77
- de: "Traf bis zu einem gewissen Grad oder manchmal auf mich zu",
78
- zh: "在某种程度上适用于我,或有时适用",
79
- es: "Se aplicó a mí en cierta medida, o parte del tiempo",
80
60
  },
81
61
  },
82
62
  {
83
63
  value: 2,
84
64
  label: {
85
65
  en: "Applied to me to a considerable degree, or a good part of the time",
86
- tr: "Bana oldukça uydu ya da zamanın büyük bölümünde uydu",
87
- de: "Traf in beträchtlichem Maße oder einen guten Teil der Zeit auf mich zu",
88
- zh: "在相当程度上适用于我,或大部分时间适用",
89
- es: "Se aplicó a mí en un grado considerable, o una buena parte del tiempo",
90
66
  },
91
67
  },
92
68
  {
93
69
  value: 3,
94
70
  label: {
95
71
  en: "Applied to me very much, or most of the time",
96
- tr: "Bana çok uydu ya da hemen hemen her zaman uydu",
97
- de: "Traf sehr stark oder die meiste Zeit auf mich zu",
98
- zh: "非常适用于我,或绝大部分时间适用",
99
- es: "Se aplicó a mí mucho, o la mayor parte del tiempo",
100
72
  },
101
73
  },
102
74
  ],
@@ -105,210 +77,126 @@ export const dass21: AssessmentDefinition = {
105
77
  id: "dass21-1",
106
78
  text: {
107
79
  en: "I found it hard to wind down",
108
- tr: "Sakinleşip yatışmakta zorlandım",
109
- de: "Ich fand es schwer, mich zu beruhigen",
110
- zh: "我发现自己很难平静下来",
111
- es: "Me costó calmarme",
112
80
  },
113
81
  },
114
82
  {
115
83
  id: "dass21-2",
116
84
  text: {
117
85
  en: "I was aware of dryness of my mouth",
118
- tr: "Ağzımın kuruduğunu fark ettim",
119
- de: "Ich bemerkte, dass mein Mund trocken war",
120
- zh: "我注意到自己口干",
121
- es: "Noté que tenía la boca seca",
122
86
  },
123
87
  },
124
88
  {
125
89
  id: "dass21-3",
126
90
  text: {
127
91
  en: "I couldn't seem to experience any positive feeling at all",
128
- tr: "Hiç olumlu duygu yaşayamadığımı fark ettim",
129
- de: "Ich konnte überhaupt keine positiven Gefühle mehr erleben",
130
- zh: "我似乎完全无法体验到任何积极的感受",
131
- es: "No parecía poder experimentar ningún sentimiento positivo en absoluto",
132
92
  },
133
93
  },
134
94
  {
135
95
  id: "dass21-4",
136
96
  text: {
137
97
  en: "I experienced breathing difficulty (e.g. excessively rapid breathing, breathlessness in the absence of physical exertion)",
138
- tr: "Nefes almada zorluk yaşadım (örneğin, fiziksel çaba göstermediğim hâlde aşırı hızlı nefes alma, nefessiz kalma)",
139
- de: "Ich hatte Atemprobleme (z. B. übermäßig schnelle Atmung, Atemlosigkeit ohne körperliche Anstrengung)",
140
- zh: "我感到呼吸困难(例如呼吸过快,或没有体力活动时也感到喘不过气)",
141
- es: "Experimenté dificultad para respirar (p. ej., respiración excesivamente rápida, falta de aire sin haber hecho esfuerzo físico)",
142
98
  },
143
99
  },
144
100
  {
145
101
  id: "dass21-5",
146
102
  text: {
147
103
  en: "I found it difficult to work up the initiative to do things",
148
- tr: "Bir işe başlamak için gereken isteği kendimde bulmakta zorlandım",
149
- de: "Es fiel mir schwer, die Initiative zu ergreifen, um Dinge zu erledigen",
150
- zh: "我发现自己很难主动去做事情",
151
- es: "Me resultó difícil tomar la iniciativa para hacer cosas",
152
104
  },
153
105
  },
154
106
  {
155
107
  id: "dass21-6",
156
108
  text: {
157
109
  en: "I tended to over-react to situations",
158
- tr: "Olaylara aşırı tepki verme eğiliminde oldum",
159
- de: "Ich neigte dazu, auf Situationen überzureagieren",
160
- zh: "我容易对事情反应过度",
161
- es: "Tendí a reaccionar de forma exagerada ante las situaciones",
162
110
  },
163
111
  },
164
112
  {
165
113
  id: "dass21-7",
166
114
  text: {
167
115
  en: "I experienced trembling (e.g. in the hands)",
168
- tr: "Titreme yaşadım (örneğin ellerde)",
169
- de: "Ich hatte Zittern (z. B. in den Händen)",
170
- zh: "我出现过颤抖(例如手抖)",
171
- es: "Experimenté temblores (p. ej., en las manos)",
172
116
  },
173
117
  },
174
118
  {
175
119
  id: "dass21-8",
176
120
  text: {
177
121
  en: "I felt that I was using a lot of nervous energy",
178
- tr: "Sinirsel enerjimin çok fazla olduğunu hissettim",
179
- de: "Ich fühlte, dass ich viel nervöse Energie verbrauchte",
180
- zh: "我觉得自己消耗了很多精神能量",
181
- es: "Sentí que estaba gastando mucha energía nerviosa",
182
122
  },
183
123
  },
184
124
  {
185
125
  id: "dass21-9",
186
126
  text: {
187
127
  en: "I was worried about situations in which I might panic and make a fool of myself",
188
- tr: "Panikleyip kendimi gülünç duruma düşürebileceğim durumlar nedeniyle endişelendim",
189
- de: "Ich machte mir Sorgen über Situationen, in denen ich in Panik geraten und mich blamieren könnte",
190
- zh: "我担心自己会在某些场合惊慌失措、出丑",
191
- es: "Me preocupaban las situaciones en las que podría entrar en pánico y hacer el ridículo",
192
128
  },
193
129
  },
194
130
  {
195
131
  id: "dass21-10",
196
132
  text: {
197
133
  en: "I felt that I had nothing to look forward to",
198
- tr: "Dört gözle beklediğim hiçbir şey olmadığını hissettim",
199
- de: "Ich hatte das Gefühl, mich auf nichts mehr freuen zu können",
200
- zh: "我觉得自己没有什么可期待的",
201
- es: "Sentí que no tenía nada que esperar con ilusión",
202
134
  },
203
135
  },
204
136
  {
205
137
  id: "dass21-11",
206
138
  text: {
207
139
  en: "I found myself getting agitated",
208
- tr: "Giderek huzursuzlandığımı fark ettim",
209
- de: "Ich merkte, dass ich unruhig wurde",
210
- zh: "我发现自己变得焦躁不安",
211
- es: "Me di cuenta de que me estaba agitando",
212
140
  },
213
141
  },
214
142
  {
215
143
  id: "dass21-12",
216
144
  text: {
217
145
  en: "I found it difficult to relax",
218
- tr: "Gevşeyip rahatlamakta zorlandım",
219
- de: "Es fiel mir schwer, mich zu entspannen",
220
- zh: "我发现自己很难放松",
221
- es: "Me resultó difícil relajarme",
222
146
  },
223
147
  },
224
148
  {
225
149
  id: "dass21-13",
226
150
  text: {
227
151
  en: "I felt down-hearted and blue",
228
- tr: "Kendimi üzgün ve karamsar hissettim",
229
- de: "Ich fühlte mich niedergeschlagen und traurig",
230
- zh: "我感到情绪低落、忧郁",
231
- es: "Me sentí desanimado y triste",
232
152
  },
233
153
  },
234
154
  {
235
155
  id: "dass21-14",
236
156
  text: {
237
157
  en: "I was intolerant of anything that kept me from getting on with what I was doing",
238
- tr: "Yaptığım işi sürdürmeme engel olan şeylere tahammül edemedim",
239
- de: "Ich konnte es nicht ertragen, von dem, was ich gerade tat, abgehalten zu werden",
240
- zh: "我无法容忍任何妨碍我继续做事的事情",
241
- es: "No toleraba nada que me impidiera seguir con lo que estaba haciendo",
242
158
  },
243
159
  },
244
160
  {
245
161
  id: "dass21-15",
246
162
  text: {
247
163
  en: "I felt I was close to panic",
248
- tr: "Panik olmaya yakın olduğumu hissettim",
249
- de: "Ich fühlte mich einer Panik nahe",
250
- zh: "我感到自己快要惊慌失措了",
251
- es: "Sentí que estaba a punto de entrar en pánico",
252
164
  },
253
165
  },
254
166
  {
255
167
  id: "dass21-16",
256
168
  text: {
257
169
  en: "I was unable to become enthusiastic about anything",
258
- tr: "Hiçbir şeye karşı heves duyamadım",
259
- de: "Ich konnte mich für nichts mehr begeistern",
260
- zh: "我对任何事情都提不起热情",
261
- es: "No fui capaz de entusiasmarme con nada",
262
170
  },
263
171
  },
264
172
  {
265
173
  id: "dass21-17",
266
174
  text: {
267
175
  en: "I felt I wasn't worth much as a person",
268
- tr: "Kişi olarak fazla bir değerimin olmadığını hissettim",
269
- de: "Ich hatte das Gefühl, als Person nicht viel wert zu sein",
270
- zh: "我觉得自己作为一个人没有多大价值",
271
- es: "Sentí que como persona no valía mucho",
272
176
  },
273
177
  },
274
178
  {
275
179
  id: "dass21-18",
276
180
  text: {
277
181
  en: "I felt that I was rather touchy",
278
- tr: "Oldukça alıngan olduğumu hissettim",
279
- de: "Ich fühlte, dass ich ziemlich empfindlich war",
280
- zh: "我觉得自己相当敏感、易被触怒",
281
- es: "Sentí que estaba bastante susceptible",
282
182
  },
283
183
  },
284
184
  {
285
185
  id: "dass21-19",
286
186
  text: {
287
187
  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)",
288
- tr: "Fiziksel çaba göstermediğim hâlde kalbimin hareketlerini fark ettim (örneğin, kalp atışının hızlanması, kalbin bir atışı atlaması)",
289
- de: "Ich nahm meinen Herzschlag wahr, ohne mich körperlich angestrengt zu haben (z. B. Gefühl von Herzrasen oder Herzstolpern)",
290
- zh: "在没有体力活动的情况下,我能察觉到自己的心跳(例如感到心率加快或心跳漏跳)",
291
- es: "Fui consciente de los latidos de mi corazón sin haber hecho esfuerzo físico (p. ej., sensación de aumento del ritmo cardíaco, o de que el corazón se saltaba un latido)",
292
188
  },
293
189
  },
294
190
  {
295
191
  id: "dass21-20",
296
192
  text: {
297
193
  en: "I felt scared without any good reason",
298
- tr: "Geçerli bir neden olmadığı hâlde korktuğumu hissettim",
299
- de: "Ich fühlte mich ohne triftigen Grund ängstlich",
300
- zh: "我无缘无故地感到害怕",
301
- es: "Me sentí asustado sin ninguna razón justificada",
302
194
  },
303
195
  },
304
196
  {
305
197
  id: "dass21-21",
306
198
  text: {
307
199
  en: "I felt that life was meaningless",
308
- tr: "Yaşamın anlamsız olduğunu hissettim",
309
- de: "Ich hatte das Gefühl, dass das Leben sinnlos ist",
310
- zh: "我觉得生活毫无意义",
311
- es: "Sentí que la vida no tenía sentido",
312
200
  },
313
201
  },
314
202
  ],
@@ -317,21 +205,21 @@ export const dass21: AssessmentDefinition = {
317
205
  subscales: [
318
206
  {
319
207
  id: "depression",
320
- label: { en: "Depression", tr: "Depresyon", de: "Depression", zh: "抑郁", es: "Depresión" },
208
+ label: { en: "Depression" },
321
209
  questionIds: ["dass21-3", "dass21-5", "dass21-10", "dass21-13", "dass21-16", "dass21-17", "dass21-21"],
322
210
  multiplier: 2,
323
211
  bands: depressionBands,
324
212
  },
325
213
  {
326
214
  id: "anxiety",
327
- label: { en: "Anxiety", tr: "Anksiyete", de: "Angst", zh: "焦虑", es: "Ansiedad" },
215
+ label: { en: "Anxiety" },
328
216
  questionIds: ["dass21-2", "dass21-4", "dass21-7", "dass21-9", "dass21-15", "dass21-19", "dass21-20"],
329
217
  multiplier: 2,
330
218
  bands: anxietyBands,
331
219
  },
332
220
  {
333
221
  id: "stress",
334
- label: { en: "Stress", tr: "Stres", de: "Stress", zh: "压力", es: "Estrés" },
222
+ label: { en: "Stress" },
335
223
  questionIds: ["dass21-1", "dass21-6", "dass21-8", "dass21-11", "dass21-12", "dass21-14", "dass21-18"],
336
224
  multiplier: 2,
337
225
  bands: stressBands,
@@ -14,17 +14,9 @@ export const gad7: AssessmentDefinition = {
14
14
  version: "1.0.0",
15
15
  title: {
16
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
- zh: "广泛性焦虑障碍量表(GAD-7)",
20
- es: "Escala del Trastorno de Ansiedad Generalizada (GAD-7)",
21
17
  },
22
18
  description: {
23
19
  en: "A 7-item self-report questionnaire for screening and measuring the severity of generalized anxiety.",
24
- tr: "Yaygın anksiyeteyi taramak ve şiddetini ölçmek için kullanılan 7 maddelik bir öz bildirim ölçeği.",
25
- de: "Ein Selbstbeurteilungsfragebogen mit 7 Items zum Screening und zur Schweregradmessung generalisierter Angst.",
26
- zh: "一份包含7个条目的自评问卷,用于筛查广泛性焦虑并测量其严重程度。",
27
- es: "Un cuestionario de autoinforme de 7 ítems para la detección y la medición de la gravedad de la ansiedad generalizada.",
28
20
  },
29
21
  instructions: twoWeekInstructions,
30
22
  defaultLocale: "en",
@@ -34,70 +26,42 @@ export const gad7: AssessmentDefinition = {
34
26
  id: "gad7-1",
35
27
  text: {
36
28
  en: "Feeling nervous, anxious, or on edge",
37
- tr: "Sinirli, kaygılı ya da çok gergin hissetme",
38
- de: "Nervosität, Ängstlichkeit oder Anspannung",
39
- zh: "感到紧张、焦虑或心情烦躁",
40
- es: "Sentirse nervioso(a), ansioso(a) o con los nervios de punta",
41
29
  },
42
30
  },
43
31
  {
44
32
  id: "gad7-2",
45
33
  text: {
46
34
  en: "Not being able to stop or control worrying",
47
- tr: "Endişelenmeyi durduramama ya da kontrol edememe",
48
- de: "Nicht in der Lage sein, Sorgen zu stoppen oder zu kontrollieren",
49
- zh: "无法停止或控制担忧",
50
- es: "No poder dejar de preocuparse o controlar la preocupación",
51
35
  },
52
36
  },
53
37
  {
54
38
  id: "gad7-3",
55
39
  text: {
56
40
  en: "Worrying too much about different things",
57
- tr: "Farklı konular hakkında çok fazla endişelenme",
58
- de: "Übermäßige Sorgen bezüglich verschiedener Angelegenheiten",
59
- zh: "对各种各样的事情担忧过多",
60
- es: "Preocuparse demasiado por diferentes cosas",
61
41
  },
62
42
  },
63
43
  {
64
44
  id: "gad7-4",
65
45
  text: {
66
46
  en: "Trouble relaxing",
67
- tr: "Gevşeyip rahatlamada güçlük",
68
- de: "Schwierigkeiten, sich zu entspannen",
69
- zh: "难以放松",
70
- es: "Dificultad para relajarse",
71
47
  },
72
48
  },
73
49
  {
74
50
  id: "gad7-5",
75
51
  text: {
76
52
  en: "Being so restless that it is hard to sit still",
77
- tr: "Yerinde duramayacak kadar huzursuz olma",
78
- de: "Rastlosigkeit, sodass das Stillsitzen schwerfällt",
79
- zh: "坐立不安,难以安静地坐着",
80
- es: "Estar tan inquieto(a) que le resulta difícil quedarse quieto(a)",
81
53
  },
82
54
  },
83
55
  {
84
56
  id: "gad7-6",
85
57
  text: {
86
58
  en: "Becoming easily annoyed or irritable",
87
- tr: "Çabuk kızma ya da kolayca sinirlenir olma",
88
- de: "Schnelle Verärgerung oder Gereiztheit",
89
- zh: "容易恼怒或易被激怒",
90
- es: "Enfadarse o irritarse con facilidad",
91
59
  },
92
60
  },
93
61
  {
94
62
  id: "gad7-7",
95
63
  text: {
96
64
  en: "Feeling afraid, as if something awful might happen",
97
- tr: "Sanki çok kötü bir şey olacakmış gibi korkuya kapılma",
98
- de: "Angstgefühl, als könnte etwas Schlimmes passieren",
99
- zh: "感到害怕,好像会有可怕的事情发生",
100
- es: "Sentir miedo, como si algo terrible pudiera pasar",
101
65
  },
102
66
  },
103
67
  ],
@@ -108,25 +72,25 @@ export const gad7: AssessmentDefinition = {
108
72
  id: "minimal",
109
73
  min: 0,
110
74
  max: 4,
111
- label: { en: "Minimal anxiety", tr: "Minimal anksiyete", de: "Minimale Angst", zh: "极轻度焦虑", es: "Ansiedad mínima" },
75
+ label: { en: "Minimal anxiety" },
112
76
  },
113
77
  {
114
78
  id: "mild",
115
79
  min: 5,
116
80
  max: 9,
117
- label: { en: "Mild anxiety", tr: "Hafif anksiyete", de: "Leichte Angst", zh: "轻度焦虑", es: "Ansiedad leve" },
81
+ label: { en: "Mild anxiety" },
118
82
  },
119
83
  {
120
84
  id: "moderate",
121
85
  min: 10,
122
86
  max: 14,
123
- label: { en: "Moderate anxiety", tr: "Orta düzeyde anksiyete", de: "Mittelgradige Angst", zh: "中度焦虑", es: "Ansiedad moderada" },
87
+ label: { en: "Moderate anxiety" },
124
88
  },
125
89
  {
126
90
  id: "severe",
127
91
  min: 15,
128
92
  max: 21,
129
- label: { en: "Severe anxiety", tr: "Şiddetli anksiyete", de: "Schwere Angst", zh: "重度焦虑", es: "Ansiedad grave" },
93
+ label: { en: "Severe anxiety" },
130
94
  },
131
95
  ],
132
96
  },
@@ -1,6 +1,8 @@
1
1
  import type { AssessmentDefinition } from "../types.ts";
2
2
  import { Assessment } from "../assessment.ts";
3
3
  import { PsytoolsError } from "../errors.ts";
4
+ import { applyLocale } from "../i18n.ts";
5
+ import { availableLocales, localePacks } from "../locales/index.ts";
4
6
  import { phq9 } from "./phq9.ts";
5
7
  import { gad7 } from "./gad7.ts";
6
8
  import { dass21 } from "./dass21.ts";
@@ -37,13 +39,35 @@ export type InventoryId =
37
39
 
38
40
  /**
39
41
  * Instantiates a predefined inventory as an `Assessment`.
40
- * @throws PsytoolsError `unknown_inventory`
42
+ *
43
+ * Base definitions carry English only; other languages live in separate
44
+ * locale-pack modules that are dynamically imported — and only then held
45
+ * in memory — when listed in `options.locales` (data minimization by
46
+ * default). The returned assessment's definition is still one complete,
47
+ * serializable JSON object containing exactly the requested locales.
48
+ *
49
+ * @throws PsytoolsError `unknown_inventory` | `unknown_locale`
41
50
  */
42
- export function loadInventory(id: InventoryId | string): Assessment {
51
+ export async function loadInventory(
52
+ id: InventoryId | string,
53
+ options?: { locales?: string[] },
54
+ ): Promise<Assessment> {
43
55
  const definition = inventories[id];
44
56
  if (!definition) {
45
57
  const known = Object.keys(inventories).join(", ");
46
58
  throw new PsytoolsError("unknown_inventory", `Unknown inventory "${id}" (available: ${known})`);
47
59
  }
48
- return new Assessment(definition);
60
+ let merged = definition;
61
+ for (const locale of options?.locales ?? []) {
62
+ if (locale === definition.defaultLocale) continue;
63
+ const loader = localePacks[id]?.[locale];
64
+ if (!loader) {
65
+ throw new PsytoolsError(
66
+ "unknown_locale",
67
+ `No "${locale}" locale pack for inventory "${id}" (available: ${availableLocales(id).join(", ")})`,
68
+ );
69
+ }
70
+ merged = applyLocale(merged, (await loader()).default);
71
+ }
72
+ return new Assessment(merged);
49
73
  }