<?php
namespace App\Entity\FielpetPol;
use App\Entity\Traits\LoggableTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Policy
*
* @ORM\Table(name="policy")
* @ORM\Entity
* @ORM\Entity(repositoryClass="App\Repository\FielpetPol\PolicyRepository")
* @Gedmo\Loggable
*/
class Policy
{
/**
* LoggableTrait add add_user_ add_date, edit_user, edit_date
*/
use LoggableTrait;
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="version", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $version;
/**
* @var string
*
* @ORM\Column(name="estado", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $estado;
/**
* @var string
*
* @ORM\Column(name="enfermedad_id", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $enfermedadId;
/**
* @var string
*
* @ORM\Column(name="enfermedad_nombre", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $enfermedadNombre;
/**
* @var string
*
* @ORM\Column(name="sistema", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $sistema;
/**
* @var string
*
* @ORM\Column(name="agente", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $agente;
/**
* @var string
*
* @ORM\Column(name="agente_etiologico", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $agenteEtiologico;
/**
* @var string
*
* @ORM\Column(name="razas", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $razas;
/**
* @ORM\OneToMany(targetEntity="Enfermedad", mappedBy="fkPolicy")
**/
private $enfermedades;
/**
* @ORM\OneToMany(targetEntity="CaracteristicaDetalle", mappedBy="fkPolicy", cascade={"persist"})
**/
private $caracteristicas;
/**
* @ORM\OneToMany(targetEntity="ManifestacionClinicaSintoma", mappedBy="fkPolicy", cascade={"persist"})
**/
private $manifestaciones;
/**
* @ORM\OneToMany(targetEntity="DiagnosticoDetalle", mappedBy="fkPolicy", cascade={"persist"})
**/
private $diagnosticos;
/**
* @ORM\OneToMany(targetEntity="TratamientoDetalle", mappedBy="fkPolicy", cascade={"persist"})
**/
private $tratamientos;
/**
* @ORM\OneToMany(targetEntity="ResultadoDetalle", mappedBy="fkPolicy", cascade={"persist"})
**/
private $resultados;
public function __construct()
{
$this->enfermedades = new \Doctrine\Common\Collections\ArrayCollection();
$this->caracteristicas = new \Doctrine\Common\Collections\ArrayCollection();
$this->manifestaciones = new \Doctrine\Common\Collections\ArrayCollection();
$this->diagnosticos = new \Doctrine\Common\Collections\ArrayCollection();
$this->tratamientos = new \Doctrine\Common\Collections\ArrayCollection();
$this->resultados = new \Doctrine\Common\Collections\ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getVersion(): ?string
{
return $this->version;
}
public function setVersion(?string $version): static
{
$this->version = $version;
return $this;
}
public function getEstado(): ?string
{
return $this->estado;
}
public function setEstado(?string $estado): static
{
$this->estado = $estado;
return $this;
}
public function getSistema(): ?string
{
return $this->sistema;
}
public function setSistema(?string $sistema): static
{
$this->sistema = $sistema;
return $this;
}
public function getAgente(): ?string
{
return $this->agente;
}
public function setAgente(?string $agente): static
{
$this->agente = $agente;
return $this;
}
public function getAgenteEtiologico(): ?string
{
return $this->agenteEtiologico;
}
public function setAgenteEtiologico(?string $agenteEtiologico): static
{
$this->agenteEtiologico = $agenteEtiologico;
return $this;
}
/**
* @return Collection<int, ManifestacionClinicaSintoma>
*/
public function getManifestaciones(): Collection
{
return $this->manifestaciones;
}
public function addManifestacione(ManifestacionClinicaSintoma $manifestacione): static
{
if (!$this->manifestaciones->contains($manifestacione)) {
$this->manifestaciones->add($manifestacione);
$manifestacione->setFkVenta($this);
}
return $this;
}
public function removeManifestacione(ManifestacionClinicaSintoma $manifestacione): static
{
if ($this->manifestaciones->removeElement($manifestacione)) {
// set the owning side to null (unless already changed)
if ($manifestacione->getFkPolicy() === $this) {
$manifestacione->setFkPolicy(null);
}
}
return $this;
}
public function getEnfermedadId(): ?string
{
return $this->enfermedadId;
}
public function setEnfermedadId(?string $enfermedadId): static
{
$this->enfermedadId = $enfermedadId;
return $this;
}
public function getEnfermedadNombre(): ?string
{
return $this->enfermedadNombre;
}
public function setEnfermedadNombre(?string $enfermedadNombre): static
{
$this->enfermedadNombre = $enfermedadNombre;
return $this;
}
public function getEnfermedades(): Collection
{
return $this->enfermedades;
}
public function setEnfermedades(Collection $enfermedades): void
{
$this->enfermedades = $enfermedades;
}
public function getDiagnosticos(): Collection
{
return $this->diagnosticos;
}
public function setDiagnosticos(Collection $diagnosticos): void
{
$this->diagnosticos = $diagnosticos;
}
public function addDiagnostico(DiagnosticoDetalle $diagnostico): void
{
$diagnostico->setFkPolicy($this);
$this->diagnosticos->add($diagnostico);
}
public function getTratamientos(): Collection
{
return $this->tratamientos;
}
public function setTratamientos(Collection $tratamientos): void
{
$this->tratamientos = $tratamientos;
}
public function addTratamiento(TratamientoDetalle $tratamiento): void
{
$tratamiento->setFkPolicy($this);
$this->tratamientos->add($tratamiento);
}
public function getResultados(): Collection
{
return $this->resultados;
}
public function setResultados(Collection $resultados): void
{
$this->resultados = $resultados;
}
public function addResultado(ResultadoDetalle $resultado): void
{
$resultado->setFkPolicy($this);
$this->resultados->add($resultado);
}
public function __toString() {
return $this->getId().' '.$this->getEnfermedadNombre().' '.$this->getVersion();
}
public function getCaracteristicas(): Collection
{
return $this->caracteristicas;
}
public function setCaracteristicas(Collection $caracteristicas): void
{
$this->caracteristicas = $caracteristicas;
}
public function addCaracteristica(CaracteristicaDetalle $caracteristica): void
{
$caracteristica->setFkPolicy($this);
$this->caracteristicas->add($caracteristica);
}
/**
* @return string
*/
public function getRazas(): ?string
{
return $this->razas;
}
/**
* @param string $razas
*/
public function setRazas(string $razas): void
{
$this->razas = $razas;
}
}