public function showThreadList($request, $response)
    {/*{{{*/
        $nowPage = $request->getRequest('p', 1);
        $pager = new XPager($nowPage, 10);
        $status = $request->getRequest('status', '');
        if($request->patientId > 0)
        {
            $patient = DAL::get()->mustFind('Patient', $request->patientId);
            DBC::requireTrue($patient->user->id == $this->user->id, '无效患者');
            list($caseList, $pageInfo) = ProposalClient::getInstance()->getProposalAndFlowList($patient, $pager, $status);
        }
        else
        {
            list($caseList, $pageInfo) = ProposalClient::getInstance()->getProposalAndFlowList($this->user, $pager, $status);
        }

        $response->caseList = $caseList;
        $url = $response->router->urlfor('proposal/showThreadList', array(
            'patientId' => $request->patientId,
            'status' => $request->status,
        ));
        $response->pageLink = PageNav::getNavLink(
            PageNav::getPageNavTemplate($url.'&p=')
            , $pageInfo['nowpage']
            , $pageInfo['pagesize']
            , $pageInfo['total']
        );

        $response->patientId = $request->patientId;
        $response->caseStatus = "";
        $response->status = $status;
        $response->chargeFlowList = FlowClient::getInstance()->getPaiedFlowListByUser($this->user, $needCache = false);
        $response->titleAndDisease = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds(array_keys($caseList),"Proposal");
    }/*}}}*/
 private function doImportMaterials($fileName)
 {
     /*{{{*/
     setlocale(LC_ALL, array('zh_CN.gbk', 'zh_CN.gb2312', 'zh_CN.gb18030'));
     $handle = fopen($fileName, "r");
     // 根据excel列名生成要导入的营养成分在nodepropertys中的keyname数组
     $nutrientNameArr = fgetcsv($handle, 1000, ',');
     $nutrientKeyNameArr = array(nutrientComponentInfoNodeDefine::NUTRIENT_NAME);
     foreach ($nutrientNameArr as $nutrientName) {
         foreach (nutrientComponentInfoNodeDefine::$nutrientComponentDesUnits as $name => $nutrientDesUnit) {
             $des = $nutrientDesUnit['description'];
             if ($des == $nutrientName) {
                 $nutrientKeyNameArr[] = $name;
                 break;
             }
         }
     }
     $successCount = $failCount = 0;
     $errMsgs = "";
     while ($data = fgetcsv($handle, 1000, ',')) {
         // 保留2位小数, 下标从1开始,原料名不进行这种操作
         for ($i = 1; $i < count($data); $i++) {
             if (false == is_numeric($data[$i])) {
                 continue;
             }
             $data[$i] = round(floatval($data[$i]), 2);
         }
         $nutrientComponentArr = array_combine($nutrientKeyNameArr, $data);
         $nutrientComponentArr[nutrientComponentInfoNodeDefine::NUTRIENT_STATUS] = nutrientComponentInfoNodeDefine::STATUS_STANDARD;
         try {
             $nodeId = NodeClient::getInstance()->addFoodMatialNode($nutrientComponentArr);
             $successCount++;
             echo "导入" . $nutrientComponentArr[nutrientComponentInfoNodeDefine::NUTRIENT_NAME] . "成功\n";
         } catch (Exception $e) {
             $failCount++;
             $errMsgs .= $e->getMessage() . "\n";
             echo "--------导入" . $nutrientComponentArr[nutrientComponentInfoNodeDefine::NUTRIENT_NAME] . "失败---------" . $e->getMessage() . "\n";
         }
     }
     echo "\n\n************************************导入结果如下*************************************\n\n";
     echo "成功导入" . $successCount . "条原料, 失败导入" . $failCount . "条原料\n" . $errMsgs;
 }
