This commit is contained in:
131
api/app/Models/ExameImagem/Agendamento/Agendamento.php
Normal file
131
api/app/Models/ExameImagem/Agendamento/Agendamento.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Agendamento;
|
||||
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Grupo\Grupo;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameImagem\Agendamento\AgendamentoExame;
|
||||
use App\Models\ExameImagem\Jornada\Jornada;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use App\Models\Regulacao\Solicitacao as RegulacaoSolicitacao;
|
||||
use App\Models\Sms\SmsEnvio;
|
||||
|
||||
class Agendamento extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_agendamento';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'paciente_id',
|
||||
'unidade_id',
|
||||
'infraestrutura_id',
|
||||
'unidade_solicitante_id',
|
||||
'infraestrutura_solicitante_id',
|
||||
'exame_id',
|
||||
'medico_id',
|
||||
'hora_exame',
|
||||
'jornada_id',
|
||||
'profissional_id',
|
||||
'gestante',
|
||||
'urgente',
|
||||
'observacao',
|
||||
'agendamento_numero',
|
||||
'supervisor_id',
|
||||
'nome_responsavel',
|
||||
'retroativo',
|
||||
'agendador_id',
|
||||
'regulacao_solicitacao_id',
|
||||
'sms_envio_id',
|
||||
'app_conectasus_cidadao',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'data' => 'datetime:d/m/Y',
|
||||
'data_menstruacao' => 'datetime:d/m/Y',
|
||||
'gestante' => 'boolean',
|
||||
'urgente' => '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',
|
||||
'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 exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
|
||||
public function infraestruturaSolicitante()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function medico()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function agendamentoExame()
|
||||
{
|
||||
return $this->hasMany(AgendamentoExame::class);
|
||||
}
|
||||
|
||||
public function jornada()
|
||||
{
|
||||
return $this->belongsTo(Jornada::class);
|
||||
}
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function grupo()
|
||||
{
|
||||
return $this->belongsTo(Grupo::class, 'exame_id');
|
||||
}
|
||||
|
||||
public function regulacaoSolicitacao()
|
||||
{
|
||||
return $this->belongsTo(RegulacaoSolicitacao::class);
|
||||
}
|
||||
|
||||
public function smsEnvio()
|
||||
{
|
||||
return $this->belongsTo(SmsEnvio::class);
|
||||
}
|
||||
}
|
||||
68
api/app/Models/ExameImagem/Agendamento/AgendamentoExame.php
Normal file
68
api/app/Models/ExameImagem/Agendamento/AgendamentoExame.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Agendamento;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameImagem\Agendamento\Agendamento;
|
||||
use App\Models\ExameImagem\Fechamento\Faturamento;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use App\Models\Model;
|
||||
|
||||
class AgendamentoExame extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_agendamento_exame';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'agendamento_id',
|
||||
'soap_solicitacao_exame_item_id',
|
||||
'exame_id',
|
||||
'paciente_id',
|
||||
'status_id',
|
||||
'status_troca',
|
||||
'resultado',
|
||||
'arquivo',
|
||||
'laudo_nome',
|
||||
'usuario_id',
|
||||
'acompanhamento_oci_id'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'laudo_data' => 'datetime:d/m/Y',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'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 agendamento()
|
||||
{
|
||||
return $this->belongsTo(Agendamento::class);
|
||||
}
|
||||
|
||||
public function faturamentos()
|
||||
{
|
||||
return $this->hasMany(Faturamento::class);
|
||||
}
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Agendamento;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\ExameImagem\Agendamento\Agendamento;
|
||||
use App\Models\ExameImagem\Agendamento\AgendamentoExame;
|
||||
use App\Models\ExameImagem\Fechamento\Faturamento;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AgendamentoHistorico extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_historico_alteracao';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'agendamento_id',
|
||||
'paciente_id',
|
||||
'agendamento_exame_id',
|
||||
'resultado',
|
||||
'arquivo',
|
||||
'laudo_nome',
|
||||
'usuario_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'data' => 'datetime:d/m/Y',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
|
||||
public function agendamento()
|
||||
{
|
||||
return $this->belongsTo(Agendamento::class);
|
||||
}
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function agendamentoExame()
|
||||
{
|
||||
return $this->belongsTo(AgendamentoExame::class);
|
||||
}
|
||||
|
||||
public function usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Agendamento;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
|
||||
class AgendamentoHistoricoExclusao extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_agendamento_historico_exclusao';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'agendamento_id',
|
||||
'agendamento_agendador_id',
|
||||
'data_hora_criacao',
|
||||
'paciente_id',
|
||||
'agendamento_numero',
|
||||
'exame_id',
|
||||
'data_hora_exclusao',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'data_hora_criacao' => 'datetime:d/m/Y H:i:s',
|
||||
'data_hora_exclusao' => 'datetime:d/m/Y H:i:s',
|
||||
];
|
||||
|
||||
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 exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user