@medicus.ai/medicus-report-pdf-generator 1.3.10 → 1.3.12
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/config/maisonsante.json +40 -0
- package/lib/big_integral_questionnaire.js +298 -0
- package/lib/template.js +31 -10
- package/lib/wellbeing_report_generator.js +36 -4
- package/locales/en.json +64 -0
- package/locales/wellbeing/en.json +422 -408
- package/package.json +3 -3
- package/preview-big-integral.js +75 -0
- package/templates/maisonsante/blocks/first-section.html +208 -0
- package/templates/maisonsante/blocks/footer.html +8 -0
- package/templates/maisonsante/blocks/header-template.html +6 -0
- package/templates/maisonsante/blocks/header.html +20 -0
- package/templates/maisonsante/blocks/patient-table.html +38 -0
- package/templates/maisonsante/blocks/pdf-header.html +8 -0
- package/templates/maisonsante/blocks/tips.html +9 -0
- package/templates/maisonsante/ltr_no_pages.html +38 -0
- package/templates/maisonsante/rtl_no_pages.html +43 -0
- package/templates/maisonsante/wellbeing_template.html +42 -0
- package/test.js +8 -10
- package/testing-reports/mediclinic/arabic-data.js +402 -506
- package/testing-reports/mediclinic/doctor-data.js +483 -620
- package/testing-reports/mediclinic/with-wellbeing.js +382 -8110
- package/testing-reports/pha/notes-example.js +397 -0
- package/testing-reports/pha/ex1.js +0 -485
- package/testing-reports/pha/ex2.js +0 -116
- package/testing-reports/pha/prod-patient.js +0 -510
- package/testing-reports/pha/with-wellbeing-full-data.js +0 -813
- package/testing-reports/pha/with-wellbeing.js +0 -529
- package/testing-reports/pha/without-wellbeing.js +0 -448
package/test.js
CHANGED
|
@@ -6,23 +6,21 @@ const {
|
|
|
6
6
|
|
|
7
7
|
const CLIENTS = {
|
|
8
8
|
Mediclinic: 'Mediclinic',
|
|
9
|
-
PHA: 'pha'
|
|
9
|
+
PHA: 'pha',
|
|
10
|
+
MaisonSante: 'maisonsante'
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const client = CLIENTS.PHA;
|
|
13
14
|
|
|
14
15
|
const path = require("path");
|
|
15
|
-
const
|
|
16
|
-
const phaReportWithoutWellbeing = require("./testing-reports/pha/without-wellbeing");
|
|
17
|
-
const phaReportWithWellbeingFullData = require("./testing-reports/pha/with-wellbeing-full-data");
|
|
18
|
-
const phaReportEx2 = require("./testing-reports/pha/ex2");
|
|
19
|
-
const phaReportEx1 = require("./testing-reports/pha/ex1");
|
|
16
|
+
const phaNotesExample = require("./testing-reports/pha/notes-example");
|
|
20
17
|
const mediclinicReportWithWellbeing = require("./testing-reports/mediclinic/with-wellbeing");
|
|
21
18
|
const mediclinicDoctorData = require("./testing-reports/mediclinic/doctor-data");
|
|
22
19
|
const mediclinicArabicData = require("./testing-reports/mediclinic/arabic-data");
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
|
|
20
|
+
// PHA examples: phaNotesExample
|
|
21
|
+
// Mediclinic examples: mediclinicReportWithWellbeing | mediclinicDoctorData | mediclinicArabicData
|
|
22
|
+
// Using mediclinicDoctorData (IsDoctor:true) so the Big Integral Questionnaire section renders for Maison Sante
|
|
23
|
+
const data = phaNotesExample;
|
|
26
24
|
const doctorData = mediclinicDoctorData;
|
|
27
25
|
const arabicData = mediclinicArabicData;
|
|
28
26
|
|
|
@@ -30,7 +28,7 @@ async function generateTestPDF() {
|
|
|
30
28
|
const PDF_FILE_PATH = path.resolve(__dirname, "output/nasco-sample.pdf");
|
|
31
29
|
const ENCRYPTED_PATH = path.resolve(__dirname, "output/nasco-sample-encrypted.pdf");
|
|
32
30
|
|
|
33
|
-
// Generate HTML - uses `data` (
|
|
31
|
+
// Generate HTML - uses `data` (swap with any example variable above)
|
|
34
32
|
const html = await generateHTMLWellbeingReportWithSmartReport(
|
|
35
33
|
data,
|
|
36
34
|
true,
|