@medicus.ai/medicus-report-pdf-generator 1.3.13 → 1.3.15

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.
Files changed (178) hide show
  1. package/.vscode/settings.json +3 -3
  2. package/HANDOVER.md +146 -0
  3. package/README.md +26 -26
  4. package/app/i18n.config.js +20 -20
  5. package/app/i18n_wellbeing.config.js +20 -20
  6. package/app/services/localeService.js +28 -28
  7. package/assets/Mediclinic/css/nasco_report.css +6297 -6297
  8. package/assets/Mediclinic/css/nasco_report_rtl.css +851 -851
  9. package/assets/Mediclinic/css/style.css +33 -33
  10. package/assets/Mediclinic/js/js.js +112 -112
  11. package/assets/Mediclinic/js/raphael.js +8437 -8437
  12. package/assets/arabic.css +275 -275
  13. package/assets/charts.min.js +7 -7
  14. package/assets/corporate_report/css/report.css +582 -582
  15. package/assets/corporate_report/css/report_rtl.css +144 -144
  16. package/assets/corporate_report/js/js.js +14 -14
  17. package/assets/data/data.json +124 -124
  18. package/assets/data/data2.json +675 -675
  19. package/assets/data/pdf_data_with_history.json +1255 -1255
  20. package/assets/doctor-note-insight-icon.svg +11 -11
  21. package/assets/imc/css/style.css +61 -61
  22. package/assets/jquery-1.4.min.js +151 -151
  23. package/assets/jquery-2.1.0.min.js +3 -3
  24. package/assets/js.js +201 -201
  25. package/assets/medicus_pdf/arabic.css +444 -444
  26. package/assets/medicus_pdf/styles.css +2427 -2427
  27. package/assets/print.css +4 -4
  28. package/assets/qr-code-style.css +68 -68
  29. package/assets/qrcode.min.js +3 -3
  30. package/assets/raphael-min.js +10 -10
  31. package/assets/sanusx/css/sanusx_report.css +707 -707
  32. package/assets/sizing.js +2 -2
  33. package/assets/styles.css +1545 -1545
  34. package/assets/styles.min.css +1358 -1358
  35. package/assets/translation.js +30 -30
  36. package/assets/wellbeing/css/nasco_report.css +3472 -3472
  37. package/assets/wellbeing/css/nasco_report_rtl.css +679 -679
  38. package/assets/wellbeing/js/js.js +111 -111
  39. package/assets/wellbeing/js/raphael.js +8437 -8437
  40. package/base64/cairo-font.js +2 -2
  41. package/config/Mediclinic.json +37 -37
  42. package/config/Najeeb.ai.json +35 -35
  43. package/config/Pha.json +64 -64
  44. package/config/bionext.json +37 -37
  45. package/config/default.json +35 -35
  46. package/config/diagnostikare.json +34 -34
  47. package/config/maisonsante.json +39 -39
  48. package/config/nasco.json +35 -35
  49. package/config/sanitas.json +35 -35
  50. package/config/sanusx.json +34 -34
  51. package/config/test.txt +4 -4
  52. package/data converter.js +53 -53
  53. package/docs/01-architecture-overview.md +149 -0
  54. package/docs/02-configuration-and-whitelabelling.md +111 -0
  55. package/docs/03-templating-and-rendering.md +71 -0
  56. package/docs/04-report-pipelines.md +128 -0
  57. package/docs/05-questions-and-data-model.md +67 -0
  58. package/docs/06-internationalization.md +59 -0
  59. package/docs/07-email-notifications.md +59 -0
  60. package/docs/08-known-issues-and-technical-debt.md +41 -0
  61. package/docs/README.md +22 -0
  62. package/downloadfile.js +6 -6
  63. package/example.txt +1188 -1188
  64. package/index.js +481 -480
  65. package/lib/big_integral_questionnaire.js +370 -298
  66. package/lib/corporate_report_generator.js +399 -399
  67. package/lib/pdf_generator.min.js +525 -525
  68. package/lib/sanusx_report_generator.js +533 -533
  69. package/lib/sendEmail.js +343 -343
  70. package/lib/template.js +2227 -2227
  71. package/lib/wellbeing_report_generator.js +2164 -2134
  72. package/locales/ar-AE.json +169 -169
  73. package/locales/ar-SA.json +169 -169
  74. package/locales/ar.json +397 -397
  75. package/locales/de.json +169 -169
  76. package/locales/en.json +229 -229
  77. package/locales/fr.json +168 -168
  78. package/locales/pt.json +165 -165
  79. package/locales/wellbeing/ar-AE.json +149 -149
  80. package/locales/wellbeing/ar-SA.json +257 -257
  81. package/locales/wellbeing/de.json +301 -301
  82. package/locales/wellbeing/en.json +423 -423
  83. package/locales/wellbeing/es.json +133 -133
  84. package/locales/wellbeing/fr.json +121 -121
  85. package/locales/wellbeing/it-IT.json +121 -121
  86. package/locales/wellbeing/pt.json +121 -121
  87. package/locales/wellbeing/tr.json +121 -121
  88. package/locales/wellbeing/zh-CN.json +121 -121
  89. package/locales/zh-CN.json +165 -165
  90. package/package.json +47 -47
  91. package/preview-big-integral.js +75 -75
  92. package/run.js +15 -15
  93. package/templates/Mediclinic/blocks/first-section.html +205 -205
  94. package/templates/Mediclinic/blocks/footer.html +7 -7
  95. package/templates/Mediclinic/blocks/header-template.html +5 -5
  96. package/templates/Mediclinic/blocks/header.html +20 -20
  97. package/templates/Mediclinic/blocks/patient-table.html +38 -38
  98. package/templates/Mediclinic/blocks/pdf-header.html +9 -9
  99. package/templates/Mediclinic/blocks/tips.html +8 -8
  100. package/templates/Mediclinic/ltr_no_pages.html +37 -37
  101. package/templates/Mediclinic/rtl_no_pages.html +42 -42
  102. package/templates/Mediclinic/wellbeing_template.html +41 -41
  103. package/templates/Pha/blocks/first-section.html +207 -207
  104. package/templates/Pha/blocks/footer.html +7 -7
  105. package/templates/Pha/blocks/header-template.html +5 -5
  106. package/templates/Pha/blocks/header.html +20 -20
  107. package/templates/Pha/blocks/patient-table.html +38 -38
  108. package/templates/Pha/blocks/pdf-header.html +8 -8
  109. package/templates/Pha/blocks/tips.html +8 -8
  110. package/templates/Pha/ltr_no_pages.html +37 -37
  111. package/templates/Pha/rtl_no_pages.html +42 -42
  112. package/templates/Pha/wellbeing_template.html +41 -41
  113. package/templates/base.html +23 -23
  114. package/templates/blocks/ar-first-page-header.html +68 -68
  115. package/templates/blocks/ar-footer.html +54 -54
  116. package/templates/blocks/ar-header.html +67 -67
  117. package/templates/blocks/biomarker-compact-ar.html +27 -27
  118. package/templates/blocks/biomarker-compact.html +27 -27
  119. package/templates/blocks/biomarker-details.html +41 -41
  120. package/templates/blocks/biomarker-insight.html +22 -22
  121. package/templates/blocks/biomarker-min.html +9 -9
  122. package/templates/blocks/doctor-note.html +11 -11
  123. package/templates/blocks/footer.html +35 -35
  124. package/templates/blocks/header-first-page.html +46 -46
  125. package/templates/blocks/header.html +49 -49
  126. package/templates/blocks/panel-compact.html +38 -38
  127. package/templates/blocks/panel-details.html +16 -16
  128. package/templates/blocks/report-summary.html +16 -16
  129. package/templates/blocks/section-title.html +4 -4
  130. package/templates/blocks/signature.html +16 -16
  131. package/templates/blocks/summary-insight.html +15 -15
  132. package/templates/blocks/summary.html +9 -9
  133. package/templates/corporate_report/cover_page.html +23 -23
  134. package/templates/corporate_report/footer.html +9 -9
  135. package/templates/corporate_report/ltr_no_pages.html +20 -20
  136. package/templates/corporate_report/page.html +24 -24
  137. package/templates/corporate_report/participant_analytics.html +5 -5
  138. package/templates/corporate_report/rtl_no_pages.html +20 -20
  139. package/templates/empty.html +10 -10
  140. package/templates/first_page_head.html +157 -157
  141. package/templates/imc/first-header-template.html +53 -53
  142. package/templates/ltr.html +1368 -1368
  143. package/templates/ltr_no_pages.html +89 -89
  144. package/templates/maisonsante/blocks/first-section.html +151 -207
  145. package/templates/maisonsante/blocks/footer.html +7 -7
  146. package/templates/maisonsante/blocks/header-template.html +5 -5
  147. package/templates/maisonsante/blocks/header.html +20 -20
  148. package/templates/maisonsante/blocks/patient-table.html +38 -38
  149. package/templates/maisonsante/blocks/pdf-header.html +8 -8
  150. package/templates/maisonsante/blocks/tips.html +8 -8
  151. package/templates/maisonsante/ltr_no_pages.html +38 -38
  152. package/templates/maisonsante/rtl_no_pages.html +43 -43
  153. package/templates/maisonsante/wellbeing_template.html +41 -41
  154. package/templates/no_pages.html +1224 -1224
  155. package/templates/popup/popup-template.html +129 -129
  156. package/templates/rtl_no_pages.html +92 -92
  157. package/templates/sanusx/blocks/footer.html +6 -6
  158. package/templates/sanusx/blocks/header.html +20 -20
  159. package/templates/sanusx/blocks/personal-details.html +123 -123
  160. package/templates/sanusx/blocks/predictions-section.html +57 -57
  161. package/templates/sanusx/blocks/recommendations-section.html +6 -6
  162. package/templates/sanusx/blocks/super-power-section.html +29 -29
  163. package/templates/sanusx/blocks/tips.html +8 -8
  164. package/templates/sanusx/ltr_no_pages.html +26 -26
  165. package/templates/sanusx/rtl_no_pages.html +36 -36
  166. package/templates/template.html +1377 -1377
  167. package/templates/wellbeing/blocks/first-section.html +106 -106
  168. package/templates/wellbeing/blocks/footer.html +7 -7
  169. package/templates/wellbeing/blocks/header.html +37 -37
  170. package/templates/wellbeing/blocks/tips.html +8 -8
  171. package/templates/wellbeing/ltr_no_pages.html +35 -35
  172. package/templates/wellbeing/rtl_no_pages.html +36 -36
  173. package/templates/wellbeing/wellbeing_template.html +43 -43
  174. package/test.js +74 -74
  175. package/testing-reports/mediclinic/arabic-data.js +0 -439
  176. package/testing-reports/mediclinic/doctor-data.js +0 -523
  177. package/testing-reports/mediclinic/with-wellbeing.js +0 -415
  178. package/testing-reports/pha/notes-example.js +0 -397
