|
@@ -94,7 +94,8 @@ class Client extends Model
|
|
{
|
|
{
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
// ->where('is_core_note', false)
|
|
// ->where('is_core_note', false)
|
|
- ->orderBy('effective_dateest', 'desc');
|
|
|
|
|
|
+ ->orderBy('effective_dateest', 'desc')
|
|
|
|
+ ->orderBy('created_at', 'desc');
|
|
}
|
|
}
|
|
|
|
|
|
public function prescriptions()
|
|
public function prescriptions()
|
|
@@ -123,7 +124,8 @@ class Client extends Model
|
|
public function notesAscending()
|
|
public function notesAscending()
|
|
{
|
|
{
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
- ->orderBy('effective_dateest', 'asc');
|
|
|
|
|
|
+ ->orderBy('effective_dateest', 'asc')
|
|
|
|
+ ->orderBy('created_at', 'desc');;
|
|
}
|
|
}
|
|
|
|
|
|
public function mcCodeChecks(){
|
|
public function mcCodeChecks(){
|
|
@@ -143,7 +145,8 @@ class Client extends Model
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
->where('is_cancelled', false)
|
|
->where('is_cancelled', false)
|
|
->where('id', '<>', $this->core_note_id)
|
|
->where('id', '<>', $this->core_note_id)
|
|
- ->orderBy('effective_dateest', 'desc');
|
|
|
|
|
|
+ ->orderBy('effective_dateest', 'desc')
|
|
|
|
+ ->orderBy('created_at', 'desc');;
|
|
}
|
|
}
|
|
|
|
|
|
public function cancelledNotes()
|
|
public function cancelledNotes()
|
|
@@ -151,7 +154,8 @@ class Client extends Model
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
return $this->hasMany(Note::class, 'client_id', 'id')
|
|
->where('is_cancelled', true)
|
|
->where('is_cancelled', true)
|
|
->where('id', '<>', $this->core_note_id)
|
|
->where('id', '<>', $this->core_note_id)
|
|
- ->orderBy('effective_dateest', 'desc');
|
|
|
|
|
|
+ ->orderBy('effective_dateest', 'desc')
|
|
|
|
+ ->orderBy('created_at', 'desc');;
|
|
}
|
|
}
|
|
|
|
|
|
public function sections()
|
|
public function sections()
|