@baravak/risloo-profile-cli 4.39.0 → 4.40.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.
- package/package.json +1 -1
- package/src/publish/json/profiles/BDI93.json +423 -0
- package/src/publish/json/profiles/BDI9A.json +297 -0
- package/src/samples/BDI93.js +137 -0
- package/src/samples/BDI9A.js +120 -0
- package/views/profiles/samples/BDI93_1.hbs +114 -0
- package/views/profiles/samples/BDI93_2.hbs +57 -0
- package/views/profiles/samples/BDI9A.hbs +137 -0
package/package.json
CHANGED
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "$X1HXXXXX",
|
|
3
|
+
"scale": {
|
|
4
|
+
"id": "$BDI-93",
|
|
5
|
+
"title": "آزمون افسردگی بک"
|
|
6
|
+
},
|
|
7
|
+
"chain": null,
|
|
8
|
+
"version": "2",
|
|
9
|
+
"edition": "",
|
|
10
|
+
"edition_version": null,
|
|
11
|
+
"client": {
|
|
12
|
+
"id": "GH966XXXX",
|
|
13
|
+
"name": "مراجع"
|
|
14
|
+
},
|
|
15
|
+
"room": {
|
|
16
|
+
"id": "RS96XXXX",
|
|
17
|
+
"manager": {
|
|
18
|
+
"id": "GH9XXXXX",
|
|
19
|
+
"name": "درمانگر",
|
|
20
|
+
"user_id": "IR9XXXX"
|
|
21
|
+
},
|
|
22
|
+
"center": {
|
|
23
|
+
"id": "RS966XXXX",
|
|
24
|
+
"acceptation": null,
|
|
25
|
+
"status": "active",
|
|
26
|
+
"type": "personal_clinic",
|
|
27
|
+
"detail": {
|
|
28
|
+
"title": "درمانگر"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"acceptation": null,
|
|
32
|
+
"status": "active",
|
|
33
|
+
"type": "personal_clinic"
|
|
34
|
+
},
|
|
35
|
+
"case": null,
|
|
36
|
+
"code": null,
|
|
37
|
+
"created_at": 1694157079,
|
|
38
|
+
"started_at": 1694157198,
|
|
39
|
+
"scored_at": 1694242467,
|
|
40
|
+
"closed_at": 1694160574,
|
|
41
|
+
"total_amount": 100000,
|
|
42
|
+
"prepayment": true,
|
|
43
|
+
"purchased": true,
|
|
44
|
+
"amount": 100000,
|
|
45
|
+
"psychologist_description": null,
|
|
46
|
+
"description": "## دستور اجرای آزمون\n\nاین پرسشنامه شامل ۲۱ گروه جمله است. لطفاً هر گروه از جملات را با دقت بخوانید. سپس در هر گروه یک جمله را انتخاب کنید که بهتر از همه گویای احساس شما طی ۲ هفته گذشته تا به امروز است. سپس دور شماره کنار جملهای که انتخاب کردهاید یک دایره بکشید. اگر در یک گروه از جملات، چند جمله در مورد شما صدق میکند دور شمارهای که از همه بالاتر است دایره بکشید. دقت کنید در هیچ یک از جملات بیشتر از یک جمله انتخاب نکنید.",
|
|
47
|
+
"items": [
|
|
48
|
+
{
|
|
49
|
+
"type": "text",
|
|
50
|
+
"text": "غمگینی",
|
|
51
|
+
"answer": {
|
|
52
|
+
"type": "optional",
|
|
53
|
+
"options": [
|
|
54
|
+
"احساس غمگینی نمیکنم.",
|
|
55
|
+
"خیلی اوقات احساس غمگینی میکنم.",
|
|
56
|
+
"همیشه غمگین هستم.",
|
|
57
|
+
"به قدری غمگین هستم که نمیتوانم تحمل کنم."
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"user_answered": "1"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "text",
|
|
64
|
+
"text": "بدبینی",
|
|
65
|
+
"answer": {
|
|
66
|
+
"type": "optional",
|
|
67
|
+
"options": [
|
|
68
|
+
"نسبت به آینده بدبین نیستم.",
|
|
69
|
+
"بیشتر از گذشته، نسبت به آینده بدبین هستم.",
|
|
70
|
+
"انتظار ندارم اوضاع بر وفق مراد من باشد.",
|
|
71
|
+
"احساس میکنم امیدی به آینده نیست و اوضاع فقط بدتر میشود."
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"user_answered": "1"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "text",
|
|
78
|
+
"text": "احساس شکست",
|
|
79
|
+
"answer": {
|
|
80
|
+
"type": "optional",
|
|
81
|
+
"options": [
|
|
82
|
+
"احساس نمیکنم فردی شکست خوردهام.",
|
|
83
|
+
"بیش از آنچه که سزاوار بودم، شکست خوردهام.",
|
|
84
|
+
"وقتی به گذشته مینگرم، شکستهای زیادی را میبینم.",
|
|
85
|
+
"احساس میکنم شخص کاملاً شکست خوردهای هستم."
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"user_answered": "1"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "text",
|
|
92
|
+
"text": "نارضایتی",
|
|
93
|
+
"answer": {
|
|
94
|
+
"type": "optional",
|
|
95
|
+
"options": [
|
|
96
|
+
"به اندازه گذشته، از زندگی لذت میبرم.",
|
|
97
|
+
"دیگر به اندازه گذشته از زندگی لذت نمیبرم.",
|
|
98
|
+
"از چیزهایی که در گذشته از آنها لذت میبردم، خیلی کم لذت میبرم.",
|
|
99
|
+
"اصلا نمیتوانم از چیزهایی که قبلاً از آنها لذت میبردم، هیچ لذتی ببرم."
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"user_answered": "2"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "text",
|
|
106
|
+
"text": "احساس گناه",
|
|
107
|
+
"answer": {
|
|
108
|
+
"type": "optional",
|
|
109
|
+
"options": [
|
|
110
|
+
"احساس گناه خاصی ندارم.",
|
|
111
|
+
"در مورد خیلی از چیزهایی که انجام دادهام و یا باید انجام میدادم احساس گناه میکنم.",
|
|
112
|
+
"اغلب اوقات احساس گناه میکنم.",
|
|
113
|
+
"همواره احساس گناه میکنم."
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"user_answered": "2"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "text",
|
|
120
|
+
"text": "انتظار تنبیه",
|
|
121
|
+
"answer": {
|
|
122
|
+
"type": "optional",
|
|
123
|
+
"options": [
|
|
124
|
+
"احساس نمیکنم دارم تنبیه میشوم.",
|
|
125
|
+
"احساس میکنم ممکن است تنبیه شوم.",
|
|
126
|
+
"من انتظار تنبیه شدن را دارم.",
|
|
127
|
+
"احساس میکنم که دارم تنبیه میشوم."
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"user_answered": "1"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"type": "text",
|
|
134
|
+
"text": "دوست نداشتن خود",
|
|
135
|
+
"answer": {
|
|
136
|
+
"type": "optional",
|
|
137
|
+
"options": [
|
|
138
|
+
"همان احساسی را درمورد خود دارم که همیشه داشتهام.",
|
|
139
|
+
"اعتماد به نفسم را از دست دادهام.",
|
|
140
|
+
"از خودم مایوس شدهام.",
|
|
141
|
+
"از خودم بدم میآید."
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"user_answered": "1"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "text",
|
|
148
|
+
"text": "خودسرزنشی",
|
|
149
|
+
"answer": {
|
|
150
|
+
"type": "optional",
|
|
151
|
+
"options": [
|
|
152
|
+
"بیش از حد معمول، خود را مورد انتقاد و سرزنش قرار نمیدهم.",
|
|
153
|
+
"بیش از گذشته، از خودم انتقاد میکنم.",
|
|
154
|
+
"به خاطر تمامی اشتباهاتم، از خودم انتقاد میکنم.",
|
|
155
|
+
"برای هر چیز بدی که اتفاق میافتد خود را سرزنش میکنم."
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"user_answered": "2"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "text",
|
|
162
|
+
"text": "افکار خودکشی",
|
|
163
|
+
"answer": {
|
|
164
|
+
"type": "optional",
|
|
165
|
+
"options": [
|
|
166
|
+
"اصلاً در فکر آن نیستم که به خودم آسیبی برسانم.",
|
|
167
|
+
"درباره اینکه به خودم آسیبی برسانم فکر میکنم، ولی این کار را نمیکنم.",
|
|
168
|
+
"دلم میخواهد خودم را بکشم.",
|
|
169
|
+
"اگر امکان داشت، خودم را میکشتم."
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"user_answered": "1"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "text",
|
|
176
|
+
"text": "گریه کردن",
|
|
177
|
+
"answer": {
|
|
178
|
+
"type": "optional",
|
|
179
|
+
"options": [
|
|
180
|
+
"بیش از گذشته، گریه نمیکنم.",
|
|
181
|
+
"بیشتر از گذشته، گریه میکنم.",
|
|
182
|
+
"به خاطر هر چیز کوچکی، گریه میکنم.",
|
|
183
|
+
"دلم میخواهد گریه کنم، ولی نمیتوانم."
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"user_answered": "2"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "text",
|
|
190
|
+
"text": "بیقراری",
|
|
191
|
+
"answer": {
|
|
192
|
+
"type": "optional",
|
|
193
|
+
"options": [
|
|
194
|
+
"بیش از حد معمول بیقرار و تحریک پذیر نیستم.",
|
|
195
|
+
"احساس میکنم بیشتر از حد معمول، بیقرار و تحریک پذیر شدهام.",
|
|
196
|
+
"به قدری بیقرار و ناراحت هستم که نمیتوانم آرام بگیرم.",
|
|
197
|
+
"به قدری بیقرار و ناراحت هستم که باید دائما یا حرکت کنم یا به کاری مشغول باشم."
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"user_answered": "1"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"type": "text",
|
|
204
|
+
"text": "کنارهگیری اجتماعی",
|
|
205
|
+
"answer": {
|
|
206
|
+
"type": "optional",
|
|
207
|
+
"options": [
|
|
208
|
+
"علاقهام را نسبت به مردم و فعالیتها از دست ندادهام.",
|
|
209
|
+
"در مقایسه با قبل، کمتر به مردم و چیزها علاقه دارم.",
|
|
210
|
+
"بیشتر علاقهام را نسبت به مردم و چیزها از دست دادهام.",
|
|
211
|
+
"علاقه مند شدن به هر چیز برایم دشوار است."
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"user_answered": "1"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "text",
|
|
218
|
+
"text": "بیتصمیمی",
|
|
219
|
+
"answer": {
|
|
220
|
+
"type": "optional",
|
|
221
|
+
"options": [
|
|
222
|
+
"تقریباً به خوبی گذشته، تصمیم گیری میکنم.",
|
|
223
|
+
"تصمیم گیری برایم دشوارتر از حد معمول است.",
|
|
224
|
+
"بیشتر از گذشته، در تصمیم گیری مشکل دارم.",
|
|
225
|
+
"در گرفتن هر نوع تصمیمی، مشکل دارم."
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"user_answered": "1"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "text",
|
|
232
|
+
"text": "بیارزشی",
|
|
233
|
+
"answer": {
|
|
234
|
+
"type": "optional",
|
|
235
|
+
"options": [
|
|
236
|
+
"احساس میکنم آدم ارزشمندی هستم.",
|
|
237
|
+
"احساس نمیکنم به اندازه گذشته، ارزشمند و مفید هستم.",
|
|
238
|
+
"در مقایسه با دیگران، خود را کم ارزشتر میدانم.",
|
|
239
|
+
"بینهایت احساس بیارزشی میکنم."
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"user_answered": "2"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"type": "text",
|
|
246
|
+
"text": "از دست دادن انرژی",
|
|
247
|
+
"answer": {
|
|
248
|
+
"type": "optional",
|
|
249
|
+
"options": [
|
|
250
|
+
"من به اندازه گذشته، انرژی دارم.",
|
|
251
|
+
"نسبت به گذشته، انرژیام کمتر شده است.",
|
|
252
|
+
"انرژی لازم برای انجام کارهای زیاد را ندارم.",
|
|
253
|
+
"انرژی انجام هیچ کاری را ندارم."
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
"user_answered": "2"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "text",
|
|
260
|
+
"text": "تغییر در الگوی خواب",
|
|
261
|
+
"answer": {
|
|
262
|
+
"type": "optional",
|
|
263
|
+
"options": [
|
|
264
|
+
"در الگوی خوابم، هیچ تغییری ایجاد نشده است.",
|
|
265
|
+
"کمی بیشتر از حد معمول میخوابم.",
|
|
266
|
+
"تا حدودی کمتر از حد معمول میخوابم.",
|
|
267
|
+
"خیلی بیشتر از حد معمول میخوابم.",
|
|
268
|
+
"خیلی کمتر از حد معمول میخوابم.",
|
|
269
|
+
"بیشتر اوقات روز را میخوابم.",
|
|
270
|
+
"صبحها یک تا دو ساعت زودتر بیدار میشوم و دیگر نمیتوانم بخوابم."
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"user_answered": "6"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "text",
|
|
277
|
+
"text": "تحریکپذیری",
|
|
278
|
+
"answer": {
|
|
279
|
+
"type": "optional",
|
|
280
|
+
"options": [
|
|
281
|
+
"بیش از حد معمول تحریک پذیر نیستم.",
|
|
282
|
+
"بیش از حد معمول تحریکپذیر هستم.",
|
|
283
|
+
"خیلی بیش از حد معمول تحریک پذیر هستم.",
|
|
284
|
+
"همیشه تحریک پذیر هستم."
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
"user_answered": "1"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"type": "text",
|
|
291
|
+
"text": "تغییر در اشتها",
|
|
292
|
+
"answer": {
|
|
293
|
+
"type": "optional",
|
|
294
|
+
"options": [
|
|
295
|
+
"اشتهایم تغییری نکرده است.",
|
|
296
|
+
"اشتهایم کمتر از حد معمول است.",
|
|
297
|
+
"اشتهایم بیشتر از حد معمول است.",
|
|
298
|
+
"اشتهایم خیلی کمتر از حد معمول است.",
|
|
299
|
+
"اشتهایم خیلی بیشتر از حد معمول است.",
|
|
300
|
+
"اصلا اشتها ندارم.",
|
|
301
|
+
"همیشه میل زیادی به غذا خوردن دارم."
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
"user_answered": "7"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"type": "text",
|
|
308
|
+
"text": "اشکال در تمرکز",
|
|
309
|
+
"answer": {
|
|
310
|
+
"type": "optional",
|
|
311
|
+
"options": [
|
|
312
|
+
"تمرکزم به خوبی گذشته است.",
|
|
313
|
+
"نمیتوانم به خوبی گذشته، تمرکز داشته باشم.",
|
|
314
|
+
"نمیتوانم فکرم را روی موضوعی به مدت طولانی متمرکز کنم.",
|
|
315
|
+
"احساس میکنم نمیتوانم روی هیچ چیزی تمرکز کنم."
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
"user_answered": "2"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"type": "text",
|
|
322
|
+
"text": "خستگی پذیری",
|
|
323
|
+
"answer": {
|
|
324
|
+
"type": "optional",
|
|
325
|
+
"options": [
|
|
326
|
+
"بیش از حد معمول، خسته یا کسل نیستم.",
|
|
327
|
+
"زودتر از حد معمول، خسته یا کسل میشوم.",
|
|
328
|
+
"به قدری خسته یا کسل هستم که نمیتوانم کارهایی را که قبلاً انجام میدادم، انجام دهم.",
|
|
329
|
+
"به قدری خسته یا کسل هستم که نمیتوانم اغلب کارهایی را که قبلا انجام میدادم، انجام دهم."
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
"user_answered": "1"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"type": "text",
|
|
336
|
+
"text": "کاهش علاقه جنسی",
|
|
337
|
+
"answer": {
|
|
338
|
+
"type": "optional",
|
|
339
|
+
"options": [
|
|
340
|
+
"متوجه تغییر تازهای در علاقه جنسیام نشدهام.",
|
|
341
|
+
"کمتر از گذشته به امور جنسی علاقه دارم.",
|
|
342
|
+
"در حال حاضر خیلی کم به امور جنسی علاقه دارم.",
|
|
343
|
+
"علاقه جنسیام را کاملاً از دست دادهام."
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"user_answered": "2"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"prerequisites": [
|
|
350
|
+
{
|
|
351
|
+
"type": "text",
|
|
352
|
+
"label": "gender",
|
|
353
|
+
"text": "جنسیت",
|
|
354
|
+
"answer": { "type": "select", "options": ["زن", "مرد"] },
|
|
355
|
+
"alias": "gender",
|
|
356
|
+
"force": true,
|
|
357
|
+
"user_answered": "1"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"type": "text",
|
|
361
|
+
"label": "age",
|
|
362
|
+
"text": "سن",
|
|
363
|
+
"answer": { "type": "number" },
|
|
364
|
+
"alias": "age",
|
|
365
|
+
"force": true,
|
|
366
|
+
"user_answered": "33"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"type": "text",
|
|
370
|
+
"label": "education",
|
|
371
|
+
"text": "تحصیلات",
|
|
372
|
+
"answer": {
|
|
373
|
+
"type": "select",
|
|
374
|
+
"options": [
|
|
375
|
+
"ابتدایی اول",
|
|
376
|
+
"ابتدایی دوم",
|
|
377
|
+
"متوسطه اول",
|
|
378
|
+
"متوسطه دوم",
|
|
379
|
+
"دیپلم",
|
|
380
|
+
"کارشناسی",
|
|
381
|
+
"کارشناسی ارشد",
|
|
382
|
+
"پزشکی عمومی",
|
|
383
|
+
"متخصص",
|
|
384
|
+
"دکتری تخصصی",
|
|
385
|
+
"حوزوی مقدمات",
|
|
386
|
+
"حوزوی سطح۱",
|
|
387
|
+
"حوزوی سطح۲",
|
|
388
|
+
"حوزوی سطح۳",
|
|
389
|
+
"حوزوی سطح۴"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"alias": "education",
|
|
393
|
+
"force": true,
|
|
394
|
+
"user_answered": "7"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"type": "text",
|
|
398
|
+
"label": "marital_status",
|
|
399
|
+
"text": "وضعیت تأهل",
|
|
400
|
+
"answer": { "type": "select", "options": ["مجرد", "متأهل"] },
|
|
401
|
+
"alias": "marital_status",
|
|
402
|
+
"force": true,
|
|
403
|
+
"user_answered": "2"
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
|
|
407
|
+
"cornometer": 56,
|
|
408
|
+
"score": {
|
|
409
|
+
"cognitive_raw": 9,
|
|
410
|
+
"cognitive_percentage": 0.375,
|
|
411
|
+
"affective_raw": 14,
|
|
412
|
+
"affective_percentage": 0.5833,
|
|
413
|
+
"somatic_raw": 4,
|
|
414
|
+
"somatic_percentage": 0.2667,
|
|
415
|
+
"raw": 27,
|
|
416
|
+
"percentage": 0.4286,
|
|
417
|
+
"report": "moderate",
|
|
418
|
+
"suicide_alert": 0,
|
|
419
|
+
"type": "long"
|
|
420
|
+
},
|
|
421
|
+
"score_current_version": "1.0.0",
|
|
422
|
+
"score_last_version": "1.0.0"
|
|
423
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "$X1HXXXXX",
|
|
3
|
+
"scale": { "id": "$BDI-9A", "title": "آزمون افسردگی بک فرم کوتاه" },
|
|
4
|
+
"chain": null,
|
|
5
|
+
"version": "2",
|
|
6
|
+
"edition": "",
|
|
7
|
+
"edition_version": null,
|
|
8
|
+
"client": {
|
|
9
|
+
"id": "GH966XXXX",
|
|
10
|
+
"name": "مراجع"
|
|
11
|
+
},
|
|
12
|
+
"room": {
|
|
13
|
+
"id": "RS96XXXX",
|
|
14
|
+
"manager": {
|
|
15
|
+
"id": "GH9XXXXX",
|
|
16
|
+
"name": "درمانگر",
|
|
17
|
+
"user_id": "IR9XXXX"
|
|
18
|
+
},
|
|
19
|
+
"center": {
|
|
20
|
+
"id": "RS966XXXX",
|
|
21
|
+
"acceptation": null,
|
|
22
|
+
"status": "active",
|
|
23
|
+
"type": "personal_clinic",
|
|
24
|
+
"detail": {
|
|
25
|
+
"title": "درمانگر"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"acceptation": null,
|
|
29
|
+
"status": "active",
|
|
30
|
+
"type": "personal_clinic"
|
|
31
|
+
},
|
|
32
|
+
"case": null,
|
|
33
|
+
"code": null,
|
|
34
|
+
"created_at": 1694157079,
|
|
35
|
+
"started_at": 1694157198,
|
|
36
|
+
"scored_at": 1694242467,
|
|
37
|
+
"closed_at": 1694160574,
|
|
38
|
+
"total_amount": 100000,
|
|
39
|
+
"prepayment": true,
|
|
40
|
+
"purchased": true,
|
|
41
|
+
"amount": 100000,
|
|
42
|
+
"psychologist_description": null,
|
|
43
|
+
"description": "## دستور اجرای آزمون\n\nاین پرسشنامه شامل ۲۱ گروه جمله است. لطفاً هر گروه از جملات را با دقت بخوانید. سپس در هر گروه یک جمله را انتخاب کنید که بهتر از همه گویای احساس شما طی ۲ هفته گذشته تا به امروز است. سپس دور شماره کنار جملهای که انتخاب کردهاید یک دایره بکشید. اگر در یک گروه از جملات، چند جمله در مورد شما صدق میکند دور شمارهای که از همه بالاتر است دایره بکشید. دقت کنید در هیچ یک از جملات بیشتر از یک جمله انتخاب نکنید.",
|
|
44
|
+
"items": [
|
|
45
|
+
{
|
|
46
|
+
"type": "text",
|
|
47
|
+
"text": "غمگینی",
|
|
48
|
+
"answer": {
|
|
49
|
+
"type": "optional",
|
|
50
|
+
"options": [
|
|
51
|
+
"من آنقدر غمگین یا بدبختم که دیگر تحملش را ندارم.",
|
|
52
|
+
"من همیشه غمگین یا گرفتهام و نمیتوانم خود را از این وضع خلاص کنم.",
|
|
53
|
+
"من غمگین یا گرفتهام.",
|
|
54
|
+
"من غمگین نیستم."
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"user_answered": "1"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "text",
|
|
61
|
+
"text": "بدبینی",
|
|
62
|
+
"answer": {
|
|
63
|
+
"type": "optional",
|
|
64
|
+
"options": [
|
|
65
|
+
"من احساس میکنم که به آینده امیدی نیست و اوضاع بهتر نخواهد شد.",
|
|
66
|
+
"من احساس میکنم که هیچ امیدی به آینده ندارم.",
|
|
67
|
+
"من نسبت به آینده مأیوسم.",
|
|
68
|
+
"من نسبت به آینده بدبین یا مأیوس نیستم."
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"user_answered": "1"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "text",
|
|
75
|
+
"text": "احساس شکستخوردگی",
|
|
76
|
+
"answer": {
|
|
77
|
+
"type": "optional",
|
|
78
|
+
"options": [
|
|
79
|
+
"من احساس میکنم که شخصی کاملاً شکست خوردهام (به عنوان پدر، مادر، شوهر، زن).",
|
|
80
|
+
"من هر چه به گذشتهام مینگرم چیزی جز شکست نمییابم.",
|
|
81
|
+
"من احساس میکنم که بیش از یک شخص متوسط در زندگی با شکست مواجه شدهام.",
|
|
82
|
+
"من خود را مثل یک شخص شکستخورده نمیدانم."
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"user_answered": "2"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "text",
|
|
89
|
+
"text": "نارضایتی",
|
|
90
|
+
"answer": {
|
|
91
|
+
"type": "optional",
|
|
92
|
+
"options": [
|
|
93
|
+
"من از همه چیز ناراضیام.",
|
|
94
|
+
"دیگر هیچ چیز مرا راضی نمیکند.",
|
|
95
|
+
"من از چیزهایی که لذت میبردم، دیگر لذت نمیبرم.",
|
|
96
|
+
"من نارضایتی خاصی ندارم."
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"user_answered": "3"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "text",
|
|
103
|
+
"text": "احساس گنهکاری",
|
|
104
|
+
"answer": {
|
|
105
|
+
"type": "optional",
|
|
106
|
+
"options": [
|
|
107
|
+
"انگار احساس میکنم که بسیار بد یا بیارزش هستم.",
|
|
108
|
+
"من احساس میکنم که کاملاً گنهکارم.",
|
|
109
|
+
"من اغلب اوقات احساس میکنم که بد یا بیارزشم.",
|
|
110
|
+
"من احساس گنهکاری بهخصوصی ندارم."
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"user_answered": "1"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "text",
|
|
117
|
+
"text": "از خودبیزاری",
|
|
118
|
+
"answer": {
|
|
119
|
+
"type": "optional",
|
|
120
|
+
"options": [
|
|
121
|
+
"من از خود نفرت دارم.",
|
|
122
|
+
"من از خود بیزارم.",
|
|
123
|
+
"من از خود ناامیدم.",
|
|
124
|
+
"من از خود ناامید نیستم."
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"user_answered": "3"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "text",
|
|
131
|
+
"text": "خودآزاررسانی",
|
|
132
|
+
"answer": {
|
|
133
|
+
"type": "optional",
|
|
134
|
+
"options": [
|
|
135
|
+
"اگر امکان داشت خودم را میکشتم.",
|
|
136
|
+
"من نقشههای مشخصی برای خودکشی دارم.",
|
|
137
|
+
"من احساس میکنم که بهتر است بمیرم.",
|
|
138
|
+
"من به هیچوجه در فکر آسیبرساندن به خود نیستم."
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"user_answered": "3"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "text",
|
|
145
|
+
"text": "کنارهگیری",
|
|
146
|
+
"answer": {
|
|
147
|
+
"type": "optional",
|
|
148
|
+
"options": [
|
|
149
|
+
"من تمام علاقهام را نسبت به مردم از دست دادهام و هیچ توجهی به آنها ندارم.",
|
|
150
|
+
"من علاقهام را تا حد زیادی نسبت به مردم از دست دادهام و فقط اندک احساسی نسبت به آنها دارم.",
|
|
151
|
+
"من اکنون کمتر از گذشته نسبت به مردم علاقه دارم.",
|
|
152
|
+
"من علاقهام را نسبت به مردم از دست ندادهام."
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"user_answered": "2"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "text",
|
|
159
|
+
"text": "بی تصمیمی",
|
|
160
|
+
"answer": {
|
|
161
|
+
"type": "optional",
|
|
162
|
+
"options": [
|
|
163
|
+
"من دیگر نمیتوانم هیچ تصمیمی بگیرم.",
|
|
164
|
+
"برای من تصمیم گرفتن بسیار مشکل است.",
|
|
165
|
+
"من سعی میکنم که تصمیمگیری خود را به تأخیر بیندازنم.",
|
|
166
|
+
"من مثل همیشه میتوانم به خوبی تصمیم بگیرم."
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"user_answered": "3"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"type": "text",
|
|
173
|
+
"text": "تغییر خودپنداشت",
|
|
174
|
+
"answer": {
|
|
175
|
+
"type": "optional",
|
|
176
|
+
"options": [
|
|
177
|
+
"من احساس میکنم که زشت یا زنندهام.",
|
|
178
|
+
"من احساس میکنم که وضع ظاهری من دائماً در تغییر است و باعث میشود به نظر دیگران جذاب نباشم.",
|
|
179
|
+
"من از اینکه پیر یا غیر جذاب به نظر برسم، نگرانم.",
|
|
180
|
+
"من احساس نمیکنم که به نظر دیگران بدتر از گذشته باشم."
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"user_answered": "2"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "text",
|
|
187
|
+
"text": "دشواری در کار",
|
|
188
|
+
"answer": {
|
|
189
|
+
"type": "optional",
|
|
190
|
+
"options": [
|
|
191
|
+
"من اصلاً نمیتوانم کار کنم.",
|
|
192
|
+
"من برای انجام هر کاری باید خیلی به خود فشار بیاورم.",
|
|
193
|
+
"برای من شروع یک کار مستلزم کوششی فوقالعاده است.",
|
|
194
|
+
"من میتوانم مثل گذشته کار کنم."
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"user_answered": "2"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "text",
|
|
201
|
+
"text": "خستگیپذیری",
|
|
202
|
+
"answer": {
|
|
203
|
+
"type": "optional",
|
|
204
|
+
"options": [
|
|
205
|
+
"من خستهتر از آنم که بتوانم کاری انجام دهم.",
|
|
206
|
+
"من با انجام هر کاری خسته میشوم.",
|
|
207
|
+
"من خیلی زودتر از سابق خسته میشوم.",
|
|
208
|
+
"من بیش از حد معمول خسته نمیشوم."
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"user_answered": "1"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "text",
|
|
215
|
+
"text": "بیاشتهایی",
|
|
216
|
+
"answer": {
|
|
217
|
+
"type": "optional",
|
|
218
|
+
"options": [
|
|
219
|
+
"من دیگر به هیچ وجه اشتها ندارم.",
|
|
220
|
+
"حالا دیگر اشتهای من خیلی بدتر شده است.",
|
|
221
|
+
"اشتهای من دیگر به خوبی گذشته نیست.",
|
|
222
|
+
"اشتهای من بدتر از حد معمول نیست."
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"user_answered": "2"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"prerequisites": [
|
|
229
|
+
{
|
|
230
|
+
"type": "text",
|
|
231
|
+
"label": "gender",
|
|
232
|
+
"text": "جنسیت",
|
|
233
|
+
"answer": { "type": "select", "options": ["زن", "مرد"] },
|
|
234
|
+
"alias": "gender",
|
|
235
|
+
"force": true,
|
|
236
|
+
"user_answered": "1"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "text",
|
|
240
|
+
"label": "age",
|
|
241
|
+
"text": "سن",
|
|
242
|
+
"answer": { "type": "number" },
|
|
243
|
+
"alias": "age",
|
|
244
|
+
"force": true,
|
|
245
|
+
"user_answered": "33"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "text",
|
|
249
|
+
"label": "education",
|
|
250
|
+
"text": "تحصیلات",
|
|
251
|
+
"answer": {
|
|
252
|
+
"type": "select",
|
|
253
|
+
"options": [
|
|
254
|
+
"ابتدایی اول",
|
|
255
|
+
"ابتدایی دوم",
|
|
256
|
+
"متوسطه اول",
|
|
257
|
+
"متوسطه دوم",
|
|
258
|
+
"دیپلم",
|
|
259
|
+
"کارشناسی",
|
|
260
|
+
"کارشناسی ارشد",
|
|
261
|
+
"پزشکی عمومی",
|
|
262
|
+
"متخصص",
|
|
263
|
+
"دکتری تخصصی",
|
|
264
|
+
"حوزوی مقدمات",
|
|
265
|
+
"حوزوی سطح۱",
|
|
266
|
+
"حوزوی سطح۲",
|
|
267
|
+
"حوزوی سطح۳",
|
|
268
|
+
"حوزوی سطح۴"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"alias": "education",
|
|
272
|
+
"force": true,
|
|
273
|
+
"user_answered": "7"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "text",
|
|
277
|
+
"label": "marital_status",
|
|
278
|
+
"text": "وضعیت تأهل",
|
|
279
|
+
"answer": { "type": "select", "options": ["مجرد", "متأهل"] },
|
|
280
|
+
"alias": "marital_status",
|
|
281
|
+
"force": true,
|
|
282
|
+
"user_answered": "2"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
|
|
286
|
+
"cornometer": 56,
|
|
287
|
+
"score": {
|
|
288
|
+
"raw": 26,
|
|
289
|
+
"percentage": 0.6667,
|
|
290
|
+
"suicide_alert": 2,
|
|
291
|
+
"report_dadsetan": "severe",
|
|
292
|
+
"type": "short",
|
|
293
|
+
"report": "severe"
|
|
294
|
+
},
|
|
295
|
+
"score_current_version": "1.0.0",
|
|
296
|
+
"score_last_version": "1.0.0"
|
|
297
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const { Profile, FS } = require("../Profile");
|
|
2
|
+
const totalColors = {
|
|
3
|
+
minimal: ['#CBD5E1', '#475569'],
|
|
4
|
+
mild: ['#FDE047', '#EAB308'],
|
|
5
|
+
moderate: ['#FDBA74', '#EA580C'],
|
|
6
|
+
severe: ['#FDA4AF', '#E11D48'],
|
|
7
|
+
}
|
|
8
|
+
const levelColors = ['#F8FAFC', '#FEFCE8BF', '#FFEDD580', '#FFF1F2']
|
|
9
|
+
class BDI93 extends Profile {
|
|
10
|
+
static pages = 2;
|
|
11
|
+
|
|
12
|
+
labels = {
|
|
13
|
+
L1_1: { eng: "affective_raw", short: 'A', fr: "عاطفی", max: 24 },
|
|
14
|
+
L1_2: { eng: "affective_percentage"},
|
|
15
|
+
|
|
16
|
+
L2_1: { eng: "cognitive_raw", short: 'C', fr: "شناختی", max: 24 },
|
|
17
|
+
L2_2: { eng: "cognitive_percentage"},
|
|
18
|
+
|
|
19
|
+
L3_1: { eng: "somatic_raw", short: 'P', fr: "جسمانی", max: 15 },
|
|
20
|
+
L3_2: { eng: "somatic_percentage"},
|
|
21
|
+
|
|
22
|
+
L4_1: { eng: "raw"},
|
|
23
|
+
L4_2: { eng: "percentage"},
|
|
24
|
+
|
|
25
|
+
L5: { eng: "report"},
|
|
26
|
+
L6: { eng: "suicide_alert"},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
profileSpec = {
|
|
30
|
+
sample: {
|
|
31
|
+
name: "آزمون افسردگی بک",
|
|
32
|
+
multiProfile: false,
|
|
33
|
+
questions: true,
|
|
34
|
+
defaultFields: true,
|
|
35
|
+
fields: [],
|
|
36
|
+
},
|
|
37
|
+
profile: {
|
|
38
|
+
get dimensions() {
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
width: 555 + 2 * this.padding.x,
|
|
42
|
+
height: 588 + 2 * this.padding.y,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
width: 893 + 2 * this.padding.x,
|
|
46
|
+
height: 683 + 2 * this.padding.y,
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
},
|
|
50
|
+
padding: [
|
|
51
|
+
{
|
|
52
|
+
x: 194,
|
|
53
|
+
y: 63,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
x: 5,
|
|
57
|
+
y: 15,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
labels: Object.values(this.labels),
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
constructor(dataset, options, config = {}) {
|
|
66
|
+
super();
|
|
67
|
+
this._init(dataset, options, config);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
_calcContext() {
|
|
71
|
+
const { dataset } = this;
|
|
72
|
+
const factors = []
|
|
73
|
+
const questions = dataset.questions.map((q, i) => {
|
|
74
|
+
let option = Number(q.user_answered)
|
|
75
|
+
if(q.answer.options.length === 4){
|
|
76
|
+
option = option - 1
|
|
77
|
+
}else{
|
|
78
|
+
option = Math.floor(option / 2)
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
i: i +1,
|
|
83
|
+
label: q.text,
|
|
84
|
+
option,
|
|
85
|
+
color: levelColors[option],
|
|
86
|
+
alert: (i === 1 || i === 8) && option !== 0,
|
|
87
|
+
user_answered: Number(q.user_answered),
|
|
88
|
+
text: q.answer.options[Number(q.user_answered) - 1]
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
const sorted = [...questions].sort((a, b) => b.option - a.option)
|
|
92
|
+
for(let i = 0; i < 6; i+=2){
|
|
93
|
+
factors.push({
|
|
94
|
+
...dataset.score[i],
|
|
95
|
+
percentage: dataset.score[i+1].mark,
|
|
96
|
+
percentageText: Math.round(dataset.score[i+1].mark * 100),
|
|
97
|
+
bg:`url(#bg${dataset.score[i].label.eng})`
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const report = dataset.score[8].mark
|
|
102
|
+
const total = {
|
|
103
|
+
...dataset.score[6],
|
|
104
|
+
percentage: dataset.score[7].mark,
|
|
105
|
+
percentageText: Math.round(dataset.score[7].mark * 100),
|
|
106
|
+
w: calculateWidth(dataset.score[6].mark),
|
|
107
|
+
colors: totalColors[report],
|
|
108
|
+
alert: dataset.score[9].mark
|
|
109
|
+
}
|
|
110
|
+
const alerts = []
|
|
111
|
+
if(questions[1].option > 0){
|
|
112
|
+
alerts.push(questions[1])
|
|
113
|
+
}
|
|
114
|
+
if(questions[8].option > 0){
|
|
115
|
+
alerts.push(questions[8])
|
|
116
|
+
}
|
|
117
|
+
return [{factors, total, report, alerts},{sorted}
|
|
118
|
+
];
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function calculateWidth(score) {
|
|
122
|
+
let w = 0;
|
|
123
|
+
|
|
124
|
+
if (score <= 13) {
|
|
125
|
+
w = score * 10;
|
|
126
|
+
} else if (score <= 19) {
|
|
127
|
+
w = (13 * 10) + (score - 13) * 12;
|
|
128
|
+
} else if (score <= 28) {
|
|
129
|
+
w = (13 * 10) + (6 * 12) + (score - 19) * 8;
|
|
130
|
+
} else {
|
|
131
|
+
w = (13 * 10) + (6 * 12) + (9 * 8) + (score - 28) * 5;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return w;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
module.exports = BDI93;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
const { Profile } = require("../Profile");
|
|
2
|
+
const totalColors = {
|
|
3
|
+
none: ['#CBD5E1', '#475569'],
|
|
4
|
+
almost_none: ['#CBD5E1', '#475569'],
|
|
5
|
+
minimal: ['#FDE047', '#EAB308'],
|
|
6
|
+
mild: ['#FDE047', '#EAB308'],
|
|
7
|
+
moderate_i: ['#FDBA74', '#EA580C'],
|
|
8
|
+
moderate_ii: ['#FDBA74', '#EA580C'],
|
|
9
|
+
severe: ['#FDA4AF', '#E11D48']
|
|
10
|
+
}
|
|
11
|
+
const gTotalColors = {
|
|
12
|
+
minimal: ['#CBD5E1', '#475569'],
|
|
13
|
+
mild: ['#FDE047', '#EAB308'],
|
|
14
|
+
moderate: ['#FDBA74', '#EA580C'],
|
|
15
|
+
severe: ['#FDA4AF', '#E11D48'],
|
|
16
|
+
}
|
|
17
|
+
const levelColors = ['#F8FAFC', '#FEFCE8BF', '#FFEDD580', '#FFF1F2']
|
|
18
|
+
class BDI9A extends Profile {
|
|
19
|
+
static pages = 1;
|
|
20
|
+
|
|
21
|
+
labels = {
|
|
22
|
+
|
|
23
|
+
L1: { eng: "raw"},
|
|
24
|
+
L2: { eng: "percentage"},
|
|
25
|
+
L3: { eng: "report"},
|
|
26
|
+
L4: { eng: "report_dadsetan"},
|
|
27
|
+
L5: { eng: "suicide_alert"},
|
|
28
|
+
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
profileSpec = {
|
|
32
|
+
sample: {
|
|
33
|
+
name: "آزمون افسردگی بک",
|
|
34
|
+
multiProfile: false,
|
|
35
|
+
questions: true,
|
|
36
|
+
defaultFields: true,
|
|
37
|
+
fields: [],
|
|
38
|
+
},
|
|
39
|
+
profile: {
|
|
40
|
+
get dimensions() {
|
|
41
|
+
return {
|
|
42
|
+
width: 893 + 2 * this.padding.x,
|
|
43
|
+
height: 664 + 2 * this.padding.y,
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
padding: {
|
|
47
|
+
x: 5,
|
|
48
|
+
y: 25,
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
labels: Object.values(this.labels),
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
constructor(dataset, options, config = {}) {
|
|
56
|
+
super();
|
|
57
|
+
this._init(dataset, options, config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
_calcContext() {
|
|
61
|
+
const { dataset } = this;
|
|
62
|
+
const questions = dataset.questions.map((q, i) => {
|
|
63
|
+
let option = 4 - Number(q.user_answered)
|
|
64
|
+
return {
|
|
65
|
+
i: i +1,
|
|
66
|
+
label: q.text,
|
|
67
|
+
option,
|
|
68
|
+
color: levelColors[option],
|
|
69
|
+
alert: (i === 1 || i === 6) && option !== 0,
|
|
70
|
+
user_answered: Number(q.user_answered),
|
|
71
|
+
text: q.answer.options[Number(q.user_answered) - 1]
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
const sorted = [...questions].sort((a, b) => b.option - a.option)
|
|
75
|
+
|
|
76
|
+
const report = dataset.score[3].mark
|
|
77
|
+
const gReport = dataset.score[2].mark
|
|
78
|
+
|
|
79
|
+
dataset.score[1].mark = isNaN(dataset.score[1].mark) ? 0 : dataset.score[1].mark
|
|
80
|
+
const total = {
|
|
81
|
+
...dataset.score[0],
|
|
82
|
+
percentage: dataset.score[1].mark,
|
|
83
|
+
percentageText: Math.round(dataset.score[1].mark * 100),
|
|
84
|
+
w: calculateWidth(dataset.score[0].mark),
|
|
85
|
+
colors: totalColors[report],
|
|
86
|
+
gColors: gTotalColors[gReport],
|
|
87
|
+
alert: dataset.score[4].mark
|
|
88
|
+
}
|
|
89
|
+
const alerts = []
|
|
90
|
+
if(questions[1].option > 0){
|
|
91
|
+
alerts.push(questions[1])
|
|
92
|
+
}
|
|
93
|
+
if(questions[6].option > 0){
|
|
94
|
+
alerts.push(questions[6])
|
|
95
|
+
}
|
|
96
|
+
return [{total, report, gReport, alerts,sorted}];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const levels = [
|
|
100
|
+
[15, 6],
|
|
101
|
+
[11, 27],
|
|
102
|
+
[8, 34],
|
|
103
|
+
[4, 20],
|
|
104
|
+
[2, 40],
|
|
105
|
+
[1, 80],
|
|
106
|
+
]
|
|
107
|
+
function calculateWidth(_score) {
|
|
108
|
+
let score = _score
|
|
109
|
+
let w = 0
|
|
110
|
+
for(let i = 0; i < levels.length; i++){
|
|
111
|
+
const [start, weigh] = levels[i]
|
|
112
|
+
if(score >= start){
|
|
113
|
+
const bt = score - (start - 1)
|
|
114
|
+
w += bt * weigh
|
|
115
|
+
score -= bt
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return w
|
|
119
|
+
}
|
|
120
|
+
module.exports = BDI9A;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<filter id="sp" x="0" y="0" width="532" height="7.00006" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
4
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
5
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
6
|
+
<feOffset dy="-1"/>
|
|
7
|
+
<feGaussianBlur stdDeviation="1.5"/>
|
|
8
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
9
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
|
10
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4671_119062"/>
|
|
11
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4671_119062" result="shape"/>
|
|
12
|
+
</filter>
|
|
13
|
+
|
|
14
|
+
{{#each factors as | factor index |}}
|
|
15
|
+
<linearGradient id="bg{{label.eng}}" x1="14" y1="{{math 300 '*' percentage}}" x2="14" y2="9" gradientUnits="userSpaceOnUse">
|
|
16
|
+
<stop stop-color="#A5B4FC"/>
|
|
17
|
+
<stop offset="1" stop-color="#4F46E5"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
{{/each}}
|
|
20
|
+
{{#with total}}
|
|
21
|
+
<linearGradient id="bgtotal" x1="-4.8" y1="14" x2="{{math 300 '*' percentage}}" y2="14" gradientUnits="userSpaceOnUse">
|
|
22
|
+
<stop stop-color="{{colors.[0]}}"/>
|
|
23
|
+
<stop offset="1" stop-color="{{colors.[1]}}"/>
|
|
24
|
+
</linearGradient>
|
|
25
|
+
{{/with}}
|
|
26
|
+
</defs>
|
|
27
|
+
|
|
28
|
+
<g transform="translate({{spec.profile.padding.[0].x}}, {{spec.profile.padding.[0].y}})">
|
|
29
|
+
<g transform="translate(29,0)">
|
|
30
|
+
<g transform="translate(141,0)">
|
|
31
|
+
{{#each factors as | factor index |}}
|
|
32
|
+
<g transform="translate({{math 128 '*' index}},0)">
|
|
33
|
+
<text x="14" y="0" dy="1.25em" text-anchor="middle" direction="ltr" font-size="12" font-weight="300" fill="#64748B">
|
|
34
|
+
<tspan font-size="16" font-weight="700" fill="#4F46E5">{{mark}}</tspan>
|
|
35
|
+
<tspan>/</tspan>
|
|
36
|
+
<tspan font-size="13" font-weight="400">{{label.max}}</tspan>
|
|
37
|
+
</text>
|
|
38
|
+
{{bar 28 300 (object tr=4 tl=4 br=0 bl=0) (toRad 0) fill="#F8FAFC" transform="translate(0,24)"}}
|
|
39
|
+
<text x="14" y="337" dy=".85em" font-size="13" font-weight="400" text-anchor="middle" fill="#334155">{{label.short}}</text>
|
|
40
|
+
<text x="14" y="354" dy=".85em" font-size="13" font-weight="400" text-anchor="middle" fill="#334155">{{label.fr}}</text>
|
|
41
|
+
<text x="14" y="354" dy="2.15em" font-size="13" font-weight="400" text-anchor="middle" fill="#94A3B8">نشانههای</text>
|
|
42
|
+
</g>
|
|
43
|
+
{{/each}}
|
|
44
|
+
</g>
|
|
45
|
+
<g>
|
|
46
|
+
<path d="M 16.5 8.5 l 7 0 m 0 0 l -3 -3 m 3 3 l -3 3" stroke="#94A3B8" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round"/>
|
|
47
|
+
<text x="-29" y="8" dy=".25em" font-size="12" font-weight="400" text-anchor="end" fill="#94A3B8">نمره خام</text>
|
|
48
|
+
<text x="24" y="28.5" dy=".25em" font-size="12" font-weight="400" text-anchor="start" fill="#94A3B8">100 ٪</text>
|
|
49
|
+
<line x1="39.5" y1="24.5" x2="524.5" y2="24.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
50
|
+
<line x1="39.5" y1="99.5" x2="524.5" y2="99.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
51
|
+
<line x1="39.5" y1="174.5" x2="524.5" y2="174.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
52
|
+
<text x="24" y="175" dy=".25em" font-size="12" font-weight="400" text-anchor="start" fill="#94A3B8">50 ٪</text>
|
|
53
|
+
<line x1="39.5" y1="249.5" x2="524.5" y2="249.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
54
|
+
</g>
|
|
55
|
+
<g transform="translate(141,0)">
|
|
56
|
+
{{#each factors as | factor index |}}
|
|
57
|
+
<g transform="translate({{math 128 '*' index}},{{math 300 '-' (math 300 '*' percentage)}})">
|
|
58
|
+
{{bar 28 (math 300 '*' percentage) (object tr=4 tl=4 br=0 bl=0) (toRad 0) fill=bg transform="translate(0,24)"}}
|
|
59
|
+
<text font-size="16" font-weight="600" fill="{{ternary (boolean percentage '>' 0.24) '#FFFFFF' '#4F46E5'}}" transform="{{ternary (boolean percentage '>' 0.24) 'translate(19,34) rotate(-90 0 0)' 'translate(19,16) rotate(-90 0 0)'}}" text-anchor="{{ternary (boolean percentage '>' 0.24) 'start' 'end'}}">{{percentageText}} ٪</text>
|
|
60
|
+
</g>
|
|
61
|
+
{{/each}}
|
|
62
|
+
</g>
|
|
63
|
+
<g opacity="0.5" filter="url(#sp)" transform="translate(-3,321)">
|
|
64
|
+
<line x1="3.5" y1="4.5" x2="528.5" y2="4.5" stroke="white" stroke-linecap="round" />
|
|
65
|
+
</g>
|
|
66
|
+
<g transform="translate(10,434)">
|
|
67
|
+
<g transform="translate(48,44)">
|
|
68
|
+
<text y="0" x="-8" dy=".85em" text-anchor="start" font-size="13" font-weight="500" fill="#64748B">نمره کل</text>
|
|
69
|
+
<text y="0" x="-8" dy="2.1em" text-anchor="start" font-size="13" font-weight="600" fill="#475569">{{total.percentageText}} ٪</text>
|
|
70
|
+
{{bar 449 28 (object tr=4 br=4 tl=0 bl=0) (toRad 0) fill="#F8FAFC"}}
|
|
71
|
+
{{bar total.w 28 (object tr=4 br=4 tl=0 bl=0) (toRad 0) fill="url(#bgtotal)"}}
|
|
72
|
+
<text y="14" x="{{ternary (boolean total.mark '>' 5) (math total.w '-' 8) (math total.w '+' 8)}}" dy=".3em" text-anchor="{{ternary (boolean total.mark '>' 5) 'start' 'end'}}" font-size="16" font-weight="600" fill="{{ternary (boolean total.mark '>' 5) '#FFFFFF' total.colors.[1]}}">{{total.mark}}</text>
|
|
73
|
+
</g>
|
|
74
|
+
<g transform="translate(48,0)">
|
|
75
|
+
<g transform="translate(130,16)">
|
|
76
|
+
<text y="-16" x="0" dy=".85em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">13</text>
|
|
77
|
+
<text y="3" x="-65" dy=".85em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean report '===' 'minimal') 600 400}}" fill="{{ternary (boolean report '===' 'minimal') total.colors.[1] '#64748B'}}">هیچ یا کمترین حد</text>
|
|
78
|
+
<line x1="-0.5" y1="2" x2="-0.5" y2="23" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
79
|
+
</g>
|
|
80
|
+
<g transform="translate(202,16)">
|
|
81
|
+
<text y="-16" x="0" dy=".85em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">19</text>
|
|
82
|
+
<text y="3" x="-37.5" dy=".85em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean report '===' 'mild') 600 400}}" fill="{{ternary (boolean report '===' 'mild') total.colors.[1] '#64748B'}}">خفیف</text>
|
|
83
|
+
<line x1="-0.5" y1="2" x2="-0.5" y2="23" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
84
|
+
</g>
|
|
85
|
+
<g transform="translate(274,16)">
|
|
86
|
+
<text y="-16" x="0" dy=".85em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">28</text>
|
|
87
|
+
<text y="3" x="-37.5" dy=".85em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean report '===' 'moderate') 600 400}}" fill="{{ternary (boolean report '===' 'moderate') total.colors.[1] '#64748B'}}">متوسط</text>
|
|
88
|
+
<line x1="-0.5" y1="2" x2="-0.5" y2="23" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
89
|
+
</g>
|
|
90
|
+
<g transform="translate(449,16)">
|
|
91
|
+
<text y="-16" x="0" dy=".85em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">63</text>
|
|
92
|
+
<text y="3" x="-87.5" dy=".85em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean report '===' 'severe') 600 400}}" fill="{{ternary (boolean report '===' 'severe') total.colors.[1] '#64748B'}}">شدید</text>
|
|
93
|
+
<line x1="-0.5" y1="-0.5" x2="-0.5" y2="23" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
94
|
+
</g>
|
|
95
|
+
</g>
|
|
96
|
+
{{# if total.alert}}
|
|
97
|
+
<g transform="translate(48,76)">
|
|
98
|
+
<rect width="449" height="32" stroke="#FFE4E6" fill="#FFF1F2" rx="4" />
|
|
99
|
+
<text x="211.5" y="16" font-size="12" font-weight="700" fill="#E11D48" text-anchor="middle" dy=".25em">خطر بالقوه خودکشی</text>
|
|
100
|
+
<g transform="translate(267.61, 8.04)">
|
|
101
|
+
<path d="M 8.889 5.629 v 3.5556 m 0 2.6667 h 0.0089 m -1.464 -11.0303 l -7.2053 12.0303 c -0.1485 0.2572 -0.2271 0.5488 -0.228 0.8459 c -0.0009 0.297 0.0761 0.5891 0.2231 0.8472 c 0.1471 0.258 0.3591 0.4731 0.6151 0.6238 c 0.256 0.1507 0.5469 0.2317 0.844 0.2351 h 14.4125 c 0.2968 -0.0035 0.5877 -0.0845 0.8435 -0.2352 c 0.2559 -0.1506 0.4679 -0.3656 0.6149 -0.6235 c 0.147 -0.258 0.224 -0.5499 0.2233 -0.8468 c -0.0008 -0.2969 -0.0792 -0.5884 -0.2275 -0.8456 l -7.2053 -12.0321 c -0.1516 -0.2502 -0.3652 -0.4571 -0.6201 -0.6007 c -0.2549 -0.1436 -0.5425 -0.219 -0.8351 -0.219 c -0.2926 0 -0.5802 0.0754 -0.8351 0.219 c -0.2549 0.1436 -0.4685 0.3505 -0.6201 0.6007 v 0.0009 z" fill="none" stroke="#E11D48" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
102
|
+
</g>
|
|
103
|
+
<g transform="translate(224.5, 49)">
|
|
104
|
+
{{#each alerts}}
|
|
105
|
+
<text y="{{math @index '*' 1.75}}em" font-size="11" font-weight="400" fill="#57534E" text-anchor="middle" dy=".25em">پاسخ سوال {{i}} ({{label}}) = گزینه {{user_answered}}: {{text}}</text>
|
|
106
|
+
{{/each}}
|
|
107
|
+
</g>
|
|
108
|
+
</g>
|
|
109
|
+
{{/if}}
|
|
110
|
+
</g>
|
|
111
|
+
</g>
|
|
112
|
+
</g>
|
|
113
|
+
|
|
114
|
+
{{/layout}}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="titlebg" x1="420" y1="0" x2="420" y2="32" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#64748B"/>
|
|
5
|
+
<stop offset="1" stop-color="#94A3B8"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
|
|
9
|
+
<g transform="translate({{spec.profile.padding.[1].x}}, {{spec.profile.padding.[1].y}})">
|
|
10
|
+
<g transform="translate(27, 0)">
|
|
11
|
+
<g>
|
|
12
|
+
<rect width="840" height="32" rx="4" fill="url(#titlebg)" />
|
|
13
|
+
|
|
14
|
+
<text x="24" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">نمره</text>
|
|
15
|
+
<rect x="48" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
16
|
+
|
|
17
|
+
<text x="300.5" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">متن پاسخ</text>
|
|
18
|
+
<rect x="553" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
19
|
+
|
|
20
|
+
<text x="590.5" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">گزینهٔ پاسخ</text>
|
|
21
|
+
<rect x="628" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
22
|
+
|
|
23
|
+
<text x="708.5" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">نشانه</text>
|
|
24
|
+
<rect x="789" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
25
|
+
|
|
26
|
+
<text x="814" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">سوال</text>
|
|
27
|
+
</g>
|
|
28
|
+
<g transform="translate(0, 33)">
|
|
29
|
+
{{#each sorted}}
|
|
30
|
+
<g transform="translate(0, {{math @index '*' 31}})">
|
|
31
|
+
{{# if alert}}
|
|
32
|
+
<g transform="translate(846.11, 7.04)">
|
|
33
|
+
<path d="M 8.889 5.629 v 3.5556 m 0 2.6667 h 0.0089 m -1.464 -11.0303 l -7.2053 12.0303 c -0.1485 0.2572 -0.2271 0.5488 -0.228 0.8459 c -0.0009 0.297 0.0761 0.5891 0.2231 0.8472 c 0.1471 0.258 0.3591 0.4731 0.6151 0.6238 c 0.256 0.1507 0.5469 0.2317 0.844 0.2351 h 14.4125 c 0.2968 -0.0035 0.5877 -0.0845 0.8435 -0.2352 c 0.2559 -0.1506 0.4679 -0.3656 0.6149 -0.6235 c 0.147 -0.258 0.224 -0.5499 0.2233 -0.8468 c -0.0008 -0.2969 -0.0792 -0.5884 -0.2275 -0.8456 l -7.2053 -12.0321 c -0.1516 -0.2502 -0.3652 -0.4571 -0.6201 -0.6007 c -0.2549 -0.1436 -0.5425 -0.219 -0.8351 -0.219 c -0.2926 0 -0.5802 0.0754 -0.8351 0.219 c -0.2549 0.1436 -0.4685 0.3505 -0.6201 0.6007 v 0.0009 z" fill="none" stroke="#E11D48" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
34
|
+
</g>
|
|
35
|
+
{{/if}}
|
|
36
|
+
<rect width="840" height="30" rx="4" fill="{{color}}" />
|
|
37
|
+
|
|
38
|
+
<text x="24" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{option}}</text>
|
|
39
|
+
<rect x="48" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
40
|
+
|
|
41
|
+
<text x="300.5" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{text}}</text>
|
|
42
|
+
<rect x="553" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
43
|
+
|
|
44
|
+
<text x="590.5" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{user_answered}}</text>
|
|
45
|
+
<rect x="628" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
46
|
+
|
|
47
|
+
<text x="708.5" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{label}}</text>
|
|
48
|
+
<rect x="789" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
49
|
+
|
|
50
|
+
<text x="814" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{i}}</text>
|
|
51
|
+
</g>
|
|
52
|
+
{{/each}}
|
|
53
|
+
</g>
|
|
54
|
+
</g>
|
|
55
|
+
</g>
|
|
56
|
+
|
|
57
|
+
{{/layout}}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="raw-rect">
|
|
4
|
+
{{bar 600 28 (object tr=4 br=4 tl=0 bl=0) (toRad 0) fill='black'}}
|
|
5
|
+
</clipPath>
|
|
6
|
+
<linearGradient id="titlebg" x1="420" y1="0" x2="420" y2="32" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#64748B"/>
|
|
8
|
+
<stop offset="1" stop-color="#94A3B8"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
{{#with total}}
|
|
11
|
+
<linearGradient id="bgtotal" x1="-4.8" y1="14" x2="{{math 300 '*' percentage}}" y2="14" gradientUnits="userSpaceOnUse">
|
|
12
|
+
<stop stop-color="{{colors.[0]}}"/>
|
|
13
|
+
<stop offset="1" stop-color="{{colors.[1]}}"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
{{/with}}
|
|
16
|
+
</defs>
|
|
17
|
+
|
|
18
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
19
|
+
<g transform="translate(213, 0)">
|
|
20
|
+
<text x="0" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">0</text>
|
|
21
|
+
<text x="40" y="43.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean report '===' 'almost_none') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'almost_none') total.colors.[1] '#64748B'}}">تقریباً هیچ</text>
|
|
22
|
+
<line x1="0.5" y1="33" x2="0.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
23
|
+
|
|
24
|
+
<text x="80" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">1</text>
|
|
25
|
+
<text x="120" y="43.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean report '===' 'minimal') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'minimal') total.colors.[1] '#64748B'}}">ناچیز</text>
|
|
26
|
+
<line x1="79.5" y1="33" x2="79.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
27
|
+
|
|
28
|
+
<text x="160" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">3</text>
|
|
29
|
+
<text x="200" y="43.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean report '===' 'mild') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'mild') total.colors.[1] '#64748B'}}">خفیف</text>
|
|
30
|
+
<line x1="159.5" y1="33" x2="159.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
31
|
+
|
|
32
|
+
<text x="240" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">7</text>
|
|
33
|
+
<text x="291" y="27.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean report '===' 'moderate_i') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'moderate_i') total.colors.[1] '#64748B'}}">متوسط</text>
|
|
34
|
+
<text x="291" y="27.5" dy="2em" font-size="10" font-weight="{{ternary (boolean report '===' 'moderate_i') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'moderate_i') total.colors.[1] '#64748B'}}">(بیشتر از خفیف)</text>
|
|
35
|
+
<line x1="239.5" y1="33" x2="239.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
36
|
+
|
|
37
|
+
<text x="342" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">10</text>
|
|
38
|
+
<text x="396" y="27.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean report '===' 'moderate_ii') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'moderate_ii') total.colors.[1] '#64748B'}}">متوسط</text>
|
|
39
|
+
<text x="396" y="27.5" dy="2em" font-size="10" font-weight="{{ternary (boolean report '===' 'moderate_ii') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'moderate_ii') total.colors.[1] '#64748B'}}">(کمتر از وخیم)</text>
|
|
40
|
+
<line x1="341.5" y1="33" x2="341.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
41
|
+
<text x="450" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">14</text>
|
|
42
|
+
<text x="525" y="43.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean report '===' 'severe') 600 400}}" text-anchor="middle" fill="{{ternary (boolean report '===' 'severe') total.colors.[1] '#64748B'}}">وخیم</text>
|
|
43
|
+
<line x1="449.5" y1="33" x2="449.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
44
|
+
|
|
45
|
+
<text x="600" y="23" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">39</text>
|
|
46
|
+
<line x1="599.5" y1="33" x2="599.5" y2="57" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<text x="0" y="127" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">0</text>
|
|
51
|
+
<text x="89.5" y="104.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean gReport '===' 'minimal') 600 400}}" text-anchor="middle" fill="{{ternary (boolean gReport '===' 'minimal') total.gColors.[1] '#64748B'}}">هیچ یا کمترین حد</text>
|
|
52
|
+
<line x1="0.5" y1="93" x2="0.5" y2="117" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
53
|
+
|
|
54
|
+
<text x="179" y="127" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">4</text>
|
|
55
|
+
<text x="209" y="104.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean gReport '===' 'mild') 600 400}}" text-anchor="middle" fill="{{ternary (boolean gReport '===' 'mild') total.gColors.[1] '#64748B'}}">خفیف</text>
|
|
56
|
+
<line x1="178.5" y1="93" x2="178.5" y2="117" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
57
|
+
|
|
58
|
+
<text x="239" y="127" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">7</text>
|
|
59
|
+
<text x="347" y="104.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean gReport '===' 'moderate') 600 400}}" text-anchor="middle" fill="{{ternary (boolean gReport '===' 'moderate') total.gColors.[1] '#64748B'}}">متوسط</text>
|
|
60
|
+
<line x1="238.5" y1="93" x2="238.5" y2="117" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
61
|
+
|
|
62
|
+
<text x="455" y="127" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">15</text>
|
|
63
|
+
<text x="527.5" y="104.5" dy=".3em" font-size="13" font-weight="{{ternary (boolean gReport '===' 'severe') 600 400}}" text-anchor="middle" fill="{{ternary (boolean gReport '===' 'severe') total.gColors.[1] '#64748B'}}">شدید</text>
|
|
64
|
+
<line x1="454.5" y1="93" x2="454.5" y2="117" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
65
|
+
|
|
66
|
+
<text x="600" y="127" dy=".3em" font-size="12" font-weight="400" text-anchor="middle" fill="#94A3B8">39</text>
|
|
67
|
+
<line x1="599.5" y1="93" x2="599.5" y2="117" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="2 4 4 4 4 4"/>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
{{bar 600 28 (object tr=4 br=4 tl=0 bl=0) (toRad 0) fill="#F8FAFC" transform="translate(0, 61)"}}
|
|
72
|
+
{{bar total.w 28 (object tr=4 br=4 tl=0 bl=0) (toRad 0) fill="url(#bgtotal)" transform="translate(0, 61)" clip-path="url(#raw-rect)"}}
|
|
73
|
+
<text x="-28" y="36" font-size="12" font-weight="400" text-anchor="start" fill="#94A3B8" dy=".8em">هنجار منصور و دادستان</text>
|
|
74
|
+
<text x="{{ternary (boolean total.mark '===' 0) 8 (math total.w '-' 8)}}" y="75" font-size="16" font-weight="600" text-anchor="{{ternary (boolean total.mark '===' 0) 'end' 'start'}}" fill="{{ternary (boolean total.mark '===' 0) '#475569' '#FFFFFF'}}" dy=".3em">{{total.mark}}</text>
|
|
75
|
+
<path d="M -23.5 42 l 7 0 m 0 0 l -3 -3 m 3 3 l -3 3" stroke="#94A3B8" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round"/>
|
|
76
|
+
<text x="-28" y="101" font-size="12" font-weight="400" text-anchor="start" fill="#94A3B8" dy=".8em">هنجار بک</text>
|
|
77
|
+
<path d="M -23.5 107 l 7 0 m 0 0 l -3 -3 m 3 3 l -3 3" stroke="#94A3B8" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round"/>
|
|
78
|
+
<text x="-16" y="61" font-size="13" font-weight="500" text-anchor="start" fill="#64748B" dy=".8em">نمره کل</text>
|
|
79
|
+
<text x="-16" y="78" font-size="13" font-weight="600" text-anchor="start" fill="#475569" dy=".8em">{{total.percentageText}}{{ternary (boolean total.percentage '===' 0) '' ' ٪'}}</text>
|
|
80
|
+
</g>
|
|
81
|
+
<g transform="translate(27, 181)">
|
|
82
|
+
<g>
|
|
83
|
+
<rect width="840" height="32" rx="4" fill="url(#titlebg)" />
|
|
84
|
+
|
|
85
|
+
<text x="24" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">نمره</text>
|
|
86
|
+
<rect x="48" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
87
|
+
|
|
88
|
+
<text x="300.5" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">متن پاسخ</text>
|
|
89
|
+
<rect x="553" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
90
|
+
|
|
91
|
+
<text x="590.5" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">گزینهٔ پاسخ</text>
|
|
92
|
+
<rect x="628" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
93
|
+
|
|
94
|
+
<text x="708.5" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">نشانه</text>
|
|
95
|
+
<rect x="789" y="10" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
96
|
+
|
|
97
|
+
<text x="814" y="16" dy=".3em" font-weight="700" font-size="12" fill="#FFFFFF" text-anchor="middle">سوال</text>
|
|
98
|
+
</g>
|
|
99
|
+
<g transform="translate(0, 33)">
|
|
100
|
+
{{#each sorted}}
|
|
101
|
+
<g transform="translate(0, {{math @index '*' 31}})">
|
|
102
|
+
{{# if alert}}
|
|
103
|
+
<g transform="translate(846.11, 7.04)">
|
|
104
|
+
<path d="M 8.889 5.629 v 3.5556 m 0 2.6667 h 0.0089 m -1.464 -11.0303 l -7.2053 12.0303 c -0.1485 0.2572 -0.2271 0.5488 -0.228 0.8459 c -0.0009 0.297 0.0761 0.5891 0.2231 0.8472 c 0.1471 0.258 0.3591 0.4731 0.6151 0.6238 c 0.256 0.1507 0.5469 0.2317 0.844 0.2351 h 14.4125 c 0.2968 -0.0035 0.5877 -0.0845 0.8435 -0.2352 c 0.2559 -0.1506 0.4679 -0.3656 0.6149 -0.6235 c 0.147 -0.258 0.224 -0.5499 0.2233 -0.8468 c -0.0008 -0.2969 -0.0792 -0.5884 -0.2275 -0.8456 l -7.2053 -12.0321 c -0.1516 -0.2502 -0.3652 -0.4571 -0.6201 -0.6007 c -0.2549 -0.1436 -0.5425 -0.219 -0.8351 -0.219 c -0.2926 0 -0.5802 0.0754 -0.8351 0.219 c -0.2549 0.1436 -0.4685 0.3505 -0.6201 0.6007 v 0.0009 z" fill="none" stroke="#E11D48" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
105
|
+
</g>
|
|
106
|
+
{{/if}}
|
|
107
|
+
<rect width="840" height="30" rx="4" fill="{{color}}" />
|
|
108
|
+
|
|
109
|
+
<text x="24" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{option}}</text>
|
|
110
|
+
<rect x="48" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
111
|
+
|
|
112
|
+
<text x="300.5" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{text}}</text>
|
|
113
|
+
<rect x="553" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
114
|
+
|
|
115
|
+
<text x="590.5" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{user_answered}}</text>
|
|
116
|
+
<rect x="628" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
117
|
+
|
|
118
|
+
<text x="708.5" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{label}}</text>
|
|
119
|
+
<rect x="789" y="9" width="1" height="12" rx="0.5" fill="#E2E8F0"/>
|
|
120
|
+
|
|
121
|
+
<text x="814" y="15" dy=".3em" font-weight="500" font-size="12" fill="#475569" text-anchor="middle">{{i}}</text>
|
|
122
|
+
</g>
|
|
123
|
+
{{/each}}
|
|
124
|
+
</g>
|
|
125
|
+
</g>
|
|
126
|
+
{{# if total.alert}}
|
|
127
|
+
<g transform="translate(356.5, 632)">
|
|
128
|
+
<rect width="180" height="32" fill="none" stroke="#E2E8F0" rx="16" />
|
|
129
|
+
<text x="32" y="16" font-size="11" font-weight="400" text-anchor="end" fill="#57534E" dy=".3em">خطر بالقوه خودکشی</text>
|
|
130
|
+
<g transform="translate(128, 8)">
|
|
131
|
+
<path d="M 8.889 5.629 v 3.5556 m 0 2.6667 h 0.0089 m -1.464 -11.0303 l -7.2053 12.0303 c -0.1485 0.2572 -0.2271 0.5488 -0.228 0.8459 c -0.0009 0.297 0.0761 0.5891 0.2231 0.8472 c 0.1471 0.258 0.3591 0.4731 0.6151 0.6238 c 0.256 0.1507 0.5469 0.2317 0.844 0.2351 h 14.4125 c 0.2968 -0.0035 0.5877 -0.0845 0.8435 -0.2352 c 0.2559 -0.1506 0.4679 -0.3656 0.6149 -0.6235 c 0.147 -0.258 0.224 -0.5499 0.2233 -0.8468 c -0.0008 -0.2969 -0.0792 -0.5884 -0.2275 -0.8456 l -7.2053 -12.0321 c -0.1516 -0.2502 -0.3652 -0.4571 -0.6201 -0.6007 c -0.2549 -0.1436 -0.5425 -0.219 -0.8351 -0.219 c -0.2926 0 -0.5802 0.0754 -0.8351 0.219 c -0.2549 0.1436 -0.4685 0.3505 -0.6201 0.6007 v 0.0009 z" fill="none" stroke="#E11D48" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
132
|
+
</g>
|
|
133
|
+
</g>
|
|
134
|
+
{{/if}}
|
|
135
|
+
</g>
|
|
136
|
+
|
|
137
|
+
{{/layout}}
|