Example #1
0
 /**
  * @param \ConsultBundle\Entity\DoctorConsultSettings $doctorConsultSettings
  *
  * @return \ConsultBundle\Entity\DoctorEntity|null
  */
 public static function getEntityFromConsultSettings(DoctorConsultSettings $doctorConsultSettings)
 {
     if (empty($doctorConsultSettings)) {
         return null;
     }
     $doctorEntity = new DoctorEntity();
     $doctorEntity->setName($doctorConsultSettings->getName());
     $doctorEntity->setProfilePicture($doctorConsultSettings->getProfilePicture());
     $doctorEntity->setSpeciality($doctorConsultSettings->getSpeciality());
     $doctorEntity->setFabricId($doctorConsultSettings->getFabricDoctorId());
     $doctorEntity->setActivated($doctorConsultSettings->isActivated());
     return $doctorEntity;
 }
Example #2
0
 /**
  * @param array $doctorQuestion
  */
 public function setDoctorFromAttributes(array $doctorQuestion)
 {
     if (!empty($doctorQuestion)) {
         $doc = new DoctorEntity();
         $doc->setName($doctorQuestion['name']);
         $doc->setSpeciality($doctorQuestion['speciality']);
         $doc->setProfilePicture($doctorQuestion['profilePicture']);
         $doc->setFabricId($doctorQuestion['doctorId']);
         $doc->setActivated($doctorQuestion['activated']);
         $this->setDoctor($doc);
     }
 }
 /**
  * @param array $docArr
  *
  * @return \ConsultBundle\Entity\DoctorEntity|null
  */
 private function populateDoctorObject(array $docArr)
 {
     if (is_null($docArr)) {
         return null;
     }
     $doc = new DoctorEntity();
     if (array_key_exists('doctor_name', $docArr)) {
         $doc->setName($docArr['doctor_name']);
     }
     if (array_key_exists('profile_picture', $docArr)) {
         $doc->setProfilePicture($docArr['profile_picture']);
     }
     if (array_key_exists('specialties', $docArr)) {
         foreach ($docArr['specialties'] as $specialties) {
             if (array_key_exists('specialty', $docArr['specialties'])) {
             }
             $doc->setSpeciality($specialties['specialty']);
         }
     }
     return $doc;
 }
Example #4
0
 /**
  * @param $practoAccountId
  *
  * @return \ConsultBundle\Entity\DoctorEntity|null
  */
 private function populateDoctorInfo($practoAccountId)
 {
     $doctor = $this->doctorManager->getConsultSettingsByPractoAccountId($practoAccountId);
     return DoctorEntity::getEntityFromConsultSettings($doctor);
 }