This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\AtencaoBasica\AtendimentoIndividual;
|
||||
|
||||
use App\Models\Ambulatorio\AtendimentoSoapProblemaCondicao;
|
||||
use App\Models\Ambulatorio\ProblemaCondicaoSituacao;
|
||||
use App\Models\Geral\Ciap;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Cid;
|
||||
|
||||
class AtendimentoIndividualProblemaCondicao extends Model
|
||||
{
|
||||
protected $table = 'atencao_basica_atendimento_individual_problema_condicao';
|
||||
|
||||
protected $casts = [
|
||||
'inicio' => 'datetime:d/m/Y',
|
||||
'fim' => 'datetime:d/m/Y',
|
||||
'automatico' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'atendimento_individual_id',
|
||||
'ciap_id',
|
||||
'cid_id',
|
||||
'situacao_id',
|
||||
'inicio',
|
||||
'fim',
|
||||
'observacao',
|
||||
'problema_condicao_anterior_id',
|
||||
'problema_condicao_inicial_id',
|
||||
'uuid_inicial_problema_condicao',
|
||||
'uuid_evolucao',
|
||||
'sequencial_evolucao',
|
||||
'automatico',
|
||||
'soap_problema_condicao_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function atendimentoIndividual()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividual::class);
|
||||
}
|
||||
|
||||
public function ciap()
|
||||
{
|
||||
return $this->belongsTo(Ciap::class);
|
||||
}
|
||||
|
||||
public function cid()
|
||||
{
|
||||
return $this->belongsTo(Cid::class);
|
||||
}
|
||||
|
||||
public function situacao()
|
||||
{
|
||||
return $this->belongsTo(ProblemaCondicaoSituacao::class);
|
||||
}
|
||||
|
||||
public function problemaCondicaoAnterior()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoIndividualProblemaCondicao::class);
|
||||
}
|
||||
|
||||
public function problemaCondicaoPosterior()
|
||||
{
|
||||
return $this->hasOne(AtendimentoIndividualProblemaCondicao::class, 'problema_condicao_anterior_id');
|
||||
}
|
||||
|
||||
public function soapProblemaCondicao()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoSoapProblemaCondicao::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user