|
@@ -467,7 +467,7 @@ SELECT p.id,
|
|
|
p.last_child_review_point_scoped_note_uid as last_child_review_note_uid,
|
|
|
p.last_child_plan_point_scoped_note_uid as last_child_plan_note_uid
|
|
|
FROM point p
|
|
|
- left join note_point np on p.id = np.point_id and np.note_id = {$_note->id}
|
|
|
+ left join note_point np on p.id = np.point_id and np.note_id = {$_note->id} and np.is_active = TRUE
|
|
|
WHERE p.client_id = {$_patient->id} AND p.category = '{$_category}'
|
|
|
ORDER BY ((p.data)::json->'{$_sortKey}')::text
|
|
|
";
|