@medicus.ai/medicus-report-pdf-generator 1.0.299 → 1.0.302
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/README.md +26 -26
- package/app/i18n.config.js +20 -20
- package/app/i18n_wellbeing.config.js +20 -20
- package/app/services/localeService.js +28 -28
- package/assets/arabic.css +275 -275
- package/assets/charts.min.js +7 -7
- package/assets/corporate_report/css/report.css +581 -568
- package/assets/corporate_report/css/report_rtl.css +145 -0
- package/assets/corporate_report/images/cover-bg-bionext.png +0 -0
- package/assets/corporate_report/js/js.js +14 -14
- package/assets/data/data.json +124 -124
- package/assets/data/data2.json +675 -675
- package/assets/data/pdf_data_with_history.json +1255 -1255
- package/assets/doctor-note-insight-icon.svg +11 -11
- package/assets/imc/css/style.css +61 -61
- package/assets/jquery-1.4.min.js +151 -151
- package/assets/js.js +201 -201
- package/assets/print.css +4 -4
- package/assets/qr-code-style.css +68 -68
- package/assets/qrcode.min.js +3 -3
- package/assets/sanusx/css/sanusx_report.css +708 -0
- package/assets/sanusx/fonts/FrankRuhlLibre-Bold.ttf +0 -0
- package/assets/sanusx/fonts/FrankRuhlLibre-Regular.ttf +0 -0
- package/assets/sanusx/fonts/OpenSans-Bold.ttf +0 -0
- package/assets/sanusx/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/assets/sanusx/fonts/OpenSans-Regular.ttf +0 -0
- package/assets/sanusx/fonts/OpenSans-Semibold.ttf +0 -0
- package/assets/sanusx/fonts/Quattrocento-Bold.ttf +0 -0
- package/assets/sanusx/fonts/Quattrocento-Regular.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Black.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-BlackItalic.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Bold.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-BoldItalic.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Italic.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Light.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-LightItalic.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Medium.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-MediumItalic.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Regular.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-Thin.ttf +0 -0
- package/assets/sanusx/fonts/Roboto-ThinItalic.ttf +0 -0
- package/assets/sanusx/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/assets/sanusx/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/assets/sanusx/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/assets/sanusx/fonts/Sora-Bold.ttf +0 -0
- package/assets/sanusx/fonts/Sora-ExtraBold.ttf +0 -0
- package/assets/sanusx/fonts/Sora-ExtraLight.ttf +0 -0
- package/assets/sanusx/fonts/Sora-Light.ttf +0 -0
- package/assets/sanusx/fonts/Sora-Medium.ttf +0 -0
- package/assets/sanusx/fonts/Sora-Regular.ttf +0 -0
- package/assets/sanusx/fonts/Sora-SemiBold.ttf +0 -0
- package/assets/sanusx/fonts/Sora-Thin.ttf +0 -0
- package/assets/sanusx/images/A4.png +0 -0
- package/assets/sanusx/images/body_tip_icon.png +0 -0
- package/assets/sanusx/images/footer-logo.png +0 -0
- package/assets/sanusx/images/fork_icon.png +0 -0
- package/assets/sanusx/images/heart_icon.png +0 -0
- package/assets/sanusx/images/high-segments-circle-SanusX.png +0 -0
- package/assets/sanusx/images/indicator.png +0 -0
- package/assets/sanusx/images/leaves_icon.png +0 -0
- package/assets/sanusx/images/lifestyle_tip_icon.png +0 -0
- package/assets/sanusx/images/low-segments-circle-SanusX.png +0 -0
- package/assets/sanusx/images/med-segments-circle-SanusX.png +0 -0
- package/assets/sanusx/images/middle_arrows_image.png +0 -0
- package/assets/sanusx/images/mind_tip_icon.png +0 -0
- package/assets/sanusx/images/monkey.png +0 -0
- package/assets/sanusx/images/monkey_icon.png +0 -0
- package/assets/sanusx/images/old/monkey.png +0 -0
- package/assets/sanusx/images/old/monkey_icon.png +0 -0
- package/assets/sanusx/images/old/owl.png +0 -0
- package/assets/sanusx/images/old/owl_icon.png +0 -0
- package/assets/sanusx/images/old/tiger.png +0 -0
- package/assets/sanusx/images/old/tiger_icon.png +0 -0
- package/assets/sanusx/images/owl.png +0 -0
- package/assets/sanusx/images/owl_icon.png +0 -0
- package/assets/sanusx/images/right_icon.png +0 -0
- package/assets/sanusx/images/strength_icon.png +0 -0
- package/assets/sanusx/images/superpower_icon.png +0 -0
- package/assets/sanusx/images/tiger.png +0 -0
- package/assets/sanusx/images/tiger_icon.png +0 -0
- package/assets/sanusx/images/weakness_icon.png +0 -0
- package/assets/sanusx/images/wrong_icon.png +0 -0
- package/assets/sizing.js +2 -2
- package/assets/styles.css +1537 -1537
- package/assets/styles.min.css +2 -2
- package/assets/translation.js +30 -30
- package/assets/wellbeing/css/nasco_report.css +3437 -3383
- package/assets/wellbeing/css/nasco_report_rtl.css +674 -664
- package/assets/wellbeing/js/js.js +111 -111
- package/assets/wellbeing/js/raphael.js +8437 -8437
- package/config/Nageeb.ai.json +36 -0
- package/config/bionext.json +38 -0
- package/config/default.json +35 -18
- package/config/diagnostikare.json +35 -0
- package/config/nasco.json +35 -18
- package/config/sanitas.json +35 -18
- package/config/sanusx.json +35 -0
- package/downloadfile.js +6 -6
- package/index.js +332 -249
- package/lib/corporate_report_generator.js +399 -326
- package/lib/sanusx_report_generator.js +535 -0
- package/lib/sendEmail.js +343 -343
- package/lib/wellbeing_report_generator.js +690 -644
- package/locales/ar-AE.json +169 -169
- package/locales/ar-SA.json +169 -169
- package/locales/ar.json +162 -162
- package/locales/de.json +169 -169
- package/locales/en.json +165 -165
- package/locales/fr.json +168 -168
- package/locales/pt.json +165 -165
- package/locales/wellbeing/ar-AE.json +145 -121
- package/locales/wellbeing/ar-SA.json +153 -121
- package/locales/wellbeing/de.json +301 -121
- package/locales/wellbeing/en.json +309 -121
- package/locales/wellbeing/es.json +134 -0
- package/locales/wellbeing/fr.json +121 -121
- package/locales/wellbeing/it-IT.json +121 -121
- package/locales/wellbeing/pt.json +121 -121
- package/locales/wellbeing/tr.json +121 -121
- package/locales/wellbeing/zh-CN.json +121 -121
- package/locales/zh-CN.json +165 -165
- package/package.json +45 -45
- package/run.js +15 -15
- package/templates/base.html +23 -23
- package/templates/blocks/ar-first-page-header.html +68 -68
- package/templates/blocks/ar-footer.html +54 -54
- package/templates/blocks/ar-header.html +67 -67
- package/templates/blocks/biomarker-compact-ar.html +27 -27
- package/templates/blocks/biomarker-compact.html +27 -27
- package/templates/blocks/biomarker-details.html +41 -41
- package/templates/blocks/biomarker-insight.html +22 -22
- package/templates/blocks/biomarker-min.html +9 -9
- package/templates/blocks/doctor-note.html +11 -11
- package/templates/blocks/footer.html +34 -34
- package/templates/blocks/header-first-page.html +46 -46
- package/templates/blocks/header.html +49 -49
- package/templates/blocks/panel-compact.html +38 -38
- package/templates/blocks/panel-details.html +16 -16
- package/templates/blocks/report-summary.html +16 -16
- package/templates/blocks/section-title.html +4 -4
- package/templates/blocks/signature.html +16 -16
- package/templates/blocks/summary-insight.html +15 -15
- package/templates/blocks/summary.html +9 -9
- package/templates/corporate_report/cover_page.html +23 -22
- package/templates/corporate_report/footer.html +9 -9
- package/templates/corporate_report/ltr_no_pages.html +20 -20
- package/templates/corporate_report/page.html +24 -22
- package/templates/corporate_report/participant_analytics.html +5 -5
- package/templates/corporate_report/rtl_no_pages.html +21 -0
- package/templates/empty.html +10 -10
- package/templates/first_page_head.html +157 -157
- package/templates/imc/first-header-template.html +53 -53
- package/templates/ltr.html +1368 -1368
- package/templates/ltr_no_pages.html +89 -89
- package/templates/no_pages.html +1224 -1224
- package/templates/popup/popup-template.html +129 -129
- package/templates/rtl_no_pages.html +92 -92
- package/templates/sanusx/blocks/footer.html +7 -0
- package/templates/sanusx/blocks/header.html +21 -0
- package/templates/sanusx/blocks/personal-details.html +124 -0
- package/templates/sanusx/blocks/predictions-section.html +58 -0
- package/templates/sanusx/blocks/recommendations-section.html +7 -0
- package/templates/sanusx/blocks/super-power-section.html +30 -0
- package/templates/sanusx/blocks/tips.html +9 -0
- package/templates/sanusx/ltr_no_pages.html +26 -0
- package/templates/sanusx/rtl_no_pages.html +36 -0
- package/templates/template.html +1377 -1377
- package/templates/wellbeing/blocks/first-section.html +106 -106
- package/templates/wellbeing/blocks/footer.html +7 -7
- package/templates/wellbeing/blocks/header.html +37 -37
- package/templates/wellbeing/blocks/tips.html +8 -9
- package/templates/wellbeing/ltr_no_pages.html +35 -35
- package/templates/wellbeing/rtl_no_pages.html +36 -36
- package/templates/wellbeing/wellbeing_template.html +43 -43
- /package/assets/corporate_report/images/{cover-bg.png → cover-bg-default.png} +0 -0
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# Medicus Pdf Generator
|
|
2
|
-
|
|
3
|
-
This package is a stand-alone lightweight nodejs library for generating medical reports in a PDF format.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
using this command.
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @medicus.ai/medicus-report-pdf-generator
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```python
|
|
16
|
-
const {generateMedicusPDF} = require('@medicus.ai/medicus-report-pdf-generator');
|
|
17
|
-
|
|
18
|
-
async function generatePDF(json) {
|
|
19
|
-
try {
|
|
20
|
-
const data = await generateMedicusPDF(json);
|
|
21
|
-
return data;
|
|
22
|
-
}
|
|
23
|
-
catch (e) {
|
|
24
|
-
throw new Meteor.Error(500, 'error', e);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
# Medicus Pdf Generator
|
|
2
|
+
|
|
3
|
+
This package is a stand-alone lightweight nodejs library for generating medical reports in a PDF format.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
using this command.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @medicus.ai/medicus-report-pdf-generator
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
const {generateMedicusPDF} = require('@medicus.ai/medicus-report-pdf-generator');
|
|
17
|
+
|
|
18
|
+
async function generatePDF(json) {
|
|
19
|
+
try {
|
|
20
|
+
const data = await generateMedicusPDF(json);
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
throw new Meteor.Error(500, 'error', e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
27
|
```
|
package/app/i18n.config.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const i18n = require('i18n');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
i18n.configure({
|
|
5
|
-
locales: ['en', 'de', 'fr','ar-AE','ar-SA','pt','zh-CN'],
|
|
6
|
-
defaultLocale: 'en',
|
|
7
|
-
// sets a custom cookie name to parse locale settings from - defaults to NULL
|
|
8
|
-
cookie: 'currentLang',
|
|
9
|
-
queryParameter: 'lang',
|
|
10
|
-
directory: path.resolve(__dirname + '/../locales'),
|
|
11
|
-
api: {
|
|
12
|
-
'__': 'translate',
|
|
13
|
-
'__n': 'translateN'
|
|
14
|
-
},
|
|
15
|
-
// Downcase locale when passed on queryParam; e.g. lang=en-US becomes
|
|
16
|
-
// en-us. When set to false, the queryParam value will be used as passed;
|
|
17
|
-
// e.g. lang=en-US remains en-US.
|
|
18
|
-
preserveLegacyCase: true
|
|
19
|
-
});
|
|
20
|
-
|
|
1
|
+
const i18n = require('i18n');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
i18n.configure({
|
|
5
|
+
locales: ['en', 'de', 'fr','ar-AE','ar-SA','pt','zh-CN'],
|
|
6
|
+
defaultLocale: 'en',
|
|
7
|
+
// sets a custom cookie name to parse locale settings from - defaults to NULL
|
|
8
|
+
cookie: 'currentLang',
|
|
9
|
+
queryParameter: 'lang',
|
|
10
|
+
directory: path.resolve(__dirname + '/../locales'),
|
|
11
|
+
api: {
|
|
12
|
+
'__': 'translate',
|
|
13
|
+
'__n': 'translateN'
|
|
14
|
+
},
|
|
15
|
+
// Downcase locale when passed on queryParam; e.g. lang=en-US becomes
|
|
16
|
+
// en-us. When set to false, the queryParam value will be used as passed;
|
|
17
|
+
// e.g. lang=en-US remains en-US.
|
|
18
|
+
preserveLegacyCase: true
|
|
19
|
+
});
|
|
20
|
+
|
|
21
21
|
module.exports = i18n;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const i18n = require('i18n');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
i18n.configure({
|
|
5
|
-
locales: ['en', 'de', 'fr','ar-AE','ar-SA','pt','zh-CN','tr'],
|
|
6
|
-
defaultLocale: 'en',
|
|
7
|
-
// sets a custom cookie name to parse locale settings from - defaults to NULL
|
|
8
|
-
cookie: 'currentLang',
|
|
9
|
-
queryParameter: 'lang',
|
|
10
|
-
directory: path.resolve(__dirname + '/../locales/wellbeing'),
|
|
11
|
-
api: {
|
|
12
|
-
'__': 'translate',
|
|
13
|
-
'__n': 'translateN'
|
|
14
|
-
},
|
|
15
|
-
// Downcase locale when passed on queryParam; e.g. lang=en-US becomes
|
|
16
|
-
// en-us. When set to false, the queryParam value will be used as passed;
|
|
17
|
-
// e.g. lang=en-US remains en-US.
|
|
18
|
-
preserveLegacyCase: true
|
|
19
|
-
});
|
|
20
|
-
|
|
1
|
+
const i18n = require('i18n');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
i18n.configure({
|
|
5
|
+
locales: ['en', 'de', 'fr','ar-AE','ar-SA','pt','zh-CN','tr','es'],
|
|
6
|
+
defaultLocale: 'en',
|
|
7
|
+
// sets a custom cookie name to parse locale settings from - defaults to NULL
|
|
8
|
+
cookie: 'currentLang',
|
|
9
|
+
queryParameter: 'lang',
|
|
10
|
+
directory: path.resolve(__dirname + '/../locales/wellbeing'),
|
|
11
|
+
api: {
|
|
12
|
+
'__': 'translate',
|
|
13
|
+
'__n': 'translateN'
|
|
14
|
+
},
|
|
15
|
+
// Downcase locale when passed on queryParam; e.g. lang=en-US becomes
|
|
16
|
+
// en-us. When set to false, the queryParam value will be used as passed;
|
|
17
|
+
// e.g. lang=en-US remains en-US.
|
|
18
|
+
preserveLegacyCase: true
|
|
19
|
+
});
|
|
20
|
+
|
|
21
21
|
module.exports = i18n;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LocaleService
|
|
3
|
-
*/
|
|
4
|
-
function LocaleService(i18nProvider){
|
|
5
|
-
this.i18nProvider = i18nProvider;
|
|
6
|
-
this.getCurrentLocale = function (){
|
|
7
|
-
return this.i18nProvider.getLocale();
|
|
8
|
-
}
|
|
9
|
-
this.translatePlurals = function(phrase, count) {
|
|
10
|
-
return this.i18nProvider.translateN(phrase, count)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.setLocale = function(locale) {
|
|
15
|
-
if (this.getLocales().indexOf(locale) !== -1) {
|
|
16
|
-
this.i18nProvider.setLocale(locale)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
this.t = function(string, args = undefined) {
|
|
21
|
-
return this.i18nProvider.__(string, args).message
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
this.getLocales= function() {
|
|
25
|
-
return this.i18nProvider.getLocales();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
1
|
+
/**
|
|
2
|
+
* LocaleService
|
|
3
|
+
*/
|
|
4
|
+
function LocaleService(i18nProvider){
|
|
5
|
+
this.i18nProvider = i18nProvider;
|
|
6
|
+
this.getCurrentLocale = function (){
|
|
7
|
+
return this.i18nProvider.getLocale();
|
|
8
|
+
}
|
|
9
|
+
this.translatePlurals = function(phrase, count) {
|
|
10
|
+
return this.i18nProvider.translateN(phrase, count)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
this.setLocale = function(locale) {
|
|
15
|
+
if (this.getLocales().indexOf(locale) !== -1) {
|
|
16
|
+
this.i18nProvider.setLocale(locale)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
this.t = function(string, args = undefined) {
|
|
21
|
+
return this.i18nProvider.__(string, args).message
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
this.getLocales= function() {
|
|
25
|
+
return this.i18nProvider.getLocales();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
29
|
module.exports = LocaleService;
|