From 885ee272c888a79584cb115e86c4269f4c8aeecc Mon Sep 17 00:00:00 2001 From: ruth Date: Sun, 26 May 2024 19:54:29 +0100 Subject: [PATCH] Visit history - correct count for displaying ALL results on a page (#7386) * display correct count values for ALL - issue #7385 * delete blank line * escape strings on line 317 * correct style --------- Co-authored-by: Jerry Padgett --- interface/patient_file/history/encounters.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/patient_file/history/encounters.php b/interface/patient_file/history/encounters.php index 965b6e05c40..06d668821e2 100644 --- a/interface/patient_file/history/encounters.php +++ b/interface/patient_file/history/encounters.php @@ -314,7 +314,7 @@ function changePageSize() { $name = getPatientNameFirstLast($pid); $dob = text(oeFormatShortDate(getPatientData($pid, "DOB")['DOB'])); $external_id = getPatientData($pid, "pubpid")['pubpid']; - echo text($name) . " (" . text($external_id) . ")" . "    DOB: " . $dob ; + echo text($name) . " (" . text($external_id) . ")" . "    DOB: " . $dob ; } ?> @@ -437,7 +437,8 @@ function changePageSize() { if (($pagesize > 0) && ($pagestart > 0)) { generatePageElement($pagestart - $pagesize, $pagesize, $billing_view, $issue, "⇐" . htmlspecialchars(xl("Prev"), ENT_NOQUOTES) . " "); } - echo ($pagestart + 1) . "-" . $upper . " " . htmlspecialchars(xl('of'), ENT_NOQUOTES) . " " . $numRes; + echo (($pagesize > 0) ? ($pagestart + 1) : "1") . "-" . $upper . " " . htmlspecialchars(xl('of'), ENT_NOQUOTES) . " " . $numRes; + if (($pagesize > 0) && ($pagestart + $pagesize <= $numRes)) { generatePageElement($pagestart + $pagesize, $pagesize, $billing_view, $issue, " " . htmlspecialchars(xl("Next"), ENT_NOQUOTES) . "⇒"); }