Example #3
0
<?php if (false == empty($bingliSet->treatement)) { ?>
<?php $ids = array();
      foreach($bingliSet->treatement as $dto)
      {
          if ($dto->treatedHospitalId)
              $ids[] = $dto->treatedHospitalId;
      }
      $hospitals = NodeClient::getInstance()->getHospitalBingLiByIds($ids);
      ?>
      <li class="h_tit">ÖÎÁÆÇé¿ö£º</li>
<?php 
    foreach ($bingliSet->treatement as $dto) {
    $hospitalOrNull = isset($hospitals[$dto->treatedHospitalId])?$hospitals[$dto->treatedHospitalId]:null; 
    $hospitalName = (!$hospitalOrNull || empty($hospitalOrNull->hospitalName)) ? "δÌîд" : $hospitalOrNull->hospitalName;
    $facultyName = (!$hospitalOrNull || empty($hospitalOrNull->facultyName)) ? " " : $hospitalOrNull->facultyName;
?>
    <li class="h_con"><?=$dto->beginTime?$dto->beginTime:"δÌîд"?> ÖÁ <?=$dto->endTime?$dto->endTime:"δÌîд"?></li>
    <li class="h_con"><?="Ò½Ôº¿ÆÊÒ£º".$hospitalName." ".$facultyName?></li>
    <?php if ($dto->treatmentDesc) { ?>
    <li class="h_con"><?="ÖÎÁƹý³Ì£º".$dto->treatmentDesc?></li>
    <?php } ?>
<?
    } 
} 
?>

 public function searchFood($request, $response)
 {
     /*{{{*/
     $pageSize = 15;
     $page = $request->getRequest('page', 1);
     $searchName = $request->searchname;
     //$res = NodeClient::getInstance()->getFoodMatialBySearchName($searchName, $page, $pageSize);
     $res = NodeClient::getInstance()->getDietFoodBySearchName($searchName, $page, $pageSize);
     $response->foodMatialsNodeObjs = $res['list'];
     $response->searchName = $searchName;
     $response->pagelink = '';
     if (false == empty($res['pageInfo'])) {
         $response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate('/followup/searchfood?foodInputId=' . $request->foodInputId . '&searchname=' . urlencode($searchName) . '&page='), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
     }
     $response->foodInputId = $request->foodInputId;
 }
 public function ajaxGetCustomerOperationInfo($request, $response)
 {
     /*{{{*/
     $operationInfo = NodeClient::getInstance()->showCustomerAllOperationInfo($request->customerid, false);
     $infoContent = implode("\n", $operationInfo);
     echo $infoContent;
     return parent::DIRECT_OUTPUT;
 }
 public function copyToTmpProposal($request, $response)
 {
     /*{{{*/
     $ticketId = $request->getRequest('ticketid', 0);
     $proposal = $this->getProposalById($request->proposalId);
     $group = InspectGroup::find($request->groupid);
     // $proposal->inspectGroup = $proposal->inspectGroup;
     $proposal->intentionId = $request->getRequest('sourceIntentionId', 0);
     $newTmpProposalId = ProposalClient::getInstance()->createTemporaryProposalByCopy($proposal, $this->curInspector);
     $tmpProposal = DAL::get()->find('TemporaryProposal', $newTmpProposalId);
     NodeClient::getInstance()->copyFromSources($tmpProposal, array($proposal));
     //把意向s的病例复制到临时方案上
     //根据组判断方案来源以决定是否需要隐藏重新选择医生按钮
     if ($request->groupid == 0) {
         $from = Intention::SRC_INSPECTOR;
     } else {
         $from = Intention::SRC_WEB;
     }
     $url = $response->router->urlfor('intention/updateproposalstep1', array('proposalId' => $newTmpProposalId, 'groupid' => $group->id, 'ticketid' => $ticketId, 'listUrl' => $request->listUrl, 'from' => $from));
     $response->setRedirect($url);
 }
