src/Entity/Interconsulta.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InterconsultaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use DateTime;
  8. /**
  9.  * @ORM\Entity(repositoryClass=InterconsultaRepository::class)
  10.  * @ORM\HasLifecycleCallbacks
  11.  */
  12. class Interconsulta
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Paciente::class, inversedBy="interconsultas")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $paciente;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=HistoriaClinica::class, inversedBy="interconsultas")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $historiaclinica;
  30.     /**
  31.      * @ORM\Column(type="string", length=100)
  32.      */
  33.     private $servicio;
  34.     /**
  35.      * @ORM\Column(type="string", length=100)
  36.      */
  37.     private $especialidad;
  38.     /**
  39.      * @ORM\Column(type="text")
  40.      */
  41.     private $evolucion;
  42.     /**
  43.      * @ORM\Column(type="string", length=50)
  44.      */
  45.     private $ip_crea;
  46.     /**
  47.      * @ORM\Column(type="string", length=50)
  48.      */
  49.     private $ip_modifica;
  50.     /**
  51.      * @ORM\Column(type="integer")
  52.      */
  53.     private $user_crea;
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      */
  57.     private $user_modifica;
  58.     /**
  59.      * @ORM\Column(type="datetime")
  60.      */
  61.     private $created_at;
  62.     /**
  63.      * @ORM\Column(type="datetime")
  64.      */
  65.     private $updated_at;
  66.     /**
  67.      * @ORM\OneToMany(targetEntity=DiagnosticosInterconsulta::class, mappedBy="interconsulta")
  68.      */
  69.     private $diagnosticosInterconsultas;
  70.     /**
  71.      * @ORM\Column(type="string", length=25, nullable=true)
  72.      */
  73.     private $tarifario;
  74.     /**
  75.      * @ORM\ManyToOne(targetEntity=ItemsCargos::class, inversedBy="interconsultas")
  76.      */
  77.     private $item;
  78.     /**
  79.      * @ORM\Column(type="text", nullable=true)
  80.      */
  81.     private $descripcion;
  82.     /**
  83.      * @ORM\Column(type="boolean", options={"default" : 1})
  84.      */
  85.     private $estado;
  86.     
  87.      /**
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $resultado_examen;
  91.     public function __construct()
  92.     {
  93.         $this->diagnosticosInterconsultas = new ArrayCollection();
  94.     }
  95.     /**
  96.      * @ORM\PrePersist
  97.      * @ORM\PreUpdate
  98.      */
  99.     public function updatedTimestamps(): void
  100.     {
  101.         $dateTimeNow = new DateTime('now');
  102.         $this->setUpdatedAt($dateTimeNow);
  103.         if ($this->getCreatedAt() === null) {
  104.             $this->setCreatedAt($dateTimeNow);
  105.         }
  106.     }
  107.     public function getId(): ?int
  108.     {
  109.         return $this->id;
  110.     }
  111.     public function getPaciente(): ?Paciente
  112.     {
  113.         return $this->paciente;
  114.     }
  115.     public function setPaciente(?Paciente $paciente): self
  116.     {
  117.         $this->paciente $paciente;
  118.         return $this;
  119.     }
  120.     public function getHistoriaclinica(): ?HistoriaClinica
  121.     {
  122.         return $this->historiaclinica;
  123.     }
  124.     public function setHistoriaclinica(?HistoriaClinica $historiaclinica): self
  125.     {
  126.         $this->historiaclinica $historiaclinica;
  127.         return $this;
  128.     }
  129.     public function getServicio(): ?string
  130.     {
  131.         return $this->servicio;
  132.     }
  133.     public function setServicio(string $servicio): self
  134.     {
  135.         $this->servicio $servicio;
  136.         return $this;
  137.     }
  138.     public function getEspecialidad(): ?string
  139.     {
  140.         return $this->especialidad;
  141.     }
  142.     public function setEspecialidad(string $especialidad): self
  143.     {
  144.         $this->especialidad $especialidad;
  145.         return $this;
  146.     }
  147.     public function getEvolucion(): ?string
  148.     {
  149.         return $this->evolucion;
  150.     }
  151.     public function setEvolucion(string $evolucion): self
  152.     {
  153.         $this->evolucion $evolucion;
  154.         return $this;
  155.     }
  156.     public function getIpCrea(): ?string
  157.     {
  158.         return $this->ip_crea;
  159.     }
  160.     public function setIpCrea(string $ip_crea): self
  161.     {
  162.         $this->ip_crea $ip_crea;
  163.         return $this;
  164.     }
  165.     public function getIpModifica(): ?string
  166.     {
  167.         return $this->ip_modifica;
  168.     }
  169.     public function setIpModifica(string $ip_modifica): self
  170.     {
  171.         $this->ip_modifica $ip_modifica;
  172.         return $this;
  173.     }
  174.     public function getUserCrea(): ?int
  175.     {
  176.         return $this->user_crea;
  177.     }
  178.     public function setUserCrea(int $user_crea): self
  179.     {
  180.         $this->user_crea $user_crea;
  181.         return $this;
  182.     }
  183.     public function getUserModifica(): ?int
  184.     {
  185.         return $this->user_modifica;
  186.     }
  187.     public function setUserModifica(int $user_modifica): self
  188.     {
  189.         $this->user_modifica $user_modifica;
  190.         return $this;
  191.     }
  192.     public function getCreatedAt(): ?\DateTimeInterface
  193.     {
  194.         return $this->created_at;
  195.     }
  196.     public function setCreatedAt(\DateTimeInterface $created_at): self
  197.     {
  198.         $this->created_at $created_at;
  199.         return $this;
  200.     }
  201.     public function getUpdatedAt(): ?\DateTimeInterface
  202.     {
  203.         return $this->updated_at;
  204.     }
  205.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  206.     {
  207.         $this->updated_at $updated_at;
  208.         return $this;
  209.     }
  210.     /**
  211.      * @return Collection|DiagnosticosInterconsulta[]
  212.      */
  213.     public function getDiagnosticosInterconsultas(): Collection
  214.     {
  215.         return $this->diagnosticosInterconsultas;
  216.     }
  217.     public function addDiagnosticosInterconsulta(DiagnosticosInterconsulta $diagnosticosInterconsulta): self
  218.     {
  219.         if (!$this->diagnosticosInterconsultas->contains($diagnosticosInterconsulta)) {
  220.             $this->diagnosticosInterconsultas[] = $diagnosticosInterconsulta;
  221.             $diagnosticosInterconsulta->setInterconsulta($this);
  222.         }
  223.         return $this;
  224.     }
  225.     public function removeDiagnosticosInterconsulta(DiagnosticosInterconsulta $diagnosticosInterconsulta): self
  226.     {
  227.         if ($this->diagnosticosInterconsultas->removeElement($diagnosticosInterconsulta)) {
  228.             // set the owning side to null (unless already changed)
  229.             if ($diagnosticosInterconsulta->getInterconsulta() === $this) {
  230.                 $diagnosticosInterconsulta->setInterconsulta(null);
  231.             }
  232.         }
  233.         return $this;
  234.     }
  235.     public function getTarifario(): ?string
  236.     {
  237.         return $this->tarifario;
  238.     }
  239.     public function setTarifario(?string $tarifario): self
  240.     {
  241.         $this->tarifario $tarifario;
  242.         return $this;
  243.     }
  244.     public function getItem(): ?ItemsCargos
  245.     {
  246.         return $this->item;
  247.     }
  248.     public function setItem(?ItemsCargos $item): self
  249.     {
  250.         $this->item $item;
  251.         return $this;
  252.     }
  253.     public function getDescripcion(): ?string
  254.     {
  255.         return $this->descripcion;
  256.     }
  257.     public function setDescripcion(?string $descripcion): self
  258.     {
  259.         $this->descripcion $descripcion;
  260.         return $this;
  261.     }
  262.     public function getEstado(): ?bool
  263.     {
  264.         return $this->estado;
  265.     }
  266.     public function setEstado(bool $estado): self
  267.     {
  268.         $this->estado $estado;
  269.         return $this;
  270.     }
  271.     
  272.     public function getResultadoExamen(): ?string
  273.     {
  274.         return $this->resultado_examen;
  275.     }
  276.     public function setResultadoExamen(?string $resultado_examen): self
  277.     {
  278.         $this->resultado_examen $resultado_examen;
  279.         return $this;
  280.     }
  281. }