示例#1
0
 /**
  * Internal function to return a article details object from a row.
  * @param $row array
  * @return ArticleDetails object
  */
 function &_returnArticleDetailsFromRow(&$row)
 {
     $articleDetails = new ArticleDetails();
     $articleDetails->setArticleId($row['article_id']);
     $articleDetails->setProtocolVersion($row['protocol_version']);
     $articleDetails->setTherapeuticArea($row['therapeutic_area']);
     $articleDetails->setHealthCondDisease($row['healthcond_disease']);
     $articleDetails->setMinAgeNum($row['min_age_num']);
     $articleDetails->setMinAgeUnit($row['min_age_unit']);
     $articleDetails->setMaxAgeNum($row['max_age_num']);
     $articleDetails->setMaxAgeUnit($row['max_age_unit']);
     $articleDetails->setSex($row['sex']);
     $articleDetails->setHealthy($row['healthy']);
     $articleDetails->setLocaleSampleSize($row['local_sample_size']);
     $articleDetails->setMultinational($row['multinational']);
     $articleDetails->setIntSampleSize($row['international_sample_size']);
     if (isset($row['enrolment_start_date'])) {
         $articleDetails->setStartDate(date("d-M-Y", strtotime($this->dateFromDB($row['enrolment_start_date']))));
     }
     if (isset($row['enrolment_end_date'])) {
         $articleDetails->setEndDate(date("d-M-Y", strtotime($this->dateFromDB($row['enrolment_end_date']))));
     }
     $articleDetails->setRecruitmentStatus($row['recruitment_status']);
     $articleDetails->setAdvertisingScheme($row['advertising_scheme']);
     $articleDetails->setCROInvolved($row['cro']);
     $articleDetails->setCompensationPolicy($row['compensation_policy']);
     HookRegistry::call('ArticleDetailsDAO::_returnArticleDetailsFromRow', array(&$articleDetails, &$row));
     return $articleDetails;
 }