134 lines
3.1 KiB
PHP
134 lines
3.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Ambulatorio;
|
|
|
|
use App\Models\Almoxarifado\SaidaItem;
|
|
use App\Models\Apac\SolicitacaoAutorizacao;
|
|
use App\Models\Bpa\Procedimento as BpaProcedimento;
|
|
use App\Models\Cadastro\Especialidade;
|
|
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
|
use App\Models\Model;
|
|
use App\Models\Raas\AtendimentoProcedimento as RaasAtendimentoProcedimento;
|
|
use App\Models\Sigtap\Cid;
|
|
use App\Models\Sigtap\Ocupacao;
|
|
use App\Models\Sigtap\Procedimento;
|
|
|
|
class AtendimentoProcedimento extends Model
|
|
{
|
|
protected $table = 'ambulatorio_atendimento_procedimento';
|
|
|
|
protected $casts = [
|
|
'automatico' => 'boolean',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'atendimento_id',
|
|
'pre_atendimento_id',
|
|
'soap_id',
|
|
'pos_consulta_id',
|
|
'bpa_procedimento_id',
|
|
'raas_atendimento_procedimento_id',
|
|
'apac_solicitacao_autorizacao_id',
|
|
'apac_procedimento_secundario_id',
|
|
'ocupacao_id',
|
|
'especialidade_id',
|
|
'usuario_id',
|
|
'procedimento_id',
|
|
'cid_id',
|
|
'saida_item_id',
|
|
'quantidade',
|
|
'automatico',
|
|
'local_curativo',
|
|
'acompanhamento_oci_id',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'created_at',
|
|
'created_lotacao_id',
|
|
'created_centro_custo_id',
|
|
'updated_at',
|
|
'updated_lotacao_id',
|
|
'updated_centro_custo_id',
|
|
];
|
|
|
|
public function atendimento()
|
|
{
|
|
return $this->belongsTo(Atendimento::class);
|
|
}
|
|
|
|
public function preAtendimento()
|
|
{
|
|
return $this->belongsTo(AtendimentoPreAtendimento::class);
|
|
}
|
|
|
|
public function posConsulta()
|
|
{
|
|
return $this->belongsTo(AtendimentoPosConsulta::class);
|
|
}
|
|
|
|
public function soap()
|
|
{
|
|
return $this->belongsTo(AtendimentoSoap::class);
|
|
}
|
|
|
|
public function raasAtendimentoProcedimento()
|
|
{
|
|
return $this->belongsTo(RaasAtendimentoProcedimento::class);
|
|
}
|
|
|
|
public function apacSolicitacaoAutorizacao()
|
|
{
|
|
return $this->belongsTo(SolicitacaoAutorizacao::class);
|
|
}
|
|
|
|
public function bpaProcedimento()
|
|
{
|
|
return $this->belongsTo(BpaProcedimento::class);
|
|
}
|
|
|
|
public function ocupacao()
|
|
{
|
|
return $this->belongsTo(Ocupacao::class);
|
|
}
|
|
|
|
public function especialidade()
|
|
{
|
|
return $this->belongsTo(Especialidade::class);
|
|
}
|
|
|
|
public function usuario()
|
|
{
|
|
return $this->belongsTo(Usuario::class);
|
|
}
|
|
|
|
public function procedimento()
|
|
{
|
|
return $this->belongsTo(Procedimento::class);
|
|
}
|
|
|
|
public function cid()
|
|
{
|
|
return $this->belongsTo(Cid::class);
|
|
}
|
|
|
|
public function soapProcedimentoClinico()
|
|
{
|
|
return $this->hasOne(AtendimentoSoapProcedimentoClinico::class);
|
|
}
|
|
|
|
public function soapProcedimentoAdministrativo()
|
|
{
|
|
return $this->hasOne(AtendimentoSoapProcedimentoAdministrativo::class);
|
|
}
|
|
|
|
public function almoxarifadoSaidaItem()
|
|
{
|
|
return $this->belongsTo(SaidaItem::class, 'saida_item_id');
|
|
}
|
|
|
|
public function materiais()
|
|
{
|
|
return $this->hasMany(AtendimentoSoapFeridaMaterial::class, 'atendimento_procedimento_id');
|
|
}
|
|
}
|