This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Ambulatorio;
|
||||
|
||||
use App\Models\Ambulatorio\AtendimentoSoapExameSolicitadoItem;
|
||||
use App\Models\AtencaoBasica\AtendimentoIndividual\ExameSolicitadoAvaliado;
|
||||
use App\Models\Geral\Ciap;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Cid;
|
||||
|
||||
class AtendimentoSoapExameSolicitado extends Model
|
||||
{
|
||||
protected $table = 'ambulatorio_atendimento_soap_exame_solicitado';
|
||||
|
||||
protected $fillable = [
|
||||
'soap_id',
|
||||
'cid_id',
|
||||
'ciap_id',
|
||||
'justificativa',
|
||||
'observacao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function soap()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoSoap::class);
|
||||
}
|
||||
|
||||
public function cid()
|
||||
{
|
||||
return $this->belongsTo(Cid::class);
|
||||
}
|
||||
|
||||
public function ciap()
|
||||
{
|
||||
return $this->belongsTo(Ciap::class);
|
||||
}
|
||||
|
||||
public function examesSolicitados()
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
ExameSolicitadoAvaliado::class,
|
||||
'ambulatorio_atendimento_soap_exame_solicitado_item',
|
||||
'soap_exame_solicitado_id',
|
||||
'exame_solicitado_avaliado_id'
|
||||
)
|
||||
->using(AtendimentoSoapExameSolicitadoItem::class)
|
||||
->as('soapExameSolicitado')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user