|
@@ -3306,7 +3306,8 @@ ORDER BY c.name_last, c.name_first
|
|
n.note_reason_icd3description AS icd3description,
|
|
n.note_reason_icd3description AS icd3description,
|
|
n.note_reason_icd4 AS icd4,
|
|
n.note_reason_icd4 AS icd4,
|
|
n.note_reason_icd4description AS icd4description,
|
|
n.note_reason_icd4description AS icd4description,
|
|
- n.note_reason_memo AS icd_memo
|
|
|
|
|
|
+ n.note_reason_memo AS icd_memo,
|
|
|
|
+ n.visit_number
|
|
|
|
|
|
";
|
|
";
|
|
$from = "FROM note AS n
|
|
$from = "FROM note AS n
|
|
@@ -3344,7 +3345,7 @@ ORDER BY c.name_last, c.name_first
|
|
$filters = '';
|
|
$filters = '';
|
|
}
|
|
}
|
|
// $filters = '';
|
|
// $filters = '';
|
|
- $orderBy = "ORDER BY c.id ASC, n.effective_dateest ASC";
|
|
|
|
|
|
+ $orderBy = "ORDER BY c.id ASC, n.visit_number ASC";
|
|
|
|
|
|
$countQuery = "SELECT count(*) {$from} {$where} {$filters}";
|
|
$countQuery = "SELECT count(*) {$from} {$where} {$filters}";
|
|
// dd($countQuery);
|
|
// dd($countQuery);
|