Add Preview button at top of IPD discharge form

IMPROVEMENT: Preview button now always visible at top of page

PROBLEM: Preview button was at bottom in sidebar, often hidden
and users had to scroll to find it.

SOLUTION:
- Added Preview button at top right after patient header
- Button labeled 'Preview Discharge Summary' with eye icon
- Original sidebar button still present for convenience
- Top button uses same onclick handler as sidebar button

Now users can easily preview discharge summary without scrolling.
This commit is contained in:
DevSoftTech Server 2026-06-06 04:42:00 +05:30
parent a76f0dd9e7
commit 3de14194a7

View File

@ -601,6 +601,12 @@ $allergyStatusNoKnown = in_array($allergyStatusNormalized, ['no known drug aller
/ IPD ID : <strong><?= esc((string) ($ipd->ipd_code ?? '')) ?></strong>
</div>
<div class="mb-3 text-end">
<button type="button" class="btn btn-primary" id="btn_preview_top" onclick="openDischargePreview('<?= site_url('Ipd_discharge/preview_discharge_report/' . $ipdId . '?regen=1') ?>', 'Discharge Preview');">
<i class="fas fa-eye me-1"></i> Preview Discharge Summary
</button>
</div>
<div class="card discharge-main-card">
<div class="card-body">
<?php if ($noticeText !== ''): ?>