|
@@ -44,11 +44,12 @@ if(!$contentData) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-$previousVitals = [];
|
|
|
|
|
|
+$last4VisitsIDs = \App\Models\Note::where('client_id', $note->client_id)->where('id', '!=', $note->id)->pluck('id')->toArray();
|
|
|
|
|
|
|
|
+$previousVitals = [];
|
|
$previousVitals = \App\Models\Point::where('parent_point_id', $point->id)
|
|
$previousVitals = \App\Models\Point::where('parent_point_id', $point->id)
|
|
->where('category', 'REVIEW')
|
|
->where('category', 'REVIEW')
|
|
- ->where('added_in_note_id', '!=', $note->id)
|
|
|
|
|
|
+ ->whereIn('added_in_note_id', $last4VisitsIDs)
|
|
->orderBy('id', 'DESC')
|
|
->orderBy('id', 'DESC')
|
|
->limit(4)
|
|
->limit(4)
|
|
->get();
|
|
->get();
|