@baravak/risloo-profile-cli 4.30.0 → 4.32.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.30.0",
3
+ "version": "4.32.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,539 @@
1
+ {
2
+ "id": "$X1HXXXXX",
3
+ "scale": {
4
+ "id": "$JGFQ93-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
+ "description": "پاسخگوی گرامی؛ \n\nلطفا رابطه خود و همسرتان را براساس جملات جدول زیر ارزیابی و درست بودن (درباره شما صدق می‌کند و با آن موافقید) یا نادرست بودن (درباره شما صدق نمی‌کند و با آن مخالفید) آن را درباره رابطه خودتان در جدول مقابل علامت بزنید.",
46
+ "psychologist_description": null,
47
+ "items": [
48
+ {
49
+ "type": "text",
50
+ "text": "معمولاً خوبی‌های همسرم به نظرم نمی‌آید.",
51
+ "answer": {
52
+ "type": "optional",
53
+ "options": [
54
+ "کاملاً درست",
55
+ "تقریباً درست",
56
+ "تا حدی درست",
57
+ "تقریباً نادرست",
58
+ "کاملاً نادرست"
59
+ ]
60
+ },
61
+ "user_answered": "2"
62
+ },
63
+ {
64
+ "type": "text",
65
+ "text": "وقتی گفتگو می‌کنیم با هم جر و بحثمان می‌شود.",
66
+ "answer": {
67
+ "type": "optional",
68
+ "options": [
69
+ "کاملاً درست",
70
+ "تقریباً درست",
71
+ "تا حدی درست",
72
+ "تقریباً نادرست",
73
+ "کاملاً نادرست"
74
+ ]
75
+ },
76
+ "user_answered": "3"
77
+ },
78
+ {
79
+ "type": "text",
80
+ "text": "نمی‌توانم از کنار آزارهای همسرم به راحتی عبور کنم.",
81
+ "answer": {
82
+ "type": "optional",
83
+ "options": [
84
+ "کاملاً درست",
85
+ "تقریباً درست",
86
+ "تا حدی درست",
87
+ "تقریباً نادرست",
88
+ "کاملاً نادرست"
89
+ ]
90
+ },
91
+ "user_answered": "2"
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "وقتی که همسرم خطاهایی داشته باشد که آزارم دهد می‌توانم گذشت کنم.",
96
+ "answer": {
97
+ "type": "optional",
98
+ "options": [
99
+ "کاملاً درست",
100
+ "تقریباً درست",
101
+ "تا حدی درست",
102
+ "تقریباً نادرست",
103
+ "کاملاً نادرست"
104
+ ]
105
+ },
106
+ "user_answered": "1"
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "وقتی همسرم در حق من بدی می‌کند حتما باید تلافی کنم.",
111
+ "answer": {
112
+ "type": "optional",
113
+ "options": [
114
+ "کاملاً درست",
115
+ "تقریباً درست",
116
+ "تا حدی درست",
117
+ "تقریباً نادرست",
118
+ "کاملاً نادرست"
119
+ ]
120
+ },
121
+ "user_answered": "4"
122
+ },
123
+ {
124
+ "type": "text",
125
+ "text": "همسرم به راحتی از اشتباهات من می‌گذرد.",
126
+ "answer": {
127
+ "type": "optional",
128
+ "options": [
129
+ "کاملاً درست",
130
+ "تقریباً درست",
131
+ "تا حدی درست",
132
+ "تقریباً نادرست",
133
+ "کاملاً نادرست"
134
+ ]
135
+ },
136
+ "user_answered": "1"
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "وقتی همسرم به جای تلافی مرا می‌بخشد از او به شکل‌های مختلف تشکر می‌کنم.",
141
+ "answer": {
142
+ "type": "optional",
143
+ "options": [
144
+ "کاملاً درست",
145
+ "تقریباً درست",
146
+ "تا حدی درست",
147
+ "تقریباً نادرست",
148
+ "کاملاً نادرست"
149
+ ]
150
+ },
151
+ "user_answered": "4"
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "وقتی همسرم اشتباهاتم را به رویم می‌آورد نسبت به او سرد می‌شوم.",
156
+ "answer": {
157
+ "type": "optional",
158
+ "options": [
159
+ "کاملاً درست",
160
+ "تقریباً درست",
161
+ "تا حدی درست",
162
+ "تقریباً نادرست",
163
+ "کاملاً نادرست"
164
+ ]
165
+ },
166
+ "user_answered": "3"
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "ترجیح می‌دهم بدی‌های همسرم را با خوبی جبران کنم.",
171
+ "answer": {
172
+ "type": "optional",
173
+ "options": [
174
+ "کاملاً درست",
175
+ "تقریباً درست",
176
+ "تا حدی درست",
177
+ "تقریباً نادرست",
178
+ "کاملاً نادرست"
179
+ ]
180
+ },
181
+ "user_answered": "3"
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "همسرم بدی‌های مرا با خوبی جواب نمی‌دهد.",
186
+ "answer": {
187
+ "type": "optional",
188
+ "options": [
189
+ "کاملاً درست",
190
+ "تقریباً درست",
191
+ "تا حدی درست",
192
+ "تقریباً نادرست",
193
+ "کاملاً نادرست"
194
+ ]
195
+ },
196
+ "user_answered": "3"
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "وقتی بدی‌های همسرم را می‌بخشم دلم سبک می‌شود.",
201
+ "answer": {
202
+ "type": "optional",
203
+ "options": [
204
+ "کاملاً درست",
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
+ },
226
+ "user_answered": "2"
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "از خطای همسرم می‌گذرم چون خدا از من چنین خواسته است.",
231
+ "answer": {
232
+ "type": "optional",
233
+ "options": [
234
+ "کاملاً درست",
235
+ "تقریباً درست",
236
+ "تا حدی درست",
237
+ "تقریباً نادرست",
238
+ "کاملاً نادرست"
239
+ ]
240
+ },
241
+ "user_answered": "3"
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "اگر مطمئن باشم که گذشت از خطاهای همسرم مورد رضایت خداوند است این کار را می‌کنم.",
246
+ "answer": {
247
+ "type": "optional",
248
+ "options": [
249
+ "کاملاً درست",
250
+ "تقریباً درست",
251
+ "تا حدی درست",
252
+ "تقریباً نادرست",
253
+ "کاملاً نادرست"
254
+ ]
255
+ },
256
+ "user_answered": "5"
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "در برابر خوبی همسرم سعی می‌کنم بیشتر جبران کنم.",
261
+ "answer": {
262
+ "type": "optional",
263
+ "options": [
264
+ "کاملاً درست",
265
+ "تقریباً درست",
266
+ "تا حدی درست",
267
+ "تقریباً نادرست",
268
+ "کاملاً نادرست"
269
+ ]
270
+ },
271
+ "user_answered": "5"
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "همسرم وقتی از من خوبی می‌بیند سعی می‌کند بیشتر از حد من جبران کند.",
276
+ "answer": {
277
+ "type": "optional",
278
+ "options": [
279
+ "کاملاً درست",
280
+ "تقریباً درست",
281
+ "تا حدی درست",
282
+ "تقریباً نادرست",
283
+ "کاملاً نادرست"
284
+ ]
285
+ },
286
+ "user_answered": "5"
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "قدردانی همسرم را فراموش نمی‌کنم و صحنه‌های آن را به خاطر دارم.",
291
+ "answer": {
292
+ "type": "optional",
293
+ "options": [
294
+ "کاملاً درست",
295
+ "تقریباً درست",
296
+ "تا حدی درست",
297
+ "تقریباً نادرست",
298
+ "کاملاً نادرست"
299
+ ]
300
+ },
301
+ "user_answered": "5"
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "وقتی می‌بینم که همسرم قدر نشناس است دلسرد می‌شوم.",
306
+ "answer": {
307
+ "type": "optional",
308
+ "options": [
309
+ "کاملاً درست",
310
+ "تقریباً درست",
311
+ "تا حدی درست",
312
+ "تقریباً نادرست",
313
+ "کاملاً نادرست"
314
+ ]
315
+ },
316
+ "user_answered": "2"
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "همسرم قدرشناسی من را نسبت به خودش درک نمی‌کند.",
321
+ "answer": {
322
+ "type": "optional",
323
+ "options": [
324
+ "کاملاً درست",
325
+ "تقریباً درست",
326
+ "تا حدی درست",
327
+ "تقریباً نادرست",
328
+ "کاملاً نادرست"
329
+ ]
330
+ },
331
+ "user_answered": "4"
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "همسرم مرتب به دنبال عیب‌جویی از من است.",
336
+ "answer": {
337
+ "type": "optional",
338
+ "options": [
339
+ "کاملاً درست",
340
+ "تقریباً درست",
341
+ "تا حدی درست",
342
+ "تقریباً نادرست",
343
+ "کاملاً نادرست"
344
+ ]
345
+ },
346
+ "user_answered": "5"
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "وقتی به یاد خوبی‌های همسرم می‌افتم می‌توانم از عیب‌های او بگذرم.",
351
+ "answer": {
352
+ "type": "optional",
353
+ "options": [
354
+ "کاملاً درست",
355
+ "تقریباً درست",
356
+ "تا حدی درست",
357
+ "تقریباً نادرست",
358
+ "کاملاً نادرست"
359
+ ]
360
+ },
361
+ "user_answered": "4"
362
+ },
363
+ {
364
+ "type": "text",
365
+ "text": "هر از چند گاهی بازگویی نقاط قوت رابطه همسری‌مان، باعث نشاط و گذشت می‌شود.",
366
+ "answer": {
367
+ "type": "optional",
368
+ "options": [
369
+ "کاملاً درست",
370
+ "تقریباً درست",
371
+ "تا حدی درست",
372
+ "تقریباً نادرست",
373
+ "کاملاً نادرست"
374
+ ]
375
+ },
376
+ "user_answered": "5"
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "وقتی همسرم در حق من خوبی می‌کند لازم می‌دانم از او تشکر کنم.",
381
+ "answer": {
382
+ "type": "optional",
383
+ "options": [
384
+ "کاملاً درست",
385
+ "تقریباً درست",
386
+ "تا حدی درست",
387
+ "تقریباً نادرست",
388
+ "کاملاً نادرست"
389
+ ]
390
+ },
391
+ "user_answered": "5"
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "وقتی در برابر خوبی همسرم نمی‌توانم قدردانی کنم انگار چیزی در دلم سنگینی می‌کند.",
396
+ "answer": {
397
+ "type": "optional",
398
+ "options": [
399
+ "کاملاً درست",
400
+ "تقریباً درست",
401
+ "تا حدی درست",
402
+ "تقریباً نادرست",
403
+ "کاملاً نادرست"
404
+ ]
405
+ },
406
+ "user_answered": "3"
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "نمی‌توانم به زبان از همسرم قدردانی کنم.",
411
+ "answer": {
412
+ "type": "optional",
413
+ "options": [
414
+ "کاملاً درست",
415
+ "تقریباً درست",
416
+ "تا حدی درست",
417
+ "تقریباً نادرست",
418
+ "کاملاً نادرست"
419
+ ]
420
+ },
421
+ "user_answered": "4"
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "حتی اگر به زبان از همسرم تشکر کنم اما قلباً از او ناراحتم.",
426
+ "answer": {
427
+ "type": "optional",
428
+ "options": [
429
+ "کاملاً درست",
430
+ "تقریباً درست",
431
+ "تا حدی درست",
432
+ "تقریباً نادرست",
433
+ "کاملاً نادرست"
434
+ ]
435
+ },
436
+ "user_answered": "4"
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "نمی‌توانم کسی که به من ستمی روا داشته است را ببخشم.",
441
+ "answer": {
442
+ "type": "optional",
443
+ "options": [
444
+ "کاملاً درست",
445
+ "تقریباً درست",
446
+ "تا حدی درست",
447
+ "تقریباً نادرست",
448
+ "کاملاً نادرست"
449
+ ]
450
+ },
451
+ "user_answered": "1"
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "در اختلافات خانوادگی، با این‌که به خودم حق می‌دهم ترجیح می‌دهم ببخشم.",
456
+ "answer": {
457
+ "type": "optional",
458
+ "options": [
459
+ "کاملاً درست",
460
+ "تقریباً درست",
461
+ "تا حدی درست",
462
+ "تقریباً نادرست",
463
+ "کاملاً نادرست"
464
+ ]
465
+ },
466
+ "user_answered": "1"
467
+ }
468
+ ],
469
+ "prerequisites": [
470
+ {
471
+ "type": "text",
472
+ "label": "gender",
473
+ "text": "جنسیت",
474
+ "answer": { "type": "select", "options": ["زن", "مرد"] },
475
+ "alias": "gender",
476
+ "force": true,
477
+ "user_answered": "2"
478
+ },
479
+ {
480
+ "type": "text",
481
+ "label": "age",
482
+ "text": "سن",
483
+ "answer": { "type": "number" },
484
+ "alias": "age",
485
+ "force": true,
486
+ "user_answered": "28"
487
+ },
488
+ {
489
+ "type": "text",
490
+ "label": "education",
491
+ "text": "تحصیلات",
492
+ "answer": {
493
+ "type": "select",
494
+ "options": [
495
+ "ابتدایی اول",
496
+ "ابتدایی دوم",
497
+ "متوسطه اول",
498
+ "متوسطه دوم",
499
+ "دیپلم",
500
+ "کارشناسی",
501
+ "کارشناسی ارشد",
502
+ "پزشکی عمومی",
503
+ "متخصص",
504
+ "دکتری تخصصی",
505
+ "حوزوی مقدمات",
506
+ "حوزوی سطح۱",
507
+ "حوزوی سطح۲",
508
+ "حوزوی سطح۳",
509
+ "حوزوی سطح۴"
510
+ ]
511
+ },
512
+ "alias": "education",
513
+ "force": true,
514
+ "user_answered": "8"
515
+ },
516
+ {
517
+ "type": "text",
518
+ "label": "marital_status",
519
+ "text": "وضعیت تأهل",
520
+ "answer": { "type": "select", "options": ["مجرد", "متأهل"] },
521
+ "alias": "marital_status",
522
+ "force": true,
523
+ "user_answered": "1"
524
+ }
525
+ ],
526
+ "cornometer": 0,
527
+ "score": {
528
+ "forgivness_raw": 30,
529
+ "forgivness_percentage": 0.58,
530
+ "forgivness_report": "high",
531
+ "gratitude_raw": 22,
532
+ "gratitude_percentage": 0.37,
533
+ "gratitude_report": "moderate",
534
+ "total_raw": 52,
535
+ "total_percentage": 0.46
536
+ },
537
+ "score_current_version": "1.0.0",
538
+ "score_last_version": "1.0.0"
539
+ }
@@ -0,0 +1,320 @@
1
+ {
2
+ "id": "$X1HXXXXX",
3
+ "scale": {
4
+ "id": "$JPIQ-93",
5
+ "title": "پرسشنامه 16 عاملی شخصیت کتل"
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
+ "description": "پاسخگوی گرامی؛ \n\nلطفا رابطه خود و همسرتان را براساس جملات جدول زیر ارزیابی و درست بودن (درباره شما صدق می‌کند و با آن موافقید) یا نادرست بودن (درباره شما صدق نمی‌کند و با آن مخالفید) آن را درباره رابطه خودتان در جدول مقابل علامت بزنید.",
46
+ "psychologist_description": null,
47
+ "items": [
48
+ {
49
+ "type": "text",
50
+ "text": "معمولاً وقتی اختلاف داریم پای خانواده‌ها به میان می‌آید.",
51
+ "answer": {
52
+ "type": "optional",
53
+ "options": [
54
+ "کاملاً درست",
55
+ "تقریباً درست",
56
+ "تا حدی درست",
57
+ "تقریباً نادرست",
58
+ "کاملاً نادرست"
59
+ ]
60
+ },
61
+ "user_answered": "5"
62
+ },
63
+ {
64
+ "type": "text",
65
+ "text": "ارتباط با خانواده‌هایمان اختلافات ما را بیشتر می‌کند.",
66
+ "answer": {
67
+ "type": "optional",
68
+ "options": [
69
+ "کاملاً درست",
70
+ "تقریباً درست",
71
+ "تا حدی درست",
72
+ "تقریباً نادرست",
73
+ "کاملاً نادرست"
74
+ ]
75
+ },
76
+ "user_answered": "5"
77
+ },
78
+ {
79
+ "type": "text",
80
+ "text": "وقتی که من و همسرم به نوعی با فرد دیگری در ارتباطیم، اثر دیگری بر من بیشتر از همسرم است.",
81
+ "answer": {
82
+ "type": "optional",
83
+ "options": [
84
+ "کاملاً درست",
85
+ "تقریباً درست",
86
+ "تا حدی درست",
87
+ "تقریباً نادرست",
88
+ "کاملاً نادرست"
89
+ ]
90
+ },
91
+ "user_answered": "5"
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "اگر خانواده و دیگری حذف شوند بین و همسرم مشکلات کاهش می‌یابد.",
96
+ "answer": {
97
+ "type": "optional",
98
+ "options": [
99
+ "کاملاً درست",
100
+ "تقریباً درست",
101
+ "تا حدی درست",
102
+ "تقریباً نادرست",
103
+ "کاملاً نادرست"
104
+ ]
105
+ },
106
+ "user_answered": "2"
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "وقتی میزان تماس تلفنی با خانواده/ دیگران زیاد می‌شود اختلافات ما افزایش می‌یابد.",
111
+ "answer": {
112
+ "type": "optional",
113
+ "options": [
114
+ "کاملاً درست",
115
+ "تقریباً درست",
116
+ "تا حدی درست",
117
+ "تقریباً نادرست",
118
+ "کاملاً نادرست"
119
+ ]
120
+ },
121
+ "user_answered": "3"
122
+ },
123
+ {
124
+ "type": "text",
125
+ "text": "وقتی میزان تماس حضوری با خانواده/ دیگران زیاد می‌شود اختلافات ما زیاد می‌شود.",
126
+ "answer": {
127
+ "type": "optional",
128
+ "options": [
129
+ "کاملاً درست",
130
+ "تقریباً درست",
131
+ "تا حدی درست",
132
+ "تقریباً نادرست",
133
+ "کاملاً نادرست"
134
+ ]
135
+ },
136
+ "user_answered": "4"
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "تبادل اطلاعات غیر ضروری با دیگران زیاد است.",
141
+ "answer": {
142
+ "type": "optional",
143
+ "options": [
144
+ "کاملاً درست",
145
+ "تقریباً درست",
146
+ "تا حدی درست",
147
+ "تقریباً نادرست",
148
+ "کاملاً نادرست"
149
+ ]
150
+ },
151
+ "user_answered": "5"
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "نمی‌توانم در برابر کنجکاوی‌های دیگران نسبت به خانواده‌ام مقاومت کنم.",
156
+ "answer": {
157
+ "type": "optional",
158
+ "options": [
159
+ "کاملاً درست",
160
+ "تقریباً درست",
161
+ "تا حدی درست",
162
+ "تقریباً نادرست",
163
+ "کاملاً نادرست"
164
+ ]
165
+ },
166
+ "user_answered": "4"
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "وقتی نیازهای عاطفی‌ام از جانب همسر تأمین نمی‌شود برای جبران به دیگران (خانواده) مراجعه می‌کنم.",
171
+ "answer": {
172
+ "type": "optional",
173
+ "options": [
174
+ "کاملاً درست",
175
+ "تقریباً درست",
176
+ "تا حدی درست",
177
+ "تقریباً نادرست",
178
+ "کاملاً نادرست"
179
+ ]
180
+ },
181
+ "user_answered": "2"
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "وقتی خانواده‌ام نظری داشته باشند دیدگاه متفاوت همسرم برایم قابل پذیرش نیست.",
186
+ "answer": {
187
+ "type": "optional",
188
+ "options": [
189
+ "کاملاً درست",
190
+ "تقریباً درست",
191
+ "تا حدی درست",
192
+ "تقریباً نادرست",
193
+ "کاملاً نادرست"
194
+ ]
195
+ },
196
+ "user_answered": "3"
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "در تصمیم‌گیری‌ها درباره خانواده، نظر همسرم را بر نظر همه ترجیح می‌دهم.",
201
+ "answer": {
202
+ "type": "optional",
203
+ "options": [
204
+ "کاملاً درست",
205
+ "تقریباً درست",
206
+ "تا حدی درست",
207
+ "تقریباً نادرست",
208
+ "کاملاً نادرست"
209
+ ]
210
+ },
211
+ "user_answered": "2"
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "وقتی خانواده‌ام پیشنهادی می‌دهد بدون مشورت با همسرم عمل نمی‌کنم.",
216
+ "answer": {
217
+ "type": "optional",
218
+ "options": [
219
+ "کاملاً درست",
220
+ "تقریباً درست",
221
+ "تا حدی درست",
222
+ "تقریباً نادرست",
223
+ "کاملاً نادرست"
224
+ ]
225
+ },
226
+ "user_answered": "1"
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "هر چند برای دیگران (به ویژه والدین) احترام قائلم، نمی‌گذارم در مسائل داخلی خانواده مداخله کنند.",
231
+ "answer": {
232
+ "type": "optional",
233
+ "options": [
234
+ "کاملاً درست",
235
+ "تقریباً درست",
236
+ "تا حدی درست",
237
+ "تقریباً نادرست",
238
+ "کاملاً نادرست"
239
+ ]
240
+ },
241
+ "user_answered": "1"
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "اظهار منفی دیگران درباره همسرم، در روابط خانوادگی‌مان تأثیری ندارد.",
246
+ "answer": {
247
+ "type": "optional",
248
+ "options": [
249
+ "کاملاً درست",
250
+ "تقریباً درست",
251
+ "تا حدی درست",
252
+ "تقریباً نادرست",
253
+ "کاملاً نادرست"
254
+ ]
255
+ },
256
+ "user_answered": "5"
257
+ }
258
+ ],
259
+ "prerequisites": [
260
+ {
261
+ "type": "text",
262
+ "label": "gender",
263
+ "text": "جنسیت",
264
+ "answer": { "type": "select", "options": ["زن", "مرد"] },
265
+ "alias": "gender",
266
+ "force": true,
267
+ "user_answered": "1"
268
+ },
269
+ {
270
+ "type": "text",
271
+ "label": "age",
272
+ "text": "سن",
273
+ "answer": { "type": "number" },
274
+ "alias": "age",
275
+ "force": true,
276
+ "user_answered": "30"
277
+ },
278
+ {
279
+ "type": "text",
280
+ "label": "education",
281
+ "text": "تحصیلات",
282
+ "answer": {
283
+ "type": "select",
284
+ "options": [
285
+ "ابتدایی اول",
286
+ "ابتدایی دوم",
287
+ "متوسطه اول",
288
+ "متوسطه دوم",
289
+ "دیپلم",
290
+ "کارشناسی",
291
+ "کارشناسی ارشد",
292
+ "پزشکی عمومی",
293
+ "متخصص",
294
+ "دکتری تخصصی",
295
+ "حوزوی مقدمات",
296
+ "حوزوی سطح۱",
297
+ "حوزوی سطح۲",
298
+ "حوزوی سطح۳",
299
+ "حوزوی سطح۴"
300
+ ]
301
+ },
302
+ "alias": "education",
303
+ "force": true,
304
+ "user_answered": "2"
305
+ },
306
+ {
307
+ "type": "text",
308
+ "label": "marital_status",
309
+ "text": "وضعیت تأهل",
310
+ "answer": { "type": "select", "options": ["مجرد", "متأهل"] },
311
+ "alias": "marital_status",
312
+ "force": true,
313
+ "user_answered": "2"
314
+ }
315
+ ],
316
+ "cornometer": 0,
317
+ "score": { "penetrability_raw": 23, "penetrability_percentage": 0.41 },
318
+ "score_current_version": "1.0.0",
319
+ "score_last_version": "1.0.0"
320
+ }
@@ -0,0 +1,81 @@
1
+ const gauge = require("../helpers/gauge");
2
+ const { Profile } = require("../Profile");
3
+
4
+ class JGFQ93 extends Profile {
5
+ // Number of pages
6
+ static pages = 1;
7
+
8
+ // Labels of the sample
9
+ labels = {
10
+ L1_1: { eng: "forgivness_raw", max:52, title: 'رهاسازی', color: '#4338CA', secondary: '#818CF8'},
11
+ L1_2: { eng: "forgivness_percentage"},
12
+ L1_3: { eng: "forgivness_report"},
13
+
14
+ L2_1: { eng: "gratitude_raw", max:60, title: 'آشکارسازی', color: "#7E22CE", secondary: '#C084FC'},
15
+ L2_2: { eng: "gratitude_percentage"},
16
+ L2_3: { eng: "gratitude_report"},
17
+
18
+ L3_1: { eng: "total_raw", max:112},
19
+ L3_2: { eng: "total_percentage"},
20
+ };
21
+
22
+ profileSpec = {
23
+ /* "sample" determines some important info about the sample and profile */
24
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
25
+ /* "prerequisites" is synonym to "fields" in our program */
26
+ sample: {
27
+ name: "پرسشنامه رها - آشکارسازی" /* Name of the sample */,
28
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
29
+ questions: false /* Determines whether to get questions from inital dataset or not */,
30
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
31
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
32
+ },
33
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
34
+ /* calculating its dimensions carefully is of great importance */
35
+ profile: {
36
+ get dimensions() {
37
+ return {
38
+ width: 836 + 2 * this.padding.x,
39
+ height: 427 + 2 * this.padding.y,
40
+ };
41
+ },
42
+ padding: {
43
+ x: 34,
44
+ y: 144,
45
+ },
46
+ },
47
+ /* "labels" part which has to be provided for each profile */
48
+ labels: Object.values(this.labels),
49
+ };
50
+
51
+ constructor(dataset, options, config = {}) {
52
+ super();
53
+ this._init(dataset, options, config);
54
+ }
55
+
56
+ _calcContext() {
57
+ const {
58
+ dataset,
59
+ } = this;
60
+ const forgivness = gauge(packItem(...dataset.score.slice(0, 3)), 90, 234);
61
+ const gratitude = gauge(packItem(...dataset.score.slice(3, 6)), 90, 234);
62
+ const total = packItem(...dataset.score.slice(6, 8));
63
+ total.p = dataset.score[7].mark ?? 0
64
+ return [{ forgivness, gratitude, total }];
65
+ }
66
+ }
67
+
68
+ function packItem(raw, percentage, report){
69
+ return {
70
+ ...raw,
71
+ label: {
72
+ ...raw.label,
73
+ eng: raw.label.eng.replace('_raw', '')
74
+ },
75
+ mark: raw.mark ?? 0,
76
+ percentage: Math.round((percentage.mark ?? 0) * 100),
77
+ report: report?.mark
78
+ }
79
+ }
80
+
81
+ module.exports = JGFQ93;
@@ -0,0 +1,62 @@
1
+ const gauge = require("../helpers/gauge");
2
+ const { Profile } = require("../Profile");
3
+
4
+ class JPIQ93 extends Profile {
5
+ // Number of pages
6
+ static pages = 1;
7
+
8
+ // Labels of the sample
9
+ labels = {
10
+ L1_1: { eng: "penetrability_raw", max:56},
11
+ L2_1: { eng: "penetrability_percentage"},
12
+ };
13
+
14
+ profileSpec = {
15
+ /* "sample" determines some important info about the sample and profile */
16
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
17
+ /* "prerequisites" is synonym to "fields" in our program */
18
+ sample: {
19
+ name: "پرسشنامه انعطاف-نفوذناپذیری" /* Name of the sample */,
20
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
21
+ questions: false /* Determines whether to get questions from inital dataset or not */,
22
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
23
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
24
+ },
25
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
26
+ /* calculating its dimensions carefully is of great importance */
27
+ profile: {
28
+ get dimensions() {
29
+ return {
30
+ width: 250 + 2 * this.padding.x,
31
+ height: 187 + 2 * this.padding.y,
32
+ };
33
+ },
34
+ padding: {
35
+ x: 326,
36
+ y: 264,
37
+ },
38
+ },
39
+ /* "labels" part which has to be provided for each profile */
40
+ labels: Object.values(this.labels),
41
+ };
42
+
43
+ constructor(dataset, options, config = {}) {
44
+ super();
45
+ this._init(dataset, options, config);
46
+ }
47
+
48
+ _calcContext() {
49
+ const {
50
+ dataset,
51
+ } = this;
52
+ const _raw = dataset.score[0]
53
+ _raw.mark = _raw.mark ?? 0
54
+ const raw = {
55
+ ...gauge(_raw, 180, 360),
56
+ percentage: Math.round((dataset.score[1].mark ?? 0) * 100),
57
+ }
58
+ return [{ raw }];
59
+ }
60
+ }
61
+
62
+ module.exports = JPIQ93;
@@ -0,0 +1,151 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ {{#with forgivness}}
4
+ <linearGradient id="{{details.label.eng}}bg" x1="-1.8" y1="74" x2="81.7" y2="-112.75" gradientUnits="userSpaceOnUse">
5
+ <stop stop-color="{{details.label.secondary}}"/>
6
+ <stop offset="1" stop-color="{{details.label.color}}"/>
7
+ </linearGradient>
8
+ <clipPath id="{{details.label.eng}}cr">
9
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction}}
10
+ </clipPath>
11
+ {{/with}}
12
+ {{#with gratitude}}
13
+ <linearGradient id="{{details.label.eng}}bg" x1="42.7" x2="125" y1="164" y2="-24" gradientUnits="userSpaceOnUse">
14
+ <stop stop-color="{{details.label.secondary}}"/>
15
+ <stop offset="1" stop-color="{{details.label.color}}"/>
16
+ </linearGradient>
17
+ <clipPath id="{{details.label.eng}}cr">
18
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction}}
19
+ </clipPath>
20
+ {{/with}}
21
+ <clipPath id="tptalcr">
22
+ <rect width="280" height="28" rx="6" />
23
+ </clipPath>
24
+ <linearGradient id="totalbg" x1="0" x2="280" y1="0" y2="0" gradientUnits="userSpaceOnUse">
25
+ <stop stop-color="#94A3B8"/>
26
+ <stop offset="1" stop-color="#334155"/>
27
+ </linearGradient>
28
+ </defs>
29
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
30
+ {{#with gratitude}}
31
+ <g>
32
+ <g>
33
+ <g>
34
+ {{#if (boolean details.report '===' 'low')}}
35
+ <rect x="0.5" y="0.5" width="204" height="87" stroke-width="1" rx="8" stroke="#F3E8FF" fill="#FAF5FF" />
36
+ {{else}}
37
+ <rect width="205" height="88" rx="8" fill="#F8FAFC" />
38
+ {{/if}}
39
+ <text fill="{{ternary (boolean details.report '===' 'low') details.label.color '#64748B'}}" font-size="14">
40
+ <tspan x="16" y="22" text-anchor="end" font-weight="500" dy="0.3em">۳۰ الی ۶۰</tspan>
41
+ <tspan x="16" y="50" text-anchor="end" font-weight="400" dy="0.3em">فرد آمادگی آشکارسازی را دارد.</tspan>
42
+ </text>
43
+ </g>
44
+ <g transform="translate(0, 96)">
45
+ {{#if (boolean details.report '===' 'moderate')}}
46
+ <rect x="0.5" y="0.5" width="204" height="69" stroke-width="1" rx="8" stroke="#F3E8FF" fill="#FAF5FF" />
47
+ {{else}}
48
+ <rect width="205" height="68" rx="8" fill="#F8FAFC" />
49
+ {{/if}}
50
+ <text fill="{{ternary (boolean details.report '===' 'moderate') details.label.color '#64748B'}}" font-size="14">
51
+ <tspan x="16" y="22" text-anchor="end" font-weight="500" dy="0.3em">۱۰ الی ۲۹</tspan>
52
+ <tspan x="16" y="50" text-anchor="end" font-weight="400" dy="0.3em">-</tspan>
53
+ </text>
54
+ </g>
55
+ <g transform="translate(0, 174)">
56
+ {{#if (boolean details.report '===' 'high')}}
57
+ <rect x="0.5" y="0.5" width="204" height="87" stroke-width="1" rx="8" stroke="#F3E8FF" fill="#FAF5FF" />
58
+ {{else}}
59
+ <rect width="205" height="88" rx="8" fill="#F8FAFC" />
60
+ {{/if}}
61
+ <text fill="{{ternary (boolean details.report '===' 'high') details.label.color '#64748B'}}" font-size="14">
62
+ <tspan x="16" y="22" text-anchor="end" font-weight="500" dy="0.3em">۰ الی ۹</tspan>
63
+ <tspan x="16" y="50" text-anchor="end" font-weight="400" dy="0.3em">باید از مهارت‌های پایه برای</tspan>
64
+ <tspan x="16" y="50" text-anchor="end" font-weight="400" dy="1.6em">آمادگی فرد استفاده کرد.</tspan>
65
+ </text>
66
+ </g>
67
+ </g>
68
+ <g transform="translate(253, 0)">
69
+ <text x="125" y="250" text-anchor="start" dy="0.25em" font-size="18" font-weight="500" fill="{{details.label.color}}">{{details.label.title}}</text>
70
+ <g transform="translate(71, 83)">
71
+ <text x="27" dy="2.35em" text-anchor="middle" font-size="18" font-weight="500" fill="{{details.label.color}}">٪{{details.percentage}}</text>
72
+ <text x="27" dy="0.6em" text-anchor="middle" font-size="28" font-weight="600" fill="{{details.label.color}}">{{details.mark}}</text>
73
+ </g>
74
+ <text x="76" text-anchor="end" dy="1em" font-size="14" font-weight="500" fill="#64748B">{{details.label.max}}</text>
75
+ <text y="86" x="0" text-anchor="middle" dy="1em" font-size="16" font-weight="500" fill="{{details.label.color}}">{{details.label.fa}}</text>
76
+ <g transform="translate(125, 100)">
77
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill='#F1F5F9'}}
78
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill="url(#gratitudebg)" clip-path="url(#gratitudecr)"}}
79
+ </g>
80
+ </g>
81
+ </g>
82
+ {{/with}}
83
+ <text x="418.5" y="208" text-anchor="middle" dy="0.3em" font-size="14" font-weight="500" fill="#64748B">0</text>
84
+ {{#with forgivness}}
85
+ <g transform="translate(458, 0)">
86
+ <g transform="translate(173, 0)">
87
+ <g>
88
+ {{#if (boolean details.report '===' 'low')}}
89
+ <rect x="0.5" y="0.5" width="204" height="87" stroke-width="1" rx="8" stroke="#E0E7FF" fill="#EEF2FF" />
90
+ {{else}}
91
+ <rect width="205" height="88" rx="8" fill="#F8FAFC" />
92
+ {{/if}}
93
+ <text fill="{{ternary (boolean details.report '===' 'low') details.label.color '#64748B'}}" font-size="14">
94
+ <tspan x="189" y="22" text-anchor="start" font-weight="500" dy="0.3em">۲۷ الی ۵۲</tspan>
95
+ <tspan x="189" y="50" text-anchor="start" font-weight="400" dy="0.3em">فرد آمادگی دارد تا تمرین‌های</tspan>
96
+ <tspan x="189" y="50" text-anchor="start" font-weight="400" dy="1.6em">رهاسازی را شروع کند.</tspan>
97
+ </text>
98
+ </g>
99
+ <g transform="translate(0, 96)">
100
+ {{#if (boolean details.report '===' 'moderate')}}
101
+ <rect x="0.5" y="0.5" width="204" height="69" stroke-width="1" rx="8" stroke="#E0E7FF" fill="#EEF2FF" />
102
+ {{else}}
103
+ <rect width="205" height="68" rx="8" fill="#F8FAFC" />
104
+ {{/if}}
105
+ <text fill="{{ternary (boolean details.report '===' 'moderate') details.label.color '#64748B'}}" font-size="14">
106
+ <tspan x="189" y="22" text-anchor="start" font-weight="500" dy="0.3em">۱۰ الی ۲۶</tspan>
107
+ <tspan x="189" y="50" text-anchor="start" font-weight="400" dy="0.3em">-</tspan>
108
+ </text>
109
+ </g>
110
+ <g transform="translate(0, 174)">
111
+ {{#if (boolean details.report '===' 'high')}}
112
+ <rect x="0.5" y="0.5" width="204" height="87" stroke-width="1" rx="8" stroke="#E0E7FF" fill="#EEF2FF" />
113
+ {{else}}
114
+ <rect width="205" height="88" rx="8" fill="#F8FAFC" />
115
+ {{/if}}
116
+ <text fill="{{ternary (boolean details.report '===' 'high') details.label.color '#64748B'}}" font-size="14">
117
+ <tspan x="189" y="22" text-anchor="start" font-weight="500" dy="0.3em">۰ الی ۹</tspan>
118
+ <tspan x="189" y="50" text-anchor="start" font-weight="400" dy="0.3em">فرد آمادگی رهاسازی را ندارد و</tspan>
119
+ <tspan x="189" y="50" text-anchor="start" font-weight="400" dy="1.6em">باید درمان مقدماتی ادامه یابد.</tspan>
120
+ </text>
121
+ </g>
122
+ </g>
123
+ <g transform="translate(0, 0)">
124
+ <text x="0" y="250" text-anchor="end" dy="0.25em" font-size="18" font-weight="500" fill="{{details.label.color}}">{{details.label.title}}</text>
125
+ <g transform="translate(0, 83)">
126
+ <text x="27" dy="2.35em" text-anchor="middle" font-size="18" font-weight="500" fill="{{details.label.color}}">٪{{details.percentage}}</text>
127
+ <text x="27" dy="0.6em" text-anchor="middle" font-size="28" font-weight="600" fill="{{details.label.color}}">{{details.mark}}</text>
128
+ </g>
129
+ <text x="32" text-anchor="end" dy="1em" font-size="14" font-weight="500" fill="#64748B">{{details.label.max}}</text>
130
+ <text y="86" x="0" text-anchor="middle" dy="1em" font-size="16" font-weight="500" fill="{{details.label.color}}">{{details.label.fa}}</text>
131
+ <g transform="translate(0, 100)">
132
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill='#F1F5F9' transform="scale(-1, 1)"}}
133
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill="url(#forgivnessbg)" clip-path="url(#forgivnesscr)" transform="scale(-1, 1)"}}
134
+ </g>
135
+ </g>
136
+ </g>
137
+ {{/with}}
138
+ <g transform="translate(278, 371)">
139
+ <rect width="280" height="28" fill="#F1F5F9" rx="6" />
140
+ {{bar (math total.p '*' 280) 28 (object tl=6 bl=6 tr=0 br=0) (toRad 0) clip-path="url(#tptalcr)" fill="url(#totalbg)"}}
141
+ <text x="0" y="41" text-anchor="end" dy="0.3em" font-size="12" font-weight="400" fill="#64748B">0</text>
142
+ <text x="280" y="41" text-anchor="start" dy="0.3em" font-size="12" font-weight="400" fill="#64748B">112</text>
143
+ <text x="140" y="49" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#334155">نمره کل</text>
144
+ <g transform="translate({{math total.p '*' 280}}, 0)">
145
+ <text y="-19" text-anchor="middle" dy="0.3em" font-size="20" font-weight="600" fill="#334155">{{total.mark}}</text>
146
+ <text y="-36" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#334155">٪{{total.percentage}}</text>
147
+ </g>
148
+ </g>
149
+ </g>
150
+
151
+ {{/layout}}
@@ -0,0 +1,28 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ <linearGradient id="bg">
4
+ <stop stop-color="#FB7185"/>
5
+ <stop offset="1" stop-color="#BE123C"/>
6
+ </linearGradient>
7
+ {{#with raw}}
8
+ <clipPath id="bgr">
9
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction}}
10
+ </clipPath>
11
+ {{/with}}
12
+ </defs>
13
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
14
+ <text x="125" text-anchor="middle" dy="1em" font-size="18" font-weight="500" fill="#E11D48">نفوذپذیری</text>
15
+ {{#with raw}}
16
+ <g transform="translate(125, 167)">
17
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill='#F1F5F9'}}
18
+ {{gauge 125 (math 125 '*' 0.7) (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill="url(#bg)" clip-path="url(#bgr)"}}
19
+ <text text-anchor="middle" font-size="18" font-weight="500" fill="#E11D48">٪{{percentage}}</text>
20
+ <text y="20" text-anchor="middle" dy="-44" font-size="28" font-weight="600" fill="#E11D48">{{details.mark}}</text>
21
+ <text y="10" x="-106.25" text-anchor="middle" dy=".6em" font-size="14" font-weight="500" fill="#64748B">0</text>
22
+ <text y="10" x="106.25" text-anchor="middle" dy=".6em" font-size="14" font-weight="500" fill="#64748B">56</text>
23
+ <text y="86" x="0" text-anchor="middle" dy="1em" font-size="16" font-weight="500" fill="#E11D48">{{details.label.fa}}</text>
24
+ </g>
25
+ {{/with}}
26
+ </g>
27
+
28
+ {{/layout}}