Ejemplo n.º 1
0
 public function modify($request, $response)
 {
     $paperId = $request->paperId;
     $paper = DAL::get()->find('paper', $paperId, true);
     $response->paper = $paper;
     $lableList = LableDefine::getLableList();
     $response->lableList = $lableList;
 }
    public function showIndex( $request, $response )
    {/*{{{*/
        $subList = SubscriptionClient::getInstance()->getSubcriptDiseaseList($this->user->id);
        $arr = array();
        foreach($subList as $sub)
        {
            $arr[$sub->diseaseId] = $sub;
        }
        $response->subList = $arr;

        $response->user = $this->user;
        $response->labels = LableDefine::getLableList();

        $res = SubscriptionClient::getInstance()->getUserSubscriptionArticleList4Web($this->user->id, $total=500);
        $articleRes = isset($res['list']) ? $res['list'] : array();
        $response->articleCnt = isset($res['total']) ? $res['total'] : '';
        $response->articleRes = $articleRes;
        $response->success = $request->success;
    }/*}}}*/
Ejemplo n.º 3
0
 public function detail($request, $response)
 {
     $id = $request->id;
     $disease = DAL::get()->find('disease', $id);
     $response->disease = $disease;
     $types = array(DiseaseRelation::TYPE_SYMPTOM, DiseaseRelation::TYPE_LOCATION);
     $response->relations = DAL::get()->queryStringRelation('DiseaseRelation', $disease->id, $types);
     //列出所有标签 不管是否有关联
     $defaultList = LableDefine::getLableList();
     $lableArr = array();
     $diseaseTags = array();
     if ($disease->isNull() == false) {
         $diseaseTags = DiseaseClient::getInstance()->getDiseaseTag($disease->id);
         $diseaseLableList = DiseaseClient::getInstance()->getDiseaseLablesByDisease($disease->id);
         foreach ($defaultList as $id => $title) {
             if (empty($diseaseLableList)) {
                 $lableArr[$title] = array();
             } else {
                 foreach ($diseaseLableList as $diseaseLable) {
                     if ($diseaseLable->lableid == $id) {
                         $lableArr[$title][] = $diseaseLable->objectid;
                     } else {
                         $lableArr[$title][] = array();
                     }
                 }
                 if (isset($lableArr[$title])) {
                     $lableArr[$title] = array_filter($lableArr[$title]);
                 }
             }
         }
     }
     $response->threadCategoryTopList = ThreadCateClient::getInstance()->getTopLevelList();
     $response->threadCategory = DAL::get()->find('ThreadCategory', $disease->threadCategoryId);
     $response->lableArr = $lableArr;
     $response->diseaseTags = $diseaseTags;
     $response->nounClassList = Disease::nounClassDef();
     $response->msg = $request->msg;
     $response->title = '疾病';
 }
Ejemplo n.º 4
0
 public function ajaxShowLable($request, $response)
 {
     /*{{{*/
     $objid = $request->objid;
     $type = $request->type;
     $lables = DiseaseClient::getInstance()->getDiseaseLablesByObjId($objid, $type);
     $res = array();
     $lableList = LableDefine::getLableList();
     foreach ($lables as $lable) {
         if (true == empty($lable->diseasename)) {
             $lable->diseasename = "全部疾病";
         }
         $res[] = mb_convert_encoding($lableList[$lable->lableid] . ':' . $lable->diseasename, 'utf-8', 'gbk');
     }
     echo json_encode($res);
     exit;
 }
