From 3d342def5d37efae8c8f6c691b7e35cc9eed03c5 Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Thu, 10 Mar 2011 17:25:56 -0800 Subject: [PATCH] Fix for sorting of encounters list. --- interface/patient_file/history/encounters.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/patient_file/history/encounters.php b/interface/patient_file/history/encounters.php index d62729b39..20ff6c5a0 100644 --- a/interface/patient_file/history/encounters.php +++ b/interface/patient_file/history/encounters.php @@ -252,7 +252,8 @@ if ($issue) { "ie.list_id = ? AND ie.encounter = fe.encounter "; array_push($sqlBindArray, $pid, $issue); } -$query .= "LEFT JOIN users AS u ON u.id = fe.provider_id WHERE fe.pid = ?"; +$query .= "LEFT JOIN users AS u ON u.id = fe.provider_id WHERE fe.pid = ? " . + "ORDER BY fe.date DESC, fe.id DESC"; $sqlBindArray[] = $pid; $res4 = sqlStatement($query, $sqlBindArray); -- 2.11.4.GIT