Изменил условие определения последнего движения
This commit is contained in:
@@ -33,7 +33,7 @@ class MedicalHistory extends MaterializedViewModel
|
|||||||
public function latestMigration()
|
public function latestMigration()
|
||||||
{
|
{
|
||||||
return $this->hasOne(MigrationPatient::class, 'medical_history_id', 'id')
|
return $this->hasOne(MigrationPatient::class, 'medical_history_id', 'id')
|
||||||
->whereNotNull('out_date')
|
->whereNot('stationar_branch_id', 0) // не выписка
|
||||||
->latest('ingoing_date');
|
->latest('ingoing_date');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user