Ejemplo n.º 5
0
 public function showFlowContentMarkList($request, $response)
 {
     /*{{{*/
     $pageSize = 50;
     $nowPage = (int) $request->getRequest('p', 1);
     $timeSlot = $request->timeSlot;
     $beginTime = '';
     $endTime = '';
     if ($timeSlot) {
         $timeArr = explode('|', $timeSlot);
         $beginTime = $timeArr[0];
         $endTime = $timeArr[1];
     }
     $status = $request->status;
     $mark = $request->mark;
     $realName = $request->realName;
     $diseaseName = $request->diseaseName;
     $labelId = $request->labelId;
     $diseaseId = 0;
     if ($diseaseName) {
         $disease = DAL::get()->find_by_name('Disease', $diseaseName);
         $diseaseId = $disease->isNull() ? '-1' : $disease->id;
     }
     $res = FlowMarkClient::getInstance()->getFlowContentMarkList4Search($beginTime, $endTime, $status, $mark, $realName, $diseaseId, $labelId, $nowPage, $pageSize);
     $flowContentMarkList = $res['list'];
     $pageLink = '';
     if (empty($res['pageInfo']) == false) {
         $url = "/nfsaudit/showflowcontentmarklist?beginTime={$beginTime}&&endTime={$endTime}&&status={$status}&&mark={$mark}&&realName={$realName}&diseaseName={$diseaseName}&labelId={$labelId}";
         $pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate($url . "&p="), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
     }
     $response->labelList = LableDefine::getLableList();
     $response->flowContentMarkList = $flowContentMarkList;
     $response->pageLink = $pageLink;
     $response->title = '流质量标记列表';
     $response->mark = $mark;
     $response->status = $status;
     $response->beginTime = $beginTime;
     $response->endTime = $endTime;
     $response->realName = $realName;
     $response->diseaseName = $diseaseName;
     $response->labelId = $labelId;
 }
 /**
     * @brief 拿到疾病分类
     * @author lhl
     * @exampleUrl http://dev.mobile-api.haodf.com/patientapi/subscription_getDiseaseLabelList
     *
     * @return array('diseaseCategory') 
  */
 public function getDiseaseLabelList()
 {/*{{{*/
     $results = array();
     $results[] = array('id'=>0, 'label'=>'全部');
     foreach(LableDefine::getLableList() as $key => $label)
     {
         if (in_array($key, array('101', '209', '205', '401')))
         {
             $results[] = array('id'=>$key, 'label'=>$label);
         }
     }
     $this->content = $results; 
 }/*}}}*/
Ejemplo n.º 7
0
	                             
	                                          请添加您修改后的板块ID,添加如下ID:
	               </font><?=$noTypeids?>
	            </td>
	        </tr>
		<?php }?>
	<?php }?>

	<tr>
		<td height="30" align="right">标签绑定:</td>
		<td align="left">
		<div id="demo-page">
		<?php if ($canBindLable) { ?>
		    <select name='diseaselable' id = 'diseaselable'>
		    <option value=''>请选择</option>
		    <?php foreach (LableDefine::getLableList() as $key => $lable) { ?>
		    <option value='<?=$key?>'><?=$lable?></option>
		    <?php } ?>
		    </select>
		    <span id="diseasename"> 疾病ID:</span>
		    <input type="text" id="diseaseid" name="diseaseid"></input>
		    <input type="button" onClick="searchdisease4('f', 'setdisease');" value="搜索疾病">
			<input type="button" value="绑定" id="btn_add_lable">
			<span id="el_lable">&nbsp;</span>
		<?php } else { ?>
		<span style="color:red;">等待系统绑定医生后进行操作</span> 
		<?php } ?>
		</div>
		
		
		</td>
Ejemplo n.º 8
0
<?php 
$bindDisease = $doctorPatientRef->getBindDisease(); 
$bindDiseaseLabels = $doctorPatientRef->getBindDiseaseLabels();
$bindLabelIds = array();
foreach ($bindDiseaseLabels as $bindDiseaseLabel)
{
    $bindLabelIds[] = $bindDiseaseLabel->lableid;
}
$labelsModel = LableDefine::getLableList();
$height = (isset($bindDiseaseType) && $bindDiseaseType == 'all') ? '240' : '280';

