This commit is contained in:
88
api/app/Models/ProntoAtendimento/PedidoExame/Item.php
Normal file
88
api/app/Models/ProntoAtendimento/PedidoExame/Item.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ProntoAtendimento\PedidoExame;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Lotacao;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use App\Models\Parametrizacao\Exame\ExameStatus;
|
||||
use App\Models\ProntoAtendimento\Atendimento\Enfermagem\AtendimentoEnfermagem;
|
||||
use App\Models\ProntoAtendimento\Atendimento\ExameImagem\AtendimentoExameImagem;
|
||||
use App\Models\ProntoAtendimento\Atendimento\Observacao\PacienteObservacao;
|
||||
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
use SoftDeletes, CascadeSoftDeletes;
|
||||
|
||||
protected $table = 'pronto_atendimento_pedido_exame_item';
|
||||
|
||||
protected $fillable = [
|
||||
'atendimento_enfermagem_id',
|
||||
'exame_imagem_id',
|
||||
'paciente_observacao_id',
|
||||
'exame_id',
|
||||
'valor_exame',
|
||||
'status_id',
|
||||
'horario_realizacao',
|
||||
'lotacao_executante_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',
|
||||
];
|
||||
|
||||
protected $with = [
|
||||
'exame',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function pedidoExame()
|
||||
{
|
||||
return $this->belongsTo(PedidoExame::class);
|
||||
}
|
||||
|
||||
public function atendimentoEnfermagem()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoEnfermagem::class);
|
||||
}
|
||||
|
||||
public function atendimentoExameImagem()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoExameImagem::class, 'exame_imagem_id');
|
||||
}
|
||||
|
||||
public function pacienteObservacao()
|
||||
{
|
||||
return $this->belongsTo(PacienteObservacao::class);
|
||||
}
|
||||
|
||||
public function exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo(ExameStatus::class, 'status_id');
|
||||
}
|
||||
|
||||
public function lotacaoExecutante()
|
||||
{
|
||||
return $this->belongsTo(Lotacao::class);
|
||||
}
|
||||
|
||||
public function observacoes()
|
||||
{
|
||||
return $this->hasMany(Observacao::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user