@medicus.ai/medicus-report-pdf-generator 1.3.16 → 1.3.17
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.
|
@@ -524,7 +524,8 @@ const renderExtendedFirstSection = (template, calculationData, metrics, client)
|
|
|
524
524
|
.replace(/{{rotatePhysicalAmount}}/gi, metrics.physical.rotateAmount)
|
|
525
525
|
.replace(/{{physicalColor}}/gi, metrics.physical.color)
|
|
526
526
|
.replace("{{ScoreText}}", localeService.t('scoreText'))
|
|
527
|
-
.replace("{{lowScoreText}}", localeService.t(
|
|
527
|
+
.replace("{{lowScoreText}}", localeService.t(
|
|
528
|
+
String(client).toLowerCase() === 'maisonsante' ? 'scoreText' : 'lowScoreText'))
|
|
528
529
|
.replace("{{PhysicalWellbeingText}}", localeService.t('PhysicalWellbeingText'))
|
|
529
530
|
.replace("{{PsychologicalWellbeingText}}", localeService.t('PsychologicalWellbeingText'))
|
|
530
531
|
.replace("{{psychologicalScore}}", metrics.psychological.scoreInteger)
|
|
@@ -1254,7 +1255,12 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
|
|
|
1254
1255
|
// Calculate all metrics
|
|
1255
1256
|
const metrics = {
|
|
1256
1257
|
physical: calculatePhysicalScoreMetrics(wellbeingData.calculation.physicalScore, client),
|
|
1257
|
-
psychological
|
|
1258
|
+
// Maison Sante draws the psychological dial with the same three bands as the
|
|
1259
|
+
// physical one, so it needs the physical needle geometry too. Every other
|
|
1260
|
+
// client keeps the five-band dial and its own rotation math.
|
|
1261
|
+
psychological: client.toLowerCase() === 'maisonsante'
|
|
1262
|
+
? calculatePhysicalScoreMetrics(wellbeingData.calculation.psychologicalScore, client)
|
|
1263
|
+
: calculateScoreMetrics(wellbeingData.calculation.psychologicalScore, client),
|
|
1258
1264
|
depression: calculateExtendedScoreMetrics(wellbeingData.calculation.depressionRiskScore, 'depression', client),
|
|
1259
1265
|
anxiety: calculateExtendedScoreMetrics(wellbeingData.calculation.anxietyRiskScore, 'anxiety', client)
|
|
1260
1266
|
};
|
package/package.json
CHANGED
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
|
-
<div style="width: calc(50% - 11px); margin-left: 22px;">
|
|
68
|
+
<div style="width: calc(50% - 11px); margin-left: 22px; position: relative;">
|
|
69
69
|
<div style="color: {{sectionTitleBorderColor}}; font-size: 16px; font-weight: 700; word-wrap: break-word;padding-bottom: 5px;text-align: center;margin-left: 10px;">{{PsychologicalWellbeingText}}</div>
|
|
70
70
|
|
|
71
|
-
<div class="row score-section" style="width: calc(100% - 38px) !important; margin-left: 0;">
|
|
71
|
+
<div class="row score-section" style="width: calc(100% - 38px) !important; margin-left: 0; position: static;">
|
|
72
72
|
<div style="display: flex;width: 100%;justify-content: center;">
|
|
73
|
-
<div class="center aligned eight wide psychological-score-section">
|
|
73
|
+
<div class="center aligned eight wide psychological-score-section" style="position: static;">
|
|
74
74
|
<div class="meter-component">
|
|
75
75
|
<style>
|
|
76
76
|
|
|
@@ -83,31 +83,22 @@
|
|
|
83
83
|
</style>
|
|
84
84
|
<div id="screenshot">
|
|
85
85
|
<div class="speedometer-container">
|
|
86
|
-
<svg width="150" height="
|
|
87
|
-
<path
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
fill="{{forthLevelColor}}" stroke="{{forthLevelColor}}" stroke-width="2"/>
|
|
98
|
-
|
|
99
|
-
<path d="M15.5583 77.6984C15.1887 78.1088 14.5555 78.1427 14.1534 77.7641C9.57873 73.4572 5.95383 68.2372 3.51616 62.4382C1.07849 56.6392 -0.114859 50.3971 0.00869898 44.1152C0.0195597 43.563 0.486795 43.1343 1.0386 43.1575L3.0868 43.2433C3.6386 43.2664 4.06589 43.7326 4.05624 44.2848C3.9569 49.9709 5.04306 55.6194 7.2497 60.8688C9.45634 66.1182 12.7321 70.8462 16.8642 74.7536C17.2654 75.1331 17.2995 75.7645 16.93 76.1749L15.5583 77.6984Z"
|
|
100
|
-
fill="{{fifthLevelColor}}" stroke="{{fifthLevelColor}}" stroke-width="2"/>
|
|
101
|
-
|
|
102
|
-
<path d="M87.9738 43.4993C89.0777 43.4608 90.0085 44.3247 89.998 45.4293C89.9413 51.3724 88.7076 57.2525 86.3611 62.7274C84.0145 68.2023 80.6071 73.1507 76.3423 77.2902C75.5497 78.0596 74.2822 77.9813 73.5488 77.1553L72.0218 75.4354C71.2884 74.6094 71.3676 73.3489 72.1546 72.5739C75.7288 69.054 78.5893 64.868 80.5705 60.2456C82.5517 55.6231 83.6104 50.6649 83.6946 45.6491C83.7131 44.5447 84.5713 43.6182 85.6752 43.5796L87.9738 43.4993Z"
|
|
103
|
-
fill="{{firstLevelColor}}" stroke="{{firstLevelColor}}" stroke-width="0"/>
|
|
104
|
-
</svg>
|
|
86
|
+
<svg width="150" height="102" viewBox="0 0 92 80" fill="none" >
|
|
87
|
+
<path
|
|
88
|
+
d="M47.7561 0.0346775C47.1753 0.00827408 46.5856 -0.000526428 45.9959 -0.000526428C45.4062 -0.000526428 44.8165 0.00827408 44.2356 0.0346775C32.7245 0.454498 22.2369 4.96779 14.1978 12.1602C13.8255 12.4929 13.8141 13.0764 14.1661 13.4311L14.7602 14.0287L17.251 16.5106L17.9119 17.1716C18.2376 17.4973 18.756 17.5087 19.1019 17.2033C25.87 11.2448 34.6343 7.48583 44.2356 7.08449C44.8165 7.04928 45.4062 7.04048 45.9959 7.04048C46.5856 7.04048 47.1753 7.04928 47.7561 7.08449C57.3574 7.48583 66.1217 11.2448 72.889 17.2112C73.2358 17.5166 73.7542 17.5061 74.0807 17.1795L74.7496 16.5106L77.2404 14.0287L77.8345 13.4311C78.1865 13.0764 78.1751 12.4929 77.8028 12.1602C69.7628 4.96779 59.2752 0.454498 47.7561 0.0346775Z"
|
|
89
|
+
fill="{{thirdLevelColor}}" stroke="{{thirdLevelColor}}" stroke-width="0"/>
|
|
90
|
+
<path
|
|
91
|
+
d="M91.9648 45.9963C91.5547 34.9727 87.2359 24.9278 80.3551 17.2074C80.0197 16.8307 79.4309 16.8201 79.0736 17.1757L77.8256 18.4202C77.4973 18.7476 77.4867 19.2686 77.7939 19.6154C84.0745 26.7004 88.0342 35.8951 88.4443 45.9963C88.4707 46.5772 88.4795 47.1669 88.4795 47.7566C88.4795 48.3462 88.4707 48.9359 88.4443 49.5168C88.0342 59.6171 84.0745 68.8118 77.7939 75.8977C77.4867 76.2445 77.4973 76.7655 77.8256 77.0929L79.0789 78.3418C79.4336 78.6957 80.0171 78.6851 80.3507 78.311C87.2341 70.5897 91.5547 60.543 91.9648 49.5168C91.9912 48.9271 92 48.3462 92 47.7566C92 47.1669 91.9912 46.586 91.9648 45.9963Z"
|
|
92
|
+
fill="{{fifthLevelColor}}" stroke="{{fifthLevelColor}}" stroke-width="3"/>
|
|
93
|
+
<path
|
|
94
|
+
d="M3.52051 47.7566C3.52051 47.1669 3.52931 46.5772 3.55571 45.9963C3.96673 35.8951 7.92554 26.7004 14.2061 19.6154C14.5133 19.2686 14.5036 18.7476 14.1744 18.4202L12.9211 17.1713C12.5664 16.8175 11.9829 16.828 11.6494 17.2021C4.76588 24.9234 0.445344 34.9701 0.035205 45.9963C0.00880123 46.586 0 47.1669 0 47.7566C0 48.3463 0.00880123 48.9271 0.035205 49.5168C0.445344 60.543 4.76588 70.5897 11.6494 78.311C11.9829 78.6851 12.5664 78.6957 12.9211 78.3418L14.1744 77.0929C14.5036 76.7655 14.5133 76.2445 14.2061 75.8977C7.92554 68.8118 3.96673 59.6171 3.55571 49.5168C3.52931 48.9359 3.52051 48.3463 3.52051 47.7566Z"
|
|
95
|
+
fill="{{secondLevelColor}}" stroke="{{secondLevelColor}}" stroke-width="3"/>
|
|
96
|
+
</svg>
|
|
105
97
|
|
|
106
98
|
|
|
107
99
|
</div>
|
|
108
100
|
|
|
109
|
-
<div class=" loading_Meter1
|
|
110
|
-
needle-container2">
|
|
101
|
+
<div class="needle-container loading_Meter1" style="margin-right: auto;">
|
|
111
102
|
<svg class="ui image meter-needle " version="1.2" baseProfile="tiny-ps" viewBox="0 0 65 57" width="65" height="57">
|
|
112
103
|
<g id="Layer">
|
|
113
104
|
<path id="Layer" class="shp0" fill="none" d="M-4.05 94.8L-30.63 57.17L386.92 -218.49L413.51 -180.86L-4.05 94.8Z" />
|
|
@@ -115,7 +106,7 @@
|
|
|
115
106
|
</g>
|
|
116
107
|
</svg>
|
|
117
108
|
</div>
|
|
118
|
-
<div class="speedometer-
|
|
109
|
+
<div style="margin-top: 22px; left: 0;" class="speedometer-value">
|
|
119
110
|
<span class="speedometer-value-up needle-value" >
|
|
120
111
|
<div><strong>{{psychologicalScore}}</strong>{{psychologicalScoreDecimalPart}}</div>
|
|
121
112
|
</span>
|