src/Entity/Paciente.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PacienteRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\Common\Collections\Criteria;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use DateTime;
  9. /**
  10.  * @ORM\Entity(repositoryClass=PacienteRepository::class)
  11.  * @ORM\HasLifecycleCallbacks
  12.  */
  13. class Paciente
  14. {
  15.     /**
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue()
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=13, unique=true)
  23.      */
  24.     private $cedula;
  25.     /**
  26.      * @ORM\Column(type="string", length=100)
  27.      */
  28.     private $apellido1;
  29.     /**
  30.      * @ORM\Column(type="string", length=100, nullable=true)
  31.      */
  32.     private $apellido2;
  33.     /**
  34.      * @ORM\Column(type="string", length=100)
  35.      */
  36.     private $nombre1;
  37.     /**
  38.      * @ORM\Column(type="string", length=100, nullable=true)
  39.      */
  40.     private $nombre2;
  41.     /**
  42.      * @ORM\Column(type="date")
  43.      */
  44.     private $fecha_nacimiento;
  45.     /**
  46.      * @ORM\Column(type="string", length=50, nullable=true)
  47.      */
  48.     private $telefono;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $direccion;
  53.     /**
  54.      * @ORM\Column(type="boolean")
  55.      */
  56.     private $sexo;
  57.     /**
  58.      * @ORM\Column(type="string", length=20, nullable=true)
  59.      */
  60.     private $estado_civil;
  61.     /**
  62.      * @ORM\Column(type="datetime")
  63.      */
  64.     private $created_at;
  65.     /**
  66.      * @ORM\Column(type="datetime")
  67.      */
  68.     private $updated_at;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity=PlanoCabecera::class, mappedBy="paciente")
  71.      */
  72.     private $planoCabeceras;
  73.     /**
  74.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="pacientes")
  75.      * @ORM\JoinColumn(nullable=true)
  76.      */
  77.     private $user;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity=Agenda::class, mappedBy="paciente")
  80.      */
  81.     private $agendas;
  82.     /**
  83.      * @ORM\ManyToOne(targetEntity=SeguroPrivado::class, inversedBy="pacientes")
  84.      */
  85.     private $seguro;
  86.     /**
  87.      * @ORM\Column(type="string", length=150, nullable=true)
  88.      */
  89.     private $email;
  90.     /**
  91.      * @ORM\Column(type="string", length=255, nullable=true)
  92.      */
  93.     private $celular;
  94.     /**
  95.      * @ORM\Column(type="string", length=100, nullable=true)
  96.      */
  97.     private $copia_cedula;
  98.     /**
  99.      * @ORM\Column(type="string", length=100, nullable=true)
  100.      */
  101.     private $ciudad;
  102.     /**
  103.      * @ORM\Column(type="string", length=100, nullable=true)
  104.      */
  105.     private $lugar_nacimiento;
  106.     /**
  107.      * @ORM\Column(type="string", length=100, nullable=true)
  108.      */
  109.     private $referido;
  110.     /**
  111.      * @ORM\Column(type="string", length=13, nullable=true)
  112.      */
  113.     private $cedula_familiar;
  114.     /**
  115.      * @ORM\Column(type="string", length=100, nullable=true)
  116.      */
  117.     private $parentesco;
  118.     /**
  119.      * @ORM\Column(type="string", length=255, nullable=true)
  120.      */
  121.     private $nombres_familiar;
  122.     /**
  123.      * @ORM\Column(type="string", length=100, nullable=true)
  124.      */
  125.     private $telefono_familiar;
  126.     /**
  127.      * @ORM\Column(type="string", length=255, nullable=true)
  128.      */
  129.     private $alcohol;
  130.     /**
  131.      * @ORM\Column(type="string", length=255, nullable=true)
  132.      */
  133.     private $tabaco;
  134.     /**
  135.      * @ORM\Column(type="string", length=255, nullable=true)
  136.      */
  137.     private $drogas;
  138.     /**
  139.      * @ORM\Column(type="string", length=255, nullable=true)
  140.      */
  141.     private $habitos_fisiologicos;
  142.     /**
  143.      * @ORM\Column(type="string", length=255, nullable=true)
  144.      */
  145.     private $enfermedad_de_la_infancia;
  146.     /**
  147.      * @ORM\Column(type="text", nullable=true)
  148.      */
  149.     private $mas_antecedentes_personales;
  150.     /**
  151.      * @ORM\Column(type="text", nullable=true)
  152.      */
  153.     private $antecedentes_quirurgicos;
  154.     /**
  155.      * @ORM\Column(type="text", nullable=true)
  156.      */
  157.     private $antecedentes_familiares;
  158.     /**
  159.      * @ORM\OneToMany(targetEntity=HistoriaClinica::class, mappedBy="paciente")
  160.      */
  161.     private $historiaClinicas;
  162.     /**
  163.      * @ORM\OneToMany(targetEntity=Receta::class, mappedBy="paciente")
  164.      */
  165.     private $recetas;
  166.     /**
  167.      * @ORM\Column(type="string", length=100, nullable=true)
  168.      */
  169.     private $grupo_sanguineo;
  170.     /**
  171.      * @ORM\Column(type="string", length=255, nullable=true)
  172.      */
  173.     private $enfermedad;
  174.     /**
  175.      * @ORM\Column(type="string", length=255, nullable=true)
  176.      */
  177.     private $alergias;
  178.     /**
  179.      * @ORM\OneToMany(targetEntity=ExamenOrden::class, mappedBy="paciente")
  180.      */
  181.     private $examenOrdens;
  182.     /**
  183.      * @ORM\Column(type="text", nullable=true)
  184.      */
  185.     private $medicacion;
  186.     /**
  187.      * @ORM\Column(type="text", nullable=true)
  188.      */
  189.     private $ago;
  190.     /**
  191.      * @ORM\Column(type="text", nullable=true)
  192.      */
  193.     private $fum;
  194.     /**
  195.      * @ORM\OneToMany(targetEntity=Orden012::class, mappedBy="paciente")
  196.      */
  197.     private $orden012s;
  198.     /**
  199.      * @ORM\Column(type="string", length=255, nullable=true)
  200.      */
  201.     private $gesta;
  202.     /**
  203.      * @ORM\Column(type="string", length=255, nullable=true)
  204.      */
  205.     private $abo;
  206.     /**
  207.      * @ORM\Column(type="string", length=255, nullable=true)
  208.      */
  209.     private $para;
  210.     /**
  211.      * @ORM\Column(type="string", length=255, nullable=true)
  212.      */
  213.     private $cesa;
  214.     /**
  215.      * @ORM\OneToMany(targetEntity=Interconsulta::class, mappedBy="paciente")
  216.      */
  217.     private $interconsultas;
  218.     /**
  219.      * @ORM\Column(type="string", length=50, nullable=true)
  220.      */
  221.     private $provincia_residencia;
  222.     /**
  223.      * @ORM\Column(type="string", length=50, nullable=true)
  224.      */
  225.     private $parroquia_residencia;
  226.     /**
  227.      * @ORM\Column(type="string", length=50, nullable=true)
  228.      */
  229.     private $pais;
  230.     /**
  231.      * @ORM\Column(type="string", length=255, nullable=true)
  232.      */
  233.     private $cedula_jpg;
  234.     
  235.     /**
  236.      * @ORM\Column(type="boolean", nullable=true)
  237.      */
  238.     private $tipo_firma;
  239.     /**
  240.      * @ORM\OneToMany(targetEntity=HdSolicitud::class, mappedBy="paciente")
  241.      */
  242.     private $hdSolicituds;
  243.     /**
  244.      * @ORM\Column(type="string", length=100, nullable=true)
  245.      */
  246.     private $barrio;
  247.     /**
  248.      * @ORM\Column(type="string", length=100, nullable=true)
  249.      */
  250.     private $canton;
  251.     /**
  252.      * @ORM\Column(type="string", length=100, nullable=true)
  253.      */
  254.     private $zona;
  255.     /**
  256.      * @ORM\Column(type="string", length=100, nullable=true)
  257.      */
  258.     private $grupo_cultural;
  259.     /**
  260.      * @ORM\Column(type="string", length=100, nullable=true)
  261.      */
  262.     private $instruccion;
  263.     /**
  264.      * @ORM\Column(type="string", length=100, nullable=true)
  265.      */
  266.     private $ocupacion;
  267.     /**
  268.      * @ORM\Column(type="string", length=100, nullable=true)
  269.      */
  270.     private $empresa;
  271.     /**
  272.      * @ORM\Column(type="string", length=100, nullable=true)
  273.      */
  274.     private $apf_alergico;
  275.     /**
  276.      * @ORM\Column(type="string", length=100, nullable=true)
  277.      */
  278.     private $apf_clinico;
  279.     /**
  280.      * @ORM\Column(type="string", length=100, nullable=true)
  281.      */
  282.     private $apf_ginecolo;
  283.     /**
  284.      * @ORM\Column(type="string", length=100, nullable=true)
  285.      */
  286.     private $apf_trauma;
  287.     /**
  288.      * @ORM\Column(type="string", length=100, nullable=true)
  289.      */
  290.     private $apf_quirur;
  291.     /**
  292.      * @ORM\Column(type="string", length=100, nullable=true)
  293.      */
  294.     private $apf_farma;
  295.     /**
  296.      * @ORM\Column(type="string", length=100, nullable=true)
  297.      */
  298.     private $apf_psiquia;
  299.     /**
  300.      * @ORM\Column(type="string", length=100, nullable=true)
  301.      */
  302.     private $apf_otro;
  303.     /**
  304.      * @ORM\Column(type="string", length=100, nullable=true)
  305.      */
  306.     private $direccion_familiar;
  307.     
  308.     /**
  309.      * @ORM\Column(type="string", length=255, nullable=true)
  310.      */
  311.     private $cedula_mama;
  312.     /**
  313.      * @ORM\Column(type="string", length=255, nullable=true)
  314.      */
  315.     private $cedula_papa;
  316.     
  317.     /**
  318.      * @ORM\Column(type="string", length=255, nullable=true)
  319.      */
  320.     private $recomendacion;
  321.     /**
  322.      * @ORM\Column(type="string", length=50, nullable=true)
  323.      */
  324.     private $vacuna_covid;
  325.     /**
  326.      * @ORM\Column(type="string", length=50, nullable=true)
  327.      */
  328.     private $alias;
  329.     
  330.     /**
  331.      * @ORM\Column(type="string", length=50, nullable=true)
  332.      */
  333.     private $hijos;
  334.     
  335.     /**
  336.      * @ORM\Column(type="string", length=50, nullable=true)
  337.      */
  338.     private $region;
  339.     
  340.     /**
  341.      * @ORM\Column(type="string", length=50, nullable=true)
  342.      */
  343.     private $contrato;
  344.     
  345.     /**
  346.      * @ORM\OneToMany(targetEntity=OrdenProcedimiento::class, mappedBy="paciente")
  347.      */
  348.     private $ordenProcedimientos;
  349.     
  350.     /**
  351.      * @ORM\ManyToOne(targetEntity=User::class)
  352.      */
  353.     private $recomendado;
  354.     
  355.     /**
  356.      * @ORM\ManyToOne(targetEntity=RedSocial::class, inversedBy="agendas")
  357.      * @ORM\JoinColumn(nullable=false)
  358.      */
  359.     private $redsocial;
  360.     /**
  361.      * @ORM\Column(type="string", length=50, nullable=true)
  362.      */
  363.     private $salud_producto;
  364.     
  365.     /**
  366.      * @ORM\Column(type="string", length=50, nullable=true)
  367.      */
  368.     private $salud_nropersona;
  369.     
  370.     /**
  371.      * @ORM\Column(type="string", length=50, nullable=true)
  372.      */
  373.     private $salud_nivel;
  374.     
  375.     /**
  376.      * @ORM\Column(type="string", length=255, nullable=true)
  377.      */
  378.     private $observacion;
  379.     
  380.     /**
  381.      * @ORM\Column(type="text", nullable=true)
  382.      */
  383.     private $paciente_endoscopias;
  384.     
  385.     /**
  386.      * @ORM\Column(type="text", nullable=true)
  387.      */
  388.     private $paciente_bariatrico;
  389.     
  390.     public function __construct()
  391.     {
  392.         $this->planoCabeceras = new ArrayCollection();
  393.         $this->agendas = new ArrayCollection();
  394.         $this->historiaClinicas = new ArrayCollection();
  395.         $this->recetas = new ArrayCollection();
  396.         $this->examenOrdens = new ArrayCollection();
  397.         $this->orden012s = new ArrayCollection();
  398.         $this->interconsultas = new ArrayCollection();
  399.         $this->hdSolicituds = new ArrayCollection();
  400.         $this->ordenProcedimientos = new ArrayCollection();
  401.     }
  402.     public function getId(): ?int
  403.     {
  404.         return $this->id;
  405.     }
  406.     public function getCedula(): ?string
  407.     {
  408.         return $this->cedula;
  409.     }
  410.     public function setCedula(string $cedula): self
  411.     {
  412.         $this->cedula $cedula;
  413.         return $this;
  414.     }
  415.     public function getApellido1(): ?string
  416.     {
  417.         return $this->apellido1;
  418.     }
  419.     public function setApellido1(string $apellido1): self
  420.     {
  421.         $this->apellido1 $apellido1;
  422.         return $this;
  423.     }
  424.     public function getApellido2(): ?string
  425.     {
  426.         return $this->apellido2;
  427.     }
  428.     public function setApellido2(?string $apellido2): self
  429.     {
  430.         $this->apellido2 $apellido2;
  431.         return $this;
  432.     }
  433.     public function getNombre1(): ?string
  434.     {
  435.         return $this->nombre1;
  436.     }
  437.     public function setNombre1(string $nombre1): self
  438.     {
  439.         $this->nombre1 $nombre1;
  440.         return $this;
  441.     }
  442.     public function getNombre2(): ?string
  443.     {
  444.         return $this->nombre2;
  445.     }
  446.     public function setNombre2(?string $nombre2): self
  447.     {
  448.         $this->nombre2 $nombre2;
  449.         return $this;
  450.     }
  451.     public function getFechaNacimiento(): ?\DateTimeInterface
  452.     {
  453.         return $this->fecha_nacimiento;
  454.     }
  455.     public function setFechaNacimiento(\DateTimeInterface $fecha_nacimiento): self
  456.     {
  457.         $this->fecha_nacimiento $fecha_nacimiento;
  458.         return $this;
  459.     }
  460.     public function getTelefono(): ?string
  461.     {
  462.         return $this->telefono;
  463.     }
  464.     public function setTelefono(?string $telefono): self
  465.     {
  466.         $this->telefono $telefono;
  467.         return $this;
  468.     }
  469.     public function getDireccion(): ?string
  470.     {
  471.         return $this->direccion;
  472.     }
  473.     public function setDireccion(?string $direccion): self
  474.     {
  475.         $this->direccion $direccion;
  476.         return $this;
  477.     }
  478.     public function getSexo(): ?bool
  479.     {
  480.         return $this->sexo;
  481.     }
  482.     public function setSexo(bool $sexo): self
  483.     {
  484.         $this->sexo $sexo;
  485.         return $this;
  486.     }
  487.     public function getEstadoCivil(): ?string
  488.     {
  489.         return $this->estado_civil;
  490.     }
  491.     public function setEstadoCivil(string $estado_civil): self
  492.     {
  493.         $this->estado_civil $estado_civil;
  494.         return $this;
  495.     }
  496.     public function getCreatedAt(): ?\DateTimeInterface
  497.     {
  498.         return $this->created_at;
  499.     }
  500.     public function setCreatedAt(\DateTimeInterface $created_at): self
  501.     {
  502.         $this->created_at $created_at;
  503.         return $this;
  504.     }
  505.     public function getUpdatedAt(): ?\DateTimeInterface
  506.     {
  507.         return $this->updated_at;
  508.     }
  509.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  510.     {
  511.         $this->updated_at $updated_at;
  512.         return $this;
  513.     }
  514.     /**
  515.      * @ORM\PrePersist
  516.      * @ORM\PreUpdate
  517.      */
  518.     public function updatedTimestamps(): void
  519.     {
  520.         $dateTimeNow = new DateTime('now');
  521.         $this->setUpdatedAt($dateTimeNow);
  522.         if ($this->getCreatedAt() === null) {
  523.             $this->setCreatedAt($dateTimeNow);
  524.         }
  525.     }
  526.     /**
  527.      * @return Collection|PlanoCabecera[]
  528.      */
  529.     public function getPlanoCabeceras(): Collection
  530.     {
  531.         return $this->planoCabeceras;
  532.     }
  533.     public function addPlanoCabecera(PlanoCabecera $planoCabecera): self
  534.     {
  535.         if (!$this->planoCabeceras->contains($planoCabecera)) {
  536.             $this->planoCabeceras[] = $planoCabecera;
  537.             $planoCabecera->setPaciente($this);
  538.         }
  539.         return $this;
  540.     }
  541.     public function removePlanoCabecera(PlanoCabecera $planoCabecera): self
  542.     {
  543.         if ($this->planoCabeceras->contains($planoCabecera)) {
  544.             $this->planoCabeceras->removeElement($planoCabecera);
  545.             // set the owning side to null (unless already changed)
  546.             if ($planoCabecera->getPaciente() === $this) {
  547.                 $planoCabecera->setPaciente(null);
  548.             }
  549.         }
  550.         return $this;
  551.     }
  552.     public function getUser(): ?User
  553.     {
  554.         return $this->user;
  555.     }
  556.     public function setUser(?User $user): self
  557.     {
  558.         $this->user $user;
  559.         return $this;
  560.     }
  561.     /**
  562.      * @return Collection|Agenda[]
  563.      */
  564.     public function getAgendas(): Collection
  565.     {
  566.         return $this->agendas;
  567.     }
  568.     public function addAgenda(Agenda $agenda): self
  569.     {
  570.         if (!$this->agendas->contains($agenda)) {
  571.             $this->agendas[] = $agenda;
  572.             $agenda->setPaciente($this);
  573.         }
  574.         return $this;
  575.     }
  576.     public function removeAgenda(Agenda $agenda): self
  577.     {
  578.         if ($this->agendas->removeElement($agenda)) {
  579.             // set the owning side to null (unless already changed)
  580.             if ($agenda->getPaciente() === $this) {
  581.                 $agenda->setPaciente(null);
  582.             }
  583.         }
  584.         return $this;
  585.     }
  586.     public function __toString(){
  587.         // to show the name of the Category in the select
  588.         return $this->apellido1;
  589.         // to show the id of the Category in the select
  590.         // return $this->id;
  591.     }
  592.     public function getSeguro(): ?SeguroPrivado
  593.     {
  594.         return $this->seguro;
  595.     }
  596.     public function setSeguro(?SeguroPrivado $seguro): self
  597.     {
  598.         $this->seguro $seguro;
  599.         return $this;
  600.     }
  601.     public function getEmail(): ?string
  602.     {
  603.         return $this->email;
  604.     }
  605.     public function setEmail(?string $email): self
  606.     {
  607.         $this->email $email;
  608.         return $this;
  609.     }
  610.     public function getCelular(): ?string
  611.     {
  612.         return $this->celular;
  613.     }
  614.     public function setCelular(?string $celular): self
  615.     {
  616.         $this->celular $celular;
  617.         return $this;
  618.     }
  619.     public function calculaedad()
  620.     {
  621.         $ahora = new DateTime(date("Y-m-d"));
  622.         $diferencia $ahora->diff($this->fecha_nacimiento);
  623.         if($diferencia->format("%y")==0){
  624.             
  625.             if($diferencia->format("%m")==0){
  626.                 return $diferencia->format("%d").' dias';    
  627.             }
  628.             return $diferencia->format("%m").' meses';
  629.         }
  630.         return $diferencia->format("%y").' años';
  631.     }
  632.     public function getCopiaCedula(): ?string
  633.     {
  634.         return $this->copia_cedula;
  635.     }
  636.     public function setCopiaCedula(?string $copia_cedula): self
  637.     {
  638.         $this->copia_cedula $copia_cedula;
  639.         return $this;
  640.     }
  641.     public function getCiudad(): ?string
  642.     {
  643.         return $this->ciudad;
  644.     }
  645.     public function setCiudad(?string $ciudad): self
  646.     {
  647.         $this->ciudad $ciudad;
  648.         return $this;
  649.     }
  650.     public function getLugarNacimiento(): ?string
  651.     {
  652.         return $this->lugar_nacimiento;
  653.     }
  654.     public function setLugarNacimiento(?string $lugar_nacimiento): self
  655.     {
  656.         $this->lugar_nacimiento $lugar_nacimiento;
  657.         return $this;
  658.     }
  659.     public function getReferido(): ?string
  660.     {
  661.         return $this->referido;
  662.     }
  663.     public function setReferido(?string $referido): self
  664.     {
  665.         $this->referido $referido;
  666.         return $this;
  667.     }
  668.     public function getCedulaFamiliar(): ?string
  669.     {
  670.         return $this->cedula_familiar;
  671.     }
  672.     public function setCedulaFamiliar(?string $cedula_familiar): self
  673.     {
  674.         $this->cedula_familiar $cedula_familiar;
  675.         return $this;
  676.     }
  677.     public function getParentesco(): ?string
  678.     {
  679.         return $this->parentesco;
  680.     }
  681.     public function setParentesco(?string $parentesco): self
  682.     {
  683.         $this->parentesco $parentesco;
  684.         return $this;
  685.     }
  686.     public function getNombresFamiliar(): ?string
  687.     {
  688.         return $this->nombres_familiar;
  689.     }
  690.     public function setNombresFamiliar(?string $nombres_familiar): self
  691.     {
  692.         $this->nombres_familiar $nombres_familiar;
  693.         return $this;
  694.     }
  695.     public function getTelefonoFamiliar(): ?string
  696.     {
  697.         return $this->telefono_familiar;
  698.     }
  699.     public function setTelefonoFamiliar(?string $telefono_familiar): self
  700.     {
  701.         $this->telefono_familiar $telefono_familiar;
  702.         return $this;
  703.     }
  704.     public function getAlcohol(): ?string
  705.     {
  706.         return $this->alcohol;
  707.     }
  708.     public function setAlcohol(?string $alcohol): self
  709.     {
  710.         $this->alcohol $alcohol;
  711.         return $this;
  712.     }
  713.     public function getTabaco(): ?string
  714.     {
  715.         return $this->tabaco;
  716.     }
  717.     public function setTabaco(?string $tabaco): self
  718.     {
  719.         $this->tabaco $tabaco;
  720.         return $this;
  721.     }
  722.     public function getDrogas(): ?string
  723.     {
  724.         return $this->drogas;
  725.     }
  726.     public function setDrogas(?string $drogas): self
  727.     {
  728.         $this->drogas $drogas;
  729.         return $this;
  730.     }
  731.     public function getHabitosFisiologicos(): ?string
  732.     {
  733.         return $this->habitos_fisiologicos;
  734.     }
  735.     public function setHabitosFisiologicos(?string $habitos_fisiologicos): self
  736.     {
  737.         $this->habitos_fisiologicos $habitos_fisiologicos;
  738.         return $this;
  739.     }
  740.     public function getEnfermedadDeLaInfancia(): ?string
  741.     {
  742.         return $this->enfermedad_de_la_infancia;
  743.     }
  744.     public function setEnfermedadDeLaInfancia(?string $enfermedad_de_la_infancia): self
  745.     {
  746.         $this->enfermedad_de_la_infancia $enfermedad_de_la_infancia;
  747.         return $this;
  748.     }
  749.     public function getMasAntecedentesPersonales(): ?string
  750.     {
  751.         return $this->mas_antecedentes_personales;
  752.     }
  753.     public function setMasAntecedentesPersonales(?string $mas_antecedentes_personales): self
  754.     {
  755.         $this->mas_antecedentes_personales $mas_antecedentes_personales;
  756.         return $this;
  757.     }
  758.     public function getAntecedentesQuirurgicos(): ?string
  759.     {
  760.         return $this->antecedentes_quirurgicos;
  761.     }
  762.     public function setAntecedentesQuirurgicos(?string $antecedentes_quirurgicos): self
  763.     {
  764.         $this->antecedentes_quirurgicos $antecedentes_quirurgicos;
  765.         return $this;
  766.     }
  767.     public function getAntecedentesFamiliares(): ?string
  768.     {
  769.         return $this->antecedentes_familiares;
  770.     }
  771.     public function setAntecedentesFamiliares(?string $antecedentes_familiares): self
  772.     {
  773.         $this->antecedentes_familiares $antecedentes_familiares;
  774.         return $this;
  775.     }
  776.     /**
  777.      * @return Collection|HistoriaClinica[]
  778.      */
  779.     public function getHistoriaClinicas(): Collection
  780.     {
  781.         return $this->historiaClinicas;
  782.     }
  783.     public function addHistoriaClinica(HistoriaClinica $historiaClinica): self
  784.     {
  785.         if (!$this->historiaClinicas->contains($historiaClinica)) {
  786.             $this->historiaClinicas[] = $historiaClinica;
  787.             $historiaClinica->setPaciente($this);
  788.         }
  789.         return $this;
  790.     }
  791.     public function removeHistoriaClinica(HistoriaClinica $historiaClinica): self
  792.     {
  793.         if ($this->historiaClinicas->removeElement($historiaClinica)) {
  794.             // set the owning side to null (unless already changed)
  795.             if ($historiaClinica->getPaciente() === $this) {
  796.                 $historiaClinica->setPaciente(null);
  797.             }
  798.         }
  799.         return $this;
  800.     }
  801.     /**
  802.      * @return Collection|Receta[]
  803.      */
  804.     public function getRecetas(): Collection
  805.     {
  806.         return $this->recetas;
  807.     }
  808.     public function addReceta(Receta $receta): self
  809.     {
  810.         if (!$this->recetas->contains($receta)) {
  811.             $this->recetas[] = $receta;
  812.             $receta->setPaciente($this);
  813.         }
  814.         return $this;
  815.     }
  816.     public function removeReceta(Receta $receta): self
  817.     {
  818.         if ($this->recetas->removeElement($receta)) {
  819.             // set the owning side to null (unless already changed)
  820.             if ($receta->getPaciente() === $this) {
  821.                 $receta->setPaciente(null);
  822.             }
  823.         }
  824.         return $this;
  825.     }
  826.     public function getGrupoSanguineo(): ?string
  827.     {
  828.         return $this->grupo_sanguineo;
  829.     }
  830.     public function setGrupoSanguineo(?string $grupo_sanguineo): self
  831.     {
  832.         $this->grupo_sanguineo $grupo_sanguineo;
  833.         return $this;
  834.     }
  835.     public function getEnfermedad(): ?string
  836.     {
  837.         return $this->enfermedad;
  838.     }
  839.     public function setEnfermedad(?string $enfermedad): self
  840.     {
  841.         $this->enfermedad $enfermedad;
  842.         return $this;
  843.     }
  844.     public function getAlergias(): ?string
  845.     {
  846.         return $this->alergias;
  847.     }
  848.     public function setAlergias(?string $alergias): self
  849.     {
  850.         $this->alergias $alergias;
  851.         return $this;
  852.     }
  853.     /**
  854.      * @return Collection|ExamenOrden[]
  855.      */
  856.     public function getExamenOrdens(): Collection
  857.     {
  858.         return $this->examenOrdens;
  859.     }
  860.     public function addExamenOrden(ExamenOrden $examenOrden): self
  861.     {
  862.         if (!$this->examenOrdens->contains($examenOrden)) {
  863.             $this->examenOrdens[] = $examenOrden;
  864.             $examenOrden->setPaciente($this);
  865.         }
  866.         return $this;
  867.     }
  868.     public function removeExamenOrden(ExamenOrden $examenOrden): self
  869.     {
  870.         if ($this->examenOrdens->removeElement($examenOrden)) {
  871.             // set the owning side to null (unless already changed)
  872.             if ($examenOrden->getPaciente() === $this) {
  873.                 $examenOrden->setPaciente(null);
  874.             }
  875.         }
  876.         return $this;
  877.     }
  878.     public function getMedicacion(): ?string
  879.     {
  880.         return $this->medicacion;
  881.     }
  882.     public function setMedicacion(?string $medicacion): self
  883.     {
  884.         $this->medicacion $medicacion;
  885.         return $this;
  886.     }
  887.     public function getAgo(): ?string
  888.     {
  889.         return $this->ago;
  890.     }
  891.     public function setAgo(?string $ago): self
  892.     {
  893.         $this->ago $ago;
  894.         return $this;
  895.     }
  896.     public function getFum(): ?string
  897.     {
  898.         return $this->fum;
  899.     }
  900.     public function setFum(?string $fum): self
  901.     {
  902.         $this->fum $fum;
  903.         return $this;
  904.     }
  905.     /**
  906.      * @return Collection|Orden012[]
  907.      */
  908.     public function getOrden012s(): Collection
  909.     {
  910.         return $this->orden012s;
  911.     }
  912.     public function addOrden012(Orden012 $orden012): self
  913.     {
  914.         if (!$this->orden012s->contains($orden012)) {
  915.             $this->orden012s[] = $orden012;
  916.             $orden012->setPaciente($this);
  917.         }
  918.         return $this;
  919.     }
  920.     public function removeOrden012(Orden012 $orden012): self
  921.     {
  922.         if ($this->orden012s->removeElement($orden012)) {
  923.             // set the owning side to null (unless already changed)
  924.             if ($orden012->getPaciente() === $this) {
  925.                 $orden012->setPaciente(null);
  926.             }
  927.         }
  928.         return $this;
  929.     }
  930.     public function getGesta(): ?string
  931.     {
  932.         return $this->gesta;
  933.     }
  934.     public function setGesta(?string $gesta): self
  935.     {
  936.         $this->gesta $gesta;
  937.         return $this;
  938.     }
  939.     public function getAbo(): ?string
  940.     {
  941.         return $this->abo;
  942.     }
  943.     public function setAbo(?string $abo): self
  944.     {
  945.         $this->abo $abo;
  946.         return $this;
  947.     }
  948.     public function getPara(): ?string
  949.     {
  950.         return $this->para;
  951.     }
  952.     public function setPara(?string $para): self
  953.     {
  954.         $this->para $para;
  955.         return $this;
  956.     }
  957.     public function getCesa(): ?string
  958.     {
  959.         return $this->cesa;
  960.     }
  961.     public function setCesa(?string $cesa): self
  962.     {
  963.         $this->cesa $cesa;
  964.         return $this;
  965.     }
  966.     /**
  967.      * @return Collection|Interconsulta[]
  968.      */
  969.     public function getInterconsultas(): Collection
  970.     {
  971.         return $this->interconsultas;
  972.     }
  973.     public function addInterconsulta(Interconsulta $interconsulta): self
  974.     {
  975.         if (!$this->interconsultas->contains($interconsulta)) {
  976.             $this->interconsultas[] = $interconsulta;
  977.             $interconsulta->setPaciente($this);
  978.         }
  979.         return $this;
  980.     }
  981.     public function removeInterconsulta(Interconsulta $interconsulta): self
  982.     {
  983.         if ($this->interconsultas->removeElement($interconsulta)) {
  984.             // set the owning side to null (unless already changed)
  985.             if ($interconsulta->getPaciente() === $this) {
  986.                 $interconsulta->setPaciente(null);
  987.             }
  988.         }
  989.         return $this;
  990.     }
  991.     public function getProvinciaResidencia(): ?string
  992.     {
  993.         return $this->provincia_residencia;
  994.     }
  995.     public function setProvinciaResidencia(?string $provincia_residencia): self
  996.     {
  997.         $this->provincia_residencia $provincia_residencia;
  998.         return $this;
  999.     }
  1000.     public function getParroquiaResidencia(): ?string
  1001.     {
  1002.         return $this->parroquia_residencia;
  1003.     }
  1004.     public function setParroquiaResidencia(?string $parroquia_residencia): self
  1005.     {
  1006.         $this->parroquia_residencia $parroquia_residencia;
  1007.         return $this;
  1008.     }
  1009.     public function getPais(): ?string
  1010.     {
  1011.         return $this->pais;
  1012.     }
  1013.     public function setPais(?string $pais): self
  1014.     {
  1015.         $this->pais $pais;
  1016.         return $this;
  1017.     }
  1018.     public function getCedulaJpg(): ?string
  1019.     {
  1020.         return $this->cedula_jpg;
  1021.     }
  1022.     public function setCedulaJpg(?string $cedula_jpg): self
  1023.     {
  1024.         $this->cedula_jpg $cedula_jpg;
  1025.         return $this;
  1026.     }
  1027.     
  1028.     public function getTipoFirma(): ?bool
  1029.     {
  1030.         return $this->tipo_firma;
  1031.     }
  1032.     public function setTipoFirma(bool $tipo_firma): self
  1033.     {
  1034.         $this->tipo_firma $tipo_firma;
  1035.         return $this;
  1036.     }
  1037.     /**
  1038.      * @return Collection|HdSolicitud[]
  1039.      */
  1040.     public function getHdSolicituds(): Collection
  1041.     {
  1042.         return $this->hdSolicituds;
  1043.     }
  1044.     public function addHdSolicitud(HdSolicitud $hdSolicitud): self
  1045.     {
  1046.         if (!$this->hdSolicituds->contains($hdSolicitud)) {
  1047.             $this->hdSolicituds[] = $hdSolicitud;
  1048.             $hdSolicitud->setPaciente($this);
  1049.         }
  1050.         return $this;
  1051.     }
  1052.     public function removeHdSolicitud(HdSolicitud $hdSolicitud): self
  1053.     {
  1054.         if ($this->hdSolicituds->removeElement($hdSolicitud)) {
  1055.             // set the owning side to null (unless already changed)
  1056.             if ($hdSolicitud->getPaciente() === $this) {
  1057.                 $hdSolicitud->setPaciente(null);
  1058.             }
  1059.         }
  1060.         return $this;
  1061.     }
  1062.     public function getBarrio(): ?string
  1063.     {
  1064.         return $this->barrio;
  1065.     }
  1066.     public function setBarrio(string $barrio): self
  1067.     {
  1068.         $this->barrio $barrio;
  1069.         return $this;
  1070.     }
  1071.     public function getCanton(): ?string
  1072.     {
  1073.         return $this->canton;
  1074.     }
  1075.     public function setCanton(string $canton): self
  1076.     {
  1077.         $this->canton $canton;
  1078.         return $this;
  1079.     }
  1080.     public function getZona(): ?string
  1081.     {
  1082.         return $this->zona;
  1083.     }
  1084.     public function setZona(string $zona): self
  1085.     {
  1086.         $this->zona $zona;
  1087.         return $this;
  1088.     }
  1089.     public function getGrupoCultural(): ?string
  1090.     {
  1091.         return $this->grupo_cultural;
  1092.     }
  1093.     public function setGrupoCultural(string $grupo_cultural): self
  1094.     {
  1095.         $this->grupo_cultural $grupo_cultural;
  1096.         return $this;
  1097.     }
  1098.     public function getInstruccion(): ?string
  1099.     {
  1100.         return $this->instruccion;
  1101.     }
  1102.     public function setInstruccion(?string $instruccion): self
  1103.     {
  1104.         $this->instruccion $instruccion;
  1105.         return $this;
  1106.     }
  1107.     public function getOcupacion(): ?string
  1108.     {
  1109.         return $this->ocupacion;
  1110.     }
  1111.     public function setOcupacion(?string $ocupacion): self
  1112.     {
  1113.         $this->ocupacion $ocupacion;
  1114.         return $this;
  1115.     }
  1116.     public function getEmpresa(): ?string
  1117.     {
  1118.         return $this->empresa;
  1119.     }
  1120.     public function setEmpresa(?string $empresa): self
  1121.     {
  1122.         $this->empresa $empresa;
  1123.         return $this;
  1124.     }
  1125.     public function getApfAlergico(): ?string
  1126.     {
  1127.         return $this->apf_alergico;
  1128.     }
  1129.     public function setApfAlergico(?string $apf_alergico): self
  1130.     {
  1131.         $this->apf_alergico $apf_alergico;
  1132.         return $this;
  1133.     }
  1134.     public function getApfClinico(): ?string
  1135.     {
  1136.         return $this->apf_clinico;
  1137.     }
  1138.     public function setApfClinico(?string $apf_clinico): self
  1139.     {
  1140.         $this->apf_clinico $apf_clinico;
  1141.         return $this;
  1142.     }
  1143.     public function getApfGinecolo(): ?string
  1144.     {
  1145.         return $this->apf_ginecolo;
  1146.     }
  1147.     public function setApfGinecolo(?string $apf_ginecolo): self
  1148.     {
  1149.         $this->apf_ginecolo $apf_ginecolo;
  1150.         return $this;
  1151.     }
  1152.     public function getApfTrauma(): ?string
  1153.     {
  1154.         return $this->apf_trauma;
  1155.     }
  1156.     public function setApfTrauma(?string $apf_trauma): self
  1157.     {
  1158.         $this->apf_trauma $apf_trauma;
  1159.         return $this;
  1160.     }
  1161.     public function getApfQuirur(): ?string
  1162.     {
  1163.         return $this->apf_quirur;
  1164.     }
  1165.     public function setApfQuirur(?string $apf_quirur): self
  1166.     {
  1167.         $this->apf_quirur $apf_quirur;
  1168.         return $this;
  1169.     }
  1170.     public function getApfFarma(): ?string
  1171.     {
  1172.         return $this->apf_farma;
  1173.     }
  1174.     public function setApfFarma(?string $apf_farma): self
  1175.     {
  1176.         $this->apf_farma $apf_farma;
  1177.         return $this;
  1178.     }
  1179.     public function getApfPsiquia(): ?string
  1180.     {
  1181.         return $this->apf_psiquia;
  1182.     }
  1183.     public function setApfPsiquia(?string $apf_psiquia): self
  1184.     {
  1185.         $this->apf_psiquia $apf_psiquia;
  1186.         return $this;
  1187.     }
  1188.     public function getApfOtro(): ?string
  1189.     {
  1190.         return $this->apf_otro;
  1191.     }
  1192.     public function setApfOtro(?string $apf_otro): self
  1193.     {
  1194.         $this->apf_otro $apf_otro;
  1195.         return $this;
  1196.     }
  1197.     public function getDireccionFamiliar(): ?string
  1198.     {
  1199.         return $this->direccion_familiar;
  1200.     }
  1201.     public function setDireccionFamiliar(?string $direccion_familiar): self
  1202.     {
  1203.         $this->direccion_familiar $direccion_familiar;
  1204.         return $this;
  1205.     }
  1206.     
  1207.      public function getCedulaMama(): ?string
  1208.     {
  1209.         return $this->cedula_mama;
  1210.     }
  1211.     public function setCedulaMama(?string $cedula_mama): self
  1212.     {
  1213.         $this->cedula_mama $cedula_mama;
  1214.         return $this;
  1215.     }
  1216.     public function getCedulaPapa(): ?string
  1217.     {
  1218.         return $this->cedula_papa;
  1219.     }
  1220.     public function setCedulaPapa(?string $cedula_papa): self
  1221.     {
  1222.         $this->cedula_papa $cedula_papa;
  1223.         return $this;
  1224.     }
  1225.     
  1226.     public function getRecomendacion(): ?string
  1227.     {
  1228.         return $this->recomendacion;
  1229.     }
  1230.     public function setRecomendacion(?string $recomendacion): self
  1231.     {
  1232.         $this->recomendacion $recomendacion;
  1233.         return $this;
  1234.     }
  1235.     
  1236.     public function getAlias(): ?string
  1237.     {
  1238.         return $this->alias;
  1239.     }
  1240.     public function setAlias(?string $alias): self
  1241.     {
  1242.         $this->alias $alias;
  1243.         return $this;
  1244.     }
  1245.     
  1246.     public function getHijos(): ?string
  1247.     {
  1248.         return $this->hijos;
  1249.     }
  1250.     public function setHijos(string $hijos): self
  1251.     {
  1252.         $this->hijos $hijos;
  1253.         return $this;
  1254.     }
  1255.     
  1256.     public function getRegion(): ?string
  1257.     {
  1258.         return $this->region;
  1259.     }
  1260.     public function setRegion(?string $region): self
  1261.     {
  1262.         $this->region $region;
  1263.         return $this;
  1264.     }
  1265.     
  1266.     public function getContrato(): ?string
  1267.     {
  1268.         return $this->contrato;
  1269.     }
  1270.     public function setContrato(?string $contrato): self
  1271.     {
  1272.         $this->contrato $contrato;
  1273.         return $this;
  1274.     }
  1275.     
  1276.     public function getOrdenProcedimientos(): Collection
  1277.     {
  1278.         $criteria Criteria::create()
  1279.             ->andWhere(Criteria::expr()->eq('estado''1'))
  1280.             //->orderBy(['createdAt' => 'DESC'])
  1281.         ;
  1282.         
  1283.         return $this->ordenProcedimientos->matching($criteria);
  1284.     }
  1285.     
  1286.     public function getRecomendado(): ?User
  1287.     {
  1288.         return $this->recomendado;
  1289.     }
  1290.     public function setRecomendado(?User $recomendado): self
  1291.     {
  1292.         $this->recomendado $recomendado;
  1293.         return $this;
  1294.     }
  1295.     
  1296.     public function getRedsocial(): ?RedSocial
  1297.     {
  1298.         return $this->redsocial;
  1299.     }
  1300.     public function setRedsocial(?RedSocial $redsocial): self
  1301.     {
  1302.         $this->redsocial $redsocial;
  1303.         return $this;
  1304.     }
  1305.     
  1306.     public function getSaludProducto(): ?string
  1307.     {
  1308.         return $this->salud_producto;
  1309.     }
  1310.     public function setSaludProducto(?string $salud_producto): self
  1311.     {
  1312.         $this->salud_producto $salud_producto;
  1313.         return $this;
  1314.     }
  1315.     
  1316.     public function getSaludNropersona(): ?string
  1317.     {
  1318.         return $this->salud_nropersona;
  1319.     }
  1320.     public function setSaludNropersona(?string $salud_nropersona): self
  1321.     {
  1322.         $this->salud_nropersona $salud_nropersona;
  1323.         return $this;
  1324.     }
  1325.     
  1326.     public function getSaludNivel(): ?string
  1327.     {
  1328.         return $this->salud_nivel;
  1329.     }
  1330.     public function setSaludNivel(?string $salud_nivel): self
  1331.     {
  1332.         $this->salud_nivel $salud_nivel;
  1333.         return $this;
  1334.     }
  1335.     
  1336.     public function getObservacion(): ?string
  1337.     {
  1338.         return $this->observacion;
  1339.     }
  1340.     public function setObservacion(?string $observacion): self
  1341.     {
  1342.         $this->observacion $observacion;
  1343.         return $this;
  1344.     }
  1345.     
  1346.     public function getPacienteEndoscopias(): ?string
  1347.     {
  1348.         return $this->paciente_endoscopias;
  1349.     }
  1350.     public function setPacienteEndoscopias(?string $paciente_endoscopias): self
  1351.     {
  1352.         $this->paciente_endoscopias $paciente_endoscopias;
  1353.         return $this;
  1354.     }
  1355.     
  1356.     public function getPacienteBariatrico(): ?string
  1357.     {
  1358.         return $this->paciente_bariatrico;
  1359.     }
  1360.     public function setPacienteBariatrico(?string $paciente_bariatrico): self
  1361.     {
  1362.         $this->paciente_bariatrico $paciente_bariatrico;
  1363.         return $this;
  1364.     }
  1365.     
  1366. }