92 lines
2.2 KiB
PHP
92 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models\ProntoAtendimento\Atendimento\Medico;
|
|
|
|
use App\Models\Geral\DocumentoTipo;
|
|
use App\Models\Model;
|
|
use App\Models\ProntoAtendimento\Atendimento\Enfermagem\AtendimentoEnfermagem;
|
|
use App\Models\ProntoAtendimento\Atendimento\ExameImagem\AtendimentoExameImagem;
|
|
use App\Models\ProntoAtendimento\Atendimento\Observacao\PacienteObservacao;
|
|
use App\Models\ProntoAtendimento\Atendimento\Recepcao;
|
|
use App\Models\ProntoAtendimento\Atendimento\Triagem\AtendimentoTriagem;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class DeclaracaoComparecimento extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'pronto_atendimento_atendimento_medico_declaracao_comparecimento';
|
|
|
|
protected $casts = [
|
|
'de' => 'datetime:Y-m-d H:i:s',
|
|
'ate' => 'datetime:Y-m-d H:i:s',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'tipo_id',
|
|
'nome',
|
|
'documento_tipo_id',
|
|
'documento_numero',
|
|
'de',
|
|
'ate',
|
|
'motivo'
|
|
];
|
|
|
|
protected $hidden = [
|
|
'created_at',
|
|
'created_lotacao_id',
|
|
'created_centro_custo_id',
|
|
'updated_at',
|
|
'updated_lotacao_id',
|
|
'updated_centro_custo_id',
|
|
'deleted_at',
|
|
'deleted_lotacao_id',
|
|
'deleted_centro_custo_id',
|
|
];
|
|
|
|
public function atendimentoMedico()
|
|
{
|
|
return $this->belongsTo(AtendimentoMedico::class);
|
|
}
|
|
|
|
public function atendimentoEnfermagem()
|
|
{
|
|
return $this->belongsTo(AtendimentoEnfermagem::class);
|
|
}
|
|
|
|
public function atendimentoExameImagem()
|
|
{
|
|
return $this->belongsTo(AtendimentoExameImagem::class);
|
|
}
|
|
|
|
public function pacienteObservacao()
|
|
{
|
|
return $this->belongsTo(PacienteObservacao::class);
|
|
}
|
|
|
|
public function atendimentoTriagem()
|
|
{
|
|
return $this->belongsTo(AtendimentoTriagem::class);
|
|
}
|
|
|
|
public function recepcao()
|
|
{
|
|
return $this->belongsTo(Recepcao::class, 'atendimento_recepcao_id');
|
|
}
|
|
|
|
public function tipo()
|
|
{
|
|
return $this->belongsTo(DeclaracaoComparecimentoTipo::class);
|
|
}
|
|
|
|
public function documentoTipo()
|
|
{
|
|
return $this->belongsTo(DocumentoTipo::class);
|
|
}
|
|
|
|
public function getIsAllowedToDeleteAttribute()
|
|
{
|
|
return true;
|
|
}
|
|
}
|