79 lines
1.8 KiB
PHP
79 lines
1.8 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class NhHealthCareSheet
|
|
*
|
|
* @property int $id
|
|
* @property string $health_care_sheet_id
|
|
* @property int $insurance_id
|
|
* @property int $network_agent_id
|
|
* @property string $patient_lastname
|
|
* @property string|null $patient_firstname
|
|
* @property string $patient_situation
|
|
* @property string $practitioner_lastname
|
|
* @property string|null $practitioner_firstname
|
|
* @property string|null $practitioner_provider_class_id
|
|
* @property string $care_condition
|
|
* @property Carbon|null $accident_date
|
|
* @property Carbon|null $pregnancy_start_at
|
|
* @property Carbon|null $pregnancy_end_at
|
|
* @property string $type
|
|
* @property string $state
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class NhHealthCareSheet extends Model
|
|
{
|
|
protected $table = 'nh_health_care_sheets';
|
|
|
|
protected $casts = [
|
|
'insurance_id' => 'int',
|
|
'network_agent_id' => 'int',
|
|
];
|
|
|
|
protected $dates = [
|
|
'accident_date',
|
|
'pregnancy_start_at',
|
|
'pregnancy_end_at'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'health_care_sheet_id',
|
|
'insurance_id',
|
|
'network_agent_id',
|
|
'patient_lastname',
|
|
'patient_firstname',
|
|
'patient_situation',
|
|
'practitioner_lastname',
|
|
'practitioner_firstname',
|
|
'practitioner_provider_class_id',
|
|
'care_condition',
|
|
'accident_date',
|
|
'pregnancy_start_at',
|
|
'pregnancy_end_at',
|
|
'type',
|
|
'state'
|
|
];
|
|
|
|
public function institution()
|
|
{
|
|
return $this->belongsTo(AgentPlus::class, 'network_agent_id', 'network_agent_id');
|
|
}
|
|
|
|
public function insurance()
|
|
{
|
|
return $this->belongsTo(NhInsurance::class, 'insurance_id');
|
|
}
|
|
}
|