Ejemplo n.º 1
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param object $copyObj An object of Agenda (or compatible) type.
  * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
  * @throws PropelException
  */
 public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
 {
     $copyObj->setProgramacion($this->getProgramacion());
     $copyObj->setFechaestado($this->getFechaestado());
     $copyObj->setHora($this->getHora());
     $copyObj->setHoraestado($this->getHoraestado());
     $copyObj->setInicio($this->getInicio());
     $copyObj->setLastTime($this->getLastTime());
     $copyObj->setIngreso($this->getIngreso());
     $copyObj->setSalaId($this->getSalaId());
     $copyObj->setQuirofanoId($this->getQuirofanoId());
     $copyObj->setEgreso($this->getEgreso());
     $copyObj->setCie9mc($this->getCie9mc());
     $copyObj->setCie9mcId($this->getCie9mcId());
     $copyObj->setCxRealizada($this->getCxRealizada());
     $copyObj->setCxRealizadaId($this->getCxRealizadaId());
     $copyObj->setTipoCx($this->getTipoCx());
     $copyObj->setDiagnostico($this->getDiagnostico());
     $copyObj->setDiagnosticoId($this->getDiagnosticoId());
     $copyObj->setMedicoName($this->getMedicoName());
     $copyObj->setPacienteName($this->getPacienteName());
     $copyObj->setPacienteId($this->getPacienteId());
     $copyObj->setEdad($this->getEdad());
     $copyObj->setGenero($this->getGenero());
     $copyObj->setGeneroId($this->getGeneroId());
     $copyObj->setRegistro($this->getRegistro());
     $copyObj->setServicio($this->getServicio());
     $copyObj->setAnestesiaId($this->getAnestesiaId());
     $copyObj->setAnestesiaEmpleada($this->getAnestesiaEmpleada());
     $copyObj->setEvAdversosAnestesia($this->getEvAdversosAnestesia());
     $copyObj->setObservaciones($this->getObservaciones());
     $copyObj->setRequerimiento($this->getRequerimiento());
     $copyObj->setReqInsumos($this->getReqInsumos());
     $copyObj->setReqHemoderiv($this->getReqHemoderiv());
     $copyObj->setReqLaboratorio($this->getReqLaboratorio());
     $copyObj->setReqAnestesico($this->getReqAnestesico());
     $copyObj->setStatus($this->getStatus());
     $copyObj->setCausaDiferidoId($this->getCausaDiferidoId());
     $copyObj->setSolicitado($this->getSolicitado());
     $copyObj->setRiesgoqxId($this->getRiesgoqxId());
     $copyObj->setContaminacionqxId($this->getContaminacionqxId());
     $copyObj->setEventoqxId($this->getEventoqxId());
     $copyObj->setComplicaciones($this->getComplicaciones());
     $copyObj->setValPreAnestesica($this->getValPreAnestesica());
     $copyObj->setReintervencion($this->getReintervencion());
     $copyObj->setPermisos($this->getPermisos());
     $copyObj->setTipoProcId($this->getTipoProcId());
     $copyObj->setAtencionId($this->getAtencionId());
     $copyObj->setTiempoFuera($this->getTiempoFuera());
     $copyObj->setProcedencia($this->getProcedencia());
     $copyObj->setClasificacionqx($this->getClasificacionqx());
     $copyObj->setRegionPx($this->getRegionPx());
     $copyObj->setExtensionPx($this->getExtensionPx());
     $copyObj->setAnexoDetalle($this->getAnexoDetalle());
     $copyObj->setDestinoPx($this->getDestinoPx());
     $copyObj->setLiberacionSala($this->getLiberacionSala());
     $copyObj->setTiempoEst($this->getTiempoEst());
     $copyObj->setRiesgoQxPre($this->getRiesgoQxPre());
     $copyObj->setShowInIndex($this->getShowInIndex());
     $copyObj->setProtocolo($this->getProtocolo());
     $copyObj->setCancelada($this->getCancelada());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setUpdatedAt($this->getUpdatedAt());
     if ($deepCopy && !$this->startCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         // store object hash to prevent cycle
         $this->startCopy = true;
         foreach ($this->getPersonalcirugias() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPersonalcirugia($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getDiagnosticocirugias() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addDiagnosticocirugia($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getProcedimientocirugias() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addProcedimientocirugia($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getProcedimientregrogramados() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addProcedimientregrogramado($relObj->copy($deepCopy));
             }
         }
         //unflag object copy
         $this->startCopy = false;
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
Ejemplo n.º 2
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param object $copyObj An object of Especialidad (or compatible) type.
  * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
  * @throws PropelException
  */
 public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
 {
     $copyObj->setNombre($this->getNombre());
     $copyObj->setMedica($this->getMedica());
     $copyObj->setQuirurgica($this->getQuirurgica());
     $copyObj->setActivo($this->getActivo());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setTreeLeft($this->getTreeLeft());
     $copyObj->setTreeRight($this->getTreeRight());
     $copyObj->setTreeLevel($this->getTreeLevel());
     $copyObj->setTreeScope($this->getTreeScope());
     if ($deepCopy && !$this->startCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         // store object hash to prevent cycle
         $this->startCopy = true;
         foreach ($this->getAgendas() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addAgenda($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getProcedimientocirugias() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addProcedimientocirugia($relObj->copy($deepCopy));
             }
         }
         //unflag object copy
         $this->startCopy = false;
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }