private function getTelOrderAndTelVisit(Proposal $proposal) {/*{{{*/ $telOrder = current($proposal->getExecutions()); if (empty($telOrder)) { $telOrder = new NullEntity(); } $telVisit = new NullEntity(); if (false == $telOrder->isNull()) { $telVisit = DAL::get()->find_by_orderid('TelVisit', $telOrder->id); } return array($telOrder, $telVisit); }/*}}}*/
{ $dvotes = $goodVoteCount[$doctor2->id]; } } if($legalDoctor->user->isNull() == false) { $space = isset($spaceList[$legalDoctor->user->id]) ? $spaceList[$legalDoctor->user->id] : new NullEntity(); } else { $space = new NullEntity(); } $hfname = $legalDoctor->hospitalfaculty->hospital->commonName . $legalDoctor->hospitalfaculty->name; $dtitle = (string)$legalDoctor->grade? $legalDoctor->grade : ''; $dgrade = (string)$legalDoctor->educateGrade? $legalDoctor->educateGrade : ''; $dspecialilze = (string)($space->isNull() == false && $space->commonCaseNote) ? $space->commonCaseNote : $legalDoctor->specialize; $dspecialilze = XString::truncate($dspecialilze, 84); if($space->isNull() == false) { $postCount = isset($spacePostCntInfos[$space->id]) ? $spacePostCntInfos[$space->id] : 0; } ?> <tr class="gray"> <td> <table> <tr> <td class="doctorAvatar1"><a target="_blank" href="<?=$legalDoctor->getUrl()?>"><img src="<?=$legalDoctor->getSmallHeadImage()?>"></a></td> </tr> </table> <?php if(false == ($legalDoctor instanceof Doctor)){ if($space instanceof Space){?>
public function weixinSetRedirect($request, $response) {/*{{{*/ UserClient::clearSeed(); $openid = $request->openid; $weixUser = DAL::get()->find_by_openid_and_weixintype("WeixUser", $openid, WeixUser::WEIXINTYPE_PATIENT, true); $spaceId = $request->spaceId; $userId = $weixUser->userId; setcookie("WeixUserId", $weixUser->id, time()+3600*24*365*20, "/", "haodf.com"); if($userId != 0) { UserClient::getInstance()->login4Weix($weixUser->userId); setcookie("WeixUserId", $weixUser->id, time()+3600*24*365*20, "/", "haodf.com"); $patientSignin = DAL::get()->find_by_ForWeiXinSignin('PatientSignin', $spaceId, 0, $userId); } else { $patientSignin = new NullEntity(); } if($patientSignin->isNull()) { if($weixUser->userId != 0) { $url = $response->router->urlfor('weixin/checkpatient', array('userid'=>$weixUser->userId, 'spaceid'=>$spaceId, 'patientName'=>$request->patientName, 'disease'=>$request->disease)); } else { $url = $response->router->urlfor('weixin/reportinfo', array('wxUserId'=>$weixUser->id, 'spaceid'=>$spaceId)); } } else { $patientId = $patientSignin->patient->id; $attachmentIds = $patientSignin->attachmentIds; $hasPatientSigninContent = (false == empty($attachmentIds)) || ('' != trim($patientSignin->treatment)); if($hasPatientSigninContent) { $url = $response->router->urlfor('weixin/wxflowdetail', array('patientid'=>$patientId, 'spaceid'=>$spaceId)); } else { $url = $response->router->urlfor('attach/weixinconfirmattach', array('patientId'=>$patientId, 'spaceId'=>$spaceId)); } } $response->setRedirect($url); }/*}}}*/
public static function getQRCode4PhoneClient($curUser, $nowSpaceUser = '') {/*{{{*/ if(empty($nowSpaceUser)) { $nowSpaceUser = new NullEntity; } //患者和未登录用户 if(false == $curUser->hasSpace()) { echo '<script type="text/javascript" src="http://i1.hdfimg.com/space/js/twodimension.js?20131118"></script>'; } //医生登录 if($curUser->hasSpace() && false == $nowSpaceUser->isNull() && $curUser->id == $nowSpaceUser->id && false == $curUser->space->hasLoginMobileTerminal() && $curUser->space->isConfirmed()) { //echo '<script type="text/javascript" src="http://i1.hdfimg.com/space/js/twodimension_doc.js?20131118"></script>'; } //微信医生服务号二维码 if($curUser->hasSpace() && false == $nowSpaceUser->isNull() && $curUser->id == $nowSpaceUser->id && $curUser->space->isConfirmed()) { $doc_scene = DAL::get()->find_by_spaceid("weixdoctorqrcodescene", $nowSpaceUser->id); if(false == $doc_scene->isNull()) { $sceneId = $doc_scene->sceneId; } else { $sceneId = WeixClient::getInstance()->queryMaxSceneId(); WeixClient::getInstance()->createDoctorScene($sceneId, $nowSpaceUser->id); } $ticket = WeixApi::getTicket($sceneId, WeixUser::WEIXINTYPE_SPACE); if(false == empty($ticket)) { $codeUrl = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' . urlencode($ticket); echo '<script type="text/javascript" src="http://i1.hdfimg.com/space/js/twodimension_wxdoc.js?20141105"></script>'; echo "<script>loadTwoDimension('{$codeUrl}'); scrollx({id: 'two_dimen'}) </script>"; } } }/*}}}*/
public function modifyTelOwner($request, $response) {/*{{{*/ $params = $request->vars; $options = array( 'bankName'=>$params['bankName'], 'bankAccountNo'=>$params['bankAccountNo'], 'bankUserName'=>$params['bankUserName'], 'bankMark'=>$params['bankMark'], ); $telOwnerId = $request->telOwnerId; $patientExt = new NullEntity(); $optionExts = array(); if (false == $this->patient->isNull()) { $optionExts = array( 'phone1'=>$params['phone1'], 'phone2'=>$params['phone2'], ); if ($patientExt->isNull()) { $patientExtId = TelOwnerClient::getInstance()->createPatientExt($patient, $optionExts); $patientExt = DAL::get()->find('telowner', $patientExtId); } } TelOwnerClient::getInstance()->modifyOwner($telOwnerId, $patientExt, $options, $optionExts); $response->setRedirect($response->router->urlfor('telpayment/showrefund')); }/*}}}*/
public function healthdiary($request, $response) {/*{{{*/ $user = $this->user; $signin = $this->user->getFollowupPatientSignin(); if($signin->isNull() || ($signin->isNull() == false && false == $signin->isOpenFollowup() && $signin->isSuspendedFollowup() == false)) { $response->setRedirect("http://".URL_PREFIX."passport.haodf.com"); } $response->signin = $signin; //默认不弹出 $nofirst = $request->getRequest('nofirst', 0); $isDisplay = $request->getRequest('isDisplay', 0); $success = $request->getRequest('success',0); if($signin->isNull() && $signin->isSuspendedFollowup()) { $isDisplay = 0; } $response->isDisplay = $isDisplay; $response->saveresult = $success; $response->lastSpacePosts = DoctorPatientPostClient::getInstance()->getLastSpacePostForPayedUser($signin->space->id,30); $response->signin = $signin; // 患教课堂部分 $this->_patientsTech($request, $response); $response->ref = DAL::get()->find_by_spaceid_and_patientid('DoctorPatientRef', $signin->space->id, $signin->patient->id); $ticketId = $request->ticketId; if(empty($ticketId) == false) { $checkupTicket = DAL::get()->find('checkupticket', $ticketId); } else { // 先出临时任务,出定期临时,再出复查任务,只显示正在进行中的任务 $checkupTickets = CheckupClient::getInstance()->getUserWaitingTickets($this->user->id); $checkupTicket = new NullEntity(); $followupCnt = 0; $cycleTemporaryCnt = 1000; $temporaryCnt = 2000; $customizeCnt = 3000; $sortTicketList = array(); foreach ($checkupTickets as $t) { if ($t->task->isFollowupTask()) { $sortTicketList[$followupCnt++] = $t; } else if ($t->task->isTemporaryTask()) { $sortTicketList[$temporaryCnt++] = $t; } else if ($t->task->isCycleTemporaryTask()) { $sortTicketList[$cycleTemporaryCnt++] = $t; } else if ($t->task->isCustomizeTask()){ $sortTicketList[$customizeCnt++] = $t; } } if ($temporaryCnt - 2000 > 0) { $checkupTicket = $sortTicketList[$temporaryCnt - 1]; } else if ($cycleTemporaryCnt - 1000 > 0) { $checkupTicket = $sortTicketList[$cycleTemporaryCnt - 1]; } else if ($followupCnt - 0 > 0) { $checkupTicket = $sortTicketList[$followupCnt - 1]; } else if ($customizeCnt - 3000 > 0){ $checkupTicket = $sortTicketList[$customizeCnt - 1]; } } $response->checkupTicket = $checkupTicket; $healthProblemList = DAL::get()->find_all_userAllHealth('HealthRecordProblem', $user->id); $response->healthProblemList = $healthProblemList; $lastDiaryList = HealthDiaryClient::getInstance()->getLastDiarys($user->id, 2); $response->lastDiaryList = $lastDiaryList; $diaryIds = array_keys($lastDiaryList); $abnormalStatus = array(); if(empty($diaryIds) == false) { $abnormalStatus = PatientCaseHistoryClient::getInstance()->getAbnormalStatusByEntityIds($diaryIds); } $response->abnormalStatus = $abnormalStatus; //吃药 $userCurrentMedicineSchemeList = MedicineClient::getInstance()->getUserCurrentMedicineScheme($user->id); $response->userCurrentMedicineSchemeList = $userCurrentMedicineSchemeList; $medicineId_dotime_answer = $this->medicineId_dotime_answer(MedicineClient::getInstance()->getLastSomeDaysCurrentMedicineAnswerList($user->id, 5)); $response->medicineId_dotime_answer = $medicineId_dotime_answer; // 获取复查任务 显示下次复查时间,只查复查的 $checkupTicketList = CheckupClient::getInstance()->getUserLastFollowupTickets($user->id); $nextTask = new NullEntity(); $nextTaskTime = new NullEntity(); foreach ($checkupTicketList as $ticket) { $nt = CheckupClient::getInstance()->getNextTask($ticket->id); $ntt = CheckupClient::getInstance()->getNextTaskTime($ticket->id); if ($nt->isNull() == false) { if ($nextTask->isNull() || XDateTime::dayDiff($ntt, $nextTaskTime) > 0) { $nextTask = $nt; $nextTaskTime = $ntt; } } } $response->nextTask = $nextTask; $response->nextTaskTime = $nextTaskTime; $response->noFirst = $nofirst; //医生助理其他批注 $response->unReadAnnotationList = DAL::get()->find_all_byUserId_hosttype_read('NfsAnnotation', $user->id, array('HealthDiary','DoctorPatientPost'), NfsAnnotation::IS_USER_READ_NO); }/*}}}*/
$postCount = 0; if($doctor2->hasSpace() && $doctor2->space->user->isNull() == false) { $space = isset($spaceList[$doctor2->space->user->id]) ? $spaceList[$doctor2->space->user->id] : new NullEntity(); } else { $space = new NullEntity(); } $dtitle = (string)$doctor2->grade? $doctor2->grade : ''; $dgrade = (string)$doctor2->educateGrade? $doctor2->educateGrade : ''; if(false == empty($dtitle) && false == empty($dgrade)) { $dtitle .= "/"; } $dspecialilze = (string)($space->isNull() == false && $space->commonCaseNote) ? $space->commonCaseNote : $doctor2->specialize; $dspecialilze = XString::truncate($dspecialilze, 84); if($space->isNull() == false) { $spaceUrl = $space->getUrl(); $postCount = isset($spacePostCntInfos[$space->id]) ? $spacePostCntInfos[$space->id] : 0; } else { $spaceUrl = $doctor2->getUrl(); } $diseaseDoctor = DAL::get()->find_by_fld_diseaseid_and_fld_doctorid('DiseaseDoctor', $disease->id, $doctor2->id); ?> <li> <div class="clearfix pb10 pr">
echo $doctorComment->ip; ?> "> <span style="border:1px solid #009900; color:#009900; padding-left:3px; padding-right:3px; text-decoration: none;"> <?php echo $ipSegmentGoodCnt; ?> </span> </a> <?php } ?> <!-- ip统计模块 end--> <?php if (!$space->isNull()) { ?> <a href="<?php echo $space->host->getUrl(); ?> " target="_blank" style="color:red">★</a> <?php } ?> <!-- 查看前端页面结束 --> <?php if (!empty($doctorIps[$doctorComment->ip])) { ?> <a href="/doctorcomment/doctorip?ip=<?php echo $doctorComment->ip; ?>
} $spaceList = DAL::get()->find('space', $spaceIds); foreach ($doctorList2 as $doctor2) { if($doctor2 instanceof Doctor) { if($doctor2->hasSpace()) { $space = isset($spaceList[$doctor2->space->id]) ? $spaceList[$doctor2->space->id] : new NullEntity(); }else{ $space = new NullEntity(); } $hfname = $doctor2->hospitalfaculty->hospital->commonName . $doctor2->hospitalfaculty->name; $hospitalFacultyUrl = $doctor2->hospitalfaculty->getUrl(); $dtitle = (string)$doctor2->grade ? '<br />' . $doctor2->grade : ''; $dgrade = (string)$doctor2->educateGrade ? '<br/>' . $doctor2->educateGrade : ''; $dspecialilze = (string)($space->isNull() == false && $space->commonCaseNote) ? $space->commonCaseNote : $doctor2->specialize; $dspecialilze = XString::truncate($dspecialilze, 84); }else{ $space = ($doctor2->doctor->hasSpace() && empty($spaceList) == false ) && isset($spaceList[$doctor2->doctor->space->id]) ? $spaceList[$doctor2->doctor->space->id] : new NullEntity(); $hfname = $doctor2->doctor->hospitalfaculty->hospital->commonName . $doctor2->doctor->hospitalfaculty->name; $hospitalFacultyUrl = $doctor2->doctor->hospitalfaculty->getUrl(); $dtitle = (string)$doctor2->doctor->grade ? '<br />' . $doctor2->doctor->grade : ''; $dgrade = (string)$doctor2->doctor->educateGrade ? '<br/>' . $doctor2->doctor->educateGrade : ''; $dspecialilze = (string)($space->isNull() == false && $space->commonCaseNote) ? $space->commonCaseNote : $doctor2->doctor->specialize; $dspecialilze = XString::truncate($dspecialilze, 84); $dranktype =DiseaseDoctor::getRealRankType($doctor2->rankType); } ?> <tr> <td> <?php if(!($doctor2 instanceof Doctor)){?>