mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
45 lines
1.1 KiB
PHP
Executable File
45 lines
1.1 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Streamline\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use OwenIt\Auditing\Contracts\Auditable;
|
|
|
|
|
|
class Patient extends Model implements Auditable {
|
|
|
|
|
|
public $timestamps = true;
|
|
protected $fillable = [
|
|
'number',
|
|
'first_name',
|
|
'last_name',
|
|
'date_of_birth',
|
|
'marital_status',
|
|
'national_id',
|
|
'occupation',
|
|
'religion',
|
|
'patient_category',
|
|
'district_id',
|
|
'county_id',
|
|
'subcounty_id',
|
|
'parish',
|
|
'village'
|
|
];
|
|
protected $dates = ['date_of_birth', 'deleted_at'];
|
|
|
|
// use laravel-auditing to track database changes
|
|
use \OwenIt\Auditing\Auditable;
|
|
|
|
// use for soft deletes
|
|
use SoftDeletes;
|
|
|
|
/* added this to allow plucking the first name + last name at once when making a dropdown */
|
|
public function getFullNameAttribute($value)
|
|
{
|
|
return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name). ' ' . ucfirst($this->number) . ' ' . ucfirst('('.$this->phone.')');
|
|
}
|
|
|
|
}
|