<?php
namespace App\Entity;
use App\Repository\Orden012Repository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* @ORM\Entity(repositoryClass=Orden012Repository::class)
* @ORM\HasLifecycleCallbacks
*/
class Orden012
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="boolean")
*/
private $estado;
/**
* @ORM\Column(type="string", length=50)
*/
private $ip_crea;
/**
* @ORM\Column(type="string", length=50)
*/
private $ip_modifica;
/**
* @ORM\Column(type="integer")
*/
private $user_crea;
/**
* @ORM\Column(type="integer")
*/
private $user_modifica;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\Column(type="datetime")
*/
private $updated_at;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $refiere;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $sala;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $cama;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $urgente;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $rutina;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $control;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $rx;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $tomografia;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $resonancia;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $ecografia;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $procedimiento;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $otros;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $otros_texto;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $puede_movilizarse;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $puede_retirarse_vendas_apositos_o_yesos;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $el_medico_estara_presente_en_el_examen;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $toma_de_radiografia_en_la_cama;
/**
* @ORM\OneToMany(targetEntity=Orden012Detalle::class, mappedBy="orden012")
*/
private $orden012Detalles;
/**
* @ORM\ManyToOne(targetEntity=Paciente::class, inversedBy="orden012s")
* @ORM\JoinColumn(nullable=false)
*/
private $paciente;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="orden012s")
* @ORM\JoinColumn(nullable=false)
*/
private $doctor;
/**
* @ORM\Column(type="datetime")
*/
private $fecha_orden;
/**
* @ORM\ManyToOne(targetEntity=HistoriaClinica::class, inversedBy="orden012s")
* @ORM\JoinColumn(nullable=false)
*/
private $historia;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $derivacion;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $servicio;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $especialidad;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $evolucion;
/**
* @ORM\OneToMany(targetEntity=DiagnosticosOrden012::class, mappedBy="orden012")
*/
private $diagnosticosOrden012s;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $motivo;
public function __construct()
{
$this->orden012Detalles = new ArrayCollection();
$this->diagnosticosOrden012s = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getEstado(): ?bool
{
return $this->estado;
}
public function setEstado(bool $estado): self
{
$this->estado = $estado;
return $this;
}
public function getIpCrea(): ?string
{
return $this->ip_crea;
}
public function setIpCrea(string $ip_crea): self
{
$this->ip_crea = $ip_crea;
return $this;
}
public function getIpModifica(): ?string
{
return $this->ip_modifica;
}
public function setIpModifica(string $ip_modifica): self
{
$this->ip_modifica = $ip_modifica;
return $this;
}
public function getUserCrea(): ?int
{
return $this->user_crea;
}
public function setUserCrea(int $user_crea): self
{
$this->user_crea = $user_crea;
return $this;
}
public function getUserModifica(): ?int
{
return $this->user_modifica;
}
public function setUserModifica(int $user_modifica): self
{
$this->user_modifica = $user_modifica;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeInterface $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps(): void
{
$dateTimeNow = new DateTime('now');
$this->setUpdatedAt($dateTimeNow);
if ($this->getCreatedAt() === null) {
$this->setCreatedAt($dateTimeNow);
}
}
public function getRefiere(): ?string
{
return $this->refiere;
}
public function setRefiere(?string $refiere): self
{
$this->refiere = $refiere;
return $this;
}
public function getSala(): ?string
{
return $this->sala;
}
public function setSala(?string $sala): self
{
$this->sala = $sala;
return $this;
}
public function getCama(): ?string
{
return $this->cama;
}
public function setCama(?string $cama): self
{
$this->cama = $cama;
return $this;
}
public function getUrgente(): ?bool
{
return $this->urgente;
}
public function setUrgente(?bool $urgente): self
{
$this->urgente = $urgente;
return $this;
}
public function getRutina(): ?bool
{
return $this->rutina;
}
public function setRutina(?bool $rutina): self
{
$this->rutina = $rutina;
return $this;
}
public function getControl(): ?bool
{
return $this->control;
}
public function setControl(?bool $control): self
{
$this->control = $control;
return $this;
}
public function getRx(): ?bool
{
return $this->rx;
}
public function setRx(?bool $rx): self
{
$this->rx = $rx;
return $this;
}
public function getTomografia(): ?bool
{
return $this->tomografia;
}
public function setTomografia(?bool $tomografia): self
{
$this->tomografia = $tomografia;
return $this;
}
public function getResonancia(): ?bool
{
return $this->resonancia;
}
public function setResonancia(?bool $resonancia): self
{
$this->resonancia = $resonancia;
return $this;
}
public function getEcografia(): ?bool
{
return $this->ecografia;
}
public function setEcografia(?bool $ecografia): self
{
$this->ecografia = $ecografia;
return $this;
}
public function getProcedimiento(): ?bool
{
return $this->procedimiento;
}
public function setProcedimiento(?bool $procedimiento): self
{
$this->procedimiento = $procedimiento;
return $this;
}
public function getOtros(): ?bool
{
return $this->otros;
}
public function setOtros(?bool $otros): self
{
$this->otros = $otros;
return $this;
}
public function getOtrosTexto(): ?string
{
return $this->otros_texto;
}
public function setOtrosTexto(?string $otros_texto): self
{
$this->otros_texto = $otros_texto;
return $this;
}
public function getPuedeMovilizarse(): ?bool
{
return $this->puede_movilizarse;
}
public function setPuedeMovilizarse(?bool $puede_movilizarse): self
{
$this->puede_movilizarse = $puede_movilizarse;
return $this;
}
public function getPuedeRetirarseVendasApositosOYesos(): ?bool
{
return $this->puede_retirarse_vendas_apositos_o_yesos;
}
public function setPuedeRetirarseVendasApositosOYesos(?bool $puede_retirarse_vendas_apositos_o_yesos): self
{
$this->puede_retirarse_vendas_apositos_o_yesos = $puede_retirarse_vendas_apositos_o_yesos;
return $this;
}
public function getElMedicoEstaraPresenteEnElExamen(): ?bool
{
return $this->el_medico_estara_presente_en_el_examen;
}
public function setElMedicoEstaraPresenteEnElExamen(?bool $el_medico_estara_presente_en_el_examen): self
{
$this->el_medico_estara_presente_en_el_examen = $el_medico_estara_presente_en_el_examen;
return $this;
}
public function getTomaDeRadiografiaEnLaCama(): ?bool
{
return $this->toma_de_radiografia_en_la_cama;
}
public function setTomaDeRadiografiaEnLaCama(?bool $toma_de_radiografia_en_la_cama): self
{
$this->toma_de_radiografia_en_la_cama = $toma_de_radiografia_en_la_cama;
return $this;
}
/**
* @return Collection|Orden012Detalle[]
*/
public function getOrden012Detalles(): Collection
{
return $this->orden012Detalles;
}
public function addOrden012Detalle(Orden012Detalle $orden012Detalle): self
{
if (!$this->orden012Detalles->contains($orden012Detalle)) {
$this->orden012Detalles[] = $orden012Detalle;
$orden012Detalle->setOrden012($this);
}
return $this;
}
public function removeOrden012Detalle(Orden012Detalle $orden012Detalle): self
{
if ($this->orden012Detalles->removeElement($orden012Detalle)) {
// set the owning side to null (unless already changed)
if ($orden012Detalle->getOrden012() === $this) {
$orden012Detalle->setOrden012(null);
}
}
return $this;
}
public function getPaciente(): ?Paciente
{
return $this->paciente;
}
public function setPaciente(?Paciente $paciente): self
{
$this->paciente = $paciente;
return $this;
}
public function getDoctor(): ?User
{
return $this->doctor;
}
public function setDoctor(?User $doctor): self
{
$this->doctor = $doctor;
return $this;
}
public function getFechaOrden(): ?\DateTimeInterface
{
return $this->fecha_orden;
}
public function setFechaOrden(\DateTimeInterface $fecha_orden): self
{
$this->fecha_orden = $fecha_orden;
return $this;
}
public function getHistoria(): ?HistoriaClinica
{
return $this->historia;
}
public function setHistoria(?HistoriaClinica $historia): self
{
$this->historia = $historia;
return $this;
}
public function getDerivacion(): ?string
{
return $this->derivacion;
}
public function setDerivacion(?string $derivacion): self
{
$this->derivacion = $derivacion;
return $this;
}
public function getServicio(): ?string
{
return $this->servicio;
}
public function setServicio(?string $servicio): self
{
$this->servicio = $servicio;
return $this;
}
public function getEspecialidad(): ?string
{
return $this->especialidad;
}
public function setEspecialidad(?string $especialidad): self
{
$this->especialidad = $especialidad;
return $this;
}
public function getEvolucion(): ?string
{
return $this->evolucion;
}
public function setEvolucion(?string $evolucion): self
{
$this->evolucion = $evolucion;
return $this;
}
/**
* @return Collection|DiagnosticosOrden012[]
*/
public function getDiagnosticosOrden012s(): Collection
{
return $this->diagnosticosOrden012s;
}
public function addDiagnosticosOrden012(DiagnosticosOrden012 $diagnosticosOrden012): self
{
if (!$this->diagnosticosOrden012s->contains($diagnosticosOrden012)) {
$this->diagnosticosOrden012s[] = $diagnosticosOrden012;
$diagnosticosOrden012->setOrden012($this);
}
return $this;
}
public function removeDiagnosticosOrden012(DiagnosticosOrden012 $diagnosticosOrden012): self
{
if ($this->diagnosticosOrden012s->removeElement($diagnosticosOrden012)) {
// set the owning side to null (unless already changed)
if ($diagnosticosOrden012->getOrden012() === $this) {
$diagnosticosOrden012->setOrden012(null);
}
}
return $this;
}
public function getMotivo(): ?string
{
return $this->motivo;
}
public function setMotivo(?string $motivo): self
{
$this->motivo = $motivo;
return $this;
}
}