first commit
This commit is contained in:
35
app/Models/SI/SttMedicalHistory.php
Normal file
35
app/Models/SI/SttMedicalHistory.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\SI;
|
||||
|
||||
use App\Models\ArchiveHistory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SttMedicalHistory extends Model
|
||||
{
|
||||
protected $table = 'si_stt_patients';
|
||||
|
||||
protected $fillable = [
|
||||
'fam', // Фамилия
|
||||
'im', // Имя
|
||||
'ot', // Отчество
|
||||
'mpostdate', // Д. пост.
|
||||
'menddate', // Д. вып.
|
||||
'narhiv', // № в архиве
|
||||
'datearhiv', // Д. архив
|
||||
'statgod', // Год нахождения в стационаре
|
||||
'enp', // ЕНП
|
||||
'nkarta', // № карты
|
||||
'dr', // ДР
|
||||
];
|
||||
|
||||
public function getFullNameAttribute()
|
||||
{
|
||||
return "$this->fam $this->im $this->ot";
|
||||
}
|
||||
|
||||
public function getArchiveHistory()
|
||||
{
|
||||
return $this->morphMany(ArchiveHistory::class, 'historyable');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user