78 lines
1.8 KiB
PHP
78 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Models\ProntoAtendimento\Aih;
|
|
|
|
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
|
use App\Models\Geral\DocumentoTipo;
|
|
use App\Models\Model;
|
|
use App\Models\ProntoAtendimento\Aih\CaraterInternacao;
|
|
use App\Models\ProntoAtendimento\Aih\Clinica;
|
|
use App\Models\Sigtap\Procedimento;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class InternacaoProcedimento extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'pronto_atendimento_aih_internacao_procedimento';
|
|
|
|
protected $fillable = [
|
|
'internacao_id',
|
|
'procedimento_solicitado_id',
|
|
'data_solicitacao',
|
|
'clinica_id',
|
|
'carater_internacao_id',
|
|
'profissional_solicitante_assistente_id',
|
|
'documento_tipo_id',
|
|
'documento_numero',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'internacao_id',
|
|
'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 internacao()
|
|
{
|
|
return $this->belongsTo(Internacao::class);
|
|
}
|
|
|
|
public function procedimentoSolicitado()
|
|
{
|
|
return $this->belongsTo(Procedimento::class);
|
|
}
|
|
|
|
public function clinica()
|
|
{
|
|
return $this->belongsTo(Clinica::class);
|
|
}
|
|
|
|
public function caraterInternacao()
|
|
{
|
|
return $this->belongsTo(CaraterInternacao::class);
|
|
}
|
|
|
|
public function profissionalSolicitanteAssistente()
|
|
{
|
|
return $this->belongsTo(Usuario::class);
|
|
}
|
|
|
|
public function documentoTipo()
|
|
{
|
|
return $this->belongsTo(DocumentoTipo::class);
|
|
}
|
|
|
|
public function getIsAllowedToDeleteAttribute()
|
|
{
|
|
return $this->hasNoOne([]);
|
|
}
|
|
}
|