private function getRealData(Disease $disease, $diseaseContentList=array()) {/*{{{*/ $res = array(); $zhuanTiInfo = ZhuanTiClient::getInstance()->getZhuaTisByDisease($disease->id); if (count($zhuanTiInfo)>1) { $res['name'] = $disease->name; $res['url'] = $disease->getUrl(); $res['date'] = date('Y-m-d', time()); $content = ""; if (isset($diseaseContentList[$disease->key])) { $content = $this->getContent($diseaseContentList[$disease->key]); } $res['content'] = $content; $res['doctorUrl'] = $disease->getDoctorUrl(); $res['zixunUrl'] = $disease->getZixunUrl(); $zhuanTi1 = array_shift($zhuanTiInfo); $zhuanTi2= array_shift($zhuanTiInfo); $res['zhuantiUrl1'] = $zhuanTi1->getUrl(); $res['zhuantiUrl2'] = $zhuanTi2->getUrl(); $res['zhuantiTitle1'] = $zhuanTi1->title; $res['zhuantiTitle2'] = $zhuanTi2->title; } BeanFinder::get('LocalCache')->removeAll(); return $res; }/*}}}*/
private function getZhuantis($request, $response) { /*{{{*/ $newZhuanTiList = PaperClient::getInstance()->queryPaperListByTag($this->space->host->id, 'Doctor'); $oldZhuanTiList = ZhuanTiClient::getInstance()->getZhuanTiByDoctorId($this->space->host->id, 50000); list($allZhuanTiCount, $zhuanTis) = CombineZhuanTi::combineZhuanTiList($oldZhuanTiList, $newZhuanTiList); $response->allZhuanTiCount = $allZhuanTiCount; $zhuanTitWithPicUrl = array(); foreach ($newZhuanTiList as $zhuanTi) { if ($zhuanTi->adpicurl != "") { $zhuanTitWithPicUrl[] = $zhuanTi; } } $response->zhuanTitWithPicUrl = array_slice($zhuanTitWithPicUrl, 0, 5); }
private function getTopicDoctorListByZhuanTi(Zhuanti $zhuanTi) {/*{{{*/ $topicList = ZhuanTiClient::getInstance()->getTopicListByKey($zhuanTi); $doctorIds = array(); foreach ($topicList as $topic) { if ($topic->doctorId > 0 && $topic->title != '') { $doctorIds[$topic->id] = $topic->doctorId; } if (count($doctorIds)>2) { break; } } $doctors = DAL::get()->find('doctor', $doctorIds); $tmpDoctors = array(); foreach ($doctorIds as $topicId => $doctorId) { $tmpDoctors[$topicId] = $doctors[$doctorId]; } $result['topicList'] = $topicList; $result['DoctorList'] = $tmpDoctors; return $result; }/*}}}*/
private function getZhuanTiListByType($cmsObjArr) {/*{{{*/ $oldZhuanTiList = ZhuanTiClient::getInstance()->getZhuanTiByDoctorId($cmsObjArr['doctorIds'],50000); $newZhuanTiList = PaperClient::getInstance()->queryPaperListByTag($cmsObjArr['entity']->id,get_Class($cmsObjArr['entity'])); return CombineZhuanTi::combineZhuanTiList($oldZhuanTiList,$newZhuanTiList); }/*}}}*/
private function updateHdfArticle($request, $response) { $doctorIds = $request->doctorids; $doctorIds = empty($doctorIds) ? array() : $doctorIds ; ZhuanTiClient::getInstance()->updateHdfArticle($request->id,$request->key, $request->title, $request->subheading, $doctorIds, $request->getUnSafeData('article_content'), $request->source); }
private function getZhuanTiListByDoctor($doctorId) {/*{{{*/ $oldZhuanTiList = ZhuanTiClient::getInstance()->getZhuanTiByDoctorId($doctorId, 10); $newZhuanTiList = PaperClient::getInstance()->queryPaperListByTag($doctorId,'Doctor'); return CombineZhuanTi::combineZhuanTiList($oldZhuanTiList,$newZhuanTiList); }/*}}}*/
private function getZhuantiListByFaculty($facultyId) {/*{{{*/ // get doctorids by facultyid $doctorIds = DAL::get()->find_id_byFacultyId('doctor', $facultyId); $oldZhuanTiList = array(); if($doctorIds) { $oldZhuanTiList = ZhuanTiClient::getInstance()->getZhuanTiByDoctorId($doctorIds, 10); } $newZhuanTiList = PaperClient::getInstance()->queryPaperListByTag($facultyId,'Faculty'); return CombineZhuanTi::combineZhuanTiList($oldZhuanTiList,$newZhuanTiList); }/*}}}*/
private function getDoctorList4ZhuanTi($list) {/*{{{*/ $zhuanTiIds = array(); foreach ($list as $key => $zhuanTi) { $zhuanTiIds[] = $zhuanTi->id; } return ZhuanTiClient::getInstance()->getZhuanTiDoctorList($zhuanTiIds); }/*}}}*/