@baravak/risloo-profile-cli 3.1.2 → 3.3.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": "3.1.2",
3
+ "version": "3.3.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":"$X1H6YNY4F","scale":{"id":"$JLHSQ-93","title":"پرسشنامه بررسی سبک زندگی و سلامت"},"chain":null,"version":"1","edition":"4","edition_version":null,"client":{"id":"GH96XXXXX","name":"مراجع","user_id":"IR96XXXX"},"room":{"id":"RSXSSSS","manager":{"id":"GHXXXXX","name":"درمانگر","user_id":"GHXXXXX"},"center":{"id":"RSXSSSS","acceptation":null,"status":"active","type":"counseling_center","detail":{"title":"مرکز"}},"acceptation":null,"status":"active","type":"room"},"case":null,"code":null,"created_at":1677485199,"started_at":1677485251,"scored_at":1677491277,"closed_at":1677485251,"total_amount":null,"prepayment":false,"purchased":true,"amount":null,"billing":null,"description":null,"psychologist_description":null,"items":[{"type":"text","text":"به صورت منظم روزانه یک وعده غذای گرم می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به طور منظم روزانه دو وعده میوه می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"موقع غذا خوردن، نمی‌توانم درباره حجم غذایی مناسب تصمیم بگیرم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"موقع غذا خوردن همواره از سبزیجات استفاده می‌کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به خوردن دسر اهمیت می‌دهم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"در شبانه‌روز به مقدار لازم آب می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"در ترکیبات غذایی روزانه من حبوبات و سبزیجات از اهمیت برخوردارند.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"عادت‌های غذایی ناجوری دارم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"عادت دارم همراه با غذا، نوشابه یا نوشیدنی سرد استفاده کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به نوع غذا و ترکیبات آن توجهی ندارم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"موقع غذا خوردن مناسک و آداب آن را به جا می‌آورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"تشریفات وسواس‌گونه‌ای برای غذا خوردن دارم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"خیلی تند و سریع غذا می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"بعد از خوردن غذا، خودم را بخاطر رعایت نکردن رژیمم سرزنش می‌کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"با اشتها غذا می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"قبل از غذا خوردن، دست‌هایم را می‌شویم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"دسته‌جمعی یا با خانواده غذا می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"از نوشیدنی‌های مضر اجتناب می‌کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"زیاد هله و هوله می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"موقع غذا خوردن کارهای دیگری (مثل تماشای تلویزیون، مطالعه، حل مسائل خانوادگی و ..) انجام می‌دهم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"غذاهای چرب را از رژیم غذایی‌ام حذف کرده‌ام.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"در خوردن نمک و قند و شکر احتیاط می‌کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"گوشت قرمز در رژیم غذایی‌ام به قدر ضرورت (تقریباً دوبار در هفته) وجود دارد.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"ساعات تغذیه من منظم نیست.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"همواره با سبک غذا خوردنم درگیرم و می‌خواهم آن را تغییر دهم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"کمتر از پانزده دقیقه سر سفره می‌نشینم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به مقداری که لازم است غذا می‌خورم و حتی اگر سیر نشده باشم از خوردن دست می‌کشم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"در هر وعده غذایی یک نوع غذا می‌خورم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"از خوردن غذاهای آماده و غیرتازه پرهیز می‌کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"موقع خوردن غذا بسم الله می‌گویم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"حواسم به این‌که خوراکی حلال استفاده کنم جمع است.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"برایم مهم است که لذت و مزه غذا را با خوردن افراطی از دست ندهم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"از کسانی که غذا را آماده کرده‌اند سپاسگزاری می‌کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"یادم هست که بعد از یک وعده غذایی دعا کنم و از خدا تشکر کنم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"موقع غذا یاد خدا هستم و نعمت‌هایش را شکر می‌گویم.","category":"تغذیه","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"محیط خوابم پر سر و صدا است.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"محیط خوابم از هوای (گرما/سرما) مطبوعی برخورداراست.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"سر ساعت منظمی نمی‌خوابم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"سر ساعت معینی ازخواب بیدار می‌شوم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"همواره احساس کمبود خواب می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"وقتی از خواب بیدار می‌شوم خسته و کسل هستم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"دعاهای مخصوص خواب را می‌خوانم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"با وضو می‌خوابم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"عادت دارم کار یا مطالعه‌ام را در رختخواب یا روی تختخواب انجام دهم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"قبل از خواب ورزش می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"اتاق خواب مشخصی دارم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"هم‌اتاقی‌ام روی ساعت خواب و بیداری‌ام تأثیر می‌گذارد.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"تحرکم در طول روز کم است.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"خواب‌های آشفته می‌بینم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"جلوی تلویزیون خوابم می‌برد.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"موقع به خواب رفتن فکر و خیال زیادی سراغم می‌آید.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"موقع به خواب رفتن مرتب با خودم کلنجار میروم. (مثلا: به خودم می‌گویم اگر خوب نخوابم فردا عصبی می شوم)","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"د ر روز بیشتر از یک ساعت می‌خوابم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"از قرص‌های خواب‌آور استفاده می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"از قرص‌های ضد اشتها استفاده می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"داروهای محرک، ضد برونشیت، سرماخوردگی و ... استفاده می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"قبل از خواب شکلات یا خوراکی‌های کافئین‌دار مصرف می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"بعضی وقت‌ها از مواد خوراکی توهم‌زا مصرف می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"وقتی صبح بیدار می‌شوم زمان زیادی طول می‌کشد تا از جایم بلند شوم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"بیدار شدنم را خودم مدیریت می‌کنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"فکر می‌کنم اگر شب خوب نخوابم صبح سرحال نخواهم بود.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"اگر از مواد یا نوشیدنی‌های خواب‌آور استفاده نکنم خوب نمی‌توانم بخوابم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"هنگام کارهای روزانه‌ام چرت می‌زنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"موقع طلوع آفتاب بیدارم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"وقتی از خوابم را در شب برای عبادت می‌زنم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"وقتی از خواب بیدار می‌شوم، خدا را شکر می‌کنم و خوشحالم.","category":"خواب","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"روزانه حداقل ١٠ دقیقه ورزش می‌کنم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به طور متوسط ٢٠ تا ٦٠ دقیقه، برای سه تا پنج بار در هفته ورزش می‌کنم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"یک رشته ورزشی را پیگیری می‌کنم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"هر روز پیاده‌روی می‌کنم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"برای تفریح و رفع خستگی خود برنامه دارم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"معمولاً وزنم را متعادل نگه میدارم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"بخشی ازاوقات فراغتم را به فعالیت‌های بدنی (مانند: باغبانی و ...) می‌پردازم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"برای ورزش و تحرک نیت معنوی دارم.","category":"ورزش","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"ذهنم را نمی‌توانم جمع و جور کنم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"تمرکز ندارم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"خیلی حواس‌پرت هستم. (مثلاً وسایلم را جا می‌گذارم)","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"وقتی مسیری که تا مقصد طی می‌کنم، آن‌قدر حواسم جمع است که گذر زمان را احساس نمی‌کنم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"زیاد خیال‌بافی می‌کنم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"گاهی آن‌قدر ذهنم به خودم مشغول است که دارم بلند بلند با خودم حرف می‌زنم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"همواره در حال سرزنش خودم یا دیگری هستم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"هر وقت تصمیم می‌گیرم حواسم را جمع کنم، همه چیز یادم می‌رود.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"فکرهای نگران‌کننده‌ای مرا آزار می‌دهند.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"حواسم پرت نمی‌شود وقتی نماز و دعا می‌خوانم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"ذهنم همیشه در جایی است که من آن‌جا هستم.","category":"هشیاری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"وقتی قرار است تنهایی تصمیم بگیرم (بخصوص در کارهای مهم) عذاب می‌کشم.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"وقتی تصمیم می‌گیرم، مرتب پشیمان می‌شوم.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"ذهنم همواره مشغول کارهای ناتمامی است که باید انجام دهم.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"وقتی حرفم را با فردی ناتمام می‌گذارم یا او فرصت به من نمی‌دهد، همواره ذهنم به گفت‌وگو با او مشغول است.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"در خیلی از اعمالم دودل می‌شوم و احساس فشار عصبی می‌کنم.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به سختی دوست پیدا می‌کنم و به راحتی آن‌ها را از دست می‌دهم.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"در خیلی جاها رودربایستی می‌کنم (خجالت می‌کشم) که حرفم را بزنم و بعد کلی با خودم کلنجار می‌روم.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"برخی تصمیم‌ها در زندگی‌ام هست که سال‌ها با آن درگیرم و هنوز تصمیم نگرفته‌ام.","category":"تعارض / استرس","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"من از فعالیت‌های روزانه‌ام لذت می‌برم، کارها و فعالیت‌های روزانه‌ام را دوست دارم.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"من به راحتی آرامشم را به دست می‌آورم و احساساتم را به طور آزادانه بیان می‌کنم.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به راحتی بر استرس‌هایم غلبه می‌کنم.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"در بیان احساسم به دیگران مشکلی ندارم.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"به راحتی به عواطفم جهت می‌دهم (هدف احساسم را گم نمی‌کنم)","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"دوستان، بستگان یا افراد نزدیکی دارم که می‌توانم درباره موضوعات شخصی‌ام با آن‌ها حرف بزنم یا از آن‌ها کمک بخواهم.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"از کوره درنمی‌روم و عصبانی نمی‌شوم.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"در فعالیت‌های گروهی شرکت می‌کنم (مثل مراسم مذهبی و سازمان‌های اجتماعی) و کارهای خاصی دارم که انجام آن‌ها برایم لذت‌بخش است.","category":"مدیریت عاطفی","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"بعد از سوار شدن به ماشین حتماً کمربندم را می‌بندم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"وقتی هشیار نیستم یا خواب‌آلوده هستم رانندگی نمی‌کنم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"من قوانین رانندگی و ترافیک را رعایت می‌کنم و در حد سرعت مجاز میرانم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"هنگام خرید مواد غذایی، به تاریخ مصرف آن‌ها توجه دارم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"از سیگار و هیچ‌گونه دودی استفاده نمی‌کنم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"روزانه کارهایم را به خدا می‌سپارم و از او مدد می‌جویم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"در خوردن و نوشیدن، خیلی به حرام و حلال بودن آن فکر نمی‌کنم.","category":"امنیت","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"نشانه‌های حمله قلبی، سرطان، دیابت و سکته مغزی را می‌دانم.","category":"پیشگیری از بیماری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"از قرار گرفتن در معرض تابش مستقیم نور آفتاب اجتناب می‌کنم یا از کِرِم محافظ پوست استفاده می‌کنم.","category":"پیشگیری از بیماری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"به من توصیه شده آزمایشات پزشکی (مثل فشارخون، وارسی وضعیت سیستم ایمنی) را انجام دهم.","category":"پیشگیری از بیماری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"آزمایش‌های ماهانه‌ای برای بررسی سلامت خودم انجام می‌دهم.","category":"پیشگیری از بیماری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"},{"type":"text","text":"از نظر جنسی فعال هستم و مراقب سلامت جنسی خودم هستم.","category":"پیشگیری از بیماری","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"در انجام تکالیف مذهبی کوتاهی نمی‌کنم.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"نسبت به مُحرّمات مذهبی حساسم و مراعات می‌کنم.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"سعی می‌کنم مستحبات مذهبی را به جا آورم.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"شبهات مذهبی‌ام را با علاقه پیگیری می‌کنم و آن‌ها را حل می‌کنم.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"مذهبم مهم‌ترین منبع برای ملاک تصمیم‌گیری‌هایم می‌باشد.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"1"},{"type":"text","text":"هنگام استرس و سختی، معنویت/مذهبم (مانند دعا و ذکر) به من کمک می‌کند.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"2"},{"type":"text","text":"به طور منظم و در مناسبات در مناسک مذهبی جمعی شرکت می‌کنم.","category":"رابطه با خدا","answer":{"type":"optional","options":["هرگز","گاهی","همیشه"]},"user_answered":"3"}],"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":"7"},{"type":"text","label":"education","text":"تحصیلات","answer":{"type":"select","options":["ابتدایی اول","ابتدایی دوم","متوسطه اول","متوسطه دوم","دیپلم","کارشناسی","کارشناسی ارشد","پزشکی عمومی","متخصص","دکتری تخصصی","حوزوی مقدمات","حوزوی سطح۱","حوزوی سطح۲","حوزوی سطح۳","حوزوی سطح۴"]},"alias":"education","force":true,"user_answered":"10"},{"type":"text","label":"marital_status","text":"وضعیت تأهل","answer":{"type":"select","options":["مجرد","متأهل"]},"alias":"marital_status","force":true,"user_answered":"1"}],"entities":[{"offset":0,"title":"تغذیه"},{"offset":35,"title":"خواب"},{"offset":66,"title":"ورزش"},{"offset":74,"title":"هشیاری"},{"offset":85,"title":"تعارض/ استرس"},{"offset":93,"title":"مدیریت عاطفی"},{"offset":101,"title":"امنیت"},{"offset":108,"title":"پیشگیری از بیماری"},{"offset":113,"title":"رابطه با خدا"}],"cornometer":0,"score":{"raw":110,"nutrition":38,"sleep":25,"sport":8,"awareness":13,"conflict_stress":5,"affection_management":4,"security":5,"disease_prevention":6,"god_relation":6},"score_current_version":"1.0.0","score_last_version":"1.0.0","sample_id":8746}
@@ -0,0 +1 @@
1
+ {"id":"$X1H6UQGD3","scale":{"id":"$RAS-93","title":"مقیاس نگرش مسئولیت‌پذیری"},"version":"1","edition":"","edition_version":null,"client":{"id":"GH96XX","name":"مراجع","user_id":"IR96XXX"},"room":{"id":"RS96XXXX","manager":{"id":"GH966XXXX","name":"درمانگر","user_id":"IR96XXXX"},"center":{"id":"RS96XXXX","acceptation":null,"status":"active","type":"counseling_center","detail":{"title":"مرکز درمانی"}},"acceptation":null,"status":"active","type":"room"},"case":null,"code":null,"created_at":1674877621,"started_at":1674879347,"scored_at":1677943803,"closed_at":1674879799,"total_amount":0,"prepayment":false,"purchased":true,"amount":null,"billing":null,"description":"## دستور اجرای آزمون\n\nدر این پرسشنامه فهرستی از نگرش‌ها و رویکردها یا عقاید مختلفی که مردم بعضی اوقات از خود نشان می دهند، ارائه شده است. هر جمله را به دقت بخوانید و مشخص کنید که چقدر با آن موافق یا مخالف هستید. برای هر مورد، 7 گزینه پاسخی وجود دارد . گزینه‌ای را که مناسب می دانید مشخص کنید و بر روی آن شماره که نشان دهنده گزینه انتخابی شما است علامت بزنید . دقت کنید که فقط یک پاسخ برای هر رویکرد را انتخاب کنید از آنجائی که مردم با یکدیگر متفاوتند ، پاسخ درست یا نادرست وجود ندارد. برای تصمیم‌گیری در مورد این‌که گزینه ارائه شده تا چه حد نگرش شما را نشان می‌دهد گزینه‌ای را که اکثریت اوقات در مورد شما صدق می‌کند، در نظر بگیرید. گزینه‌ها از گزینه کاملا موافقم تا کاملا مخالفم در هفت درجه تقسیم شده است.","psychologist_description":null,"items":[{"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":"3"},{"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":"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":"3"},{"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":"2"},{"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":"2"},{"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":"5"},{"type":"text","text":" من باید مطمئن شوم که مردم دیگر از تمامی عواقب اعمالی که من انجام می‌دهم در امان باشند.","answer":{"type":"optional","options":["کاملا موافقم","بسیار موافقم","تا حدودی موافقم","نظری ندارم","تا حدودی مخالفم","بسیار مخالفم","کاملا مخالفم"]},"user_answered":"3"},{"type":"text","text":" دیگران نباید بر قضاوت من تکیه و اعتماد کنند.","answer":{"type":"optional","options":["کاملا موافقم","بسیار موافقم","تا حدودی موافقم","نظری ندارم","تا حدودی مخالفم","بسیار مخالفم","کاملا مخالفم"]},"user_answered":"5"},{"type":"text","text":" اگر من اطمینان حاصل نکنم که مستحق سرزنش نیستم،احساس می‌کنم که باید سرزنش شوم.","answer":{"type":"optional","options":["کاملا موافقم","بسیار موافقم","تا حدودی موافقم","نظری ندارم","تا حدودی مخالفم","بسیار مخالفم","کاملا مخالفم"]},"user_answered":"5"},{"type":"text","text":" اگر دقت کافی اعمال کنم، می‌توانم جلوی حوادث خطرناک را بگیرم.","answer":{"type":"optional","options":["کاملا موافقم","بسیار موافقم","تا حدودی موافقم","نظری ندارم","تا حدودی مخالفم","بسیار مخالفم","کاملا مخالفم"]},"user_answered":"4"},{"type":"text","text":" من اغلب فکر می‌کنم اگر به اندازه کافی دقت نکنم، اتفاقات ناگوار رخ خواهد داد.","answer":{"type":"optional","options":["کاملا موافقم","بسیار موافقم","تا حدودی موافقم","نظری ندارم","تا حدودی مخالفم","بسیار مخالفم","کاملا مخالفم"]},"user_answered":"4"}],"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":"44"},{"type":"text","label":"education","text":"تحصیلات","answer":{"type":"select","options":["ابتدایی اول","ابتدایی دوم","متوسطه اول","متوسطه دوم","دیپلم","کارشناسی","کارشناسی ارشد","پزشکی عمومی","متخصص","دکتری تخصصی","حوزوی مقدمات","حوزوی سطح۱","حوزوی سطح۲","حوزوی سطح۳","حوزوی سطح۴"]},"alias":"education","force":true,"user_answered":"7"},{"type":"text","label":"marital_status","text":"وضعیت تأهل","answer":{"type":"select","options":["مجرد","متأهل"]},"alias":"marital_status","force":true,"user_answered":"1"}],"cornometer":8,"score":{"raw":125,"conflicting_thoughts_of_self":null,"dichotomous_view_of_self":null,"fear_of_others_judgment":null,"preoccupation_with_self_worth":null,"interpretation_level":null,"percentage_interpretation":null},"score_current_version":"1.0.0","score_last_version":"1.0.0","profiles":[{"id":"F963HQ7","file_name":"X1H6UQGD3.json","slug":"storage/profiles/X1H6UQGD3e16zDL4Rm9ckXWFT8u1cKgUPuKYKFWo8t40czt5tlcnBWju49S5VOINq49a9umQVfd2Evb0ZWQwQ7dYQXLD0mK0MV8bFPRy19dLUGNikUKbCQOgFFUFVr8yo/X1H6UQGD3.json","mode":"profile_json","url":"https://api.risloo.local/storage/profiles/X1H6UQGD3e16zDL4Rm9ckXWFT8u1cKgUPuKYKFWo8t40czt5tlcnBWju49S5VOINq49a9umQVfd2Evb0ZWQwQ7dYQXLD0mK0MV8bFPRy19dLUGNikUKbCQOgFFUFVr8yo/X1H6UQGD3.json","type":"data","mime":"application/json","exec":"json"},{"id":"F963HQY","file_name":"X1H6UQGD3.xlsx","slug":"storage/profiles/X1H6UQGD3e16zDL4Rm9ckXWFT8u1cKgUPuKYKFWo8t40czt5tlcnBWju49S5VOINq49a9umQVfd2Evb0ZWQwQ7dYQXLD0mK0MV8bFPRy19dLUGNikUKbCQOgFFUFVr8yo/X1H6UQGD3.xlsx","mode":"profile_xlsx","url":"https://api.risloo.local/storage/profiles/X1H6UQGD3e16zDL4Rm9ckXWFT8u1cKgUPuKYKFWo8t40czt5tlcnBWju49S5VOINq49a9umQVfd2Evb0ZWQwQ7dYQXLD0mK0MV8bFPRy19dLUGNikUKbCQOgFFUFVr8yo/X1H6UQGD3.xlsx","type":"document","mime":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","exec":"xlsx"}]}
@@ -0,0 +1,64 @@
1
+ const { Profile, FS } = require("../Profile");
2
+
3
+ class JLHSQ93 extends Profile {
4
+ // Number of pages
5
+ static pages = 1;
6
+
7
+ // Labels of the sample
8
+ labels = {
9
+ L1: { eng: "raw", fr: "نمره خام", max:240},
10
+ L2: { eng: "nutrition", fr: "تغذیه" , max:70},
11
+ L3: { eng: "sleep", fr: "خواب" , max:62},
12
+ L4: { eng: "sport", fr: "ورزش" , max:16},
13
+ L5: { eng: "awareness", fr: "هشیاری" , max:22},
14
+ L6: { eng: "conflict_stress", fr: "تعارض/ استرس" , max:16},
15
+ L7: { eng: "affection_management", fr: "مدیریت عاطفی" , max:16},
16
+ L8: { eng: "security", fr: "امنیت" , max:14},
17
+ L9: { eng: "disease_prevention", fr: "پیشگیری از بیماری" , max:10},
18
+ L10: { eng: "god_relation", fr: "رابطه با خدا" , max:14},
19
+
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: 702 + 2 * this.padding.x,
39
+ height: 518 + 2 * this.padding.y,
40
+ };
41
+ },
42
+ padding: {
43
+ x: 100.5,
44
+ y: 58,
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 { dataset } = this
58
+ const raw = dataset.score[0]
59
+ const factors = dataset.score.slice(1)
60
+ return [{ raw, factors}];
61
+ }
62
+ }
63
+
64
+ module.exports = JLHSQ93;
@@ -0,0 +1,129 @@
1
+ const { Profile, FS } = require("../Profile");
2
+
3
+ class RAS93 extends Profile {
4
+ // Number of pages
5
+ static pages = 1;
6
+
7
+ // Labels of the sample
8
+ labels = {
9
+ L1: { eng: "raw", fr: "کل" },
10
+ };
11
+
12
+ profileSpec = {
13
+ /* "sample" determines some important info about the sample and profile */
14
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
15
+ /* "prerequisites" is synonym to "fields" in our program */
16
+ sample: {
17
+ name: "مقیاس نگرش مسئولیت‌پذیری" /* Name of the sample */,
18
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
19
+ questions: false /* Determines whether to get questions from inital dataset or not */,
20
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
21
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
22
+ },
23
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
24
+ /* calculating its dimensions carefully is of great importance */
25
+ profile: {
26
+ get dimensions() {
27
+ return {
28
+ width: 730 + 2 * this.padding.x,
29
+ height: 404.5 + 2 * this.padding.y,
30
+ }
31
+ },
32
+ padding: {
33
+ x: 80,
34
+ y: 0,
35
+ },
36
+ },
37
+ /* "item" is the general term used for independent data element to be drawn in the profile */
38
+ item: {
39
+ minValue: 0 /* Minimum value of the item mark */,
40
+ maxValue: 182 /* Maximum value of the item mark */,
41
+ stops: [0, 182] /* Stops array of the item mark */,
42
+ circle: {
43
+ center: {
44
+ radius: 42.5 /* Radius of the central circle */,
45
+ },
46
+ main: {
47
+ R: 340 /* Radius of the outer circle of the item element */,
48
+ r: 290 /* Radius of the inner circle of the item element */,
49
+ brs: {
50
+ tl: 0 /* Top left border radius */,
51
+ bl: 0 /* Bottom left border radius */,
52
+ tr: 0 /* Top right border radius */,
53
+ br: 0 /* Bottom right border radius */,
54
+ } /* Border radiuses at each end of the gauge of the item element */,
55
+ angles: {
56
+ start: FS.toRadians(-180),
57
+ end: FS.toRadians(0),
58
+ } /* Angles of each end of the item element */,
59
+ direction: false /* Clockwise direction for the item gauge element */,
60
+ base: {
61
+ fill: "#F4F4F5" /* Fill of the base part of the item gauge */,
62
+ stroke: "#E4E4E7" /* Stroke of the base part of the item gauge */,
63
+ },
64
+ body: {
65
+ fill: "#DB2777" /* Fill of the body part of the item gauge */,
66
+ stroke: "#9D174D" /* Stroke of the base part of the item gauge */,
67
+ },
68
+ },
69
+ },
70
+ },
71
+ /* "labels" part which has to be provided for each profile */
72
+ labels: Object.values(this.labels)
73
+ };
74
+
75
+ constructor(dataset, options, config = {}) {
76
+ super();
77
+ this._init(dataset, options, config);
78
+ }
79
+
80
+ _calcContext() {
81
+ const {
82
+ spec: { parameters: spec },
83
+ dataset,
84
+ } = this;
85
+
86
+ const { item: itemSpec } = spec;
87
+
88
+ const itemData = dataset.score[0];
89
+ const item = {
90
+ label: itemData.label,
91
+ mark: itemData.mark,
92
+ angle: this._markToAngle(
93
+ itemData.mark,
94
+ itemSpec.minValue,
95
+ itemSpec.maxValue,
96
+ itemSpec.circle.main.angles,
97
+ itemSpec.circle.main.direction
98
+ ),
99
+ stops: itemSpec.stops.map((stop) => ({
100
+ mark: stop,
101
+ angle: this._markToAngle(
102
+ stop,
103
+ itemSpec.minValue,
104
+ itemSpec.maxValue,
105
+ itemSpec.circle.main.angles,
106
+ itemSpec.circle.main.direction
107
+ ),
108
+ })),
109
+ };
110
+
111
+ return [{ item }];
112
+ }
113
+
114
+ _markToAngle(mark, min, max, angles, direction) {
115
+ const totalAngle = this._calcDiffAngle(angles.end, angles.start, direction);
116
+ const deltaTheta = ((mark - min) / (max - min)) * totalAngle;
117
+ return this._calcDistAngle(deltaTheta, angles.start, direction);
118
+ }
119
+
120
+ _calcDiffAngle(theta, theta0, direction) {
121
+ return direction ? 2 * Math.PI - (theta - theta0) : theta - theta0;
122
+ }
123
+
124
+ _calcDistAngle(deltaTheta, theta0, direction) {
125
+ return direction ? 2 * Math.PI - deltaTheta + theta0 : deltaTheta + theta0;
126
+ }
127
+ }
128
+
129
+ module.exports = RAS93;
@@ -0,0 +1,43 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ <linearGradient id="line-bar" x1="0%" y1="0%" x2="100%" y2="0%">
4
+ <stop offset="0%" style="stop-color:#4CBFF5;stop-opacity:1" />
5
+ <stop offset="100%" style="stop-color:#0369A1;stop-opacity:1" />
6
+ </linearGradient>
7
+
8
+ <linearGradient id="line-raw" x1="0%" y1="100%" x2="0%" y2="0%">
9
+ <stop offset="0%" style="stop-color:#A1A1AA;stop-opacity:1"/>
10
+ <stop offset="100%" style="stop-color:#52525B;stop-opacity:1"/>
11
+ </linearGradient>
12
+ </defs>
13
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
14
+ {{bar 4 480 (object tr=2 tl=2 bl=2 br=2) (toRad 0) fill="#E4E4E7" transform="translate(139.5, 19)"}}
15
+
16
+ {{#with factors}}
17
+ {{#each this}}
18
+ <g transform="translate(0, {{math 53 '+' (math @key '*' 53)}})">
19
+ <rect width="{{math label.max '*' 5}}" height="4px" fill="#F4F4F5" transform="translate(143.5, -4)"/>
20
+ {{#if (boolean mark '>=' 2)}}
21
+ {{bar (math 5 '*' mark) 12 (object tr=12 tl=0 bl=0 br=0) (toRad 0) fill="url(#line-bar)" transform="translate(143.5, -12)"}}
22
+ <text x="{{math 143.5 '+' (math 5 '*' mark)}}" y="-18px" text-anchor="middle" font-weight="500" font-size="20px" fill="#075985">{{mark}}</text>
23
+ {{else}}
24
+ {{bar (math 1 '+' (math 2 '*' mark)) 12 (object tr=(math 3 '*' mark) tl=0 bl=0 br=0) (toRad 0) fill="url(#line-bar)" transform="translate(143.5, -12)"}}
25
+ <text x="{{math 146 '+' 2}}" y="-18px" text-anchor="middle" font-weight="500" font-size="20px" fill="#075985">{{mark}}</text>
26
+ {{/if}}
27
+ <text x="{{math 159.5 '+' (math label.max '*' 5)}}" text-anchor="end" font-weight="400" font-size="14px" fill="#3F3F46">{{label.max}}</text>
28
+ <text x="127.5" text-anchor="start" font-weight="400" font-size="18px" fill="#075985">{{label.fr}}</text>
29
+ </g>
30
+ {{/each}}
31
+ {{/with}}
32
+ <g transform="translate(636.5, 0)">
33
+ <text x="5" y="15px" text-anchor="middle" font-weight="400" font-size="20px" fill="#71717A">{{raw.label.max}}</text>
34
+ <text x="22" y="{{math 525 '-' (math 2 '*' raw.mark)}}px" text-anchor="end" font-weight="500" font-size="28px" fill="#3F3F46">{{raw.mark}}</text>
35
+ <rect width="6px" height="480px" fill="#F4F4F5" transform="translate(0, 38)"/>
36
+ {{bar 10 (math 2 '*' raw.mark) (object tr=10 tl=0 bl=0 br=0) (toRad 0) fill="url(#line-raw)" transform=(concat "translate(0, " (concat
37
+ (math 518 '-' (math 2 '*' raw.mark))
38
+ ")"))}}
39
+ <rect width="14px" height="2px" fill="#E4E4E7" transform="translate(-2, 516)"/>
40
+ <text text-anchor="start" font-weight="400" font-size="18px" fill="#3F3F46" transform="rotate(270, -10, 0) translate(-475, 0)">نمره کل</text>
41
+ </g>
42
+ </g>
43
+ {{/ layout}}
@@ -0,0 +1,26 @@
1
+ {{#> layout}}
2
+
3
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
4
+ <g transform="translate({{math (math spec.item.circle.main.R '+' 10) '+' 8}}, {{math (math spec.item.circle.main.R '+' 10) '+' 12}})">
5
+ <text x="0" y="0" font-size="32" font-weight="500" fill="#DB2777" text-anchor="middle" dy="8">{{item.mark}}</text>
6
+ {{#with spec.item.circle as | circleSpec |}}
7
+ <circle cx="0" cy="0" r="{{circleSpec.center.radius}}" stroke="#A1A1AA" fill="none" stroke-dasharray="3"/>
8
+ {{gauge circleSpec.main.R circleSpec.main.r circleSpec.main.brs circleSpec.main.angles circleSpec.main.direction fill=circleSpec.main.base.fill stroke=circleSpec.main.base.stroke}}
9
+ {{gauge circleSpec.main.R circleSpec.main.r circleSpec.main.brs (object start=circleSpec.main.angles.start end=../item.angle) circleSpec.main.direction fill=circleSpec.main.body.fill stroke=circleSpec.main.body.stroke}}
10
+ {{setVar "p1" (polarToCartesian circleSpec.center.radius ../item.angle)}}
11
+ {{setVar "p2" (polarToCartesian circleSpec.main.R ../item.angle)}}
12
+ <line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}" stroke="#71717A"/>
13
+ {{/with}}
14
+ <g font-size="16" font-weight="400" fill="#A1A1AA">
15
+ {{#each item.stops as | stop index |}}
16
+ {{#with @root.spec.item as | itemSpec |}}
17
+ {{setVar "p" (polarToCartesian (math itemSpec.circle.main.R '+' 10) stop.angle)}}
18
+ {{setVar "betMinus90And90" (boolean (boolean stop.angle '>' (toRad -90)) '&&' (boolean stop.angle '<' (toRad 90)))}}
19
+ <text x="{{p.x}}" y="{{p.y}}" text-anchor="{{ternary betMinus90And90 'end' 'start'}}" dy="0">{{stop.mark}}</text>
20
+ {{/with}}
21
+ {{/each}}
22
+ </g>
23
+ </g>
24
+ </g>
25
+
26
+ {{/layout}}