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