Skip to content

Commit

Permalink
last 2 commits from master for rel-702 (openemr#7055)
Browse files Browse the repository at this point in the history
* fix: mpdf necessary config for patient custom report pdf download (openemr#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 (openemr#7051)

* Update style.css

* Update a_issue.php

* Update eye_mag_functions.php

---------

Co-authored-by: ophthal <[email protected]>
  • Loading branch information
stephenwaite and ophthal authored Nov 29, 2023
1 parent a212cf0 commit 738fc9f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions interface/forms/eye_mag/a_issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ function negate_radio(section) {
</td>
</tr>
</table>
<table id="row_social" class="w-100">
<table id="row_social" class="w-100 small">
<?php
$given = "*";
$dateStart = $_POST['dateState'] ?? '';
Expand Down Expand Up @@ -1148,7 +1148,7 @@ function negate_radio(section) {
</tr>
</tbody>
</table>
<table id="row_FH" name="row_FH" width="90%">
<table id="row_FH" class="small" name="row_FH" width="90%">
<tr>
<td class="right text-nowrap"><?php echo xlt('Glaucoma'); ?>:</td>
<td class="text data"><input type="radio" onclick='negate_radio(this);' id="radio_usertext11" name="radio_usertext11" <?php if (!$result1['usertext11']) {
Expand Down Expand Up @@ -1331,7 +1331,7 @@ function negate_radio(section) {
</tr>
</table>
</div>
<div class="text-center w-100 mt-0">
<div class="text-center w-100 mt-3">
<input type="hidden" id="issue_js" name="issue_js" value="test" />
<input type="hidden" id="pid" name="pid" value="<?php echo attr($pid); ?>" />
<button type='button' id='form_save' name='form_save' class="btn btn-primary btn-save" onclick='top.restoreSession();submit_this_form();'><?php echo xla('Save'); ?></button>
Expand Down
10 changes: 6 additions & 4 deletions interface/forms/eye_mag/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ input[type=text] {
/* REFRACTION PANEL */

#REFRACTION_sections {
margin: 0 auto;
max-width: 95%;
margin: auto;
}

.refraction_panel {
Expand Down Expand Up @@ -643,6 +644,7 @@ body {
margin-left: auto;
margin-right: auto;
text-align: center;
font-size: 0.8rem;
}

.sections {
Expand Down Expand Up @@ -696,7 +698,7 @@ body {

.exam_section_left {
float: left;
margin: 5px auto;
margin: 5px;
min-height: 415px;
padding: 10px;
top: 0;
Expand All @@ -717,7 +719,7 @@ body {

.exam_section_right {
float: left;
margin: 5px auto;
margin: 5px;
min-height: 415px;
padding: 10px;
top: 0;
Expand Down Expand Up @@ -2162,7 +2164,7 @@ View.php

#DA_EXAM_sections {
display: inline-table;
max-width: 93%;
max-width: 90%;
text-align: center;
}

Expand Down
16 changes: 7 additions & 9 deletions interface/forms/eye_mag/php/eye_mag_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5081,8 +5081,6 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
$OS_time_values = "'" . implode("','", $OS_time_values) . "'";

?> <p style="font-weight:bold;"> <?php echo xlt('Glaucoma Zone'); ?>:</p>
<br />
<br />
<span class="closeButton fas fa-times" id="Close_IOP" name="Close_IOP"></span>
<div id="GFS_table" name="GFS_table" class="table-responsive borderShadow" style="position:relative;display:table;float:left;margin-top:10px;padding:15px;text-align:left;vertical-align:center;width:30%;">
<table class="GFS_table">
Expand Down Expand Up @@ -5134,7 +5132,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
<td class="GFS_title" style="text-align:center;"><?php echo $meds_here; ?></td>
<?php
if ($FAILED_drugs ?? null) {
echo '<td><span class="right toggleme" id="toggle_drugs"><i class="fa fa-toggle-down"></i></span></td>';
echo '<td><span class="right toggleme" id="toggle_drugs"><i class="fa-regular fa-square-caret-down"></i></span></td>';
} ?>
</tr>
<?php
Expand Down Expand Up @@ -5175,7 +5173,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
<td colspan="3" class="GFS_title"><?php echo xlt('Visual Fields'); ?>:
<?php
if ($old_VFs ?? null) {
echo '<td><span class="top right" id="toggle_VFs"><i class="fa fa-toggle-down"></i></span></td>';
echo '<td><span class="top right" id="toggle_VFs"><i class="fa-regular fa-square-caret-down"></i></span></td>';
}
?>
</tr>
Expand Down Expand Up @@ -5211,7 +5209,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
}

if ($old_OCTs ?? null) {
echo '<td><span class="top right " id="toggle_OCTs"><i class="fa fa-toggle-down"></i></span></td>';
echo '<td><span class="top right " id="toggle_OCTs"><i class="fa-regular fa-square-caret-down"></i></span></td>';
}

echo "</tr>";
Expand Down Expand Up @@ -5257,7 +5255,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
}

if ($hideme) {
echo '<td><span class="top right" id="toggle_gonios"><i class="fa fa-toggle-down"></i></span></td>';
echo '<td><span class="top right" id="toggle_gonios"><i class="fa-regular fa-square-caret-down"></i></span></td>';
}
?>
</tr>
Expand Down Expand Up @@ -5297,7 +5295,7 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
<td class="GFS_title_1" id="GFS_cups" name="GFS_cups" title="<?php echo xla('Click this to display/hide additional tests'); ?>"style="position:relative;"><?php echo xlt('Optic Discs'); ?>:
<?php
if ($hideme) {
$plus = '<td><span class="top right" id="toggle_cups"><i class="fa fa-toggle-down"></i></span></td>';
$plus = '<td><span class="top right" id="toggle_cups"><i class="fa-regular fa-square-caret-down"></i></span></td>';
}

if ($count > '0') {
Expand Down Expand Up @@ -5735,14 +5733,14 @@ function display_GlaucomaFlowSheet($pid, $bywhat = 'byday')
</script>
<?php
} else {
echo "<div style='text-align:left;padding-left:20px;'><h4>The Glaucoma Flow Sheet graphically displays:
echo "<div style='text-align:left;padding-left:20px;'><span>The Glaucoma Flow Sheet graphically displays:
<ul>
<li> IOP measurements</li>
<li> Target IOPs </li>
<li> related tests (OCT/VF/Gonio)</li>
<li> diurnal IOP curve</li>
</ul>
The graphs are not generated on the initial visit...</h4></div>";
The graphs are not generated on the initial visit...</span></div>";
} ?>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions interface/patient_file/report/custom_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
5 changes: 1 addition & 4 deletions interface/patient_file/summary/demographics_print.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 {
?>
<!-- This should really be in the onload handler but that seems to be unreliable and can crash Firefox 3. -->
Expand Down

0 comments on commit 738fc9f

Please sign in to comment.