@baravak/risloo-profile-cli 4.5.0 → 4.6.1

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.5.0",
3
+ "version": "4.6.1",
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,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,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: 9},
18
+ L10 : {eng: "the_anger", fr: "مشکل خشم", max: 12},
19
+ L11 : {eng: "the_social_desirability", fr: "مشکل مطلوبیت اجتماعی", max: 3},
20
+ L12 : {eng: "self_esteem", fr: "مشکل اعتماد به نفس", max: 9},
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,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}}