?>
<style type="text/css">
.want_p_checkboxs{ width:840px; overflow:hidden;}
.want_p_checkboxs ul{ width:840px;}
.want_p_checkboxs ul li{ float:left; width:80px; height:30px; line-height:30px; list-style-type: none;}
.want_p_checkboxs ul li input{ float:left; margin-top:10px; *margin-top:5px; _margin-top:6px;}
.want_p_checkboxs ul li label{ float:left; padding-left:2px;}
.want_p_sub{ border:none; color:#fff; font-weight:bold; background:#098bce; border-radius:3px; text-align:center; width:102px; height:38px; line-height:38px; cursor:pointer; margin:10px 0;}
</style>
    <span style="font-size:18px; <?php echo (isset($bindDiseaseType) && $bindDiseaseType == 'all') ? 'display:none' : ''; ?>" >
    <?php 
      $displayButtonName="¿ªÊ¼°ó¶¨¼²²¡";
      if($bindDisease && false == $bindDisease->isNull())
      {
          $displayButtonName="¸üа󶨼²²¡";
      }
    ?>
        <input type="button" value="<?=$displayButtonName?>" onclick="showBindDisease()"/>
    °ó¶¨¼²²¡: <span id="flow_disease" style="color:red"><?php if ($bindDisease && $bindDisease->isNull() == false) { echo $bindDisease->name; } else { echo 'ÎÞ'; }  ?></span>
    </span>
Ejemplo n.º 9
0
                {
                    include_once dirname(__file__).'/zhuanti/_center_jingpinzhuanti_inner.php'; 
                }
            ?>
        <!--精华文章 end--> 

        <!--文章列表 start-->
            <? 
            if (0 < count($id2Types))
            {
                include_once dirname(__file__).'/zhuanti/_center_zhuantis_inner.php'; 
            }
            else
            {
                $roots =  LableDefine::getRootLableList();
                $leafs = LableDefine::getLableList();
                $leafLableStr = isset($leafs[$leafLableKey]) ? $leafs[$leafLableKey] : '';
                $rootLableStr = isset($roots[$rootLableKey]) ? $roots[$rootLableKey] : '';

                $array4Paper = CmsObjCategory::getDescArray4Paper();
                $cmsCategoryDes = isset($array4Paper[$cmsCategory]) ? $array4Paper[$cmsCategory] : '';
                $emptyInfo = '"'.$rootLableStr.$leafLableStr.$cmsCategoryDes.'" 相关专题';
                include_once dirname(__file__).'/common/_noresult_inner.php'; 
            }
            ?>
        <!--文章列表 end-->
    </div>
</div>
<!--中间区域文章 end-->

<!--右侧区域 start-->
 public function applyDetail($request, $response)
 {
     /*{{{*/
     $applyId = $request->applyid;
     $myApplyDisease = DAL::get()->find('subscriptiondiseaseapplication', $applyId);
     if ($request->hasnextapply == 1) {
         $nowPage = 1;
         $pageSize = 1;
         $vars = array();
         $vars['status'] = (string) SubscriptionDiseaseApplication::AUDIT_NO;
         $vars['userphone'] = $request->userphone;
         $vars['username'] = $request->username;
         $vars['starttime'] = $request->starttime;
         $vars['endtime'] = $request->enttime;
         $vars['source'] = $request->source;
         $res = SubscriptionClient::getInstance()->getSubscriptionDiseaseApplicationList($nowPage, $pageSize, $vars);
         $nextApply = reset($res['list']);
         if (empty($res['list']) || $nextApply->isNull()) {
             $nextApply = $myApplyDisease;
             $response->finishAudit = '审核结束:)';
         }
         $myApplyDisease = $nextApply;
     }
     $response->apply = $myApplyDisease;
     $subscribedDisease = DAL::get()->find_all_by_fld_userid_and_isdelete('SubscriptDisease', $myApplyDisease->user->id, SubscriptDisease::ISDELETE_NO);
     $response->subscribedDisease = $this->filterDuplicateDiseaseName($subscribedDisease);
     $historySubsritpionDisease = DAL::get()->find_all_by_fld_userid_and_isdelete('SubscriptDisease', $myApplyDisease->user->id, SubscriptDisease::ISDELETE_YES);
     $response->historySubsritpionDisease = $this->filterDuplicateDiseaseName($historySubsritpionDisease);
     $response->labelsModel = LableDefine::getLableList();
     $response->applyId = $myApplyDisease->id;
     $response->adddisease = $request->adddisease;
     //取已绑定的文章
     $beBindArticleArr = DAL::get()->find_all_byUserIdAndSourcetype('UserSubscriptionArticleRef', $myApplyDisease->user->id, UserSubscriptionArticleRef::SOURCETYPE_ARTICLE);
     $beBindThesisArr = DAL::get()->find_all_byUserIdAndSourcetype('UserSubscriptionArticleRef', $myApplyDisease->user->id, UserSubscriptionArticleRef::SOURCETYPE_THESIS);
     $beBindArticleRes = '';
     foreach ($beBindArticleArr as $beBindArticle) {
         $article = DAL::get()->find('Article', $beBindArticle->sourceId);
         $beBindArticleRes .= trim($article->getUrl()) . "\n";
     }
     foreach ($beBindThesisArr as $beBindThesis) {
         $thesis = DAL::get()->find('Thesis', $beBindThesis->sourceId);
         $beBindArticleRes .= trim($thesis->getUrl()) . "\n";
     }
     $response->beBindArticleRes = $beBindArticleRes;
 }