mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 03:31:31 +00:00
updated streamline-setup v2
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
<?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.')');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user