This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
|
||||
use App\Models\ExameLaboratorial\Jornada\Jornada;
|
||||
use App\Models\Model;
|
||||
use App\Models\Regulacao\Solicitacao as RegulacaoSolicitacao;
|
||||
use App\Models\WebService\Laboratorio\Cliente\PedidoStatus;
|
||||
|
||||
class Agendamento extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento';
|
||||
|
||||
protected $fillable = [
|
||||
'paciente_id',
|
||||
'medico_id',
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'coleta_unidade_id',
|
||||
'coleta_infraestrutura_id',
|
||||
'laboratorio_unidade_id',
|
||||
'laboratorio_infraestrutura_id',
|
||||
'jornada_id',
|
||||
'uso_medicamento',
|
||||
'suspeita_clinica',
|
||||
'observacao',
|
||||
'urgente',
|
||||
'data',
|
||||
'horario',
|
||||
'agendamento_numero',
|
||||
'ultima_menstruacao',
|
||||
'gestante',
|
||||
'responsavel',
|
||||
'supervisor_id',
|
||||
'retroativo',
|
||||
'regulacao_solicitacao_id',
|
||||
'usuario_id',
|
||||
'ocupacao_id',
|
||||
'lotacao_id',
|
||||
'laboratorio_usuario_id',
|
||||
'laboratorio_ocupacao_id',
|
||||
'laboratorio_lotacao_id',
|
||||
'bpa_procedimento_id',
|
||||
'web_service_laboratorio_cliente_pedido_status_id',
|
||||
'app_conectasus_cidadao',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'data' => 'datetime:d/m/Y',
|
||||
'ultima_menstruacao' => 'datetime:d/m/Y',
|
||||
'urgente' => 'boolean',
|
||||
'gestante' => 'boolean',
|
||||
'retroativo' => 'boolean',
|
||||
'app_conectasus_cidadao' => 'boolean',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'externo_created_usuario_id',
|
||||
'externo_updated_usuario_id',
|
||||
];
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function coletaUnidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function laboratorioUnidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function coletaInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function laboratorioInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function medico()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function jornada()
|
||||
{
|
||||
return $this->belongsTo(Jornada::class);
|
||||
}
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function regulacaoSolicitacao()
|
||||
{
|
||||
return $this->belongsTo(RegulacaoSolicitacao::class);
|
||||
}
|
||||
|
||||
public function webServiceLaboratorioClientePedidoStatus()
|
||||
{
|
||||
return $this->belongsTo(PedidoStatus::class);
|
||||
}
|
||||
|
||||
public function agendamentoExame()
|
||||
{
|
||||
return $this->hasMany(AgendamentoExame::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user