@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.
@@ -3803,7 +3803,6 @@ div[key="mind"] .score-details-title {
3803
3803
 
3804
3804
  .insight-content {
3805
3805
  margin-top: 5%;
3806
- text-align: justify;
3807
3806
  color: #124374;
3808
3807
  font-size: 11.5px;
3809
3808
  font-family: "Metropolis;", sans-serif;
@@ -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.81) ? 550 :
557
- (depressionRiskScore >= 18.52 && depressionRiskScore <= 33.33) ? 400 :
558
- (depressionRiskScore >= 37.04 && depressionRiskScore <= 51.85) ? 380 :
559
- (depressionRiskScore >= 55.56 && depressionRiskScore <= 70.37) ? 370 :
560
- (depressionRiskScore >= 74.07 && depressionRiskScore <= 100) ? 330 :
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.05) ? 460 :
570
- (anxietyRiskScore >= 23.81 && anxietyRiskScore <= 42.86) ? 400 :
571
- (anxietyRiskScore >= 47.62 && anxietyRiskScore <= 66.67) ? 360 :
572
- (anxietyRiskScore >= 71.43 && anxietyRiskScore <= 100) ? 330 :
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>https://www.mediclinic.ae/hra</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: '40px', // Adjust bottom margin to accommodate footer
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.forEach((t)=>{
1231
- if(t.isPositive) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicus.ai/medicus-report-pdf-generator",
3
- "version": "1.0.331",
3
+ "version": "1.0.333",
4
4
  "description": "Nasco corporate report - latest update in 12/10/2023 - Fix HRC for bionext",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -44,4 +44,10 @@
44
44
  <script type="text/javascript" src="../assets/wellbeing/js/js.js"></script>
45
45
 
46
46
  </body>
47
+
48
+ <style>
49
+ body{
50
+ font-family: "Metropolis;", sans-serif;
51
+ }
52
+ </style>
47
53
  </html>