@medicus.ai/medicus-report-pdf-generator 1.0.197 → 1.0.200
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/lib/sendEmail.js
CHANGED
|
@@ -251,16 +251,16 @@ async function sendNascoEmail(data, pdfAttach, mailConfig,clientName) {
|
|
|
251
251
|
}]
|
|
252
252
|
let emailProp = {
|
|
253
253
|
logo: logo,
|
|
254
|
-
headerText: "Your Wellbeing Report",
|
|
255
|
-
body: "Hi" + " " + data.name + ",<br/>" +
|
|
254
|
+
headerText: localeService.t("Your Wellbeing Report"),
|
|
255
|
+
body: localeService.t("Hi") + " " + data.name + ",<br/>" +
|
|
256
256
|
"<br/>" +
|
|
257
|
-
"Your detailed Wellbeing Report is ready!"+"<br/>" +
|
|
257
|
+
localeService.t("Your detailed Wellbeing Report is ready!")+"<br/>" +
|
|
258
258
|
"<br/>" +
|
|
259
|
-
"Download the attached PDF to view your report."+ "<br/>" +
|
|
259
|
+
localeService.t("Download the attached PDF to view your report.")+ "<br/>" +
|
|
260
260
|
"<br/>" +
|
|
261
|
-
"Learn more about what your physical and psychological scores mean and get recommendations on how you can start improving your health and wellbeing today."+"<br/>" +
|
|
261
|
+
localeService.t("Learn more about what your physical and psychological scores mean and get recommendations on how you can start improving your health and wellbeing today.")+"<br/>" +
|
|
262
262
|
"<br/>" +
|
|
263
|
-
"Congratulations, you’ve taken the first step towards better health. Keep going!",
|
|
263
|
+
localeService.t("Congratulations, you’ve taken the first step towards better health. Keep going!"),
|
|
264
264
|
emailColor: fifth_level_color,
|
|
265
265
|
sincerely: false,
|
|
266
266
|
signature: signature,
|
|
@@ -242,13 +242,13 @@ let generateHTMLWellbeingReport = async (data, isDebugging, clientName, language
|
|
|
242
242
|
const rotatePsychologicalAmount = (psychologicalScore / 100) * psychologicalAmount;
|
|
243
243
|
|
|
244
244
|
|
|
245
|
-
let firstSectionlHtml = firstSectionTemplate.replace("{{physicalScore}}", parseFloat(data.calculation.physicalScore)
|
|
245
|
+
let firstSectionlHtml = firstSectionTemplate.replace("{{physicalScore}}", parseFloat(Math.floor(data.calculation.physicalScore)))
|
|
246
246
|
.replace("{{physicalScoreDecimalPart}}", parseFloat((data.calculation.physicalScore).toFixed(1) % 1).toFixed(1).substring(1))
|
|
247
247
|
.replace("{{physicalScoreStatement}}", data.calculation.physicalScoreStatement)
|
|
248
248
|
.replace("{{PhysicalWord}}", localeService.t('physical'))
|
|
249
249
|
.replace(/{{rotatePhysicalAmount}}/gi, rotatePhysicalAmount)
|
|
250
250
|
.replace(/{{physicalColor}}/gi, physicalColor)
|
|
251
|
-
.replace("{{psychologicalScore}}", data.calculation.psychologicalScore
|
|
251
|
+
.replace("{{psychologicalScore}}", Math.floor(data.calculation.psychologicalScore))
|
|
252
252
|
.replace("{{psychologicalScoreDecimalPart}}", parseFloat((data.calculation.psychologicalScore).toFixed(1) % 1).toFixed(1).substring(1))
|
|
253
253
|
.replace("{{psychologicalWord}}", localeService.t('psychological'))
|
|
254
254
|
.replace("{{psychologicalScoreStatement}}", data.calculation.psychologicalScoreStatement)
|
|
@@ -118,5 +118,29 @@
|
|
|
118
118
|
"Participant Analytics": {
|
|
119
119
|
"message": "Participant Analytics",
|
|
120
120
|
"description": "Section title in corporate report"
|
|
121
|
-
}
|
|
121
|
+
},
|
|
122
|
+
"Hi": {
|
|
123
|
+
"message": "Hi",
|
|
124
|
+
"description": "مرحباً"
|
|
125
|
+
},
|
|
126
|
+
"Your Wellbeing Report": {
|
|
127
|
+
"message": "تقرير الصحة العامة الخاص بك",
|
|
128
|
+
"description": "first sentence in the email body"
|
|
129
|
+
},
|
|
130
|
+
"Your detailed Wellbeing Report is ready!": {
|
|
131
|
+
"message": "التقرير المفصل لصحتك العامة أصبح جاهزاً!",
|
|
132
|
+
"description": "second sentence in the email body"
|
|
133
|
+
},
|
|
134
|
+
"Download the attached PDF to view your report.": {
|
|
135
|
+
"message": "حمل ملف PDF المرفق لعرض تقريرك.",
|
|
136
|
+
"description": "third sentence in the email body"
|
|
137
|
+
},
|
|
138
|
+
"Learn more about what your physical and psychological scores mean and get recommendations on how you can start improving your health and wellbeing today.": {
|
|
139
|
+
"message": "تعرف على المزيد حول نتيجة صحتك الجسدية والنفسية واحصل على توصيات حول كيفية البدء بتحسين صحتك العامة اليوم.",
|
|
140
|
+
"description": "fourth sentence in the email body"
|
|
141
|
+
},
|
|
142
|
+
"Congratulations, you’ve taken the first step towards better health. Keep going!": {
|
|
143
|
+
"message": "لقد اتخذت الخطوة الأولى نحو صحة أفضل. واصل التقدم!",
|
|
144
|
+
"description": "fifth sentence in the email body"
|
|
145
|
+
}
|
|
122
146
|
}
|
|
@@ -126,5 +126,29 @@
|
|
|
126
126
|
"Sources": {
|
|
127
127
|
"message": "المصادر",
|
|
128
128
|
"descripition": "sources in the corporate report PDF"
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
|
+
"Hi": {
|
|
131
|
+
"message": "Hi",
|
|
132
|
+
"description": "مرحباً"
|
|
133
|
+
},
|
|
134
|
+
"Your Wellbeing Report": {
|
|
135
|
+
"message": "تقرير الصحة العامة الخاص بك",
|
|
136
|
+
"description": "first sentence in the email body"
|
|
137
|
+
},
|
|
138
|
+
"Your detailed Wellbeing Report is ready!": {
|
|
139
|
+
"message": "التقرير المفصل لصحتك العامة أصبح جاهزاً!",
|
|
140
|
+
"description": "second sentence in the email body"
|
|
141
|
+
},
|
|
142
|
+
"Download the attached PDF to view your report.": {
|
|
143
|
+
"message": "حمل ملف PDF المرفق لعرض تقريرك.",
|
|
144
|
+
"description": "third sentence in the email body"
|
|
145
|
+
},
|
|
146
|
+
"Learn more about what your physical and psychological scores mean and get recommendations on how you can start improving your health and wellbeing today.": {
|
|
147
|
+
"message": "تعرف على المزيد حول نتيجة صحتك الجسدية والنفسية واحصل على توصيات حول كيفية البدء بتحسين صحتك العامة اليوم.",
|
|
148
|
+
"description": "fourth sentence in the email body"
|
|
149
|
+
},
|
|
150
|
+
"Congratulations, you’ve taken the first step towards better health. Keep going!": {
|
|
151
|
+
"message": "لقد اتخذت الخطوة الأولى نحو صحة أفضل. واصل التقدم!",
|
|
152
|
+
"description": "fifth sentence in the email body"
|
|
153
|
+
}
|
|
130
154
|
}
|
|
@@ -126,5 +126,29 @@
|
|
|
126
126
|
"Sources": {
|
|
127
127
|
"message": "Sources",
|
|
128
128
|
"descripition": "sources in the corporate report PDF"
|
|
129
|
+
},
|
|
130
|
+
"Hi": {
|
|
131
|
+
"message": "Hi",
|
|
132
|
+
"description": "Hi in the email body"
|
|
133
|
+
},
|
|
134
|
+
"Your Wellbeing Report": {
|
|
135
|
+
"message": "Your Wellbeing Report",
|
|
136
|
+
"description": "first sentence in the email body"
|
|
137
|
+
},
|
|
138
|
+
"Your detailed Wellbeing Report is ready!": {
|
|
139
|
+
"message": "Your detailed Wellbeing Report is ready!",
|
|
140
|
+
"description": "second sentence in the email body"
|
|
141
|
+
},
|
|
142
|
+
"Download the attached PDF to view your report.": {
|
|
143
|
+
"message": "Download the attached PDF to view your report.",
|
|
144
|
+
"description": "third sentence in the email body"
|
|
145
|
+
},
|
|
146
|
+
"Learn more about what your physical and psychological scores mean and get recommendations on how you can start improving your health and wellbeing today.": {
|
|
147
|
+
"message": "Learn more about what your physical and psychological scores mean and get recommendations on how you can start improving your health and wellbeing today.",
|
|
148
|
+
"description": "fourth sentence in the email body"
|
|
149
|
+
},
|
|
150
|
+
"Congratulations, you’ve taken the first step towards better health. Keep going!": {
|
|
151
|
+
"message": "Congratulations, you’ve taken the first step towards better health. Keep going!",
|
|
152
|
+
"description": "fifth sentence in the email body"
|
|
129
153
|
}
|
|
130
154
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicus.ai/medicus-report-pdf-generator",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.200",
|
|
4
|
+
"description": "Nasco patient report - latest update in 29/8/2022 - fix patient name font size",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "node index.js"
|