@medicus.ai/medicus-report-pdf-generator 1.3.32 → 1.3.33

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/Pha.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "section-title-border-color": "#0F2062",
18
18
  "first-section-scores-border-color": "#0F2062",
19
19
  "general-font-color": "#A43B2F",
20
- "disclaimer-text-color": "rgba(15, 32, 98, 0.3)",
20
+ "disclaimer-text-color": "#000000",
21
21
  "top-box-background": "#f0f4ff",
22
22
  "footer-background": "rgba(15, 32, 98, 0.14)",
23
23
  "footer-border-color": "#0F2062",
@@ -60,6 +60,24 @@ let debugLog = (val1, val2 = "") => {
60
60
  }
61
61
 
62
62
 
63
+ // PHA-only: grey report text is hard to read when printed, so it renders black. Status and
64
+ // chart colours are not listed here, and neither are the .title of a status-coloured card or
65
+ // an .insight-content with an inline colour (the theme already sets it).
66
+ const PHA_BLACK_TEXT_STYLE = '<style>' + [
67
+ '.html-content', '.html-content *', '.card', '.stats-card', '.section-content', '.insight-content:not([style*="color"])',
68
+ '.insight-disclaimer', '.details-label', '.details-label *', '.details-value',
69
+ '.info-label', '.info-value', '.info-title', '.client-name',
70
+ '.panel-title', '.panel-title-text', '.resume-title', '.report-title', '.panel-subtitle',
71
+ '.panel-subtitle-item', '.panel-biomarker-title', '.panel-sample', '.bio-name-info',
72
+ '.card:not(.darkred):not(.dark-red):not(.red):not(.orange):not(.yellow):not(.light-blue):not(.lightblue):not(.blue) .title',
73
+ '.biom-method', '.method-type', '.lab-info', '.biom-past', '.biom-last', '.biom-range',
74
+ '.biom-past-data', '.biom-last-data', '.biom-range-data', '.parent-reference-range', '.child-referene-range',
75
+ '.biom-bar .labels td', '.biom-bar .labels td span:not(.colorable)', '.biom-bar .values td', '.biom-sample-value', '.related .label',
76
+ '.biomarker-notes', '.biomarker-notes span', 'tr.labels td span:not(.colorable)', 'tr.values td',
77
+ '.speedometer-value-up', '.speedometer-value-up *', '.speedometer-value-down', '.needle-value', '.needle-value *',
78
+ '.score-list', '.chunk-text', '.score-subtext', '.disclaimer-text', '.question-title'
79
+ ].join(',') + '{color:#000 !important}.speedometer-value-down{opacity:1 !important}</style>';
80
+
63
81
  // Config object to hold all configuration values
64
82
  let config = {
65
83
  logo: "",
@@ -104,13 +122,13 @@ const loadColorTheme = (clientName = 'default') => {
104
122
  warningIcon: '#ffc107'
105
123
  },
106
124
  pha: {
107
- headerText: '#2C3E50',
125
+ headerText: '#000000',
108
126
  headerBackground: '#ECF0F1',
109
127
  headerDivider: '#0F2062',
110
- footerText: '#95A5A6',
128
+ footerText: '#000000',
111
129
  listIcon: '#7F8C8D',
112
130
  insightPrimary: '#0F2062',
113
- insightSecondary: '#2C3E50',
131
+ insightSecondary: '#000000',
114
132
  warningIcon: '#F39C12'
115
133
  },
116
134
  nasco: {
@@ -1281,6 +1299,7 @@ let generateHTMLWellbeingReportWithSmartReport = async (data, isDebugging, clien
1281
1299
  $('#content').append(dynamicStyles);
1282
1300
 
1283
1301
  if (client.toLowerCase() === 'pha') {
1302
+ $('#content').append(PHA_BLACK_TEXT_STYLE);
1284
1303
  // PHA-only: compact patient info table to reduce total height.
1285
1304
  $('#content').append('<style>.patient-details .details-column { gap: 2px !important; } .patient-details .details-row { margin-top: 2px !important; } .patient-details .details-label, .patient-details .details-value { padding: 2px 6px !important; }</style>');
1286
1305
  // PHA-only: Prevent first page content from overlapping PDF footer (email/address)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicus.ai/medicus-report-pdf-generator",
3
- "version": "1.3.32",
3
+ "version": "1.3.33",
4
4
  "description": "Nasco corporate report - latest update in 12/10/2023 - Fix HRC for bionext",
5
5
  "main": "index.js",
6
6
  "scripts": {