コード例 #1
0
ファイル: index.php プロジェクト: sdgdsffdsfff/hdf-client
                 if (isset($hospitalDoctorCount[$value]))
                    $cnt = $hospitalDoctorCount[$value];
                 else
                    $cnt = 0;
                 $value = Codec::getInstance()->encodeId($value);
             ?>
             <li>
             <a href="/jiahao/<?=rawurlencode($otAreaHospital[$key])?>/hospital/<?=rawurlencode($value)?>.htm" target="_self"><?=$key?></a><span class="gray2">(<?=$cnt?>)</span></li>
             <?php }?>
           </ul>
         </td>
         <td width="50%">
           <ul>
             <?php foreach ($otherHospitalFactory as $otHfKey => $otHfValue) {?>
                 <?php if($otHfKey != '全部'){?>
                    <li><a href="/jiahao/<?=rawurlencode('q')?>/faculty/<?=rawurlencode(FacultyList::getMainFcacultyKeyByName($otHfKey))?>.htm" target="_self"><?=$otHfKey?></a><span class="gray2">(<?=$otHfValue['total']['count']?>)</span></li>
                 <?php }?>
             <?php }?>
           </ul>
         </td>
       </tr>
     </table>
     <div style="text-align:right; padding:5px 20px 0px 0px"><a href="/jiahao/<?=rawurlencode('q')?>.htm" target="_self" class="blue">全部其它地区可网上预约专家>></a></div>
   </div>
   <div class="bottom_bg"></div>
 </div>
 </div>
 <div class="jia_hao_right">
   <div class="jia_hao_sidebar">
     <ul class="j_h_title2">
     <li class="s_l"></li>
コード例 #2
0
 public function heZuo($request, $response)
 {/*{{{*/
     //$id = $this->param('id');
     $id = 1;//仅用于协和医院(若有其它合作医院在接受参数)
     $facultyName = $request->facultyName;
     $facultyKey = $request->getRequest('facultyKey','');
     if (false == empty($facultyKey))
     {
    		$FacultyList = FacultyList::getMainFacultyList();
    		if (isset($FacultyList[$facultyKey]))
    			$facultyName = $FacultyList[$facultyKey];
     }	
     $FacultyId = $request->getRequest('facultyId','');
     if (false == empty($enFacultyId))
     {
    		$Faculty = DAL::get()->find('faculty', $enFacultyId);
    		$facultyName = $Faculty->name;
     }
     if ($id && $facultyName){
     	$request->setRequest('id', $id);
         $request->setRequest('facultyName', $facultyName);
         $this->search($request, $response);
     }
     else if ($id){
     	$request->setRequest('id', $id);
         $this->search($request, $response);
     }
     $response->hezuoHospitalId = $id;
 }/*}}}*/
コード例 #3
0
    public function getDoctorList4JiaHao($districtKey, $enHospitalId, $hosFacultyKey, $facultyId, $pageId, $pageSize)
    {/*{{{*/
        $this->_initPageInfo($pageId, $pageSize);
        $district = empty($districtKey) ? '北京' : $districtKey;
        $enHospitalName = '';
        if ($enHospitalId){
            $plussignChannel = DAL::get()->find_by_hospitalid('PlussignChannel', $enHospitalId );
            if ($plussignChannel->isNull() == false){
                $enHospitalName = $plussignChannel->hospitalName;
            }else
            {
                $this->setErrorCode('128');
                return 0;
            }
        }
        $facultyName = '';
        if (false == empty($hosFacultyKey))
        {
            $enFacultyList = FacultyList::getMainFacultyList();
            if (isset($enFacultyList[$hosFacultyKey]))
            {
                $facultyName = $enFacultyList[$hosFacultyKey];
            }else
            {
                $this->setErrorCode('134');
                return 0;
            }
        }	
        if (false == empty($facultyId))
        {
       		$enFaculty = DAL::get()->find('faculty', $facultyId);
            if($enFaculty->isNull())
            {
                $this->setErrorCode('130');
                return 0;
            }
       		$facultyName = $enFaculty->name;
        }

        $facultyArr = FacultyList::getList();
        $facultyNameList = isset($facultyArr[$facultyName]) ? $facultyArr[$facultyName]:array($facultyName);
        $result = PlussignChannelClient::getInstance()->pagingWithSpace($pageId, $pageSize, $district, $enHospitalName, $facultyName, '' , '', $enHospitalId, $hosFacultyKey, $facultyId);
        $spaces = DAL::get()->find('Space', $result['spaceIds']);

        $infos = array();
        $successOrderCounts = PlussignChannelClient::getInstance()->getOrderCntOfSpaces($result['spaceIds']);
        foreach($spaces as $spaceId => $space)
        {
            if($space->host instanceof Doctor && false == $space->host->hospitalfaculty->hospital->isInnerTestHospital())
            {
                $info = array();
                $info['doctorId'] = $space->host->id;
                $info['doctorName'] = $space->name; 
                $info['doctorImgUrl'] = $space->host->getHeadImageForMobile();
                $info['grade'] = $space->host->grade; 
                $info['educateGrade'] = $space->host->educateGrade;
                $info['hospitalCommonName'] = $space->host->hospitalfaculty->hospital->commonName;
                $info['hospitalFacultyName'] = $space->host->hospitalfaculty->name;
                $info['jiaHaoDisease'] = $result['requirements'][$spaceId]->disease;
                $info['jiaHaoTime'] = trim($result['appointTime'][$spaceId]);
                $info['successOrderCount'] = isset($successOrderCounts[$spaceId]) ? $successOrderCounts[$spaceId] : 0;
                $infos[] = $info;
            }
        }
        $this->pageInfo = $result['pageInfo'];
        $this->content = $infos;
    }/*}}}*/
