/** * 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 Visit (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setPatientId($this->patient_id); $copyObj->setDoctorId($this->doctor_id); $copyObj->setWardBedId($this->ward_bed_id); $copyObj->setWardDocId($this->ward_doc_id); $copyObj->setRoomId($this->room_id); $copyObj->setVisitType($this->visit_type); $copyObj->setBp($this->bp); $copyObj->setTemp($this->temp); $copyObj->setPulse($this->pulse); $copyObj->setDiet($this->diet); $copyObj->setDescription($this->description); $copyObj->setTime($this->time); $copyObj->setVisitDate($this->visit_date); $copyObj->setAdmitDate($this->admit_date); $copyObj->setDischargeDate($this->discharge_date); $copyObj->setFee($this->fee); $copyObj->setFeePaid($this->fee_paid); $copyObj->setStatus($this->status); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getLabReports() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLabReport($relObj->copy($deepCopy)); } } foreach ($this->getVisitMedicines() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addVisitMedicine($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }
/** * 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 Dosage (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setTitle($this->title); $copyObj->setStatus($this->status); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getVisitMedicines() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addVisitMedicine($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }
/** * 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 Patient (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setIdNumber($this->id_number); $copyObj->setCnic($this->cnic); $copyObj->setUsername($this->username); $copyObj->setPassword($this->password); $copyObj->setName($this->name); $copyObj->setFatherName($this->father_name); $copyObj->setDob($this->dob); $copyObj->setGender($this->gender); $copyObj->setAddress($this->address); $copyObj->setContactRes($this->contact_res); $copyObj->setContactCell($this->contact_cell); $copyObj->setEmergencyContact($this->emergency_contact); $copyObj->setEmail($this->email); $copyObj->setBloodGroup($this->blood_group); $copyObj->setDisease($this->disease); $copyObj->setAllergy($this->allergy); $copyObj->setDrugAllergy($this->drug_allergy); $copyObj->setStatus($this->status); $copyObj->setCreatedAt($this->created_at); $copyObj->setUpdatedAt($this->updated_at); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getLabReports() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addLabReport($relObj->copy($deepCopy)); } } foreach ($this->getVisits() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addVisit($relObj->copy($deepCopy)); } } foreach ($this->getVisitMedicines() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addVisitMedicine($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }