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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoExameBloqueado extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_exame_bloqueado';
|
||||
|
||||
protected $fillable = [
|
||||
'paciente_id',
|
||||
'exame_id',
|
||||
'supervisor_id',
|
||||
'valor',
|
||||
'motivo_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoExameBloqueadoMotivo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_exame_bloqueado_motivo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoExameHistorico extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_exame_historico';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'exame_id',
|
||||
'agendamento_id',
|
||||
'acao_id',
|
||||
'data',
|
||||
'horario',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoExameHistoricoAcao extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_exame_historico_acao';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\ExameLaboratorial\AgendamentoExame\AgendamentoExame;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\ExameComposicao;
|
||||
|
||||
class AgendamentoExameResultado extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_exame_resultado';
|
||||
|
||||
protected $fillable = [
|
||||
'agendamento_exame_id',
|
||||
'composicao_id',
|
||||
'valor',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function exame()
|
||||
{
|
||||
return $this->belongsTo(AgendamentoExame::class);
|
||||
}
|
||||
|
||||
public function composicao()
|
||||
{
|
||||
return $this->belongsTo(ExameComposicao::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameLaboratorial\AgendamentoExame\Agendamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoHistoricoMedicamento extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_historico_medicamento';
|
||||
|
||||
protected $fillable = [
|
||||
'agendamento_id',
|
||||
'data',
|
||||
'uso_medicamento',
|
||||
'paciente_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function agendamento()
|
||||
{
|
||||
return $this->belongsTo(Agendamento::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\AgendamentoExame;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameLaboratorial\AgendamentoExame\Agendamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoLaudo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_laudo';
|
||||
|
||||
protected $casts = [
|
||||
'is_enviado_webservice' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'agendamento_id',
|
||||
'arquivo',
|
||||
'url',
|
||||
'ordem',
|
||||
'is_enviado_webservice'
|
||||
];
|
||||
|
||||
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 agendamento()
|
||||
{
|
||||
return $this->belongsTo(Agendamento::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user