コード例 #4
0
ファイル: hezuo.php プロジェクト: sdgdsffdsfff/hdf-client
                您现在的位置:<a href="http://www.pumch.cn">北京协和医院</a> &gt;&gt; <a href="http://www.pumch.cn/Category_170/Index.aspx">患者服务</a> &gt;&gt; <a href="http://www.pumch.cn/Category_1278/Index.aspx">预约挂号</a> &gt;&gt;预约加号
    </div>
	<div style="padding:10px 10px 0px 10px;">
    <div id="j_h_search" style = "_height:90px; *overflow:hidden; _overflow:visible"> 
      <div class="xiehe_img01"><img alt="" src="http://i1.hdfimg.com/space/booking/images/xiehejiahao01.gif"></div>
      <ul class="j_h_tiaojian">
        <li><span class="bold">科室:</span>&nbsp;
        <?php
        $n =0;
        $fcyName = "";
        foreach($facultyList as $facultyName=>$total){
            if($facultyName == "全部"){?>
            <a class="black" href="/hospital/hezuo/<?=$hezuoHospitalId?>.htm" <?php if(empty($urlFacultyName)) echo "style='color: white;background-color: #4598D2;'"; ?> >
             <?=$facultyName ?>(<?=$total['total']['count'] ?>)</a>&nbsp;
        <?php continue;}$n++;?>
        <a class="black" href="/faculty/hezuo/<?=$hezuoHospitalId?>/<?=rawurlencode(FacultyList::getMainFcacultyKeyByName($facultyName))?>.htm"
        	<?php if($urlFacultyName == $facultyName || in_array($urlFacultyName,$facultyArr[$facultyName])) {$fcyName = $facultyName;}?> > <?=$facultyName ?>(<?=$total['total']['count'] ?>)
        </a>&nbsp;
        <?php }?>
        </li>
        <li style = "border-bottom:none;">
        <div>
        <?php if(empty($fcyName) == false){?>
         <div id='showHF' style="border:1px solid #b7ddf1; padding:6px;background-color:#e0eeff; " >
         <span style='color: white;background-color: #4598D2;';><?=$fcyName ?>&nbsp;->&nbsp;</span>
        <?php foreach($facultyList[$fcyName] as $hfty=>$cnt){
            if($hfty == 'total')continue;
        ?>
            <a class="black" href="/hospitalfaculty/hezuo/<?=$hezuoHospitalId?>/<?=$cnt['id']?>.htm"
        <?php if($urlFacultyName == $hfty ) echo "style='color: white;background-color: #4598D2;'";?>><?=$hfty ?>(<?=$cnt['count'] ?>)&nbsp;</a>
        <?php }?>
コード例 #5
0
    public function search($request, $response)
    {/*{{{*/
    	$hezuoHospitalId = $request->getRequest('hezuoHospitalId', '');
        $hezuoFacultyName = $request->getRequest('hezuoFacultyName', '');
        $nowPage = $request->getRequest("page",1);
        $pageSize = 20;
        $enDistrictKey = $request->getRequest('district','beijing');
        if ($enDistrictKey == 'hezuo'){
        	//Context::jump("http://".URL_PREFIX."jiahao.haodf.com/hospital/hezuo/1.htm", false);
        	$this->heZuo($request, $response);
        }
        $provList = Area::provInfo4PlussignChannel();
        $enDistrict = isset($provList[$enDistrictKey]) ? $provList[$enDistrictKey]['Name'] : $request->getRequest('district','北京');
        $enHospitalId = Codec::getInstance()->decodeId($request->getRequest('hospitalId', ''));
        $enHospitalName = $request->getRequest('hospitalName','');
        if ($hezuoHospitalId){
            $plussignChannel = DAL::get()->find_by_hospitalid('PlussignChannel', $hezuoHospitalId );
            if ($plussignChannel->isNull() == false){
                $enHospitalName = $plussignChannel->hospitalName;
            }
        }
        if ($enHospitalId){
            $plussignChannel = DAL::get()->find_by_hospitalid('PlussignChannel', $enHospitalId );
            if ($plussignChannel->isNull() == false){
                $enHospitalName = $plussignChannel->hospitalName;
            }
        }
        $enFacultyName = $request->getRequest('facultyName','');
        $enFacultyId = $request->getRequest('facultyId','');
        if (false == empty($enFacultyId))
        {
       		$enFaculty = DAL::get()->find('faculty', $enFacultyId);
       		$enFacultyName = $enFaculty->name;
        }
        $facultyKey = $request->getRequest('facultyKey','');
        if (false == empty($facultyKey))
        {
       		$enFacultyList = FacultyList::getMainFacultyList();
       		if (isset($enFacultyList[$facultyKey]))
       			$enFacultyName = $enFacultyList[$facultyKey];
        }	
       	if ($hezuoFacultyName){
        	$enFacultyName = $hezuoFacultyName;
        }
        $district= rawurldecode ($enDistrict);
        $hospitalName = rawurldecode ($enHospitalName);
        $facultyName = rawurldecode ($enFacultyName); 
        $out = PlussignChannelClient::getInstance()->getAll();
        if($district =='北京'||$district =='上海'||$district =='广东')
        {
            $showBSG = $this->showHosptial($out[$district]['hospital'],$district);
            $response->showBSG = $showBSG;
        }
        $facultyArr = FacultyList::getList();
        $facultyNameList = isset($facultyArr[$facultyName]) ? $facultyArr[$facultyName]:array($facultyName);
        $doctorCount = PlussignChannelClient::getInstance()->getDoctorCountByCondition($district,$hospitalName,$facultyNameList);
        $facultyList = PlussignChannelClient::getInstance()->getFacultyListByCondition($out,$district,$hospitalName);
        if ($hezuoHospitalId){
        	$sets = PlussignChannelClient::getInstance()->pagingWithSpace($nowPage,$pageSize,$district,$hospitalName,$facultyName, $hezuoHospitalId, $hezuoFacultyName,$enHospitalId, $facultyKey, $enFacultyId);
        } else {
        	$sets = PlussignChannelClient::getInstance()->pagingWithSpace($nowPage,$pageSize,$district,$hospitalName,$facultyName, '' , '', $enHospitalId, $facultyKey, $enFacultyId);
        }
        $spaceIds = $sets['spaceIds'];

        $successOrderCount = PlussignChannelClient::getInstance()->getOrderCntOfSpaces($spaceIds);
        	
        $response->urlDistrict = $district;
        $response->urlHospitalName = $hospitalName;
        $response->urlFacultyName = $facultyName;
        $response->urlHospitalId = $enHospitalId;
        $response->doctorCount = $doctorCount;
        $response->districtList = $out;
        $response->facultyArr = $facultyArr;
        $response->facultyList = $facultyList;
        $response->spaces = DAL::get()->find('Space', $spaceIds);
        $response->requirements = $sets['requirements'];
        $response->appointTime = $sets["appointTime"];
        $response->pageLink = $sets["pageLink"];
        $response->successOrderCount = $successOrderCount;
		$response->type = 'search'; //返回页面类型,暂时用于控制二级导航
        //SEO
        $title = $hospitalName.$facultyName."转诊预约_".$district."_向专家本人申请转诊机会";
        if (empty($hospitalName) && empty($facultyName))
        {
            $title = $district."向专家本人申请转诊机会";
        }
        $response->title = $title;
    }/*}}}*/