This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AleitamentoMaterno extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_aleitamento_materno';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Ambulatorio\GlicemiaCapilarMomentoColeta;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AleitamentoMaterno;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualCondicaoAvaliada;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualConduta;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualDoencaTransmissivel;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualEncaminhamento;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualExameSolicitadoAvaliado;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualNasf;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualOutroExame;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividualRastreamento;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\CondicaoAvaliada;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\Conduta;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\DoencaTransmissivel;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\Encaminhamento;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\ModalidadeAtencaoDomiciliar;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\Nasf;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\RacionalidadeSaude;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\Rastreamento;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\TipoAtendimento;
|
||||
use App\Models\AtencaoBasica\MarcadorConsumoAlimentar\LocalAtendimento;
|
||||
use App\Models\AtencaoBasica\Parametrizacao\Equipe;
|
||||
use App\Models\AtencaoBasica\Procedimento\Procedimento as ProcedimentoProcedimento;
|
||||
use App\Models\AtencaoBasica\Procedimento\ProcedimentoAtendimento;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Geral\Ciap;
|
||||
use App\Models\Geral\Turno;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Cid;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
use App\Models\Sigtap\Procedimento;
|
||||
|
||||
class AtendimentoIndividual extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual';
|
||||
|
||||
protected $casts = [
|
||||
'vacinacao' => 'boolean',
|
||||
'observacao' => 'boolean',
|
||||
'gravidez_planejada' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'soap_id',
|
||||
'uuid_ficha',
|
||||
'usuario_exportacao_id',
|
||||
'data_hora_exportacao',
|
||||
'paciente_id',
|
||||
'usuario_id',
|
||||
'equipe_id',
|
||||
'usuario_ocupacao_id',
|
||||
'data_usuario_responsavel',
|
||||
'usuario_auxiliar_id',
|
||||
'usuario_auxiliar_equipe_id',
|
||||
'usuario_auxiliar_ocupacao_id',
|
||||
'turno_id',
|
||||
'local_atendimento_id',
|
||||
'tipo_atendimento_id',
|
||||
'perimetro_cefalico',
|
||||
'peso',
|
||||
'altura',
|
||||
'temperatura',
|
||||
'pressao_arterial',
|
||||
'frequencia_respiratoria',
|
||||
'frequencia_cardiaca',
|
||||
'saturacao_o2',
|
||||
'circunferencia_abdominal',
|
||||
'perimetro_panturrilha',
|
||||
'glicemia',
|
||||
'momento_coleta_id',
|
||||
'vacinacao',
|
||||
'modalidade_atencao_domiciliar_id',
|
||||
'aleitamento_materno_id',
|
||||
'racionalidade_saude_id',
|
||||
'data_ultima_menstruacao',
|
||||
'idade_gestacional_semanas',
|
||||
'idade_gestacional_dias',
|
||||
'gravidez_planejada',
|
||||
'gestacao_previa',
|
||||
'parto',
|
||||
'ciap_primario_id',
|
||||
'ciap_secundario_id',
|
||||
'cid_primario_id',
|
||||
'cid_secundario_id',
|
||||
'observacao',
|
||||
'complemento',
|
||||
'latitude',
|
||||
'longitude',
|
||||
];
|
||||
|
||||
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 paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function equipe()
|
||||
{
|
||||
return $this->belongsTo(Equipe::class);
|
||||
}
|
||||
|
||||
public function ocupacao()
|
||||
{
|
||||
return $this->belongsTo(Ocupacao::class, 'usuario_ocupacao_id');
|
||||
}
|
||||
|
||||
public function usuarioOcupacao()
|
||||
{
|
||||
return $this->belongsTo(Ocupacao::class);
|
||||
}
|
||||
|
||||
public function usuarioAuxiliar()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function usuarioExportacao()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function usuarioAuxiliarEquipe()
|
||||
{
|
||||
return $this->belongsTo(Equipe::class);
|
||||
}
|
||||
|
||||
public function usuarioAuxiliarOcupacao()
|
||||
{
|
||||
return $this->belongsTo(Ocupacao::class);
|
||||
}
|
||||
|
||||
public function turno()
|
||||
{
|
||||
return $this->belongsTo(Turno::class);
|
||||
}
|
||||
|
||||
public function localAtendimento()
|
||||
{
|
||||
return $this->belongsTo(LocalAtendimento::class);
|
||||
}
|
||||
|
||||
public function tipoAtendimento()
|
||||
{
|
||||
return $this->belongsTo(TipoAtendimento::class);
|
||||
}
|
||||
|
||||
public function modalidadeAtencaoDomiciliar()
|
||||
{
|
||||
return $this->belongsTo(ModalidadeAtencaoDomiciliar::class);
|
||||
}
|
||||
|
||||
public function aleitamentoMaterno()
|
||||
{
|
||||
return $this->belongsTo(AleitamentoMaterno::class);
|
||||
}
|
||||
|
||||
public function racionalidadeSaude()
|
||||
{
|
||||
return $this->belongsTo(RacionalidadeSaude::class);
|
||||
}
|
||||
|
||||
public function cidPrimario()
|
||||
{
|
||||
return $this->belongsTo(Cid::class);
|
||||
}
|
||||
|
||||
public function cidSecundario()
|
||||
{
|
||||
return $this->belongsTo(Cid::class);
|
||||
}
|
||||
|
||||
public function ciapPrimario()
|
||||
{
|
||||
return $this->belongsTo(Ciap::class);
|
||||
}
|
||||
|
||||
public function ciapSecundario()
|
||||
{
|
||||
return $this->belongsTo(Ciap::class);
|
||||
}
|
||||
|
||||
public function AtendimentoIndividualExameSolicitadoAvaliado()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividualExameSolicitadoAvaliado::class);
|
||||
}
|
||||
|
||||
public function AtendimentoIndividualTriagemNeoNatal()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividualTriagemNeoNatal::class);
|
||||
}
|
||||
|
||||
public function outrosExames()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividualOutroExame::class);
|
||||
}
|
||||
|
||||
public function procedimento()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividualProcedimento::class);
|
||||
}
|
||||
|
||||
public function momentoColeta()
|
||||
{
|
||||
return $this->belongsTo(GlicemiaCapilarMomentoColeta::class);
|
||||
}
|
||||
|
||||
public function condicaoAvaliada()
|
||||
{
|
||||
return $this->belongsToMany(CondicaoAvaliada::class, 'atencao_basica_atendimento_individual_condicao_avaliada')
|
||||
->using(AtendimentoIndividualCondicaoAvaliada::class)
|
||||
->as('AtendimentoIndividualCondicaoAvaliada')
|
||||
->withPivot(
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'atendimento_individual_id',
|
||||
'condicao_avaliada_id',
|
||||
)
|
||||
->select('atencao_basica_cadastro_condicao_avaliada.id')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function doencaTransmissivel()
|
||||
{
|
||||
return $this->belongsToMany(DoencaTransmissivel::class, 'atencao_basica_atendimento_individual_doenca_transmissivel')
|
||||
->using(AtendimentoIndividualDoencaTransmissivel::class)
|
||||
->as('AtendimentoIndividualDoencaTransmissivel')
|
||||
->withPivot(
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'atendimento_individual_id',
|
||||
'doenca_transmissivel_id',
|
||||
)
|
||||
->select('atencao_basica_cadastro_doenca_transmissivel.id')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function rastreamento()
|
||||
{
|
||||
return $this->belongsToMany(Rastreamento::class, 'atencao_basica_atendimento_individual_rastreamento')
|
||||
->using(AtendimentoIndividualRastreamento::class)
|
||||
->as('AtendimentoIndividualRastreamento')
|
||||
->withPivot(
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'atendimento_individual_id',
|
||||
'rastreamento_id',
|
||||
)
|
||||
->select('atencao_basica_cadastro_rastreamento.id')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function nasf()
|
||||
{
|
||||
return $this->belongsToMany(Nasf::class, 'atencao_basica_atendimento_individual_nasf')
|
||||
->using(AtendimentoIndividualNasf::class)
|
||||
->as('AtendimentoIndividualNasf')
|
||||
->withPivot(
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'atendimento_individual_id',
|
||||
'nasf_id',
|
||||
)
|
||||
->select('atencao_basica_cadastro_nasf.id')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function conduta()
|
||||
{
|
||||
return $this->belongsToMany(Conduta::class, 'atencao_basica_atendimento_individual_conduta')
|
||||
->using(AtendimentoIndividualConduta::class)
|
||||
->as('AtendimentoIndividualConduta')
|
||||
->withPivot(
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'atendimento_individual_id',
|
||||
'conduta_id',
|
||||
)
|
||||
->select('atencao_basica_cadastro_conduta.id')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function encaminhamento()
|
||||
{
|
||||
return $this->belongsToMany(Encaminhamento::class, 'atencao_basica_atendimento_individual_encaminhamento')
|
||||
->using(AtendimentoIndividualEncaminhamento::class)
|
||||
->as('AtendimentoIndividualEncaminhamento')
|
||||
->withPivot(
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'atendimento_individual_id',
|
||||
'encaminhamento_id',
|
||||
)
|
||||
->select('atencao_basica_cadastro_encaminhamento.id')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function ivcf()
|
||||
{
|
||||
return $this->hasOne(AtendimentoIndividualIvcf::class);
|
||||
}
|
||||
|
||||
public function problemasCondicoes()
|
||||
{
|
||||
return $this->hasMany(AtendimentoIndividualProblemaCondicao::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class AtendimentoIndividualCondicaoAvaliada extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'condicao_avaliada_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class AtendimentoIndividualConduta extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'conduta_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class AtendimentoIndividualDoencaTransmissivel extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'doenca_transmissivel_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class AtendimentoIndividualEncaminhamento extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'encaminhamento_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividual;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\ExameSolicitadoAvaliado;
|
||||
use App\Models\Model;
|
||||
|
||||
class AtendimentoIndividualExameSolicitadoAvaliado extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_exame_solicitado_avaliado';
|
||||
|
||||
protected $fillable = [
|
||||
'exame_solicitado_avaliado_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'solicitado' => 'boolean',
|
||||
'avaliado' => 'boolean',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function exameSolicitadoAvaliado()
|
||||
{
|
||||
return $this->belongsTo(ExameSolicitadoAvaliado::class);
|
||||
}
|
||||
|
||||
public function atendimentoIndividual()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividual::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class AtendimentoIndividualIvcf extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_ivcf';
|
||||
|
||||
protected $fillable = [
|
||||
'atendimento_individual_id',
|
||||
'estado_saude_geral',
|
||||
'limitacao_compras',
|
||||
'limitacao_gestao_financeira',
|
||||
'limitacao_tarefas_domesticas',
|
||||
'banho_independencia',
|
||||
'relato_esquecimento_por_terceiros',
|
||||
'esquecimento_piorando',
|
||||
'esquecimento_impacta_atividades',
|
||||
'humor_tristeza_desanimo',
|
||||
'perda_interesse_atividades',
|
||||
'limitacao_elevar_bracos',
|
||||
'limitacao_motricidade_fina',
|
||||
'perda_peso_nao_intencional',
|
||||
'imc_abaixo_22',
|
||||
'panturrilha_abaixo_31',
|
||||
'marcha_lenta_4m_maior_5s',
|
||||
'dificuldade_caminhar_impacto_atividades',
|
||||
'quedas_recorrentes',
|
||||
'incontinencia',
|
||||
'problema_visao_impacto_atividades',
|
||||
'problema_audicao_impacto_atividades',
|
||||
'doencas_cronicas_multiplas',
|
||||
'polifarmacia_5_ou_mais_medicamentos',
|
||||
'internacao_ultimos_6_meses',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'limitacao_compras' => 'boolean',
|
||||
'limitacao_gestao_financeira' => 'boolean',
|
||||
'limitacao_tarefas_domesticas' => 'boolean',
|
||||
'banho_independencia' => 'boolean',
|
||||
'relato_esquecimento_por_terceiros' => 'boolean',
|
||||
'esquecimento_piorando' => 'boolean',
|
||||
'esquecimento_impacta_atividades' => 'boolean',
|
||||
'humor_tristeza_desanimo' => 'boolean',
|
||||
'perda_interesse_atividades' => 'boolean',
|
||||
'limitacao_elevar_bracos' => 'boolean',
|
||||
'limitacao_motricidade_fina' => 'boolean',
|
||||
'perda_peso_nao_intencional' => 'boolean',
|
||||
'imc_abaixo_22' => 'boolean',
|
||||
'panturrilha_abaixo_31' => 'boolean',
|
||||
'marcha_lenta_4m_maior_5s' => 'boolean',
|
||||
'dificuldade_caminhar_impacto_atividades' => 'boolean',
|
||||
'quedas_recorrentes' => 'boolean',
|
||||
'incontinencia' => 'boolean',
|
||||
'problema_visao_impacto_atividades' => 'boolean',
|
||||
'problema_audicao_impacto_atividades' => 'boolean',
|
||||
'doencas_cronicas_multiplas' => 'boolean',
|
||||
'polifarmacia_5_ou_mais_medicamentos' => 'boolean',
|
||||
'internacao_ultimos_6_meses' => 'boolean',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function atendimentoIndividual()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividual::class, 'atendimento_individual_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class AtendimentoIndividualNasf extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'nasf_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividual;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
|
||||
class AtendimentoIndividualOutroExame extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_outro_exame';
|
||||
|
||||
protected $fillable = [
|
||||
'exame_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'solicitado' => 'boolean',
|
||||
'avaliado' => 'boolean',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
|
||||
public function atendimentoIndividual()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividual::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Ambulatorio\AtendimentoSoapProblemaCondicao;
|
||||
use App\Models\Ambulatorio\ProblemaCondicaoSituacao;
|
||||
use App\Models\Geral\Ciap;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Cid;
|
||||
|
||||
class AtendimentoIndividualProblemaCondicao extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_problema_condicao';
|
||||
|
||||
protected $casts = [
|
||||
'inicio' => 'datetime:d/m/Y',
|
||||
'fim' => 'datetime:d/m/Y',
|
||||
'automatico' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'atendimento_individual_id',
|
||||
'ciap_id',
|
||||
'cid_id',
|
||||
'situacao_id',
|
||||
'inicio',
|
||||
'fim',
|
||||
'observacao',
|
||||
'problema_condicao_anterior_id',
|
||||
'problema_condicao_inicial_id',
|
||||
'uuid_inicial_problema_condicao',
|
||||
'uuid_evolucao',
|
||||
'sequencial_evolucao',
|
||||
'automatico',
|
||||
'soap_problema_condicao_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function atendimentoIndividual()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividual::class);
|
||||
}
|
||||
|
||||
public function ciap()
|
||||
{
|
||||
return $this->belongsTo(Ciap::class);
|
||||
}
|
||||
|
||||
public function cid()
|
||||
{
|
||||
return $this->belongsTo(Cid::class);
|
||||
}
|
||||
|
||||
public function situacao()
|
||||
{
|
||||
return $this->belongsTo(ProblemaCondicaoSituacao::class);
|
||||
}
|
||||
|
||||
public function problemaCondicaoAnterior()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividualProblemaCondicao::class);
|
||||
}
|
||||
|
||||
public function problemaCondicaoPosterior()
|
||||
{
|
||||
return $this->hasOne(AtendimentoIndividualProblemaCondicao::class, 'problema_condicao_anterior_id');
|
||||
}
|
||||
|
||||
public function soapProblemaCondicao()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoSoapProblemaCondicao::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Procedimento;
|
||||
|
||||
class AtendimentoIndividualProcedimento extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_procedimento';
|
||||
|
||||
protected $fillable = [
|
||||
'procedimento_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function procedimento()
|
||||
{
|
||||
return $this->belongsTo(Procedimento::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class AtendimentoIndividualRastreamento extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'rastreamento_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\AtendimentoIndividual;
|
||||
use App\Models\Model;
|
||||
|
||||
class AtendimentoIndividualTriagemNeonatal extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_triagem_neonatal';
|
||||
|
||||
protected $fillable = [
|
||||
'triagem_neonatal_id',
|
||||
'atendimento_individual_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'solicitado' => 'boolean',
|
||||
'avaliado' => 'boolean',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function triagemNeonatal()
|
||||
{
|
||||
return $this->belongsTo(TriagemNeonatal::class);
|
||||
}
|
||||
|
||||
public function atendimentoIndividual()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividual::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CondicaoAvaliada extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_condicao_avaliada';
|
||||
|
||||
protected $casts = [
|
||||
'ativo' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus',
|
||||
'ativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Conduta extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_conduta';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DoencaTransmissivel extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_doenca_transmissivel';
|
||||
|
||||
protected $casts = [
|
||||
'ativo' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus',
|
||||
'ativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Encaminhamento extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_encaminhamento';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EscalaCoelho extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_escala_coelho';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ExameSolicitadoAvaliado extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_exame_solicitado_avaliado';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus',
|
||||
'codigo_procedimento'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ModalidadeAtencaoDomiciliar extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_modalidade_atencao_domiciliar';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
21
api/app/Models/AtencaoBasica/AtendimentoIndividual/Nasf.php
Normal file
21
api/app/Models/AtencaoBasica/AtendimentoIndividual/Nasf.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Nasf extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_nasf';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RacionalidadeSaude extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_racionalidade_saude';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Rastreamento extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_rastreamento';
|
||||
|
||||
protected $casts = [
|
||||
'ativo' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus',
|
||||
'ativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TipoAtendimento extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_tipo_atendimento';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TriagemNeonatal extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_cadastro_triagem_neonatal';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
'codigo_esus',
|
||||
'codigo_procedimento'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user