This commit is contained in:
80
api/app/Models/Parametrizacao/Exame/ExameComposicao.php
Normal file
80
api/app/Models/Parametrizacao/Exame/ExameComposicao.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Parametrizacao\Exame;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Sexo;
|
||||
use App\Models\ExameLaboratorial\AgendamentoExame\AgendamentoExameResultado;
|
||||
use App\Models\Geral\MedidaTempo;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
use App\Models\Parametrizacao\Exame\ExameComposicaoTipoResultado;
|
||||
|
||||
class ExameComposicao extends Model
|
||||
{
|
||||
|
||||
protected $table = 'parametrizacao_exame_composicao';
|
||||
|
||||
protected $casts = [
|
||||
'valor_absoluto' => 'boolean',
|
||||
'visivel' => 'boolean',
|
||||
'resultado' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'exame_id',
|
||||
'descricao',
|
||||
'limite_inferior',
|
||||
'limite_superior',
|
||||
'unidade_id',
|
||||
'referencia',
|
||||
'tipo_idade_id',
|
||||
'idade_inicial',
|
||||
'idade_final',
|
||||
'sexo_id',
|
||||
'tipo_resultado_id',
|
||||
'casa_decimal_id',
|
||||
'formula_id',
|
||||
'visivel',
|
||||
'valor_absoluto',
|
||||
'referencia_especial',
|
||||
'resultado',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function sexo()
|
||||
{
|
||||
return $this->belongsTo(Sexo::class);
|
||||
}
|
||||
|
||||
public function tipoIdade()
|
||||
{
|
||||
return $this->belongsTo(MedidaTempo::class);
|
||||
}
|
||||
|
||||
public function tipoResultado()
|
||||
{
|
||||
return $this->belongsTo(ExameComposicaoTipoResultado::class);
|
||||
}
|
||||
|
||||
public function unidade()
|
||||
{
|
||||
return $this->belongsTo(ExameComposicaoUnidade::class);
|
||||
}
|
||||
|
||||
public function exame()
|
||||
{
|
||||
return $this->belongsTo(Exame::class);
|
||||
}
|
||||
|
||||
public function agendamentoExameResultado()
|
||||
{
|
||||
return $this->belongsTo(AgendamentoExameResultado::class, 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user