@baravak/risloo-profile-cli 4.4.2 → 4.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baravak/risloo-profile-cli",
3
- "version": "4.4.2",
3
+ "version": "4.6.0",
4
4
  "description": "**Risloo Profile CLI** is a library for creating profiles, reports and sheets for *psychological* samples.",
5
5
  "main": "bin/risloo.js",
6
6
  "publishConfig": {
@@ -0,0 +1 @@
1
+ {"id":"$X1H12Y266","scale":{"id":"$GHQ28-93","title":"آزمون سلامت عمومی"},"version":"1","edition":"","edition_version":null,"client":{"id":"GH9666XXXX","name":"مراجع"},"room":{"id":"RS96XXXX","manager":{"id":"GH9XXXX","name":"درمانگر","user_id":"IR9XXXXX","avatar":null},"center":{"id":"RS96XXXXX","acceptation":null,"status":"active","type":"counseling_center","detail":{"title":"مرکز"}},"acceptation":null,"status":"active","type":"room"},"code":null,"created_at":1705939691,"started_at":1705947533,"scored_at":1709800667,"closed_at":1705947855,"total_amount":0,"prepayment":false,"purchased":false,"amount":0,"billing":null,"description":"## دستور اجرای آزمون\n\nمی‌خواهیم درباره کسالت و ناراحتی‌های پزشکی و اینکه سلامت عمومی‌شما در طی یک ماه گذشته تا به امروز چگونه بوده است، اطلاعاتی به دست آوریم.\n\nلطفاً در تمامی سوال‌های زیر، پاسخی را که فکر می‌کنید با وضع شما بیشتر مطابقت دارد مشخص کنید. به خاطر داشته باشید که ما می‌خواهیم درباره ناراحتی‌های اخیر شما اطلاعاتی به دست آوریم، نه مشکلات و ناراحتی‌هایی که در گذشته داشته‌اید.\n\nسعی کنید به تمامی سوال‌ها پاسخ دهید.","psychologist_description":null,"items":[{"type":"text","text":"آیا از یک ماه گذشته تا به امروز کاملاً احساس کرده‌اید که خوب و سالم هستید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"4"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که به داروهای تقویتی نیاز دارید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"4"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس ضعف و سستی کرده‌اید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"4"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که بیمار هستید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"4"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز سردرد داشته‌اید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"3"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که سرتان را محکم با چیزی مثل دستمال بسته‌اند یا اینکه فشاری به سرتان وارد می‌شود؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"3"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که بعضی وقت‌ها بدنتان داغ و یا سرد می‌شود؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"3"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز اتفاق افتاده که بر اثر اثر نگرانی دچار بی‌خوابی شده باشید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز شب‌ها وسط خواب بیدار می‌شوید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که دائماً تحت فشار هستید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"3"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز عصبانی و بد خلق شده‌اید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"3"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز بدون هیچ دلیل قانع کننده‌ایهراسان و یا وحشت‌زده شده‌اید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز متوجه شده‌اید که انجام هر کاری از توانایی شما خارج است؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که در تمامی مدت عصبی هستید و دل شوره دارید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز توانسته‌اید خودتان را مشغول و سرگرم نگه دارید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز اتفاق افتاده که وقت بیشتری را صرف انجام کارها نمایید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز به طور کلی احساس کرده‌اید که کارها را به خوبی انجام می‌دهید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز از نحوه انجام کارهایتان احساس رضایت می‌کنید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که نقش مفیدی در انجام کارها به عهده دارید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز توانایی تصمیم گیری درباره مسائل را داشته‌اید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز قادر بوده‌اید از فعالیت‌های روزمره زندگی لذت ببرید؟","answer":{"type":"optional","options":["بیشتر از همیشه","مثل همیشه","بدتر از همیشه","خیلی بدتر از همیشه"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز فکر کرده‌اید که شخص بی‌ارزشی هستید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"1"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که زندگی کاملاً ناامید کننده است؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که زندگی ارزش زنده بودن را ندارد؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"1"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز به این مسئله فکر کرده‌اید که ممکن است دست به خودکشی بزنید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"1"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز احساس کرده‌اید که چون اعصابتان خراب است نمی‌توانید کاری انجام دهید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"3"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز به این نتیجه رسیده اید که ای کاش مرده بودی و کلاً از شر زندگی خلاص می‌شدید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"2"},{"type":"text","text":"آیا از یک ماه گذشته تا به امروز این فکر به ذهنتان رسیده است که بخواهید که زندگی خاتمه دهید؟","answer":{"type":"optional","options":["خیر","کمی","زیاد","خیلی زیاد"]},"user_answered":"1"}],"prerequisites":[{"type":"text","label":"gender","text":"جنسیت","answer":{"type":"select","options":["زن","مرد"]},"alias":"gender","force":true,"user_answered":"1"},{"type":"text","label":"age","text":"سن","answer":{"type":"number"},"alias":"age","force":true,"user_answered":"30"},{"type":"text","label":"education","text":"تحصیلات","answer":{"type":"select","options":["ابتدایی اول","ابتدایی دوم","متوسطه اول","متوسطه دوم","دیپلم","کارشناسی","کارشناسی ارشد","پزشکی عمومی","متخصص","دکتری تخصصی","حوزوی مقدمات","حوزوی سطح۱","حوزوی سطح۲","حوزوی سطح۳","حوزوی سطح۴"]},"alias":"education","force":true,"user_answered":"5"},{"type":"text","label":"marital_status","text":"وضعیت تأهل","answer":{"type":"select","options":["مجرد","متأهل"]},"alias":"marital_status","force":true,"user_answered":"1"}],"cornometer":5,"score":{"raw":38,"range":1,"a":18,"a_range":3,"b":9,"b_range":1,"c":7,"c_range":1,"d":4,"d_range":0},"score_current_version":"1.0.0","score_last_version":"1.0.0"}
@@ -0,0 +1,805 @@
1
+ {
2
+ "id": "$X1HQXXXX",
3
+ "scale": {
4
+ "id": "$LEIPAD-93",
5
+ "title": "پرسشنامه کیفیت زندگی سالمندان لیپاد"
6
+ },
7
+ "chain": null,
8
+ "version": "1",
9
+ "edition": "",
10
+ "edition_version": null,
11
+ "client": {
12
+ "id": "GH96XXXX",
13
+ "name": "تست",
14
+ "user_id": "IR96XXXX"
15
+ },
16
+ "room": {
17
+ "id": "RS966XXXX",
18
+ "manager": {
19
+ "id": "GH96XXXX",
20
+ "name": "درمانگر",
21
+ "user_id": "IR9XXXX",
22
+ "avatar": null
23
+ },
24
+ "center": {
25
+ "id": "RS9XXXX",
26
+ "status": "active",
27
+ "type": "counseling_center",
28
+ "detail": {
29
+ "title": "مرکز"
30
+ }
31
+ },
32
+ "status": "active",
33
+ "type": "room"
34
+ },
35
+ "case": null,
36
+ "code": null,
37
+ "created_at": 1713601252,
38
+ "started_at": 1713602227,
39
+ "scored_at": 1713604341,
40
+ "closed_at": 1713602790,
41
+ "total_amount": null,
42
+ "prepayment": false,
43
+ "purchased": true,
44
+ "amount": null,
45
+ "billing": null,
46
+ "description": null,
47
+ "psychologist_description": null,
48
+ "items": [
49
+ {
50
+ "type": "text",
51
+ "text": "وضعیت کلی سلامتی خود را چگونه درجه‌بندی می‌کنید؟",
52
+ "answer": {
53
+ "type": "optional",
54
+ "options": [
55
+ "بسیار خوب",
56
+ "خوب",
57
+ "بد",
58
+ "بسیار بد"
59
+ ]
60
+ },
61
+ "user_answered": "3"
62
+ },
63
+ {
64
+ "type": "text",
65
+ "text": "آیا قادر هستید بدون کمک، از پله‌ها بالا و پایین بروید؟",
66
+ "answer": {
67
+ "type": "optional",
68
+ "options": [
69
+ "بدون سختی",
70
+ "با سختی",
71
+ "فقط با کمک",
72
+ "هیچ نمی‌توانم"
73
+ ]
74
+ },
75
+ "user_answered": "3"
76
+ },
77
+ {
78
+ "type": "text",
79
+ "text": "آیا قادر هستید خودتان لباس بپوشید؟",
80
+ "answer": {
81
+ "type": "optional",
82
+ "options": [
83
+ "بدون سختی",
84
+ "با سختی",
85
+ "فقط با کمک",
86
+ "هیچ نمی‌توانم"
87
+ ]
88
+ },
89
+ "user_answered": "3"
90
+ },
91
+ {
92
+ "type": "text",
93
+ "text": "آیا قادر هستید خودتان غذا بخورید؟",
94
+ "answer": {
95
+ "type": "optional",
96
+ "options": [
97
+ "بدون سختی",
98
+ "با سختی",
99
+ "فقط با کمک",
100
+ "هیچ نمی‌توانم"
101
+ ]
102
+ },
103
+ "user_answered": "4"
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "آقا قادر هستید خودتان حمام کنید یا دوش بگیرید؟",
108
+ "answer": {
109
+ "type": "optional",
110
+ "options": [
111
+ "بدون سختی",
112
+ "با سختی",
113
+ "فقط با کمک",
114
+ "هیچ نمی‌توانم"
115
+ ]
116
+ },
117
+ "user_answered": "4"
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "آیا مشکلات خواب دارید؟",
122
+ "answer": {
123
+ "type": "optional",
124
+ "options": [
125
+ "هیچ‌وقت",
126
+ "به ندرت",
127
+ "اکثر اوقات",
128
+ "همیشه"
129
+ ]
130
+ },
131
+ "user_answered": "1"
132
+ },
133
+ {
134
+ "type": "text",
135
+ "text": "آیا بدون انجام دادن فعالیت خسته می‌شوید؟",
136
+ "answer": {
137
+ "type": "optional",
138
+ "options": [
139
+ "هیچ‌وقت",
140
+ "به ندرت",
141
+ "اکثر اوقات",
142
+ "همیشه"
143
+ ]
144
+ },
145
+ "user_answered": "3"
146
+ },
147
+ {
148
+ "type": "text",
149
+ "text": "آیا در متمرکز نمودن حواس مشکل دارید؟",
150
+ "answer": {
151
+ "type": "optional",
152
+ "options": [
153
+ "هیچ‌وقت",
154
+ "به ندرت",
155
+ "اکثر اوقات",
156
+ "همیشه"
157
+ ]
158
+ },
159
+ "user_answered": "2"
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "آیا می‌توانید وظایف معمولی خودتان را در خانه، محل کار یا جاهای دیگر انجام دهید؟",
164
+ "answer": {
165
+ "type": "optional",
166
+ "options": [
167
+ "بله، کاملاً می‌توانم",
168
+ "بیشتر کارها را می‌توانم",
169
+ "تنها بعضی کارها را می‌توانم",
170
+ "هیچ نمی‌توانم"
171
+ ]
172
+ },
173
+ "user_answered": "3"
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "آیا می‌‌توانید خودتان خرید نمایید؟",
178
+ "answer": {
179
+ "type": "optional",
180
+ "options": [
181
+ "بدون سختی",
182
+ "با سختی",
183
+ "فقط با کمک",
184
+ "هیچ نمی‌توانم"
185
+ ]
186
+ },
187
+ "user_answered": "1"
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "آیا می‌توانید با وسایل نقلیه عمومی رفت و آمد کنید؟",
192
+ "answer": {
193
+ "type": "optional",
194
+ "options": [
195
+ "بدون سختی",
196
+ "با سختی",
197
+ "فقط با کمک",
198
+ "هیچ نمی‌توانم"
199
+ ]
200
+ },
201
+ "user_answered": "2"
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "چقدر مشکلات جسمی شما (اگر وجود دارد) باعث جلوگیری از انجام کارهای دلخواهتان می‌شود؟",
206
+ "answer": {
207
+ "type": "optional",
208
+ "options": [
209
+ "هیچ",
210
+ "کم",
211
+ "زیاد",
212
+ "بسیار زیاد"
213
+ ]
214
+ },
215
+ "user_answered": "1"
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "آیا اتفاق می‌افتد که گیج شوید یا نتوانید به روشنی فکر کنید؟",
220
+ "answer": {
221
+ "type": "optional",
222
+ "options": [
223
+ "بسیار به ندرت",
224
+ "به ندرت",
225
+ "اکثر اوقات",
226
+ "همیشه"
227
+ ]
228
+ },
229
+ "user_answered": "4"
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "چقدر مشکلات تمرکز حواس شما (اگر وجود دارد) باعث جلوگیری ازانجام کارهای دلخواهتان می‌شود؟",
234
+ "answer": {
235
+ "type": "optional",
236
+ "options": [
237
+ "هیچ",
238
+ "کم",
239
+ "زیاد",
240
+ "بسیار زیاد"
241
+ ]
242
+ },
243
+ "user_answered": "3"
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "حافظه شما چقدر خوب است؟",
248
+ "answer": {
249
+ "type": "optional",
250
+ "options": [
251
+ "بسیار خوب",
252
+ "خوب",
253
+ "ضعیف",
254
+ "بد"
255
+ ]
256
+ },
257
+ "user_answered": "4"
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "چقدر مشکلات حافظه شما (اگر وجود دارد) باعث جلوگیری از انجام کارهای دلخواهتان می‌شود؟",
262
+ "answer": {
263
+ "type": "optional",
264
+ "options": [
265
+ "هیچ",
266
+ "کم",
267
+ "زیاد",
268
+ "بسیار زیاد"
269
+ ]
270
+ },
271
+ "user_answered": "3"
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "با در نظر گرفتن همه موارد چقدر احساس اضطراب می‌کنید؟",
276
+ "answer": {
277
+ "type": "optional",
278
+ "options": [
279
+ "هیچ",
280
+ "کم",
281
+ "زیاد",
282
+ "بسیار زیاد"
283
+ ]
284
+ },
285
+ "user_answered": "3"
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "چقدر احساس اضطراب شما (اگر وجود دارد) باعث جلوگیری از انجام کارهای دلخواهتان می‌شود؟",
290
+ "answer": {
291
+ "type": "optional",
292
+ "options": [
293
+ "هیچ",
294
+ "کم",
295
+ "زیاد",
296
+ "بسیار زیاد"
297
+ ]
298
+ },
299
+ "user_answered": "4"
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "با در نظر گرفتن همه موارد چقدر احساس افسردگی می‌کنید؟",
304
+ "answer": {
305
+ "type": "optional",
306
+ "options": [
307
+ "هیچ",
308
+ "کم",
309
+ "زیاد",
310
+ "بسیار زیاد"
311
+ ]
312
+ },
313
+ "user_answered": "4"
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "چقدر احساس افسردگی شما (اگر وجود دارد) باعث جلوگیری از انجام کارهای دلخواهتان می‌شود؟",
318
+ "answer": {
319
+ "type": "optional",
320
+ "options": [
321
+ "هیچ",
322
+ "کم",
323
+ "زیاد",
324
+ "بسیار زیاد"
325
+ ]
326
+ },
327
+ "user_answered": "4"
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "چقدر از ارتباط و وابستگی‌های اجتماعی‌تان رضایت دارید؟",
332
+ "answer": {
333
+ "type": "optional",
334
+ "options": [
335
+ "بسیار راضی",
336
+ "راضی",
337
+ "ناراضی",
338
+ "بسیار ناراضی"
339
+ ]
340
+ },
341
+ "user_answered": "1"
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "آیا از نظر عاطفی در روابط خود با افراد دیگر احساس رضایت می کنید؟",
346
+ "answer": {
347
+ "type": "optional",
348
+ "options": [
349
+ "بسیار زیاد",
350
+ "زیاد",
351
+ "کم",
352
+ "هیچ"
353
+ ]
354
+ },
355
+ "user_answered": "4"
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "آیا به هنگام نیاز، فردی که بتوانید با او درباره موضوعات مشخصی صحبت کنید وجود دارد؟",
360
+ "answer": {
361
+ "type": "optional",
362
+ "options": [
363
+ "تقریباً همیشه",
364
+ "اکثر اوقات",
365
+ "به ندرت",
366
+ "هیچ وقت"
367
+ ]
368
+ },
369
+ "user_answered": "4"
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "آیا به مسائل جنسی علاقه دارید؟",
374
+ "answer": {
375
+ "type": "optional",
376
+ "options": [
377
+ "بسیار زیاد",
378
+ "زیاد",
379
+ "کم",
380
+ "هیچ"
381
+ ]
382
+ },
383
+ "user_answered": "4"
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "روابط جنسی شما در چه حد است؟",
388
+ "answer": {
389
+ "type": "optional",
390
+ "options": [
391
+ "تقریباًً همیشه",
392
+ "اکثر اوقات",
393
+ "به ندرت",
394
+ "هیچ وقت"
395
+ ]
396
+ },
397
+ "user_answered": "1"
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "چقدر از توانایی خود در انجام سرگرمی‌های مورد علاقه و فعالیت‌های تفریحی رضایت دارید؟",
402
+ "answer": {
403
+ "type": "optional",
404
+ "options": [
405
+ "بسیار راضی",
406
+ "راضی",
407
+ "ناراضی",
408
+ "بسیار ناراضی"
409
+ ]
410
+ },
411
+ "user_answered": "3"
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "چقدر از وضعیت مالی خود راضی هستید؟",
416
+ "answer": {
417
+ "type": "optional",
418
+ "options": [
419
+ "بسیار راضی",
420
+ "راضی",
421
+ "ناراضی",
422
+ "بسیار ناراضی"
423
+ ]
424
+ },
425
+ "user_answered": "2"
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "آیا احساس می‌کنید که توانایی تأمین نیازهای ضروری و مورد نیاز زندگی را ندارید؟",
430
+ "answer": {
431
+ "type": "optional",
432
+ "options": [
433
+ "هیچ",
434
+ "کم",
435
+ "زیاد",
436
+ "بسیار زیاد"
437
+ ]
438
+ },
439
+ "user_answered": "3"
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "به طور کلی چقدر از زندگی فعلی خود در مقایسه با گذشته رضایت دارید؟",
444
+ "answer": {
445
+ "type": "optional",
446
+ "options": [
447
+ "بسیار راضی",
448
+ "راضی",
449
+ "ناراضی",
450
+ "بسیار ناراضی"
451
+ ]
452
+ },
453
+ "user_answered": "4"
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "با در نظر گرفتن همه موارد، پیش‌بینی می‌کنید اوضاع آینده چطور پیش برود؟",
458
+ "answer": {
459
+ "type": "optional",
460
+ "options": [
461
+ "بسیار خوب",
462
+ "خوب",
463
+ "ضعیف",
464
+ "بد"
465
+ ]
466
+ },
467
+ "user_answered": "3"
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "چقدر انتظارات شما از آینده باعث جلوگیری از انجام کارهای دلخواهتان می‌شود؟",
472
+ "answer": {
473
+ "type": "optional",
474
+ "options": [
475
+ "هیچ",
476
+ "کم",
477
+ "زیاد",
478
+ "بسیار زیاد"
479
+ ]
480
+ },
481
+ "user_answered": "2"
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "من به راحتی احساس ناراحتی یا عصبانیت می‌کنم.",
486
+ "answer": {
487
+ "type": "optional",
488
+ "options": [
489
+ "هیچ وقت",
490
+ "به ندرت",
491
+ "اکثر اوقات",
492
+ "تقریبا همیشه"
493
+ ]
494
+ },
495
+ "user_answered": "1"
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "حالت‌های طغیانی دارم که نمی‌توانم آن‌ها را کنترل کنم.",
500
+ "answer": {
501
+ "type": "optional",
502
+ "options": [
503
+ "هیچ وقت",
504
+ "به ندرت",
505
+ "اکثر اوقات",
506
+ "تقریبا همیشه"
507
+ ]
508
+ },
509
+ "user_answered": "4"
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "من با دیگران زیاد بحث و جدل می‌کنم.",
514
+ "answer": {
515
+ "type": "optional",
516
+ "options": [
517
+ "هیچ وقت",
518
+ "به ندرت",
519
+ "اکثر اوقات",
520
+ "تقریبا همیشه"
521
+ ]
522
+ },
523
+ "user_answered": "3"
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "من عصبانی می‌شوم.",
528
+ "answer": {
529
+ "type": "optional",
530
+ "options": [
531
+ "هیچ وقت",
532
+ "به ندرت",
533
+ "اکثر اوقات",
534
+ "تقریبا همیشه"
535
+ ]
536
+ },
537
+ "user_answered": "1"
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "با در نظر گرفتن همه موارد، آیا در برابر دیگران احساس حقارت می‌کنید؟",
542
+ "answer": {
543
+ "type": "optional",
544
+ "options": [
545
+ "هیچ",
546
+ "کم",
547
+ "زیاد",
548
+ "بسیار زیاد"
549
+ ]
550
+ },
551
+ "user_answered": "4"
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "چقدر به خاطر احساس حقارت از انجام کارها اجتناب می‌کنید؟",
556
+ "answer": {
557
+ "type": "optional",
558
+ "options": [
559
+ "بسیار به ندرت",
560
+ "به ندرت",
561
+ "اکثر اوقات",
562
+ "همیشه"
563
+ ]
564
+ },
565
+ "user_answered": "4"
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "من نسبت به خودم نظر منفی دارم.",
570
+ "answer": {
571
+ "type": "optional",
572
+ "options": [
573
+ "هیچ",
574
+ "کم",
575
+ "زیاد",
576
+ "بسیار زیاد"
577
+ ]
578
+ },
579
+ "user_answered": "1"
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "چقدر احساس می‌کنید که اغلب مردم قابل اعتماد نیستند؟",
584
+ "answer": {
585
+ "type": "optional",
586
+ "options": [
587
+ "هیچ وقت",
588
+ "به ندرت",
589
+ "اکثر اوقات",
590
+ "تقریبا همیشه"
591
+ ]
592
+ },
593
+ "user_answered": "1"
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "آیا به خدا اعتقاد دارید؟",
598
+ "answer": {
599
+ "type": "optional",
600
+ "options": [
601
+ "بله",
602
+ "خیر"
603
+ ]
604
+ },
605
+ "user_answered": "1"
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "آیا به وسیله چنین اعتقادی (اعتقاد به خدا) آرامش و تکیه‌گاه پیدا می‌کنید؟",
610
+ "answer": {
611
+ "type": "optional",
612
+ "options": [
613
+ "بله",
614
+ "خیر"
615
+ ]
616
+ },
617
+ "user_answered": "2"
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «من همیشه آماده هستم تا به دیگران کمک کنم.»",
622
+ "answer": {
623
+ "type": "optional",
624
+ "options": [
625
+ "نادرست",
626
+ "درست"
627
+ ]
628
+ },
629
+ "user_answered": "1"
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «گاهی اوقات دوست دارم بی‌دلیل صحبت کنم.»",
634
+ "answer": {
635
+ "type": "optional",
636
+ "options": [
637
+ "نادرست",
638
+ "درست"
639
+ ]
640
+ },
641
+ "user_answered": "1"
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «زمان‌هایی بوده است که من نسبت به خوش‌شانسی دیگران حسادت کرده‌ام.»",
646
+ "answer": {
647
+ "type": "optional",
648
+ "options": [
649
+ "نادرست",
650
+ "درست"
651
+ ]
652
+ },
653
+ "user_answered": "2"
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «در چند سال گذشته من اغلب از مشکلاتی که در ارتباط با دیگران داشته‌ام ناراحت بوده‌ام.»",
658
+ "answer": {
659
+ "type": "optional",
660
+ "options": [
661
+ "نادرست",
662
+ "درست"
663
+ ]
664
+ },
665
+ "user_answered": "2"
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «در چند سال گذشته، از ویژگی‌هایی که دارم بیزار هستم.»",
670
+ "answer": {
671
+ "type": "optional",
672
+ "options": [
673
+ "نادرست",
674
+ "درست"
675
+ ]
676
+ },
677
+ "user_answered": "2"
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «در چند سال گذشته، رفتار (من چه در محل کار، چه در خانه و چه در جاهای دیگر) اغلب من را دچار مشکل می‌کند.»",
682
+ "answer": {
683
+ "type": "optional",
684
+ "options": [
685
+ "نادرست",
686
+ "درست"
687
+ ]
688
+ },
689
+ "user_answered": "1"
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «در چند سال گذشته، به نظر می‌رسد دیگران غالباً نسبت به آن‌چه من می‌گویم یا انجام می‌دهم آزرده می‌شوند.»",
694
+ "answer": {
695
+ "type": "optional",
696
+ "options": [
697
+ "نادرست",
698
+ "درست"
699
+ ]
700
+ },
701
+ "user_answered": "2"
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "با توجه به شرایط شما، عبارت زیر درست است یا نادرست؟ «به خاطر ویژگی‌هایی که دارم، در زندگی‌ام آن‌چنان که دوست دارم پیشرفت نکرده‌ام.»",
706
+ "answer": {
707
+ "type": "optional",
708
+ "options": [
709
+ "نادرست",
710
+ "درست"
711
+ ]
712
+ },
713
+ "user_answered": "2"
714
+ }
715
+ ],
716
+ "prerequisites": [
717
+ {
718
+ "type": "text",
719
+ "label": "gender",
720
+ "text": "جنسیت",
721
+ "answer": {
722
+ "type": "select",
723
+ "options": [
724
+ "زن",
725
+ "مرد"
726
+ ]
727
+ },
728
+ "alias": "gender",
729
+ "force": true,
730
+ "user_answered": "1"
731
+ },
732
+ {
733
+ "type": "text",
734
+ "label": "age",
735
+ "text": "سن",
736
+ "answer": {
737
+ "type": "number"
738
+ },
739
+ "alias": "age",
740
+ "force": true,
741
+ "user_answered": "9"
742
+ },
743
+ {
744
+ "type": "text",
745
+ "label": "education",
746
+ "text": "تحصیلات",
747
+ "answer": {
748
+ "type": "select",
749
+ "options": [
750
+ "ابتدایی اول",
751
+ "ابتدایی دوم",
752
+ "متوسطه اول",
753
+ "متوسطه دوم",
754
+ "دیپلم",
755
+ "کارشناسی",
756
+ "کارشناسی ارشد",
757
+ "پزشکی عمومی",
758
+ "متخصص",
759
+ "دکتری تخصصی",
760
+ "حوزوی مقدمات",
761
+ "حوزوی سطح۱",
762
+ "حوزوی سطح۲",
763
+ "حوزوی سطح۳",
764
+ "حوزوی سطح۴"
765
+ ]
766
+ },
767
+ "alias": "education",
768
+ "force": true,
769
+ "user_answered": "11"
770
+ },
771
+ {
772
+ "type": "text",
773
+ "label": "marital_status",
774
+ "text": "وضعیت تأهل",
775
+ "answer": {
776
+ "type": "select",
777
+ "options": [
778
+ "مجرد",
779
+ "متأهل"
780
+ ]
781
+ },
782
+ "alias": "marital_status",
783
+ "force": true,
784
+ "user_answered": "2"
785
+ }
786
+ ],
787
+ "cornometer": 9,
788
+ "score": {
789
+ "physical_functioning": 6,
790
+ "self_care": 11,
791
+ "depression_anxiety": 11,
792
+ "cognitive_functioning": 11,
793
+ "social_functioning": 6,
794
+ "sexual_functioning": 3,
795
+ "life_satisfaction": 11,
796
+ "total_quality_of_life": 59,
797
+ "the_perceived_personality_disorder": 4,
798
+ "the_anger": 5,
799
+ "the_social_desirability": 2,
800
+ "self_esteem": 6,
801
+ "trust_in_god": 1
802
+ },
803
+ "score_current_version": "1.0.0",
804
+ "score_last_version": "1.0.0"
805
+ }
@@ -0,0 +1,85 @@
1
+ const { Profile, FS, Mappings } = require("../Profile");
2
+
3
+ const colorLevel = [
4
+ '#65A30D',
5
+ '#EAB308',
6
+ '#EA580C',
7
+ '#E11D48',
8
+ ]
9
+
10
+ const colorSubLevel = [
11
+ '#BEF264',
12
+ '#FEF08A',
13
+ '#FDBA74',
14
+ '#FDA4AF',
15
+ ]
16
+
17
+ class GHQ2893 extends Profile {
18
+ // Number of pages
19
+ static pages = 1;
20
+
21
+ // Labels of the sample
22
+ labels = {
23
+ L1: { eng: "a", fr: ['نشانه‌های', 'جسمانی']},
24
+ L2: { eng: "b", fr: ['اضطراب و', 'بی‌خوابی']},
25
+ L3: { eng: "c", fr: ['نارساکنش‌وری', 'اجتماعی']},
26
+ L4: { eng: "d", fr: ['افسردگی']},
27
+
28
+ L5: { eng: "raw", fr: "وسواسی - اجباری"},
29
+ L6: { eng: "range", fr: "وسواسی - اجباری"},
30
+
31
+ L7: { eng: "a_range"},
32
+ L8: { eng: "b_range"},
33
+ L9: { eng: "c_range"},
34
+ L10: { eng: "d_range"},
35
+ };
36
+
37
+ profileSpec = {
38
+ /* "sample" determines some important info about the sample and profile */
39
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
40
+ /* "prerequisites" is synonym to "fields" in our program */
41
+ sample: {
42
+ name: "پرسشنامه سلامت عمومی" /* Name of the sample */,
43
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
44
+ questions: false /* Determines whether to get questions from inital dataset or not */,
45
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
46
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
47
+ },
48
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
49
+ /* calculating its dimensions carefully is of great importance */
50
+ profile: {
51
+ get dimensions() {
52
+ return {
53
+ width: 477 + 2 * this.padding.x,
54
+ height: 522 + 2 * this.padding.y,
55
+ };
56
+ },
57
+ padding: {
58
+ x: 213,
59
+ y: 96,
60
+ },
61
+ },
62
+
63
+ /* "labels" part which has to be provided for each profile */
64
+ labels: Object.values(this.labels),
65
+ };
66
+
67
+ constructor(dataset, options, config = {}) {
68
+ super();
69
+ this._init(dataset, options, config);
70
+ }
71
+
72
+ _calcContext() {
73
+ const {
74
+ dataset,
75
+ } = this;
76
+ const items = dataset.score.slice(0, 4).map((item, i) => {
77
+ return {...item, range: `url(#gradiant-${dataset.score[6 + i].mark ?? 0}-y)`, mark: item.mark ?? 0, eng: item.label.eng.toUpperCase()}
78
+ })
79
+
80
+ const total = {...dataset.score[4], mark: dataset.score[4].mark ?? 0, range: `url(#gradiant-${dataset.score[5].mark ?? 0}-x)`, ranger:dataset.score[5].mark ?? 0};
81
+ return [{ items, total }];
82
+ }
83
+ }
84
+
85
+ module.exports = GHQ2893;
@@ -0,0 +1,72 @@
1
+ const { Profile, FS } = require("../Profile");
2
+
3
+ class LEIPAD93 extends Profile {
4
+ // Number of pages
5
+ static pages = 1;
6
+
7
+ // Labels of the sample
8
+ labels = {
9
+ L1 : {eng: "physical_functioning", fr: "مشکل عملکرد فیزیکی", max: 15},
10
+ L2 : {eng: "self_care", fr: "مشکل خودمراقبتی", max: 18},
11
+ L3 : {eng: "depression_anxiety", fr: "مشکل افسردگی و اضطراب", max: 12},
12
+ L4 : {eng: "cognitive_functioning", fr: "مشکل عملکرد شناختی", max: 15},
13
+ L5 : {eng: "social_functioning", fr: "مشکل عملکرد اجتماعی", max: 9},
14
+ L6 : {eng: "sexual_functioning", fr: "مشکل عملکرد جنسی", max: 6},
15
+ L7 : {eng: "life_satisfaction", fr: "مشکل رضایت از زندگی", max: 18},
16
+ L8 : {eng: "total_quality_of_life", fr: "نمره کل مشکل کیفیت زندگی", max: 93},
17
+ L9 : {eng: "the_perceived_personality_disorder", fr: "اختلال شخصیت ادراک شده", max: 6},
18
+ L10 : {eng: "the_anger", fr: "مشکل خشم", max: 4},
19
+ L11 : {eng: "the_social_desirability", fr: "مشکل مطلوبیت اجتماعی", max: 3},
20
+ L12 : {eng: "self_esteem", fr: "مشکل اعتماد به نفس", max: 3},
21
+ L13 : {eng: "trust_in_god", fr: "مشکل اعتماد به خدا", max: 2},
22
+ };
23
+
24
+ profileSpec = {
25
+ /* "sample" determines some important info about the sample and profile */
26
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
27
+ /* "prerequisites" is synonym to "fields" in our program */
28
+ sample: {
29
+ name: "پرسشنامه کیفیت زندگی سالمندان" /* Name of the sample */,
30
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
31
+ questions: false /* Determines whether to get questions from inital dataset or not */,
32
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
33
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
34
+ },
35
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
36
+ /* calculating its dimensions carefully is of great importance */
37
+ profile: {
38
+ get dimensions() {
39
+ return {
40
+ width: 737 + 2 * this.padding.x,
41
+ height: 532 + 2 * this.padding.y,
42
+ };
43
+ },
44
+ padding: {
45
+ x: 83,
46
+ y: 91,
47
+ },
48
+ },
49
+ /* "labels" part which has to be provided for each profile */
50
+ labels: Object.values(this.labels),
51
+ };
52
+
53
+ constructor(dataset, options, config = {}) {
54
+ super();
55
+ this._init(dataset, options, config);
56
+ }
57
+
58
+ _calcContext() {
59
+ const {
60
+ dataset,
61
+ } = this;
62
+
63
+ const g1 = dataset.score.slice(0, 7).map(i => ({...i, mark: i.mark ?? 0, markP: i.mark ? Math.round((i.mark/i.label.max) * 100) : 0}))
64
+ const total = dataset.score[7]
65
+ total.mark = total.mark ?? 0
66
+ total.markP = total.mark ? Math.round((total.mark/total.label.max) * 100) : 0
67
+ const g2 = dataset.score.slice(8, 13).map(i => ({...i, mark: i.mark ?? 0, markP: i.mark ? Math.round((i.mark/i.label.max) * 100) : 0}))
68
+ return [{ g1, g2, total }];
69
+ }
70
+ }
71
+
72
+ module.exports = LEIPAD93;
@@ -0,0 +1,120 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ <linearGradient id="gradiant-3-y" x1="0%" y1="0%" x2="0%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#E11D48;stop-opacity:1" />
5
+ <stop offset="100%" style="stop-color:#FDA4AF;stop-opacity:1" />
6
+ </linearGradient>
7
+ <linearGradient id="gradiant-2-y" x1="0%" y1="0%" x2="0%" y2="100%">
8
+ <stop offset="0%" style="stop-color:#EA580C;stop-opacity:1" />
9
+ <stop offset="100%" style="stop-color:#FDBA74;stop-opacity:1" />
10
+ </linearGradient>
11
+ <linearGradient id="gradiant-1-y" x1="0%" y1="0%" x2="0%" y2="100%">
12
+ <stop offset="0%" style="stop-color:#EAB308;stop-opacity:1" />
13
+ <stop offset="100%" style="stop-color:#FEF08A;stop-opacity:1" />
14
+ </linearGradient>
15
+ <linearGradient id="gradiant-0-y" x1="0%" y1="0%" x2="0%" y2="100%">
16
+ <stop offset="0%" style="stop-color:#65A30D;stop-opacity:1" />
17
+ <stop offset="100%" style="stop-color:#BEF264;stop-opacity:1" />
18
+ </linearGradient>
19
+ <linearGradient id="gradiant-bg-y" x1="0%" y1="100%" x2="0%" y2="0%">
20
+ <stop offset="28.6%" style="stop-color:#F7FEE7;stop-opacity:0.5" />
21
+ <stop offset="52.4%" style="stop-color:#FEFCE8;stop-opacity:0.5" />
22
+ <stop offset="76.2%" style="stop-color:#FFF7ED;stop-opacity:0.5" />
23
+ <stop offset="100%" style="stop-color:#FFF1F2;stop-opacity:0.5" />
24
+ </linearGradient>
25
+
26
+ <linearGradient id="gradiant-3-x" x1="100%" y1="0%" x2="0%" y2="0%">
27
+ <stop offset="0%" style="stop-color:#E11D48;stop-opacity:1" />
28
+ <stop offset="100%" style="stop-color:#FDA4AF;stop-opacity:1" />
29
+ </linearGradient>
30
+ <linearGradient id="gradiant-2-x" x1="100%" y1="0%" x2="0%" y2="0%">
31
+ <stop offset="0%" style="stop-color:#EA580C;stop-opacity:1" />
32
+ <stop offset="100%" style="stop-color:#FDBA74;stop-opacity:1" />
33
+ </linearGradient>
34
+ <linearGradient id="gradiant-1-x" x1="100%" y1="0%" x2="0%" y2="0%">
35
+ <stop offset="0%" style="stop-color:#EAB308;stop-opacity:1" />
36
+ <stop offset="100%" style="stop-color:#FEF08A;stop-opacity:1" />
37
+ </linearGradient>
38
+ <linearGradient id="gradiant-0-x" x1="100%" y1="0%" x2="0%" y2="0%">
39
+ <stop offset="0%" style="stop-color:#65A30D;stop-opacity:1" />
40
+ <stop offset="100%" style="stop-color:#BEF264;stop-opacity:1" />
41
+ </linearGradient>
42
+ <linearGradient id="gradiant-bg-x" x1="0%" y1="0%" x2="100%" y2="0%">
43
+ <stop offset="26.19%" style="stop-color:#F7FEE7;stop-opacity:0.5" />
44
+ <stop offset="47.6%" style="stop-color:#FEFCE8;stop-opacity:0.5" />
45
+ <stop offset="71.4%" style="stop-color:#FFF7ED;stop-opacity:0.5" />
46
+ <stop offset="100%" style="stop-color:#FFF1F2;stop-opacity:0.5" />
47
+ </linearGradient>
48
+ <filter id="shadow" x="0.5" y="0.5" width="480" height="7" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
49
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
50
+ <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"/>
51
+ <feOffset dy="-1"/>
52
+ <feGaussianBlur stdDeviation="1.5"/>
53
+ <feComposite in2="hardAlpha" operator="out"/>
54
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
55
+ <feBlend mode="normal" in2="BackgroundImageFix" result="dropshadow"/>
56
+ <feBlend mode="normal" in="SourceGraphic" in2="dropshadow" result="shape"/>
57
+ </filter>
58
+ </defs>
59
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
60
+ <g transform="translate(1.5, 0.5)">
61
+ {{#each items as |item index|}}
62
+ <g transform="translate({{math 122 '+' (math 88 '*' index) }}, 5)">
63
+ {{bar 28 315 (object tr=4 br=0 bl=0 tl=4) (toRad 0) fill="url(#gradiant-bg-y)"}}
64
+ </g>
65
+ {{/each}}
66
+ <line x1="1" y1="1" x2="383" y2="1" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="6 6" transform="translate(59, 4.5)"/>
67
+ <text y="4.5" x="43" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="start" dy=".35em">21</text>
68
+ <text font-size="13px" font-weight="400" fill="#E11D48" text-anchor="middle" dy=".7em" transform="rotate(-90) translate(-41.5, 60)">شدید</text>
69
+
70
+ <line x1="1" y1="1" x2="383" y2="1" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="6 6" transform="translate(59, 78.5)"/>
71
+ <text y="78.5" x="43" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="start" dy=".35em">16</text>
72
+ <text font-size="13px" font-weight="400" fill="#EA580C" text-anchor="middle" dy=".7em" transform="rotate(-90) translate(-115.5, 60)">متوسط</text>
73
+
74
+ <line x1="1" y1="1" x2="383" y2="1" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="6 6" transform="translate(59, 154.5)"/>
75
+ <text y="154.5" x="43" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="start" dy=".35em">11</text>
76
+ <text font-size="13px" font-weight="400" fill="#EAB308" text-anchor="middle" dy=".7em" transform="rotate(-90) translate(-191.5, 60)">خفیف</text>
77
+
78
+ <line x1="1" y1="1" x2="383" y2="1" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="6 6" transform="translate(59, 228.5)"/>
79
+ <text y="228.5" x="43" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="start" dy=".35em">6</text>
80
+ <text font-size="13px" font-weight="400" fill="#65A30D" text-anchor="middle" dy=".7em" transform="rotate(-90) translate(-273, 60)">کمترین حد</text>
81
+
82
+ {{#each items as |item index|}}
83
+ <g transform="translate({{math 122 '+' (math 88 '*' index) }}, {{math 5 '+' (math 15 '*' (math 21 '-' mark)) }})">
84
+ {{bar 28 (math 15 '*' mark) (object tr=4 br=0 bl=0 tl=4) (toRad 0) fill=range}}
85
+ <text y="{{ternary (boolean mark '>' 1) 8 -20}}" x="14" font-size="16px" font-weight="500" fill="{{ternary (boolean mark '>' 1) '#ffffff' '#65a30d'}}" text-anchor="middle" dy=".75em">{{mark}}</text>
86
+ </g>
87
+ <text y="335" x="{{math 136 '+' (math 88 '*' index) }}" font-size="13px" font-weight="400" fill="#4B5563" text-anchor="middle" dy="1em">{{eng}}</text>
88
+ <text y="353" x="{{math 136 '+' (math 88 '*' index) }}" font-size="13px" font-weight="400" fill="#4B5563" text-anchor="middle" dy="1em">{{label.fr.[0]}}</text>
89
+ <text y="368" x="{{math 136 '+' (math 88 '*' index) }}" font-size="13px" font-weight="400" fill="#4B5563" text-anchor="middle" dy="1em">{{label.fr.[1]}}</text>
90
+ {{/each}}
91
+ <g opacity="0.5" filter="url(#shadow)" transform="translate(0, 316)">
92
+ <line x1="4" y1="5" x2="477" y2="5" stroke="white" stroke-linecap="round"/>
93
+ </g>
94
+ <g transform="translate(0.5, 457.5)">
95
+ <g transform="translate(48, 0.5)">
96
+ {{bar 420 28 (object tr=4 br=4 bl=0 tl=0) (toRad 0) fill="url(#gradiant-bg-x)"}}
97
+ {{bar (math 5 '*' total.mark) 28 (object tr=4 br=4 bl=0 tl=0) (toRad 0) fill=total.range}}
98
+ <text x="{{ternary (boolean total.mark '>' 5) (math (math 5 '*' total.mark) '-' 8) (math (math 5 '*' total.mark) '+' 20)}}" y="14" font-size="16px" font-weight="600" fill="{{ternary (boolean total.mark '>' 5) '#ffffff' '#ea580c'}}" text-anchor="start" dy=".35em">{{total.mark}}</text>
99
+ </g>
100
+ <text y="14" x="0" font-size="13px" font-weight="500" fill="#4B5563" text-anchor="end" dy=".35em">نمره کل</text>
101
+ <line x1="158" y1="32.5" x2="158" y2="48.5" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="3 4"/>
102
+ <text y="52.5" x="158" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="middle" dy=".9em">22</text>
103
+ <text y="40.5" x="103" font-size="12px" font-weight="{{ternary (boolean total.ranger '==' 0) 600 400}}" fill="{{ternary (boolean total.ranger '==' 0) '#65A30D' '#9CA3AF'}}" text-anchor="middle" dy=".9em">کمترین حد</text>
104
+
105
+ <line x1="248" y1="32.5" x2="248" y2="48.5" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="3 4"/>
106
+ <text y="52.5" x="248" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="middle" dy=".9em">40</text>
107
+ <text y="40.5" x="203" font-size="12px" font-weight="{{ternary (boolean total.ranger '==' 1) 600 400}}" fill="{{ternary (boolean total.ranger '==' 1) '#EAB308' '#9CA3AF'}}" text-anchor="middle" dy=".9em">خفیف</text>
108
+
109
+ <line x1="348" y1="32.5" x2="348" y2="48.5" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="3 4"/>
110
+ <text y="52.5" x="348" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="middle" dy=".9em">60</text>
111
+ <text y="40.5" x="298" font-size="12px" font-weight="{{ternary (boolean total.ranger '==' 2) 600 400}}" fill="{{ternary (boolean total.ranger '==' 2) '#EA580C' '#9CA3AF'}}" text-anchor="middle" dy=".9em">متوسط</text>
112
+
113
+ <line x1="468" y1="32.5" x2="468" y2="48.5" stroke="#E5E7EB" stroke-linecap="round" stroke-dasharray="3 4"/>
114
+ <text y="52.5" x="468" font-size="12px" font-weight="400" fill="#9CA3AF" text-anchor="middle" dy=".9em">84</text>
115
+ <text y="40.5" x="408" font-size="12px" font-weight="{{ternary (boolean total.ranger '==' 3) 600 400}}" fill="{{ternary (boolean total.ranger '==' 3) '#E11D48' '#9CA3AF'}}" text-anchor="middle" dy=".9em">شدید</text>
116
+ </g>
117
+ </g>
118
+ </g>
119
+
120
+ {{/layout}}
@@ -0,0 +1,142 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="0%">
4
+ <stop offset="0%" style="stop-color:#F0FDF4;stop-opacity:0.8" />
5
+ <stop offset="100%" style="stop-color:#FEF2F2;stop-opacity:0.8" />
6
+ </linearGradient>
7
+ <linearGradient id="g1" x1="0%" y1="0%" x2="100%" y2="0%">
8
+ <stop offset="0%" style="stop-color:#94A3B8;stop-opacity:1" />
9
+ <stop offset="100%" style="stop-color:#0E7490;stop-opacity:1" />
10
+ </linearGradient>
11
+
12
+ <linearGradient id="g2" x1="0%" y1="0%" x2="100%" y2="0%">
13
+ <stop offset="0%" style="stop-color:#94A3B8;stop-opacity:1" />
14
+ <stop offset="100%" style="stop-color:#1D4ED8;stop-opacity:1" />
15
+ </linearGradient>
16
+ <filter id="filter" x="0.5" y="0" width="7" height="470" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
17
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
18
+ <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"/>
19
+ <feOffset dx="1"/>
20
+ <feGaussianBlur stdDeviation="1.5"/>
21
+ <feComposite in2="hardAlpha" operator="out"/>
22
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
23
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect"/>
24
+ <feBlend mode="normal" in="SourceGraphic" in2="effect" result="shape"/>
25
+ </filter>
26
+ <filter id="filter-total" x="0" y="0.5" width="34" height="14" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
27
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
28
+ <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"/>
29
+ <feOffset dx="2"/>
30
+ <feGaussianBlur stdDeviation="3"/>
31
+ <feComposite in2="hardAlpha" operator="out"/>
32
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
33
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19887_86132"/>
34
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19887_86132" result="shape"/>
35
+ </filter>
36
+ </defs>
37
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
38
+ <g transform="translate(152.5, 0)">
39
+ <text x="0" y="0" text-anchor="middle" dy=".25em" fill="#94A3B8" font-size="12px" font-weight="400">0</text>
40
+ <text x="400" y="0" text-anchor="middle" dy=".25em" fill="#94A3B8" font-size="12px" font-weight="400">100 ٪</text>
41
+ <g transform="translate(0, 20)">
42
+ <rect x="0" y="0" width="400" height="464" fill="url(#bg)" />
43
+ <line x1="40" x2="40" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
44
+ <line x1="80" x2="80" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
45
+ <line x1="120" x2="120" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
46
+ <line x1="160" x2="160" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
47
+ <line x1="200" x2="200" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
48
+ <line x1="240" x2="240" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
49
+ <line x1="280" x2="280" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
50
+ <line x1="320" x2="320" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
51
+ <line x1="360" x2="360" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
52
+ <line x1="400" x2="400" y1="0.5" y2="462.5" stroke="#E2E8F0" stroke-opacity="0.6" stroke-linecap="round" stroke-dasharray="6 6"/>
53
+ </g>
54
+ <text x="-7.5" y="38" text-anchor="start" dy=".25em" fill="#334155" font-size="12px" font-weight="600">
55
+ حوزه‌ها
56
+ </text>
57
+ <text x="7.5" y="38" text-anchor="end" dy=".25em" fill="#15803D" font-size="12px" font-weight="500">
58
+ عدم وجود مشکل
59
+ </text>
60
+
61
+ <text x="407.5" y="38" text-anchor="end" dy=".25em" fill="#334155" font-size="12px" font-weight="600">
62
+ نمرات
63
+ </text>
64
+ <text x="393.5" y="38" text-anchor="start" dy=".25em" fill="#BE123C" font-size="12px" font-weight="500">
65
+ وجود مشکل بیشتر
66
+ </text>
67
+ <text x="200" y="516" text-anchor="middle" fill="#475569" font-size="14px" font-weight="400">
68
+ <tspan>هر چه</tspan>
69
+ <tspan fill="#64748B" font-weight="600">نمره و درصد</tspan>
70
+ <tspan fill="#BE123C" font-weight="600">بیشتر</tspan>
71
+ <tspan>باشد، به معنای</tspan>
72
+ <tspan fill="#BE123C" font-weight="600">وجود مشکل بیشتر</tspan>
73
+ <tspan>است.</tspan>
74
+ </text>
75
+ </g>
76
+ <g transform="translate(152.5, 76)">
77
+ {{#each g1 as |item index|}}
78
+ <g transform="translate(0, {{math 28 '*' index }})">
79
+ {{bar 400 16 (object br=2 tr=2 bl=0 tl=0) (toRad 0) fill="#000000" opacity="0.04"}}
80
+ {{bar (math item.markP '*' 4) 16 (object br=2 tr=2 bl=0 tl=0) (toRad 0) fill="url(#g1)"}}
81
+ <text x="-7.5" y="8" text-anchor="start" dy=".25em" fill="#475569" font-size="13px" font-weight="400">
82
+ {{item.label.fr}}
83
+ </text>
84
+ <text x="{{math (math item.markP '*' 4) '-' 4}}" y="8" text-anchor="start" dy=".3em" fill="#FFFFFF" font-size="12px" font-weight="500">
85
+ {{item.markP}} ٪
86
+ </text>
87
+ <text x="408" y="8" text-anchor="start" dy=".3em" direction="ltr">
88
+ <tspan fill="#0E7490" font-size="18px" font-weight="700">{{item.mark}}</tspan>
89
+ <tspan fill="#64748B" font-size="12px" font-weight="300">/</tspan>
90
+ <tspan fill="#64748B" font-size="13px" font-weight="400">{{item.label.max}}</tspan>
91
+ </text>
92
+ </g>
93
+ {{/each}}
94
+ </g>
95
+
96
+ <g transform="translate(152.5, 332)">
97
+ {{#each g2 as |item index|}}
98
+ <g transform="translate(0, {{math 28 '*' index }})">
99
+ {{bar 400 16 (object br=2 tr=2 bl=0 tl=0) (toRad 0) fill="#000000" opacity="0.04"}}
100
+ {{bar (math item.markP '*' 4) 16 (object br=2 tr=2 bl=0 tl=0) (toRad 0) fill="url(#g2)"}}
101
+ <text x="-7.5" y="8" text-anchor="start" dy=".25em" fill="#475569" font-size="13px" font-weight="400">
102
+ {{item.label.fr}}
103
+ </text>
104
+ <text x="{{math (math item.markP '*' 4) '-' 4}}" y="8" text-anchor="start" dy=".3em" fill="#FFFFFF" font-size="12px" font-weight="500">
105
+ {{item.markP}} ٪
106
+ </text>
107
+ <text x="408" y="8" text-anchor="start" dy=".3em" direction="ltr">
108
+ <tspan fill="#1D4ED8" font-size="18px" font-weight="700">{{item.mark}}</tspan>
109
+ <tspan fill="#64748B" font-size="12px" font-weight="300">/</tspan>
110
+ <tspan fill="#64748B" font-size="13px" font-weight="400">{{item.label.max}}</tspan>
111
+ </text>
112
+ </g>
113
+ {{/each}}
114
+ </g>
115
+ <g opacity="0.3" filter="url(#filter)" transform="translate(149, 16)">
116
+ <line x1="3" y1="3.5" x2="3" y2="466.5" stroke="white" stroke-linecap="round"/>
117
+ </g>
118
+
119
+ <g transform="translate(674, 68.5)">
120
+ {{bar 18 186 (object tl=2 tr=2 bl=0 br=0) (toRad 0) fill="#F1F5F9" transform="translate(19, 5)"}}
121
+ <g transform="translate(0, {{math 186 '-' (math total.mark '*' 2)}})">
122
+ {{bar 18 (math total.mark '*' 2) (object tl=2 tr=2 bl=0 br=0) (toRad 0) fill="#475569" transform="translate(19, 5)"}}
123
+ </g>
124
+ <text x="43" y="{{math 186 '-' (math total.mark '*' 2)}}" text-anchor="end" dy=".3em" fill="#334155" font-size="18px" font-weight="600">
125
+ {{total.mark}}
126
+ </text>
127
+ <text x="43" y="{{math 186 '-' (math total.mark '*' 2)}}" text-anchor="end" dy="1.5em" fill="#64748B" font-size="12px" font-weight="400">
128
+ {{total.markP}} ٪
129
+ </text>
130
+ <text x="14" y="0" text-anchor="start" dy=".7em" fill="#64748B" font-size="12px" font-weight="400">
131
+ 93
132
+ </text>
133
+ <text text-anchor="start" fill="#64748B" font-size="12px" font-weight="400" transform="translate(8, 45) rotate(-90)">
134
+ نمره کل مشکل در کیفیت زندگی
135
+ </text>
136
+ <g transform="translate(12.5, 186)" opacity="0.5" filter="url(#filter-total)">
137
+ <path d="M5 7.5H25" stroke="white" stroke-width="2" stroke-linecap="round"/>
138
+ </g>
139
+ </g>
140
+ </g>
141
+
142
+ {{/layout}}