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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\FormulaExame;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
||||
use App\Models\ExameLaboratorial\FormulaExame\FormulaExameFator;
|
||||
|
||||
class FormulaExame extends Model
|
||||
{
|
||||
use SoftDeletes, CascadeSoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_formula_exame';
|
||||
|
||||
protected $cascadeDeletes = [
|
||||
'FormulaExame'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'nome',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 FormulaExame()
|
||||
{
|
||||
return $this->hasMany(FormulaExameFator::class, 'formula_exame_id');
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\FormulaExame;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ExameLaboratorial\FormulaExame\Operacao;
|
||||
|
||||
class FormulaExameFator extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_formula_exame_fator';
|
||||
|
||||
protected $fillable = [
|
||||
'formula_exame_id',
|
||||
'fator',
|
||||
'operacao_id',
|
||||
'tipo',
|
||||
'valor',
|
||||
'exponenciacao',
|
||||
'exponenciacao_tipo',
|
||||
'exponenciacao_valor',
|
||||
'ordem',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 operacao()
|
||||
{
|
||||
return $this->belongsTo(Operacao::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
19
api/app/Models/ExameLaboratorial/FormulaExame/Operacao.php
Normal file
19
api/app/Models/ExameLaboratorial/FormulaExame/Operacao.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\FormulaExame;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Operacao extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_formula_exame_operacao';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
70
api/app/Models/ExameLaboratorial/Jornada/Jornada.php
Normal file
70
api/app/Models/ExameLaboratorial/Jornada/Jornada.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Jornada;
|
||||
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\ExameLaboratorial\Jornada\TipoJornada;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
|
||||
class Jornada extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_jornada';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'semana_id',
|
||||
'tipo_id',
|
||||
'vagas',
|
||||
'vagas_app',
|
||||
'laboratorio_prestador_infraestrutura_id',
|
||||
'data',
|
||||
'hora_inicial',
|
||||
'hora_fim',
|
||||
'tempo_atendimento',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'data' => 'datetime:d/m/Y',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(TipoJornada::class);
|
||||
}
|
||||
|
||||
public function laboratorioPrestadorInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class, 'laboratorio_prestador_infraestrutura_id');
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
19
api/app/Models/ExameLaboratorial/Jornada/SemanaJornada.php
Normal file
19
api/app/Models/ExameLaboratorial/Jornada/SemanaJornada.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Jornada;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SemanaJornada extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_jornada_semana';
|
||||
|
||||
protected $fillable = [
|
||||
'nome'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
27
api/app/Models/ExameLaboratorial/Jornada/TipoJornada.php
Normal file
27
api/app/Models/ExameLaboratorial/Jornada/TipoJornada.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Jornada;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class TipoJornada extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'exame_laboratorial_jornada_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'nome'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function jornadaExameLaboratorial()
|
||||
{
|
||||
return $this->hasMany(Jornada::class);
|
||||
}
|
||||
}
|
||||
36
api/app/Models/ExameLaboratorial/JornadaBloqueio.php
Normal file
36
api/app/Models/ExameLaboratorial/JornadaBloqueio.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Model;
|
||||
|
||||
class JornadaBloqueio extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_jornada_bloqueio';
|
||||
|
||||
protected $casts = [
|
||||
'inicio' => 'datetime:d/m/Y',
|
||||
'fim' => 'datetime:d/m/Y',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'inicio',
|
||||
'fim',
|
||||
'infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
}
|
||||
19
api/app/Models/ExameLaboratorial/LancamentoColeta/Status.php
Normal file
19
api/app/Models/ExameLaboratorial/LancamentoColeta/Status.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\LancamentoColeta;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Status extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_agendamento_exame_status';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AppCidadaoLaboratorio extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_param_app_conectasus_cidadao_laboratorio';
|
||||
|
||||
protected $fillable = [
|
||||
'infraestrutura_id',
|
||||
'percentual_financeiro',
|
||||
'percentual_quantitativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AppConectasusCidadaoExame extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_app_conectasus_cidadao_exame';
|
||||
|
||||
protected $fillable = [
|
||||
'cota_exame_periodo_id',
|
||||
'percentual_financeiro',
|
||||
'percentual_quantitativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 cotaExamePeriodo()
|
||||
{
|
||||
return $this->belongsTo(CotaExamePeriodo::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AppConectasusCidadaoUnidadeSolicitante extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_param_app_conectasus_cidadao_unidade_sol';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'percentual_financeiro',
|
||||
'percentual_quantitativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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',
|
||||
];
|
||||
}
|
||||
84
api/app/Models/ExameLaboratorial/Parametrizacao/Cota.php
Normal file
84
api/app/Models/ExameLaboratorial/Parametrizacao/Cota.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\CotaExame;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\CotaUnidadeSolicitante;
|
||||
|
||||
class Cota extends Model
|
||||
{
|
||||
use SoftDeletes, CascadeSoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota';
|
||||
|
||||
protected $cascadeDeletes = [
|
||||
'cotaUnidadeSolicitante', 'cotaExame'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'unidade_tipo_id',
|
||||
'cota_tipo_id',
|
||||
'inicio',
|
||||
'fim',
|
||||
'cota_quantidade',
|
||||
'cota_valor',
|
||||
'unidade_solicitante_id',
|
||||
'unidade_solicitante_infraestrutura_id',
|
||||
'observacao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function unidadeSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function unidadeSolicitanteInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function cotaUnidadeSolicitante()
|
||||
{
|
||||
return $this->hasMany(CotaUnidadeSolicitante::class);
|
||||
}
|
||||
|
||||
public function cotaExame()
|
||||
{
|
||||
return $this->hasMany(CotaExame::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\Cota;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\CotaExameUnidadeSolicitante;
|
||||
|
||||
class CotaExame extends Model
|
||||
{
|
||||
use SoftDeletes, CascadeSoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_exame';
|
||||
|
||||
protected $cascadeDeletes = [
|
||||
'cotaExameUnidadeSolicitanteCotaExame'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'cota_id',
|
||||
'cota_quantidade',
|
||||
'cota_valor',
|
||||
'exame_id',
|
||||
'cota_exame_periodo_id'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 cota()
|
||||
{
|
||||
return $this->belongsTo(Cota::class);
|
||||
}
|
||||
|
||||
public function exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
|
||||
public function cotaExameUnidadeSolicitanteCotaExame()
|
||||
{
|
||||
return $this->hasMany(CotaExameUnidadeSolicitante::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class CotaExamePeriodo extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_exame_periodo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'exame_id',
|
||||
'observacao',
|
||||
'infraestrutura_id',
|
||||
'unidade_id',
|
||||
'cota_tipo_id',
|
||||
'inicio',
|
||||
'fim',
|
||||
'cota_quantidade',
|
||||
'cota_valor',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\CotaExame;
|
||||
|
||||
|
||||
class CotaExameUnidadeSolicitante extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_exame_unidade';
|
||||
|
||||
protected $fillable = [
|
||||
'cota_id',
|
||||
'cota_exame_id',
|
||||
'unidade_solicitante_id',
|
||||
'infraestrutura_solicitante_id',
|
||||
'cota_quantidade',
|
||||
'cota_valor'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 cotaExame()
|
||||
{
|
||||
return $this->belongsTo(CotaExame::class);
|
||||
}
|
||||
|
||||
public function unidadeSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestruturaSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
20
api/app/Models/ExameLaboratorial/Parametrizacao/CotaTipo.php
Normal file
20
api/app/Models/ExameLaboratorial/Parametrizacao/CotaTipo.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class CotaTipo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CotaTransferencia extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_transferencia';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'cota_id',
|
||||
'laboratorio_unidade_id',
|
||||
'laboratorio_infraestrutura_id',
|
||||
'origem_unidade_id',
|
||||
'origem_infraestrutura_id',
|
||||
'origem_inicio',
|
||||
'origem_fim',
|
||||
'origem_cota_quantidade',
|
||||
'origem_cota_valor',
|
||||
'destino_unidade_id',
|
||||
'destino_infraestrutura_id',
|
||||
'destino_inicio',
|
||||
'destino_fim',
|
||||
'destino_cota_quantidade',
|
||||
'destino_cota_valor',
|
||||
'unidade_tipo_id',
|
||||
'cota_tipo_id',
|
||||
];
|
||||
|
||||
public function laboratorioUnidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function laboratorioInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function origemUnidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function origemInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function destinoUnidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function destinoInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\CotaExamePeriodo;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\CotaTransferencia;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CotaTransferenciaExames extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_transferencia_exames';
|
||||
|
||||
protected $fillable = [
|
||||
'cota_transferencia_id',
|
||||
'cota_quantidade',
|
||||
'cota_valor',
|
||||
'cota_exame_id',
|
||||
'cota_quantidade_transferido',
|
||||
'cota_valor_transferido',
|
||||
];
|
||||
|
||||
public function cotaExame()
|
||||
{
|
||||
return $this->belongsTo(CotaExamePeriodo::class);
|
||||
}
|
||||
|
||||
public function cotaTransferencia()
|
||||
{
|
||||
return $this->belongsTo(CotaTransferencia::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\Cota;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
|
||||
|
||||
class CotaUnidadeSolicitante extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_cota_unidade_solicitante';
|
||||
|
||||
protected $fillable = [
|
||||
'cota_id',
|
||||
'cota_id_unidade_solicitante',
|
||||
'unidade_solicitante_id',
|
||||
'infraestrutura_solicitante_id',
|
||||
'cota_quantidade',
|
||||
'cota_valor'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 cota()
|
||||
{
|
||||
return $this->belongsTo(Cota::class);
|
||||
}
|
||||
|
||||
public function unidadeSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestruturaSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class ExameAmbulatorioAtendimento extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_exame_ambulatorio_atendimento';
|
||||
|
||||
protected $casts = [
|
||||
'exibir' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'exibir',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Enums\ExameLaboratorial\TipoImpressaoAgendamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class ImpressaoAgendamento extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_impressao_agendamento';
|
||||
|
||||
protected $fillable = [
|
||||
'tipo_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(TipoImpressaoAgendamento::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class IntegracaoAplicativo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_integracao_aplicativo';
|
||||
|
||||
protected $casts = [
|
||||
'habilita_agendamento_conectasus_cidadao' => 'boolean',
|
||||
'habilita_visualizacao_laudo_conectasus_cidadao' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'habilita_agendamento_conectasus_cidadao',
|
||||
'habilita_visualizacao_laudo_conectasus_cidadao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\LaboratorioFaturaUnidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\LaboratorioFaturaUsuario;
|
||||
use App\Models\Model;
|
||||
|
||||
class LaboratorioFatura extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_laboratorio_fatura_automatico';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function laboratorioFaturaUnidade()
|
||||
{
|
||||
return $this->hasMany(LaboratorioFaturaUnidade::class, 'laboratorio_fatura_automatico_id', 'id');
|
||||
}
|
||||
|
||||
public function laboratorioFaturaUsuario()
|
||||
{
|
||||
return $this->hasMany(LaboratorioFaturaUsuario::class, 'laboratorio_fatura_automatico_id', 'id');
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\LaboratorioFatura;
|
||||
use App\Models\Model;
|
||||
|
||||
class LaboratorioFaturaUnidade extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_lab_fatu_auto_unidade';
|
||||
|
||||
protected $fillable = [
|
||||
'laboratorio_fatura_automatico_id',
|
||||
'infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function laboratorioFaturaAutomatico()
|
||||
{
|
||||
return $this->belongsTo(LaboratorioFatura::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\LaboratorioFatura;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
|
||||
class LaboratorioFaturaUsuario extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_lab_fatu_auto_usuario';
|
||||
|
||||
protected $fillable = [
|
||||
'laboratorio_fatura_automatico_id',
|
||||
'usuario_id',
|
||||
'ocupacao_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'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 ocupacao()
|
||||
{
|
||||
return $this->belongsTo(Ocupacao::class);
|
||||
}
|
||||
|
||||
public function laboratorioFaturaAutomatico()
|
||||
{
|
||||
return $this->belongsTo(LaboratorioFatura::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class MensagemProtocolo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_mensagem_protocolo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'mensagem',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
19
api/app/Models/ExameLaboratorial/Parametrizacao/MesCota.php
Normal file
19
api/app/Models/ExameLaboratorial/Parametrizacao/MesCota.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class MesCota extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_mes';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
34
api/app/Models/ExameLaboratorial/Parametrizacao/Motivo.php
Normal file
34
api/app/Models/ExameLaboratorial/Parametrizacao/Motivo.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Motivo extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_motivo';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Model;
|
||||
|
||||
class ProfissionalAssinatura extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_profissional_assinatura';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'usuario_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class ReagendarExame extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_reagendar_exame';
|
||||
|
||||
protected $casts = [
|
||||
'exibir' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'exibir',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Supervisor extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_supervisor';
|
||||
|
||||
protected $fillable = [
|
||||
'usuario_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
use App\Models\Model;
|
||||
|
||||
class TipoImpressaoAgendamento extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_impressao_agendamento_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
|
||||
60
api/app/Models/ExameLaboratorial/Parametrizacao/Unidade.php
Normal file
60
api/app/Models/ExameLaboratorial/Parametrizacao/Unidade.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade as EstabelecimentoUnidade;
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Unidade extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade';
|
||||
|
||||
protected $casts = [
|
||||
'unidade_coleta' => 'boolean',
|
||||
'laboratorio' => 'boolean'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'unidade_coleta',
|
||||
'infraestrutura_id',
|
||||
'laboratorio',
|
||||
'laboratorio_padrao_infraestrutura_id'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 unidade()
|
||||
{
|
||||
return $this->belongsTo(EstabelecimentoUnidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function laboratorioPadraoInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class, 'laboratorio_padrao_infraestrutura_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeFaturamentoUnidade;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeFaturamentoUsuario;
|
||||
use App\Models\Model;
|
||||
|
||||
class UnidadeFaturamento extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade_faturamento_automatico';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function unidadeFaturamentoUnidade()
|
||||
{
|
||||
return $this->hasMany(UnidadeFaturamentoUnidade::class, 'unidade_faturamento_automatico_id', 'id');
|
||||
}
|
||||
|
||||
public function unidadeFaturamentoUsuario()
|
||||
{
|
||||
return $this->hasMany(UnidadeFaturamentoUsuario::class, 'unidade_faturamento_automatico_id', 'id');
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeFaturamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class UnidadeFaturamentoUnidade extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_uni_fatu_auto_unidade';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_faturamento_automatico_id',
|
||||
'infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function unidadeFaturamentoAutomatico()
|
||||
{
|
||||
return $this->belongsTo(UnidadeFaturamento::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeFaturamento;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
|
||||
class UnidadeFaturamentoUsuario extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_uni_fatu_auto_usuario';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_faturamento_automatico_id',
|
||||
'usuario_id',
|
||||
'ocupacao_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'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 ocupacao()
|
||||
{
|
||||
return $this->belongsTo(Ocupacao::class);
|
||||
}
|
||||
|
||||
public function unidadeFaturamentoAutomatico()
|
||||
{
|
||||
return $this->belongsTo(UnidadeFaturamento::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeTipo;
|
||||
|
||||
class UnidadeSolicitante extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade_solicitante';
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'unidade_solicitante_id',
|
||||
'infraestrutura_id',
|
||||
'unidade_solicitante_infraestrutura_id',
|
||||
'unidade_tipo_id'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 unidade()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function unidadeSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Unidade::class);
|
||||
}
|
||||
|
||||
public function unidadeTipo()
|
||||
{
|
||||
return $this->belongsTo(UnidadeTipo::class);
|
||||
}
|
||||
|
||||
public function unidadeSolicitanteInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade as EstabelecimentoUnidade;
|
||||
use App\Models\Model;
|
||||
|
||||
class UnidadeSolicitanteExame extends Model{
|
||||
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade_solicitante_exame';
|
||||
|
||||
protected $casts = [
|
||||
'urgencia' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'urgencia'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(EstabelecimentoUnidade::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\ExameLaboratorial\Parametrizacao\UnidadeSolicitanteExame;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
|
||||
class UnidadeSolicitanteExameItem extends Model{
|
||||
|
||||
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade_solicitante_exame_item';
|
||||
|
||||
protected $casts = [
|
||||
'urgencia' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'unidade_solicitante_exame_id',
|
||||
'exame_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function unidadeSolicitanteExame()
|
||||
{
|
||||
return $this->belongsTo(UnidadeSolicitanteExame::class);
|
||||
}
|
||||
|
||||
public function exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class UnidadeTipo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_unidade_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class WebService extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_web_service';
|
||||
|
||||
protected $fillable = [
|
||||
'tipo_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(WebServiceTipo::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameLaboratorial\Parametrizacao;
|
||||
use App\Models\Model;
|
||||
|
||||
class WebServiceTipo extends Model
|
||||
{
|
||||
protected $table = 'exame_laboratorial_parametrizacao_web_service_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'nome',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user