Example #7
0
    private function getDetailOfProposal($proposal, $openid)
    {/*{{{*/
        $str = '';
        $patient = $proposal->patient;
        $bingliSet = $proposal->getBingLiSet();
        $titleAndDisease = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds(array($proposal->id), "Proposal");  
        $title = isset($titleAndDisease[$proposal->id]->title) ? $titleAndDisease[$proposal->id]->title : "";
        $diseaseName = isset($titleAndDisease[$proposal->id]->disease) ? $titleAndDisease[$proposal->id]->disease : "";
        $age = "";
        if(XDateTime::isDate($patient->birthday))
        {
            $age = $patient->getPatientAge(); 
        }
        else if ($patient->age)
        {
            $age = $patient->age;
        }
        $xiangyingTitle = $patient->userName . ":" . $title;
        $str = "---疾病信息---\n";
        $str .= "疾病:" . $diseaseName . "\n";
        $str .= "\n---患者基本资料---\n";

        $str .= "姓名:" . $patient->name . "\n";
        $str .= "性别:" . patient::getpatientSex($patient->sex) . "\n";
        $str .= "所在省市:" . $patient->province . " " . $patient->city . "\n";
        $str .= "提交时间:" . $proposal->ctime;
        $str .= "\n";
        $conditionDesc = "\n---病情描述---\n";
        foreach($bingliSet->conditiondesc as $dto)
        {
            $conditionDesc .= (''==$dto->conditionDesc)?'未填写': ($dto->conditionDesc)." ";
            $conditionDesc = str_replace("<br/>", "\n", $conditionDesc);
        }
        if(mb_strlen($conditionDesc) > 300)
        {
            $conditionDesc = mb_substr($conditionDesc, 0, 300) . "\n...";
        }
        $str .= $conditionDesc;
        $str .= "\n";
        $dto = array_pop($bingliSet->hopeHelp);
        if(!empty($dto))
        {
            $hopeHelp = empty($dto) ? '' : $dto->hopeHelp;
            $str .= "\n---希望提供的帮助---\n";
            $str .= $hopeHelp;
            $str .= "\n";
        }
        $hospitalName = '';
        $diagnozeStr = '';
        foreach($bingliSet->hospital as $dto) 
        { 
            $hospitalName .= $dto->hospitalName . " " . $dto->facultyName . "\n";
        } 
        if($hospitalName != '')
        {
            $diagnozeStr .= "所就诊医院科室:" . $hospitalName;
        }
        $medicine = "";
        foreach($bingliSet->medicine as $dto)
        {
            $medicine .= "药物名称:" . $dto->medicineName . " \n服用说明:" . $dto->medicineDesc . "\n"; 
        }
        if(mb_strlen($medicine) > 300)
        {
            $medicine = mb_substr($medicine, 0, 300) . "\n...";
        }
        if($medicine != '')
        {
            $diagnozeStr .= "-用药情况-\n";
            $diagnozeStr .= $medicine;
        }
        if($diagnozeStr != '')
        {
            $str .= "\n---诊断与治疗---\n";
            $str .= $diagnozeStr;
        }

        if (false == empty($bingliSet->patientAttachment))
        {
            $desc = "病历:点击【查看全文】查看患者上传病历";
            $str .= $desc;
        }
        $str .= "\n";
        $str .= "------------------------";
        $str .= "\n";
        $str .= "■ 病情不适合由您处理请回复数字 2
■ 需离开处理其它紧急事项请回复数字 3 ";

        $weixintype = WeixUser::WEIXINTYPE_SPACE;
        $config = WeixApi::getWeixConfigs($weixintype);
        $AppId = $config['AppId'];
        $domain = $config['domain'];
        $Url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $AppId . '&redirect_uri=' . $domain. '/wx/auth4space?proposalId=' .$proposal->id . '&response_type=code&scope=snsapi_base&state=#wechat_redirect';   


        $arr = array
            (
                array(
                    'Title' => $xiangyingTitle,
                    'Description' => $str,
                    'PicUrl' => '',
                    'Url' => $Url,
                ),
            );   

        return WeixApi::xiangyingNewsMsgWithArr($openid, WeixUser::WEIXINTYPE_SPACE, $arr);
    }/*}}}*/
 public function proposalDetail($request, $response)
 {
     if(false == $this->isBind($request, $response))
     {
         echo "没有绑定医生,不能查看";
         return false;
     }
     $proposalId = $request->proposalId;//'1818212628';//
     $proposal = DAL::get()->find("Proposal", $proposalId);
     DBC::requireFalse($proposal->isNull(), "没有这个方案");
     DBC::requireFalse($proposal->isCanceled(), "方案已被删除或不存在");
    // DBC::requireTrue($proposal->space->id == , "只有被绑定的sapce才能看");
     $patient = $proposal->patient;
     $bingliSet = $proposal->getBingLiSet();
     $titleAndDisease = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds(array($proposal->id), "Proposal");  
     $title = isset($titleAndDisease[$proposal->id]->title) ? $titleAndDisease[$proposal->id]->title : "";
     $diseaseName = isset($titleAndDisease[$proposal->id]->disease) ? $titleAndDisease[$proposal->id]->disease : "";
     $age = "";
     if(XDateTime::isDate($patient->birthday))
     {
         $age = $patient->getPatientAge(); 
     }
     else if ($patient->age)
     {
         $age = $patient->age;
     }
     $response->age = $age;
     $response->proposal = $proposal;
     $response->description = '';
     $response->keywords = '';
     $response->proposalTitle = $title;
     $response->proposalDisease = $diseaseName;
 }
 public function creatNewOrderbyOldOrder($request, $response)
 {/*{{{*/
     $product = DAL::get()->mustFind('product', $request->productid);
     if ($product->isNull()) $this->exit();
     $proposal = DAL::get()->find('Proposal', $request->telOrderId);
     $ip = RequestDelegate::getIp();
     $intention = IntentionClient::getInstance()->createWithProduct($proposal->patient, $product, Intention::SRC_TOUCH, array(), $ip);
     NodeClient::getInstance()->copyFromSources($intention, array($proposal));//复制病例
     $response->setRedirect($response->router->urlfor('tel/payway', array('payableid'=>$intention->id)));
 }/*}}}*/
 private function _getTitleAndDisease($intentions)
 {/*{{{*/
     $intentionIds = array_keys($intentions);
     $titleAndDisease = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds($intentionIds,"Intention");
     return $titleAndDisease;
 }/*}}}*/
 private function getRecommendByCondition(array $threadCategorys, $response, $limitArea = '', $threadCategoryId = self::RECOMMEND_THREADCATEGORY_ALL)
 {
     /*{{{*/
     $diseases = $titles = array();
     $recommendProposals = array();
     foreach ($threadCategorys as $threadCategory) {
         if (count($recommendProposals) > 50) {
             break;
         }
         $options = array();
         $options['province'] = $limitArea;
         $options['levels'] = RecommendThreadCategoryClient::getInstance()->getRecommendLevels($this->space, $threadCategory);
         $recommendProposals = $recommendProposals + DAL::get()->find_all_proposalsForRecommend('Proposal', $this->space, $threadCategory, $options, self::RECOMMEND_PROPOSAL_LIMIT);
     }
     $proposalInfos = array();
     if (false == empty($recommendProposals)) {
         $proposalInfos = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds(array_keys($recommendProposals), "Proposal");
     }
     foreach ($proposalInfos as $proposalInfo) {
         $diseases[$proposalInfo->id] = XString::truncate($proposalInfo->disease, 44, "...");
         $titles[$proposalInfo->id] = XString::truncate($proposalInfo->title, 60, "...");
     }
     $response->recommendProposals = $recommendProposals;
     $response->diseases = $diseases;
     $response->titles = $titles;
     $response->threadCategoryId = $threadCategoryId;
     return $proposalInfos;
 }
    public function add($request, $response)
    {/*{{{*/
        $this->breakIfLessMessage($request, $response);
        if ($response->isQQ)
        {
            $this->checkLogin($request, $response);  
        }
        $isLogin = UserClient::getInstance()->isLogin();
        if ($isLogin == true)
        {
            $curUser = $this->_newUser;
        }
        else
        {
            $username = $request->username;
            $password = $request->password;
            $curUser = UserClient::getInstance()->register($username, $password);
            User::sendRegisterMsg($curUser->id);
            $curUser = UserClient::getInstance()->login($username, $password, false, null, $this->partnerDomain);
        }

        if ($curUser->isNull())
        {
            throw new BizException('该邮箱已被注册!');;
        }

        if (false == $curUser->allowQuestion())
        {
            throw new BizException('不允许提问');
        }

        $patient = $this->getPatient($request, $curUser);
        $space = DAL::get()->find('space', $request->host_id);
        $ip = RequestDelegate::getIp();
        $diseaseDto = BingLiDto::createDiseaseDto(XString::convertToGbk($request->case_disease_tag), $patient->id);
        $titleDto = BingLiDto::createTitleDto(XString::convertToGbk($request->case_title), $patient->id);
        $hospitalDto = BingLiDto::createHospitalDto(XString::convertToGbk($request->case_prehospital), XString::convertToGbk($request->case_prekeshi), $patient->id);
        $hopeHelpDto = BingLiDto::createHopeHelpDto(XString::convertToGbk($request->post_help), $patient->id);
        $content = "检查及化验:\n".XString::convertToGbk($request->post_content).
            "\n治疗情况(当前用药或近期手术):\n".XString::convertToGbk($request->post_effects).
            "\n病史:\n".XString::convertToGbk($request->post_history);
        if(XString::getLengthOfGBKString(XString::getLengthOfGBKString($content)>1000))
        {
            throw new BizException('请精简您所填写的病情信息');
        }
        $contentDto = BingLiDto::createConditionDescDto($content, $patient->id);
        $realBingLiDtos = NodeClient::getInstance()->addBingLis(array(
            $diseaseDto, $titleDto, $hospitalDto, $hopeHelpDto, $contentDto,
        ), NodeObj::SOURCE_PATIENT);

        if(false == $space->isNull())
        {
            $product = ProductClient::getInstance()->getFirstFlowProduct($space);
        }
        else
        {
            $product = FirstFlowPoolVirtualProduct::fetch();
        }

        SpaceClient::getInstance()->ensureAllowAskRule($curUser, $space);
        $src = $_SERVER['HTTP_HOST'];
        $intention = IntentionClient::getInstance()->createWithProduct($patient, $product, $src, $realBingLiDtos, $ip);
        $response->setRedirect('http://'.$_SERVER['HTTP_HOST'].$response->router->urlfor('thread/finish', array('threadId' => $intention->id)));
    }/*}}}*/
    private function getBingLi4Treatement($bingLiSet, &$allBingli)
    {/*{{{*/
        if (false == empty($bingLiSet->treatement))
        {
            $ids = array();
            foreach($bingLiSet->treatement as $dto)
            {
                if ($dto->treatedHospitalId)
                {
                    $ids[] = $dto->treatedHospitalId;
                }
            }
            $hospitals = NodeClient::getInstance()->getHospitalBingLiByIds($ids);

            $treatmentArr = array();
            foreach ($bingLiSet->treatement as $dto)
            {
                $hospitalOrNull = isset($hospitals[$dto->treatedHospitalId])?$hospitals[$dto->treatedHospitalId]:null; 
                $hospitalName = (!$hospitalOrNull || empty($hospitalOrNull->hospitalName)) ? "未填写" : $hospitalOrNull->hospitalName;
                $facultyName = (!$hospitalOrNull || empty($hospitalOrNull->facultyName)) ? " " : $hospitalOrNull->facultyName;
                $info = array();
                $info['treattime'] = ($dto->beginTime?$dto->beginTime:"未填写")."至".($dto->endTime?$dto->endTime:"未填写");
                $info['hospitalFaculty'] = $this->decodeStr($hospitalName." ".$facultyName);
                $info['treatDesc'] = $this->decodeStr($dto->treatmentDesc);
                $treatmentArr[] = $info;
            }
            $allBingli['treatement'] = $treatmentArr;
        }
    }/*}}}*/
 public function deleteNode($request, $response)
 {
     /*{{{*/
     $callback = $request->callback;
     NodeClient::getInstance()->deleteNodeObj($request->nodeId);
     $response->setRedirect($callback);
 }
 public function detail($request, $response)
 {
     /*{{{*/
     $this->hasOnlyPatientFlow($request, $response);
     $response->unDisplaySubMenu = true;
     $proposal = DAL::get()->find('Proposal', $request->id);
     //第三方可以查看proposal
     //$this->ensurePermissionDetail($proposal);
     DBC::requireFalse($proposal->isNull(), "没有这个方案");
     DBC::requireFalse($proposal->isCanceled(), "方案已被删除或不存在");
     /**
      * 展示的时候,已经生成了流,如果这个方案没有完成,则方案进流,置为完成,如果是医生登录则标为已读,并跳转至流页面 
      */
     $ref = FlowClient::getInstance()->getValidFlowRef($this->space->id, $proposal->patient->id);
     if ($ref instanceof DoctorPatientRef) {
         if (false == $proposal->isFinish()) {
             ProposalClient::getInstance()->markFinish($proposal);
             FlowClient::getInstance()->generateFlowOrAddItemToFlow($this->space, $proposal->patient, $proposal);
         }
         if ($this->isSpaceLogin()) {
             ProposalClient::getInstance()->markRead($proposal);
         }
         $response->setRedirect($ref->url, 301);
         return;
     }
     $response->proposal = $proposal;
     $response->description = '';
     $response->keywords = '';
     if ($this->space->isDoctor()) {
         list($thankLetterCount, $doctorVoteResult) = $this->doDetailForDoctor();
         $response->thankLetterCount = $thankLetterCount;
         $response->doctorVoteResult = $doctorVoteResult;
     }
     //by tpy:为在html头信息中输出<meta name="robots" content="noarchive">,控制case详情页不在搜索引擎中记录快照
     $response->spider_noarchive = true;
     $titleAndDisease = NodeClient::getInstance()->getTitleAndDiseaseByRelatedObjIds(array($proposal->id), "Proposal");
     $title = isset($titleAndDisease[$proposal->id]->title) ? $titleAndDisease[$proposal->id]->title : "";
     $response->proposalTitle = $title;
     $response->proposalDisease = "";
     $diseaseName = isset($titleAndDisease[$proposal->id]->disease) ? $titleAndDisease[$proposal->id]->disease : "";
     //by yxy:在页面的title中加入疾病名称,注意是全名称匹配
     $similarDisease = new NullEntity();
     $disease_title = '';
     if (false == empty($diseaseName)) {
         $response->proposalDisease = $diseaseName;
         $similarDisease = DAL::get()->find_similarDisease4Flow('disease', $diseaseName);
         if (mb_strlen($title) < mb_strlen($diseaseName)) {
             $disease_title = $diseaseName;
         } else {
             $disease_title = $similarDisease->isNull() ? $title : $title . '_' . $diseaseName;
         }
     }
     $response->spaceRelatedFacultyName = $this->space->host->hospitalfaculty->faculty->name;
     $response->relatedOpenSpaceCntByFacultyId = SpaceClient::getInstance()->queryOpenTelSvcDoctorCntByFaculty($this->space->host->hospitalfaculty->faculty->id);
     $title = $disease_title . '_好大夫在线';
     $response->similarDisease = $similarDisease;
     $response->title = $title;
     $response->disease_title = trim($disease_title);
     //显示在咨询标题上,原来在Template上的代码是:($thread->adminTitle) ? $thread->adminTitle : $thread->title
     if (false == $this->user->isNull() && $this->isSpaceLogin()) {
         //ipad和iphone用户显示简单编辑模式
         $simple = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') || ((bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') || $request->simple);
         $response->_simple = $simple;
         $this->detailForSpace($response, $proposal, $diseaseName);
         $response->object = 'space';
         return 'space';
     } else {
         if ($this->user->id == $proposal->user->id) {
             $response->object = 'patient';
             $response->setRedirect($proposal->getUrl4User(), 301);
             return;
         } else {
             $response->object = 'brower';
             $response->presentCnt = PresentClient::getInstance()->getCntOfPresent($this->space->id);
             $response->contributionAmount = ScoreClient::getInstance()->getContribution($this->space->id);
             if ($this->space->isPhoneOpenedForFront()) {
                 $telVisitList = PaymentClient::getInstance()->getPatientPhoneServiceList($this->space->user->id, 1, 10);
                 $response->telVisitTotalCnt = isset($telVisitList['pageInfo']['total']) ? $telVisitList['pageInfo']['total'] : 0;
                 $telVisitInfos = DAL::get()->queryLatestCompleteOrderIdsBySpaceId('TelOrder', $this->space->user->id, $count = 10);
                 $response->telVisitInfos = $telVisitInfos;
                 $response->ScoreDesc = TelVisit::$scoreDesc;
                 $response->callingLogs = PaymentClient::getInstance()->getDoctorRecentPhoneRecords($this->space);
             }
             $response->spaceRelatedFacultyName = $this->space->host->hospitalfaculty->faculty->name;
             $response->relatedOpenSpaceCntByFacultyId = SpaceClient::getInstance()->queryOpenTelSvcDoctorCntByFaculty($this->space->host->hospitalfaculty->faculty->id);
             $facultyDoctorIds = DoctorClient::getInstance()->getFacultyDoctor($this->space->host);
             $facultyDoctorList = DAL::get()->find('doctor', $facultyDoctorIds);
             $response->facultyDoctorList = $facultyDoctorList;
             $response->doctorSatisfactionList = PaymentClient::getInstance()->getDoctorSatisfactionList($facultyDoctorIds);
             $doctorServices = SpaceClient::getInstance()->getServiceInfo($this->space->id, $this->user->id);
             $response->doctorServices = $doctorServices;
             $searchDiseaseName = implode(' ', $proposal->getDiseases());
             if ($this->user->isNull()) {
                 $this->getRelationInfos($response, $searchDiseaseName, array('flow' => 10, 'article' => 10, 'paper' => 2, 'thesis' => 2, 'zhuanti' => 10));
             } else {
                 $this->getRelationInfos($response, $searchDiseaseName, array('flow' => 10, 'article' => 6, 'paper' => 2, 'thesis' => 2, 'zhuanti' => 3));
             }
             $response->firstProposal = $proposal;
             $encodeDiseaseName = urlencode($proposal->category->name);
             $response->telAdUrl = "http://400.haodf.com/index/search?diseasename={$encodeDiseaseName}&src=txt1";
             $response->telAdTxt = "电话咨询<span class='fb'>{$proposal->category->name}</span>全国名医 >>";
             return 'brower';
         }
     }
 }
 public function addOrModifyOperation($request, $response)
 {
     /*{{{*/
     $response->customerId = $request->customerid;
     $response->theFollowupCustomer = DAL::get()->find("FollowupCustomer", $request->customerid);
     $operationId = $request->operationid;
     if (false == empty($operationId)) {
         $response->operation = NodeClient::getInstance()->showOperationInfo($operationId);
     }
     $response->supportBrands = DAL::get()->find_all_by_keyname('nodeproperty', NodeObj::NODE_DEFINE_SUPPORTBRAND);
     $operationNodeDefine = new operationNodeDefine();
     $response->angiographyKeyValueDef = $operationNodeDefine->returnAngiographyKeyValueDef();
     $response->stentKeyValueDef = $operationNodeDefine->returnStentKeyValueDef();
     $response->operationId = $operationId;
 }