From 738fc9f17a0b6c0d2c5a7cf5d94224761b3edde3 Mon Sep 17 00:00:00 2001 From: stephen waite Date: Wed, 29 Nov 2023 10:37:30 -0500 Subject: [PATCH] last 2 commits from master for rel-702 (#7055) * fix: mpdf necessary config for patient custom report pdf download (#7054) * fix: necessary settings for patient custom report pdf download * fix: change pdf to download from inline for blank demographics form * fix: Eye Form Style fixes (#7051) * Update style.css * Update a_issue.php * Update eye_mag_functions.php --------- Co-authored-by: ophthal <60580695+ophthal@users.noreply.github.com> --- interface/forms/eye_mag/a_issue.php | 6 +++--- interface/forms/eye_mag/css/style.css | 10 ++++++---- .../forms/eye_mag/php/eye_mag_functions.php | 16 +++++++--------- interface/patient_file/report/custom_report.php | 5 +++++ .../patient_file/summary/demographics_print.php | 5 +---- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/interface/forms/eye_mag/a_issue.php b/interface/forms/eye_mag/a_issue.php index 93467a77a11..7e7b74fad81 100644 --- a/interface/forms/eye_mag/a_issue.php +++ b/interface/forms/eye_mag/a_issue.php @@ -797,7 +797,7 @@ function negate_radio(section) { - +
- +
:
-
+
diff --git a/interface/forms/eye_mag/css/style.css b/interface/forms/eye_mag/css/style.css index bc2ae0d265b..44fe2c0b621 100644 --- a/interface/forms/eye_mag/css/style.css +++ b/interface/forms/eye_mag/css/style.css @@ -331,7 +331,8 @@ input[type=text] { /* REFRACTION PANEL */ #REFRACTION_sections { - margin: 0 auto; + max-width: 95%; + margin: auto; } .refraction_panel { @@ -643,6 +644,7 @@ body { margin-left: auto; margin-right: auto; text-align: center; + font-size: 0.8rem; } .sections { @@ -696,7 +698,7 @@ body { .exam_section_left { float: left; - margin: 5px auto; + margin: 5px; min-height: 415px; padding: 10px; top: 0; @@ -717,7 +719,7 @@ body { .exam_section_right { float: left; - margin: 5px auto; + margin: 5px; min-height: 415px; padding: 10px; top: 0; @@ -2162,7 +2164,7 @@ View.php #DA_EXAM_sections { display: inline-table; - max-width: 93%; + max-width: 90%; text-align: center; } diff --git a/interface/forms/eye_mag/php/eye_mag_functions.php b/interface/forms/eye_mag/php/eye_mag_functions.php index d215f7b0a18..a9340438c7f 100644 --- a/interface/forms/eye_mag/php/eye_mag_functions.php +++ b/interface/forms/eye_mag/php/eye_mag_functions.php @@ -5081,8 +5081,6 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday') $OS_time_values = "'" . implode("','", $OS_time_values) . "'"; ?>

:

-
-
@@ -5134,7 +5132,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday') '; + echo ''; } ?> : '; + echo ''; } ?> @@ -5211,7 +5209,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday') } if ($old_OCTs ?? null) { - echo ''; + echo ''; } echo ""; @@ -5257,7 +5255,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday') } if ($hideme) { - echo ''; + echo ''; } ?> @@ -5297,7 +5295,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday') '; + $plus = ''; } if ($count > '0') { @@ -5735,14 +5733,14 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')

The Glaucoma Flow Sheet graphically displays: + echo "
The Glaucoma Flow Sheet graphically displays:
  • IOP measurements
  • Target IOPs
  • related tests (OCT/VF/Gonio)
  • diurnal IOP curve
- The graphs are not generated on the initial visit...

"; + The graphs are not generated on the initial visit..."; } ?> diff --git a/interface/patient_file/report/custom_report.php b/interface/patient_file/report/custom_report.php index 426ae588b24..193496032b8 100644 --- a/interface/patient_file/report/custom_report.php +++ b/interface/patient_file/report/custom_report.php @@ -57,6 +57,11 @@ if ($PDF_OUTPUT) { $config_mpdf = Config_Mpdf::getConfigMpdf(); + // special settings for patient custom report that are necessary for mpdf + $config_mpdf['margin_top'] = $config_mpdf['margin_top'] * 1.5; + $config_mpdf['margin_bottom'] = $config_mpdf['margin_bottom'] * 1.5; + $config_mpdf['margin_header'] = $GLOBALS['pdf_top_margin']; + $config_mpdf['margin_footer'] = $GLOBALS['pdf_bottom_margin']; $pdf = new mPDF($config_mpdf); if ($_SESSION['language_direction'] == 'rtl') { $pdf->SetDirectionality('rtl'); diff --git a/interface/patient_file/summary/demographics_print.php b/interface/patient_file/summary/demographics_print.php index 9c33233cbcf..17fc12c9e29 100644 --- a/interface/patient_file/summary/demographics_print.php +++ b/interface/patient_file/summary/demographics_print.php @@ -40,9 +40,6 @@ // True if to display as a form to complete, false to display as information. $isform = empty($_REQUEST['isform']) ? 0 : 1; -// Html2pdf fails to generate checked checkboxes properly, so write plain HTML -// if we are doing a patient-specific complete form. -// TODO - now use mPDF, so should test if still need this fix $PDF_OUTPUT = ($patientid && $isform) ? false : true; if ($PDF_OUTPUT) { @@ -366,7 +363,7 @@ function getContent() if ($PDF_OUTPUT) { $content = getContent(); $pdf->writeHTML($content); - $pdf->Output('Demographics_form.pdf', 'I'); // D = Download, I = Inline + $pdf->Output('Demographics_form.pdf', 'D'); // D = Download, I = Inline } else { ?>
: