@medicus.ai/medicus-report-pdf-generator 1.0.331 → 1.0.333
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.
|
@@ -553,11 +553,11 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
|
|
|
553
553
|
|
|
554
554
|
let depressionRiskScore = wellbeingData.calculation.depressionRiskScore?.toFixed(1)
|
|
555
555
|
const depressionRiskAmount =
|
|
556
|
-
(depressionRiskScore >= 0 && depressionRiskScore <= 14.
|
|
557
|
-
(depressionRiskScore >= 18.
|
|
558
|
-
(depressionRiskScore >= 37
|
|
559
|
-
(depressionRiskScore >= 55.
|
|
560
|
-
(depressionRiskScore >= 74.
|
|
556
|
+
(depressionRiskScore >= 0 && depressionRiskScore <= 14.8) ? 550 :
|
|
557
|
+
(depressionRiskScore >= 18.5 && depressionRiskScore <= 33.3) ? 400 :
|
|
558
|
+
(depressionRiskScore >= 37 && depressionRiskScore <= 51.9) ? 380 :
|
|
559
|
+
(depressionRiskScore >= 55.6 && depressionRiskScore <= 70.4) ? 370 :
|
|
560
|
+
(depressionRiskScore >= 74.1 && depressionRiskScore <= 100) ? 330 :
|
|
561
561
|
0;
|
|
562
562
|
let depressionRiskColor = (depressionRiskScore > 40 && depressionRiskScore < 70) ? third_level_color : (depressionRiskScore >= 70) ? fifth_level_color : client === 'nasco' ? second_level_color : first_level_color;
|
|
563
563
|
|
|
@@ -566,10 +566,10 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
|
|
|
566
566
|
|
|
567
567
|
let anxietyRiskScore = wellbeingData.calculation.anxietyRiskScore?.toFixed(1)
|
|
568
568
|
const anxietyRiskAmount =
|
|
569
|
-
(anxietyRiskScore >= 0 && anxietyRiskScore <= 19
|
|
570
|
-
(anxietyRiskScore >= 23.
|
|
571
|
-
(anxietyRiskScore >= 47.
|
|
572
|
-
(anxietyRiskScore >= 71.
|
|
569
|
+
(anxietyRiskScore >= 0 && anxietyRiskScore <= 19) ? 460 :
|
|
570
|
+
(anxietyRiskScore >= 23.8 && anxietyRiskScore <= 42.9) ? 400 :
|
|
571
|
+
(anxietyRiskScore >= 47.6 && anxietyRiskScore <= 66.7) ? 360 :
|
|
572
|
+
(anxietyRiskScore >= 71.4 && anxietyRiskScore <= 100) ? 330 :
|
|
573
573
|
0;
|
|
574
574
|
|
|
575
575
|
let anxietyRiskColor = (anxietyRiskScore > 40 && anxietyRiskScore < 70) ? third_level_color : (anxietyRiskScore >= 70) ? fifth_level_color : client === 'nasco' ? second_level_color : first_level_color;
|
|
@@ -930,9 +930,13 @@ const generatePDFReport = async (data) => {
|
|
|
930
930
|
<span style="font-style: italic;">Page <span class="pageNumber"></span> of <span class="totalPages"></span></span>
|
|
931
931
|
</div>
|
|
932
932
|
<div style="width: 1px; height: 16px; background: #9DA9B4; margin: 0 8px;"></div>
|
|
933
|
-
<div>
|
|
933
|
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
|
934
|
+
<div>Telephone: 800 20 22</div>
|
|
935
|
+
<div>Email: HRA@mediclinic.ae</div>
|
|
936
|
+
</div>
|
|
934
937
|
</div>
|
|
935
938
|
`;
|
|
939
|
+
|
|
936
940
|
|
|
937
941
|
const headerTemplate=`
|
|
938
942
|
<div style="width: 400px; height: 61.50px; position: relative">
|
|
@@ -997,7 +1001,7 @@ const generatePDFReport = async (data) => {
|
|
|
997
1001
|
width: "220mm",
|
|
998
1002
|
margin: {
|
|
999
1003
|
top: '20px', // Adjust top margin to accommodate header
|
|
1000
|
-
bottom: '
|
|
1004
|
+
bottom: '50px', // Adjust bottom margin to accommodate footer
|
|
1001
1005
|
left: '20px',
|
|
1002
1006
|
right: '20px'
|
|
1003
1007
|
}
|
|
@@ -1227,8 +1231,8 @@ let renderInsightTips = (tips,type) => {
|
|
|
1227
1231
|
|
|
1228
1232
|
let textColor = tip.isPositive ? '#124374' : 'black';
|
|
1229
1233
|
let tipContents=''
|
|
1230
|
-
tips.
|
|
1231
|
-
if(
|
|
1234
|
+
tips.map((t,index)=>{
|
|
1235
|
+
if(index==0) {
|
|
1232
1236
|
tipContents+=`
|
|
1233
1237
|
|
|
1234
1238
|
<div class="insight-content" style="color: #124374;">${t.content}</div>
|
package/package.json
CHANGED