init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models\ProntoAtendimento\Parametrizacao;
use App\Models\Sigtap\Procedimento as ProcedimentoSigtap;
use App\Models\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class AtendimentoMedico extends Model
{
use SoftDeletes;
protected $table = 'pronto_atendimento_parametrizacao_atendimento_medico';
protected $fillable = [
'procedimento_padrao_codigo',
];
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',
];
protected $appends = [
'procedimento_padrao'
];
public function getProcedimentoPadraoAttribute()
{
if (!$this->procedimento_padrao_codigo) {
return null;
}
return ProcedimentoSigtap::where('codigo', $this->procedimento_padrao_codigo)
->orderByDesc('competencia_id')
->first();
}
public function getIsAllowedToDeleteAttribute()
{
return true;
}
}

View File

@@ -0,0 +1,47 @@
<?php
namespace App\Models\ProntoAtendimento\Parametrizacao;
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
use App\Models\ProntoAtendimento\Atendimento\Medico\AtendimentoMedicoTipo as Tipo;
use App\Models\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class AtendimentoMedicoTipo extends Model
{
use SoftDeletes;
protected $table = 'pronto_atendimento_parametrizacao_atendimento_medico_tipo';
protected $fillable = [
'infraestrutura_id',
'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 infraestrutura()
{
return $this->belongsTo(Infraestrutura::class);
}
public function tipo()
{
return $this->belongsTo(Tipo::class);
}
public function getIsAllowedToDeleteAttribute()
{
return true;
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Models\ProntoAtendimento\Parametrizacao;
use App\Models\Cadastro\SujeitoAtencao\Lotacao;
use App\Models\Model;
class FaturamentoExameLaboratorial extends Model
{
protected $table = 'pronto_atendimento_parametrizacao_faturamento_exame_laboratorial';
protected $fillable = [
'lotacao_id',
];
protected $hidden = [
'created_at',
'created_lotacao_id',
'created_centro_custo_id',
'updated_at',
'updated_lotacao_id',
'updated_centro_custo_id',
];
public function lotacao()
{
return $this->belongsTo(Lotacao::class);
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models\ProntoAtendimento\Parametrizacao;
use App\Models\Model;
class Parametrizacao extends Model
{
protected $table = 'pronto_atendimento_parametrizacao';
protected $casts = [
'faturamento_automatico_enfermagem' => 'boolean',
'assinatura_eletronica' => 'boolean',
];
protected $fillable = [
'faturamento_automatico_enfermagem',
'assinatura_eletronica',
'tempo_adicional_plantao',
];
protected $hidden = [
'created_at',
'created_lotacao_id',
'created_centro_custo_id',
'updated_at',
'updated_lotacao_id',
'updated_centro_custo_id',
];
}

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Models\ProntoAtendimento\Parametrizacao;
use App\Models\Sigtap\Procedimento as ProcedimentoSigtap;
use App\Models\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ServicoEnfermagem extends Model
{
use SoftDeletes;
protected $table = 'pronto_atendimento_parametrizacao_servico_enfermagem';
protected $fillable = [
'procedimento_codigo',
];
protected $hidden = [
'procedimento_codigo',
'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',
];
protected $appends = [
'procedimento'
];
public function getProcedimentoAttribute()
{
if (!$this->procedimento_codigo) {
return null;
}
return ProcedimentoSigtap::where('codigo', $this->procedimento_codigo)
->orderByDesc('competencia_id')
->first();
}
public function getIsAllowedToDeleteAttribute()
{
return true;
}
}