@medicus.ai/medicus-report-pdf-generator 1.3.19 → 1.3.21
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/template.js
CHANGED
|
@@ -1184,7 +1184,9 @@ function renderPanelV3(panel, nestingLevel, isCompactView, counter = null, isRec
|
|
|
1184
1184
|
|
|
1185
1185
|
|
|
1186
1186
|
const panelCssId = `panel-${panel.panelId}db${Math.floor(Math.random() * 3)}`;
|
|
1187
|
-
|
|
1187
|
+
// Each panel note is a separate line from the lab; joining with '' glued them
|
|
1188
|
+
// into one run of text ("...Association:Glucose Level70-99 Normal...").
|
|
1189
|
+
const notes = panel.notes ? panel.notes.join('<br/>') : '';
|
|
1188
1190
|
let classPanel = '';
|
|
1189
1191
|
if (panel.doctorNotes && isCompactView) {
|
|
1190
1192
|
classPanel = 'panel-with-notes';
|
|
@@ -1324,10 +1326,25 @@ function renderDetailsListV3(detailsList, nestingLevel, isCompactView) {
|
|
|
1324
1326
|
if (nestingLevel > 0) {
|
|
1325
1327
|
let extraPadding = ((nestingLevel + 10 % 10) + 1);
|
|
1326
1328
|
let levelNesting = extraPadding + nestingLevel * INDENTATION.BIOMARKER_DETAILS + plusPadding;
|
|
1327
|
-
blockStyle = `padding-left: ${levelNesting}px
|
|
1329
|
+
blockStyle = `padding-left: ${levelNesting}px;`;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
// The shared stylesheet sizes details tables at 70% of the panel and lets the
|
|
1333
|
+
// browser size columns to their content. A wide table (e.g. a 12-column
|
|
1334
|
+
// prescription) then overflows the panel card and gets cut at the page edge.
|
|
1335
|
+
// Wide tables take the full panel width with fixed column layout so every
|
|
1336
|
+
// column stays inside the card; the header row wraps instead of overflowing.
|
|
1337
|
+
const WIDE_TABLE_COLUMNS = 6;
|
|
1338
|
+
let tableStyle = '';
|
|
1339
|
+
let cellStyle = '';
|
|
1340
|
+
if (colspanColumn >= WIDE_TABLE_COLUMNS) {
|
|
1341
|
+
blockStyle += 'width:100%;max-width:100%;box-sizing:border-box;';
|
|
1342
|
+
tableStyle = 'width:100%;table-layout:fixed;';
|
|
1343
|
+
cellStyle = 'word-wrap:break-word;overflow-wrap:break-word;padding:6px 4px;font-size:10px;line-height:1.3;';
|
|
1344
|
+
content = content.replace(/<td colspan="1">/g, `<td colspan="1" style="${cellStyle}">`);
|
|
1328
1345
|
}
|
|
1329
1346
|
|
|
1330
|
-
return `<div style="${blockStyle}" class="biomarker-details-table" style="
|
|
1347
|
+
return `<div style="${blockStyle}padding:0 ${plusPadding}px" class="biomarker-details-table"><table style="${tableStyle}">${content}</table></div>`;
|
|
1331
1348
|
}
|
|
1332
1349
|
|
|
1333
1350
|
function renderNoteV3(note, nestingLevel, isCompactView, showInCompactView, showInDetailsView) {
|
package/package.json
CHANGED
|
@@ -14,6 +14,37 @@
|
|
|
14
14
|
-webkit-font-feature-settings: "zero" off !important;
|
|
15
15
|
-moz-font-feature-settings: "zero" off !important;
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
/* Maison Santé Arabic smart report: mixed-direction text.
|
|
19
|
+
The shared RTL sheet forces panel/biomarker titles to direction:ltr and
|
|
20
|
+
lays lab notes out RTL, so Arabic titles get their parentheses mirrored
|
|
21
|
+
("(المعادن (المصل") and English notes get their punctuation displaced
|
|
22
|
+
(".Iron shows", ":Reference"). unicode-bidi:plaintext lets every line
|
|
23
|
+
pick its own direction from its first strong character, so Arabic lines
|
|
24
|
+
read RTL and English lines read LTR, while staying right-aligned. */
|
|
25
|
+
.score-main .panel-title-text,
|
|
26
|
+
.score-main .biom-title,
|
|
27
|
+
.score-main .biomarker-notes,
|
|
28
|
+
.score-main .panel-notes,
|
|
29
|
+
.score-main .biomarker-details-table td {
|
|
30
|
+
unicode-bidi: plaintext !important;
|
|
31
|
+
text-align: right !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Reference ranges are numeric ("4 - 10", "<= 4", "> 50"); rendered RTL they
|
|
35
|
+
come out mirrored ("10 - 4", "4 =>", "50 <"). Keep the text LTR but leave
|
|
36
|
+
the cells themselves in RTL order. */
|
|
37
|
+
.score-main .parent-reference-range,
|
|
38
|
+
.score-main td.biom-range,
|
|
39
|
+
.score-main tr.values td,
|
|
40
|
+
.score-main .biom-value {
|
|
41
|
+
direction: ltr !important;
|
|
42
|
+
unicode-bidi: isolate !important;
|
|
43
|
+
}
|
|
44
|
+
.score-main .parent-reference-range,
|
|
45
|
+
.score-main td.biom-range {
|
|
46
|
+
text-align: right !important;
|
|
47
|
+
}
|
|
17
48
|
</style>
|
|
18
49
|
<script>
|
|
19
50
|
var IS_ARABIC = true;
|