package/assets/arabic.css CHANGED
@@ -1,275 +1,275 @@
1
- html, body {
2
- direction: rtl;
3
- letter-spacing: unset;
4
- font-family: Helvetica;
5
- }
6
-
7
- .report-date {
8
- float: left;
9
- }
10
-
11
- .patient-info .col {
12
- float: right;
13
- }
14
-
15
- .report-title .heading {
16
- letter-spacing: unset;
17
- }
18
-
19
- .plus-info .heading {
20
-
21
- letter-spacing: unset;
22
- }
23
-
24
- .panel-title, .report-title .info-label, .report-title .info-value, .report-title .heading, .resume-title, .plus-info .heading {
25
- font-family: 'Helvetica';
26
- font-weight: normal;
27
- line-height: 1.2em;
28
- }
29
-
30
- .info-label, .info-value {
31
- padding-right: 0px;
32
- padding-left: 10px;
33
- text-align: right;
34
- }
35
-
36
- .plus-info .description {
37
- padding-right: 0px;
38
- }
39
-
40
- .plus-info .logos {
41
- float: left;
42
- }
43
-
44
- .plus-info .logos img {
45
- margin-right: 20px;
46
- margin-left: 1px;
47
- }
48
-
49
- .sign {
50
- text-align: left;
51
- }
52
-
53
- .section-content {
54
- padding-right: 0px;
55
- padding-left: 0px;
56
- }
57
-
58
- .report-title {
59
- margin-right: 0;
60
- margin-left: 20px;
61
- direction: rtl;
62
- }
63
-
64
- .biom-value {
65
- padding-left: 6px;
66
- padding-right: auto;
67
- text-align: left;
68
- }
69
-
70
- .biom-past {
71
- text-align: left;
72
- padding-left: 0px !important;
73
- padding-right: 15px !important;
74
- }
75
-
76
- .biom-unit {
77
- text-align: right;
78
- padding-right: 5px !important;
79
- }
80
-
81
- .biom-range {
82
- text-align: right;
83
- }
84
-
85
- .biom-last {
86
-
87
- text-align: right;
88
- }
89
-
90
- .panel-title, .resume-title{
91
- direction: ltr;
92
- margin-left: 0;
93
- margin-right: -10px;
94
- text-align: right;
95
- }
96
-
97
- .bar {
98
- float: left;
99
- margin-left: 10px;
100
- }
101
-
102
- .biom-circle {
103
- float: right;
104
- }
105
-
106
- .footer .text {
107
- float: right;
108
- }
109
-
110
- .footer-content {
111
- text-align: left;
112
- }
113
-
114
- .page-head {
115
- padding: 50px 50px 10px 10px;
116
- }
117
-
118
- .card .text {
119
- margin-left: 0px;
120
- padding-right: 0px;
121
- padding-left: 10px;
122
- word-break: unset;
123
- }
124
-
125
- .card.cr .text {
126
- margin-left: 0px;
127
- margin-right: 50px;
128
- }
129
-
130
- /*.text .insight-text{*/
131
- /*width: 67% !important;*/
132
- /*}*/
133
- /*.insight-text{*/
134
- /*width: 75% !important;*/
135
- /*}*/
136
- .card .icon {
137
- right: 18px;
138
- }
139
-
140
- .related-icons {
141
- right: 800px;
142
- left: 0px;
143
- }
144
-
145
- .related .label {
146
- padding-right: 10px;
147
- }
148
-
149
- /*** GRID ****************************************/
150
-
151
- .grid-col {
152
- float: right;
153
- }
154
-
155
- .grid-row {
156
- float: right;
157
- }
158
-
159
- .intro {
160
- padding: 6px 35px;
161
- margin-right: 13px;
162
- }
163
-
164
- /**************/
165
-
166
- /*** panel details ************/
167
-
168
- .biom-info {
169
- float: right;
170
- margin-right: 16px;
171
- }
172
-
173
- /********/
174
- .biom-bar .range {
175
- height: 5px;
176
- margin-left: 3px;
177
- margin-right: 0px;
178
- }
179
-
180
- .biom-bar .labels td {
181
- padding-left: 8px;
182
- }
183
-
184
- .biom-info .unit, .biom-unit, .flip {
185
- direction: rtl !important;
186
- text-align: right;
187
- }
188
-
189
- .flip:before, .biom-info .unit:before, .biom-unit:before {
190
- content: "\200E";
191
- }
192
-
193
- .bar > div:last-child {
194
- border-radius: 3px 0px 0px 3px;
195
- border-right: 1px solid white;
196
- }
197
-
198
- .bar > div:first-child {
199
- border-radius: 0px 3px 3px 0px;
200
- border-right: 1px solid rgba(0, 0, 0, 0);
201
- }
202
-
203
- .risk > td:first-child {
204
- border-radius: 0px 4px 4px 0px;
205
- }
206
-
207
- .risk > td:last-child {
208
- border-radius: 4px 0px 0px 4px
209
- }
210
-
211
- .arrow.up {
212
- transform: scaleX(-1);
213
- }
214
-
215
- .arrow.down {
216
- transform: scaleX(-1);
217
- }
218
-
219
- .arrow {
220
-
221
- right: auto;
222
- left: 0px;
223
- top: 6px;
224
- }
225
-
226
- .content > .section:first-child .listing .header td {
227
- line-height: 25px;
228
- }
229
-
230
- .detailed-list{
231
- padding-right:39px;
232
- padding-left: 0;
233
- }
234
-
235
- .detailed-list li:not(.arrow-icon):before{
236
- padding-right: 0;
237
- padding-left: 10px;
238
- left: auto;
239
- right: -13px;
240
- }
241
- li.arrow-icon{
242
- margin-left: 0;
243
- margin-right: 8px;
244
- text-indent: -8px;
245
- }
246
- .arrow-icon + ul{
247
- padding-left:0;
248
- padding-right:25px;
249
- }
250
- .biom-unit{
251
- text-align:left;
252
- }
253
- .biom-value,
254
- .biom-past{
255
- text-align:right;
256
- }
257
- .pair{
258
- direction:ltr;
259
- text-align:right;
260
- }
261
-
262
- .new-page:not(#summary){
263
- float: right;
264
- }
265
-
266
- .biom-title,
267
- .biom-info .title{
268
- direction: ltr;
269
- text-align:right;
270
- }
271
- .biomarker-container .grid-row.biomarker-insights .card-wrapper .text,
272
- .biomarker-container .grid-row.biomarker-insights .card-wrapper .text span{
273
- text-align: right;
274
- direction: rtl;
275
- }
1
+ html, body {
2
+ direction: rtl;
3
+ letter-spacing: unset;
4
+ font-family: Helvetica;
5
+ }
6
+
7
+ .report-date {
8
+ float: left;
9
+ }
10
+
11
+ .patient-info .col {
12
+ float: right;
13
+ }
14
+
15
+ .report-title .heading {
16
+ letter-spacing: unset;
17
+ }
18
+
19
+ .plus-info .heading {
20
+
21
+ letter-spacing: unset;
22
+ }
23
+
24
+ .panel-title, .report-title .info-label, .report-title .info-value, .report-title .heading, .resume-title, .plus-info .heading {
25
+ font-family: 'Helvetica';
26
+ font-weight: normal;
27
+ line-height: 1.2em;
28
+ }
29
+
30
+ .info-label, .info-value {
31
+ padding-right: 0px;
32
+ padding-left: 10px;
33
+ text-align: right;
34
+ }
35
+
36
+ .plus-info .description {
37
+ padding-right: 0px;
38
+ }
39
+
40
+ .plus-info .logos {
41
+ float: left;
42
+ }
43
+
44
+ .plus-info .logos img {
45
+ margin-right: 20px;
46
+ margin-left: 1px;
47
+ }
48
+
49
+ .sign {
50
+ text-align: left;
51
+ }
52
+
53
+ .section-content {
54
+ padding-right: 0px;
55
+ padding-left: 0px;
56
+ }
57
+
58
+ .report-title {
59
+ margin-right: 0;
60
+ margin-left: 20px;
61
+ direction: rtl;
62
+ }
63
+
64
+ .biom-value {
65
+ padding-left: 6px;
66
+ padding-right: auto;
67
+ text-align: left;
68
+ }
69
+
70
+ .biom-past {
71
+ text-align: left;
72
+ padding-left: 0px !important;
73
+ padding-right: 15px !important;
74
+ }
75
+
76
+ .biom-unit {
77
+ text-align: right;
78
+ padding-right: 5px !important;
79
+ }
80
+
81
+ .biom-range {
82
+ text-align: right;
83
+ }
84
+
85
+ .biom-last {
86
+
87
+ text-align: right;
88
+ }
89
+
90
+ .panel-title, .resume-title{
91
+ direction: ltr;
92
+ margin-left: 0;
93
+ margin-right: -10px;
94
+ text-align: right;
95
+ }
96
+
97
+ .bar {
98
+ float: left;
99
+ margin-left: 10px;
100
+ }
101
+
102
+ .biom-circle {
103
+ float: right;
104
+ }
105
+
106
+ .footer .text {
107
+ float: right;
108
+ }
109
+
110
+ .footer-content {
111
+ text-align: left;
112
+ }
113
+
114
+ .page-head {
115
+ padding: 50px 50px 10px 10px;
116
+ }
117
+
118
+ .card .text {
119
+ margin-left: 0px;
120
+ padding-right: 0px;
121
+ padding-left: 10px;
122
+ word-break: unset;
123
+ }
124
+
125
+ .card.cr .text {
126
+ margin-left: 0px;
127
+ margin-right: 50px;
128
+ }
129
+
130
+ /*.text .insight-text{*/
131
+ /*width: 67% !important;*/
132
+ /*}*/
133
+ /*.insight-text{*/
134
+ /*width: 75% !important;*/
135
+ /*}*/
136
+ .card .icon {
137
+ right: 18px;
138
+ }
139
+
140
+ .related-icons {
141
+ right: 800px;
142
+ left: 0px;
143
+ }
144
+
145
+ .related .label {
146
+ padding-right: 10px;
147
+ }
148
+
149
+ /*** GRID ****************************************/
150
+
151
+ .grid-col {
152
+ float: right;
153
+ }
154
+
155
+ .grid-row {
156
+ float: right;
157
+ }
158
+
159
+ .intro {
160
+ padding: 6px 35px;
161
+ margin-right: 13px;
162
+ }
163
+
164
+ /**************/
165
+
166
+ /*** panel details ************/
167
+
168
+ .biom-info {
169
+ float: right;
170
+ margin-right: 16px;
171
+ }
172
+
173
+ /********/
174
+ .biom-bar .range {
175
+ height: 5px;
176
+ margin-left: 3px;
177
+ margin-right: 0px;
178
+ }
179
+
180
+ .biom-bar .labels td {
181
+ padding-left: 8px;
182
+ }
183
+
184
+ .biom-info .unit, .biom-unit, .flip {
185
+ direction: rtl !important;
186
+ text-align: right;
187
+ }
188
+
189
+ .flip:before, .biom-info .unit:before, .biom-unit:before {
190
+ content: "\200E";
191
+ }
192
+
193
+ .bar > div:last-child {
194
+ border-radius: 3px 0px 0px 3px;
195
+ border-right: 1px solid white;
196
+ }
197
+
198
+ .bar > div:first-child {
199
+ border-radius: 0px 3px 3px 0px;
200
+ border-right: 1px solid rgba(0, 0, 0, 0);
201
+ }
202
+
203
+ .risk > td:first-child {
204
+ border-radius: 0px 4px 4px 0px;
205
+ }
206
+
207
+ .risk > td:last-child {
208
+ border-radius: 4px 0px 0px 4px
209
+ }
210
+
211
+ .arrow.up {
212
+ transform: scaleX(-1);
213
+ }
214
+
215
+ .arrow.down {
216
+ transform: scaleX(-1);
217
+ }
218
+
219
+ .arrow {
220
+
221
+ right: auto;
222
+ left: 0px;
223
+ top: 6px;
224
+ }
225
+
226
+ .content > .section:first-child .listing .header td {
227
+ line-height: 25px;
228
+ }
229
+
230
+ .detailed-list{
231
+ padding-right:39px;
232
+ padding-left: 0;
233
+ }
234
+
235
+ .detailed-list li:not(.arrow-icon):before{
236
+ padding-right: 0;
237
+ padding-left: 10px;
238
+ left: auto;
239
+ right: -13px;
240
+ }
241
+ li.arrow-icon{
242
+ margin-left: 0;
243
+ margin-right: 8px;
244
+ text-indent: -8px;
245
+ }
246
+ .arrow-icon + ul{
247
+ padding-left:0;
248
+ padding-right:25px;
249
+ }
250
+ .biom-unit{
251
+ text-align:left;
252
+ }
253
+ .biom-value,
254
+ .biom-past{
255
+ text-align:right;
256
+ }
257
+ .pair{
258
+ direction:ltr;
259
+ text-align:right;
260
+ }
261
+
262
+ .new-page:not(#summary){
263
+ float: right;
264
+ }
265
+
266
+ .biom-title,
267
+ .biom-info .title{
268
+ direction: ltr;
269
+ text-align:right;
270
+ }
271
+ .biomarker-container .grid-row.biomarker-insights .card-wrapper .text,
272
+ .biomarker-container .grid-row.biomarker-insights .card-wrapper .text span{
273
+ text-align: right;
274
+ direction: rtl;
275
+ }