127 lines
3.0 KiB
PHP
127 lines
3.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
|
|
|
use App\Models\Cadastro\SujeitoAtencao\Lotacao;
|
|
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
|
use App\Models\ExameLaboratorial\AgendamentoExame\Agendamento;
|
|
use App\Models\ExameLaboratorial\LancamentoColeta\Status;
|
|
use App\Models\ExameLaboratorial\Parametrizacao\Motivo;
|
|
use App\Models\Model;
|
|
use App\Models\Parametrizacao\Exame\Exame;
|
|
use App\Models\Sigtap\Ocupacao;
|
|
use App\Models\Sigtap\Procedimento as SigtapProcedimento;
|
|
|
|
class AgendamentoExame extends Model
|
|
{
|
|
protected $table = 'exame_laboratorial_agendamento_exame';
|
|
|
|
protected $fillable = [
|
|
'agendamento_id',
|
|
'pre_atendimento_id',
|
|
'exame_id',
|
|
'valor',
|
|
'status_id',
|
|
'motivo_id',
|
|
'data_coleta',
|
|
'data_laudo',
|
|
'data_assinatura',
|
|
'assinatura_profissional_id',
|
|
'observacao',
|
|
'usuario_id',
|
|
'ocupacao_id',
|
|
'impressao_mapa_producao',
|
|
'entregue',
|
|
'entregue_usuario_id',
|
|
'data_entregue',
|
|
'impressao',
|
|
'impressao_usuario_id',
|
|
'data_impressao',
|
|
'bpa_procedimento_id',
|
|
'apac_procedimento_secundario_id',
|
|
'procedimento_id',
|
|
'lotacao_id',
|
|
'quantidade',
|
|
'supervisor_id',
|
|
'regulacao_solicitacao_id',
|
|
'soap_solicitacao_exame_item_id',
|
|
'acompanhamento_oci_id'
|
|
];
|
|
|
|
protected $casts = [
|
|
'data_coleta' => 'datetime:d/m/Y',
|
|
'data_laudo' => 'datetime:d/m/Y',
|
|
'data_assinatura' => 'datetime:d/m/Y',
|
|
'data_entregue' => 'datetime:d/m/Y',
|
|
'data_impressao' => 'datetime:d/m/Y',
|
|
'impressao_mapa_producao' => 'boolean',
|
|
'entregue' => 'boolean',
|
|
'impressao' => '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 exame()
|
|
{
|
|
return $this->belongsTo(Exame::class);
|
|
}
|
|
|
|
public function agendamento()
|
|
{
|
|
return $this->belongsTo(Agendamento::class);
|
|
}
|
|
|
|
public function usuario()
|
|
{
|
|
return $this->belongsTo(Usuario::class);
|
|
}
|
|
|
|
public function assinaturaProfissional()
|
|
{
|
|
return $this->belongsTo(Usuario::class);
|
|
}
|
|
|
|
public function entregueUsuario()
|
|
{
|
|
return $this->belongsTo(Usuario::class);
|
|
}
|
|
|
|
public function impressaoUsuario()
|
|
{
|
|
return $this->belongsTo(Usuario::class);
|
|
}
|
|
|
|
public function ocupacao()
|
|
{
|
|
return $this->belongsTo(Ocupacao::class);
|
|
}
|
|
|
|
public function motivo()
|
|
{
|
|
return $this->belongsTo(Motivo::class);
|
|
}
|
|
|
|
public function status()
|
|
{
|
|
return $this->belongsTo(Status::class);
|
|
}
|
|
|
|
public function procedimento()
|
|
{
|
|
return $this->belongsTo(SigtapProcedimento::class);
|
|
}
|
|
|
|
public function lotacao()
|
|
{
|
|
return $this->belongsTo(Lotacao::class);
|
|
}
|
|
}
|