src/Entity/PlanoCabecera.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PlanoCabeceraRepository;
  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=PlanoCabeceraRepository::class)
  11.  * @ORM\HasLifecycleCallbacks
  12.  */
  13. class PlanoCabecera
  14. {
  15.     /**
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue()
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=20)
  23.      */
  24.     private $nombre_plano;
  25.     /**
  26.      * @ORM\Column(type="string", length=100)
  27.      */
  28.     private $nombre_pantilla;
  29.     /**
  30.      * @ORM\Column(type="boolean")
  31.      */
  32.     private $estado;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Paciente::class, inversedBy="planoCabeceras")
  35.      * @ORM\JoinColumn(nullable=false)
  36.      */
  37.     private $paciente;
  38.     /**
  39.      * @ORM\Column(type="string", length=13, nullable=true)
  40.      */
  41.     private $cedula_afiliado;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $nombre_afiliado;
  46.     /**
  47.      * @ORM\Column(type="string", length=100, nullable=true)
  48.      */
  49.     private $parentesco;
  50.     /**
  51.      * @ORM\Column(type="datetime")
  52.      */
  53.     private $created_at;
  54.     /**
  55.      * @ORM\Column(type="datetime")
  56.      */
  57.     private $updated_at;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $apellido_afiliado;
  62.     /**
  63.      * @ORM\Column(type="date")
  64.      */
  65.     private $ingreso;
  66.     /**
  67.      * @ORM\Column(type="date")
  68.      */
  69.     private $alta;
  70.     /**
  71.      * @ORM\ManyToOne(targetEntity=TipoSeguro::class, inversedBy="planoCabeceras")
  72.      * @ORM\JoinColumn(nullable=false)
  73.      */
  74.     private $tiposeguro;
  75.     /**
  76.      * @ORM\Column(type="string", length=25, nullable=true)
  77.      */
  78.     private $cobertura_compartida;
  79.     /**
  80.      * @ORM\Column(type="string", length=50, nullable=true)
  81.      */
  82.     private $presuntivo_definitivo;
  83.     /**
  84.      * @ORM\ManyToOne(targetEntity=SeguroPrivado::class, inversedBy="planoCabeceras")
  85.      * @ORM\JoinColumn(nullable=true)
  86.      */
  87.     private $seguroprivado;
  88.     /**
  89.      * @ORM\ManyToOne(targetEntity=Empresa::class, inversedBy="planoCabeceras")
  90.      * @ORM\JoinColumn(nullable=false)
  91.      */
  92.     private $empresa;
  93.     /**
  94.      * @ORM\ManyToOne(targetEntity=Dependencia::class, inversedBy="planoCabeceras")
  95.      * @ORM\JoinColumn(nullable=false)
  96.      */
  97.     private $dependencia;
  98.     /**
  99.      * @ORM\ManyToOne(targetEntity=Derivacion::class, inversedBy="planoCabeceras")
  100.      * @ORM\JoinColumn(nullable=false)
  101.      */
  102.     private $derivacion;
  103.     /**
  104.      * @ORM\OneToMany(targetEntity=PlanoDetalle::class, mappedBy="planocabecera")
  105.      */
  106.     private $planoDetalles;
  107.     /**
  108.      * @ORM\Column(type="string", length=10)
  109.      */
  110.     private $iess_msp;
  111.     /**
  112.      * @ORM\Column(type="string", length=10)
  113.      */
  114.     private $cie10;
  115.     /**
  116.      * @ORM\Column(type="string", length=255)
  117.      */
  118.     private $cie10_txt;
  119.     /**
  120.      * @ORM\Column(type="string", length=10, nullable=true)
  121.      */
  122.     private $cie10_2;
  123.     /**
  124.      * @ORM\Column(type="string", length=255, nullable=true)
  125.      */
  126.     private $cie10_txt_2;
  127.     /**
  128.      * @ORM\Column(type="string", length=10, nullable=true)
  129.      */
  130.     private $cie10_3;
  131.     /**
  132.      * @ORM\Column(type="string", length=255, nullable=true)
  133.      */
  134.     private $cie10_txt_3;
  135.     /**
  136.      * @ORM\Column(type="string", length=50, nullable=true)
  137.      */
  138.     private $pres_def_2;
  139.     /**
  140.      * @ORM\Column(type="string", length=50, nullable=true)
  141.      */
  142.     private $pres_def_3;
  143.     /**
  144.      * @ORM\Column(type="string", length=50)
  145.      */
  146.     private $tipo_consulta;
  147.     /**
  148.      * @ORM\Column(type="string", length=50)
  149.      */
  150.     private $ip_crea;
  151.     /**
  152.      * @ORM\Column(type="string", length=50)
  153.      */
  154.     private $ip_modifica;
  155.     /**
  156.      * @ORM\Column(type="integer")
  157.      */
  158.     private $user_crea;
  159.     /**
  160.      * @ORM\Column(type="integer")
  161.      */
  162.     private $user_modifica;
  163.     /**
  164.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="planoCabeceras")
  165.      */
  166.     private $doctor;
  167.     /**
  168.      * @ORM\ManyToOne(targetEntity=HistoriaClinica::class, inversedBy="planoCabeceras")
  169.      */
  170.     private $historia;
  171.     public function __construct()
  172.     {
  173.         $this->planoDetalles = new ArrayCollection();
  174.         $this->ingreso = new \DateTime();
  175.         $this->alta = new \DateTime();
  176.     }
  177.     public function getId(): ?int
  178.     {
  179.         return $this->id;
  180.     }
  181.     public function getNombrePlano(): ?string
  182.     {
  183.         return $this->nombre_plano;
  184.     }
  185.     public function setNombrePlano(string $nombre_plano): self
  186.     {
  187.         $this->nombre_plano $nombre_plano;
  188.         return $this;
  189.     }
  190.     public function getNombrePantilla(): ?string
  191.     {
  192.         return $this->nombre_pantilla;
  193.     }
  194.     public function setNombrePantilla(string $nombre_pantilla): self
  195.     {
  196.         $this->nombre_pantilla $nombre_pantilla;
  197.         return $this;
  198.     }
  199.     public function getEstado(): ?bool
  200.     {
  201.         return $this->estado;
  202.     }
  203.     public function setEstado(bool $estado): self
  204.     {
  205.         $this->estado $estado;
  206.         return $this;
  207.     }
  208.     public function getPaciente(): ?Paciente
  209.     {
  210.         return $this->paciente;
  211.     }
  212.     public function setPaciente(?Paciente $paciente): self
  213.     {
  214.         $this->paciente $paciente;
  215.         return $this;
  216.     }
  217.     public function getCreatedAt(): ?\DateTimeInterface
  218.     {
  219.         return $this->created_at;
  220.     }
  221.     public function setCreatedAt(\DateTimeInterface $created_at): self
  222.     {
  223.         $this->created_at $created_at;
  224.         return $this;
  225.     }
  226.     public function getUpdatedAt(): ?\DateTimeInterface
  227.     {
  228.         return $this->updated_at;
  229.     }
  230.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  231.     {
  232.         $this->updated_at $updated_at;
  233.         return $this;
  234.     }
  235.     /**
  236.      * @ORM\PrePersist
  237.      * @ORM\PreUpdate
  238.      */
  239.     public function updatedTimestamps(): void
  240.     {
  241.         $dateTimeNow = new DateTime('now');
  242.         $this->setUpdatedAt($dateTimeNow);
  243.         if ($this->getCreatedAt() === null) {
  244.             $this->setCreatedAt($dateTimeNow);
  245.         }
  246.     }
  247.     public function getCedulaAfiliado(): ?string
  248.     {
  249.         return $this->cedula_afiliado;
  250.     }
  251.     public function setCedulaAfiliado(?string $cedula_afiliado): self
  252.     {
  253.         $this->cedula_afiliado $cedula_afiliado;
  254.         return $this;
  255.     }
  256.     public function getNombreAfiliado(): ?string
  257.     {
  258.         return $this->nombre_afiliado;
  259.     }
  260.     public function setNombreAfiliado(?string $nombre_afiliado): self
  261.     {
  262.         $this->nombre_afiliado $nombre_afiliado;
  263.         return $this;
  264.     }
  265.     public function getParentesco(): ?string
  266.     {
  267.         return $this->parentesco;
  268.     }
  269.     public function setParentesco(?string $parentesco): self
  270.     {
  271.         $this->parentesco $parentesco;
  272.         return $this;
  273.     }
  274.     public function getApellidoAfiliado(): ?string
  275.     {
  276.         return $this->apellido_afiliado;
  277.     }
  278.     public function setApellidoAfiliado(?string $apellido_afiliado): self
  279.     {
  280.         $this->apellido_afiliado $apellido_afiliado;
  281.         return $this;
  282.     }
  283.     public function getIngreso(): ?\DateTimeInterface
  284.     {
  285.         return $this->ingreso;
  286.     }
  287.     public function setIngreso(\DateTimeInterface $ingreso): self
  288.     {
  289.         $this->ingreso $ingreso;
  290.         return $this;
  291.     }
  292.     public function getAlta(): ?\DateTimeInterface
  293.     {
  294.         return $this->alta;
  295.     }
  296.     public function setAlta(\DateTimeInterface $alta): self
  297.     {
  298.         $this->alta $alta;
  299.         return $this;
  300.     }
  301.     public function getTiposeguro(): ?TipoSeguro
  302.     {
  303.         return $this->tiposeguro;
  304.     }
  305.     public function setTiposeguro(?TipoSeguro $tiposeguro): self
  306.     {
  307.         $this->tiposeguro $tiposeguro;
  308.         return $this;
  309.     }
  310.     public function getCoberturaCompartida(): ?string
  311.     {
  312.         return $this->cobertura_compartida;
  313.     }
  314.     public function setCoberturaCompartida(?string $cobertura_compartida): self
  315.     {
  316.         $this->cobertura_compartida $cobertura_compartida;
  317.         return $this;
  318.     }
  319.     public function getPresuntivoDefinitivo(): ?string
  320.     {
  321.         return $this->presuntivo_definitivo;
  322.     }
  323.     public function setPresuntivoDefinitivo(?string $presuntivo_definitivo): self
  324.     {
  325.         $this->presuntivo_definitivo $presuntivo_definitivo;
  326.         return $this;
  327.     }
  328.     public function getSeguroprivado(): ?SeguroPrivado
  329.     {
  330.         return $this->seguroprivado;
  331.     }
  332.     public function setSeguroprivado(?SeguroPrivado $seguroprivado): self
  333.     {
  334.         $this->seguroprivado $seguroprivado;
  335.         return $this;
  336.     }
  337.     public function getEmpresa(): ?Empresa
  338.     {
  339.         return $this->empresa;
  340.     }
  341.     public function setEmpresa(?Empresa $empresa): self
  342.     {
  343.         $this->empresa $empresa;
  344.         return $this;
  345.     }
  346.     public function getDependencia(): ?Dependencia
  347.     {
  348.         return $this->dependencia;
  349.     }
  350.     public function setDependencia(?Dependencia $dependencia): self
  351.     {
  352.         $this->dependencia $dependencia;
  353.         return $this;
  354.     }
  355.     public function getDerivacion(): ?Derivacion
  356.     {
  357.         return $this->derivacion;
  358.     }
  359.     public function setDerivacion(?Derivacion $derivacion): self
  360.     {
  361.         $this->derivacion $derivacion;
  362.         return $this;
  363.     }
  364.     /**
  365.      * @return Collection|PlanoDetalle[]
  366.      */
  367.     public function getPlanoDetalles(): Collection
  368.     {
  369.         return $this->planoDetalles;
  370.     }
  371.     
  372.     public function getPlanoDetalles_iva()
  373.     {
  374.         $criteria Criteria::create()
  375.             ->andWhere(Criteria::expr()->eq('iva'0.12))
  376.         ;
  377.         return $this->planoDetalles->matching($criteria);
  378.     }
  379.     public function addPlanoDetalle(PlanoDetalle $planoDetalle): self
  380.     {
  381.         if (!$this->planoDetalles->contains($planoDetalle)) {
  382.             $this->planoDetalles[] = $planoDetalle;
  383.             $planoDetalle->setPlanocabecera($this);
  384.         }
  385.         return $this;
  386.     }
  387.     public function removePlanoDetalle(PlanoDetalle $planoDetalle): self
  388.     {
  389.         if ($this->planoDetalles->contains($planoDetalle)) {
  390.             $this->planoDetalles->removeElement($planoDetalle);
  391.             // set the owning side to null (unless already changed)
  392.             if ($planoDetalle->getPlanocabecera() === $this) {
  393.                 $planoDetalle->setPlanocabecera(null);
  394.             }
  395.         }
  396.         return $this;
  397.     }
  398.     public function getIessMsp(): ?string
  399.     {
  400.         return $this->iess_msp;
  401.     }
  402.     public function setIessMsp(string $iess_msp): self
  403.     {
  404.         $this->iess_msp $iess_msp;
  405.         return $this;
  406.     }
  407.     public function getCie10(): ?string
  408.     {
  409.         return $this->cie10;
  410.     }
  411.     public function setCie10(string $cie10): self
  412.     {
  413.         $this->cie10 $cie10;
  414.         return $this;
  415.     }
  416.     public function getCie10Txt(): ?string
  417.     {
  418.         return $this->cie10_txt;
  419.     }
  420.     public function setCie10Txt(string $cie10_txt): self
  421.     {
  422.         $this->cie10_txt $cie10_txt;
  423.         return $this;
  424.     }
  425.     public function getCie102(): ?string
  426.     {
  427.         return $this->cie10_2;
  428.     }
  429.     public function setCie102(?string $cie10_2): self
  430.     {
  431.         $this->cie10_2 $cie10_2;
  432.         return $this;
  433.     }
  434.     public function getCie10Txt2(): ?string
  435.     {
  436.         return $this->cie10_txt_2;
  437.     }
  438.     public function setCie10Txt2(?string $cie10_txt_2): self
  439.     {
  440.         $this->cie10_txt_2 $cie10_txt_2;
  441.         return $this;
  442.     }
  443.     public function getCie103(): ?string
  444.     {
  445.         return $this->cie10_3;
  446.     }
  447.     public function setCie103(?string $cie10_3): self
  448.     {
  449.         $this->cie10_3 $cie10_3;
  450.         return $this;
  451.     }
  452.     public function getCie10Txt3(): ?string
  453.     {
  454.         return $this->cie10_txt_3;
  455.     }
  456.     public function setCie10Txt3(?string $cie10_txt_3): self
  457.     {
  458.         $this->cie10_txt_3 $cie10_txt_3;
  459.         return $this;
  460.     }
  461.     public function getPresDef2(): ?string
  462.     {
  463.         return $this->pres_def_2;
  464.     }
  465.     public function setPresDef2(?string $pres_def_2): self
  466.     {
  467.         $this->pres_def_2 $pres_def_2;
  468.         return $this;
  469.     }
  470.     public function getPresDef3(): ?string
  471.     {
  472.         return $this->pres_def_3;
  473.     }
  474.     public function setPresDef3(?string $pres_def_3): self
  475.     {
  476.         $this->pres_def_3 $pres_def_3;
  477.         return $this;
  478.     }
  479.     public function getTipoConsulta(): ?string
  480.     {
  481.         return $this->tipo_consulta;
  482.     }
  483.     public function setTipoConsulta(string $tipo_consulta): self
  484.     {
  485.         $this->tipo_consulta $tipo_consulta;
  486.         return $this;
  487.     }
  488.     public function getIpCrea(): ?string
  489.     {
  490.         return $this->ip_crea;
  491.     }
  492.     public function setIpCrea(string $ip_crea): self
  493.     {
  494.         $this->ip_crea $ip_crea;
  495.         return $this;
  496.     }
  497.     public function getIpModifica(): ?string
  498.     {
  499.         return $this->ip_modifica;
  500.     }
  501.     public function setIpModifica(string $ip_modifica): self
  502.     {
  503.         $this->ip_modifica $ip_modifica;
  504.         return $this;
  505.     }
  506.     public function getUserCrea(): ?int
  507.     {
  508.         return $this->user_crea;
  509.     }
  510.     public function setUserCrea(int $user_crea): self
  511.     {
  512.         $this->user_crea $user_crea;
  513.         return $this;
  514.     }
  515.     public function getUserModifica(): ?int
  516.     {
  517.         return $this->user_modifica;
  518.     }
  519.     public function setUserModifica(int $user_modifica): self
  520.     {
  521.         $this->user_modifica $user_modifica;
  522.         return $this;
  523.     }
  524.     public function getDoctor(): ?User
  525.     {
  526.         return $this->doctor;
  527.     }
  528.     public function setDoctor(?User $doctor): self
  529.     {
  530.         $this->doctor $doctor;
  531.         return $this;
  532.     }
  533.     public function getHistoria(): ?HistoriaClinica
  534.     {
  535.         return $this->historia;
  536.     }
  537.     public function setHistoria(?HistoriaClinica $historia): self
  538.     {
  539.         $this->historia $historia;
  540.         return $this;
  541.     }
  542. }