Пример #1
0
.rengaozheng_f14{ font-size:14px;}
.rengaozheng_f12{ font-size:12px;}
.rengaozheng_pt5{ padding-top:5px;}
.rengaozheng_ml30{ margin-left:30px;}
.sf-plan-inter{background:#ee6500; padding:3px 5px;color:#fff; text-decoration:none;}
.mb10{ margin-bottom:10px;}
</style>
<?php 
$source = '妊高症随访申请';
$applyCount = SpaceClient::getInstance()->getUserAdviceCntBySource('UserAdvice', $source);
$applyCount = $applyCount + 32;
$space = DAL::get()->find_by_name('space', 'wqi8046');
$signinPayCount = 0;
if($space->isNull() == false)
{
    $signinPayCount = NfsClient::getInstance()->payedPatientCnt('FollowupOwner', $space->id);
}
$signinPayCount = $signinPayCount + 10;
?>
<div class="mb10"><a href="http://www.haodf.com/info/followup_rengao.php?image"><img src="http://i1.hdfimg.com/www/images/rgz-banner03.gif"></a></div>
<div class="panelC_orange">
    <div class="toptr">
      <div class="lt">
        <ul>
          <li>高危妊娠VIP服务区</li>
        </ul>
      </div>
    </div>
    <div class="midtr">
        <div class="lt">
            <div id="hostim">
    public function saveReport($request, $response)
    {/*{{{*/
        $checkupTicketId = $request->ticketid;
        $checkupReportId = $request->reportid;
        $answerValueAndUnit = $request->answervalueandunit;
        $questionId_answerValueAndUnit = $this->formatAnswerValueAndUnit($request->questionid_answervalueandunit);
    
        NfsClient::getInstance()->updateCheckupReportAndInfo($checkupReportId, $answerValueAndUnit, $questionId_answerValueAndUnit);

        $response->setRedirect($response->router->urlfor('myhealth/checkuphistory', array('ticketId'=>$checkupTicketId)));
    }/*}}}*/
            <div class="fr"> 
                <p>不会填写报告?可直接
                    <a href="#" class="blue unl upload-btn">拍照上传</a>或<a href="#" class="blue unl upload-btn">手写报告</a>
                </p> 
            </div>
<?php include_once('_checkup_attach.php'); ?>
        </div>

<!-- start -->
<?php
$i = 0;
$resultRefArr = array();
foreach($questionCategories as $questionCategory) 
{ 
    $i ++;
    $reportList = NfsClient::getInstance()->getStructuredAuditedReportList($user->id, $questionCategory->name);
    if(empty($reportList))
    {
?>
<div class="reveiwNotice-check-details">
    <p class="reveiwNotice-check-details-title fb pb5">
        2、血常规
    </p>
    <div class="reveiwNotice-check-details-content clearfix">
        <div>
            <span class="dil">
                检查结果:
            </span>
            <span id="attachmentresult479506591" style="color:red;">
            </span>
        </div>
Пример #4
0
 private function getCommonPatientFlow($userId, $commonFlowCount, $commonInfos, $isBrowser)
 {
     /*{{{*/
     $refRes = NfsClient::getInstance()->getCommonPatientRef($this->space->id, $userId, 1, $commonFlowCount, $isBrowser);
     foreach ($refRes['list'] as $comRef) {
         $key = strtotime($comRef->lastPostTime->toString());
         while (array_key_exists($key, $commonInfos)) {
             $key++;
         }
         $commonInfos[$key] = $comRef;
     }
     return $commonInfos;
 }
Пример #5
0
    private function getCntOfCase($spaceId)
    {/*{{{*/
        $threadIds = array();
       // $threadIds = DAL::get()->find_id_by_spaceid_and_status('thread', $spaceId, Thread::STATUS_VALID);                        
       // $cntOfThread = count($threadIds);
        $space = DAL::get()->find('space', $spaceId);
        $cntOfThread = DAL::get()->querySpaceNotProcessCnt('proposal', $space, 'FLOW');
        $flowIds = array();
        $cntOfFlow = FlowClient::getInstance()->getCntOfFlow($spaceId);                        
        $cntOfUnThreatFollowup = 0;
        $space= DAL::get()->find('space', $spaceId);
        if($space->isOpenFollowup())
        {
            $cntOfUnThreatFollowup = NfsClient::getInstance()->getCntOfUnThreatFollowup($spaceId);    
        }
        $cntOfCase = array('cntOfThread'=>$cntOfThread, 'cntOfFlow'=>$cntOfFlow, 'cntOfUnThreatFollowup'=>$cntOfUnThreatFollowup);

        //记log
        $logStr = XDateTime::now();
        $logStr .= ' space: '.$space->name.' '.$spaceId;
        $logStr .= ' '.__FUNCTION__;
        foreach ($cntOfCase as $cntName=>$cntValue) 
        {
            $logStr .= ' '.$cntName.': '.$cntValue;
        }
        error_log($logStr."\n", 3, BeanFinder::get('configs')->spaceThreadInfoLogPath);

        return $cntOfCase;
    }/*}}}*/
Пример #6
0
 public function saveReport($request, $response)
 {
     /*{{{*/
     $checkupTicketId = $request->ticketid;
     $checkupReportId = $request->reportid;
     $answerValueAndUnit = $request->answervalueandunit;
     $questionId_answerValueAndUnit = $this->formatAnswerValueAndUnit($request->questionid_answervalueandunit);
     NfsClient::getInstance()->updateCheckupReportAndInfo($checkupReportId, $answerValueAndUnit, $questionId_answerValueAndUnit);
     $checkupTicket = DAL::get()->find('CheckupTicket', $checkupTicketId);
     $response->setRedirect($response->router->urlfor('checkup/checkupdetail', array('ticketId' => $checkupTicketId, 'userid' => $checkupTicket->user->id)));
 }
Пример #7
0
$(function(){
    $('#finish_checkup_form').find(':input').change(function(){
        $(this).parents('.reveiwNotice-check-details').find('.changedcategory').val(1);
    })
})
</script>

<?php 
//按时间标签获取复查报告
$timeLabelName = CheckupLabel::getLabelNameByCheckupTask($checkupTicket->task->id);
if (false == empty($timeLabelName)) {
    $checkupReportList = NfsClient::getInstance()->getStructuredAuditedReportList($user->id, $timeLabelName);
}
$space = DAL::get()->find('space', $checkupTicket->dispatcher->id);
$questionNaire = NfsClient::getInstance()->createQuNaire($space, $checkUpTpl);
$answerNaire = NfsClient::getInstance()->getUserValidAnswerNaire($user->id, $questionNaire->id);
$abnormalCateInfos = $answerNaire->isNull() == false ? $answerNaire->getAbnormalAnswerCategoryInfos() : array();
$dspQuestionIds = array();
$quNaireQuestionRefs = DAL::get()->find_all_by_questionnaireid('QunaireQuestionRef', $questionNaire->id);
foreach ($quNaireQuestionRefs as $quNaireQuestionRef) {
    $dspQuestionIds[] = $quNaireQuestionRef->nfsQuestion->id;
}
$answers = $answerNaire->isNull() == false ? $answerNaire->answers : '';
$resultRefs = $answerNaire->getResultRefs();
$answerInfos = array();
if (is_array($answers)) {
    foreach ($answers as $answer) {
        $answerInfos[$answer->question->id] = $answer;
    }
}
$questionCategories = $checkUpTpl->getQuestionCategories();
Пример #8
0
 private function addPost2Flow($user, $ref, $postContent, $option)
 {/*{{{*/
     // 如果还有继续能回复post的就打开post回复开关
     if ($ref->isClosePost())
     {
         DoctorPatientPostClient::getInstance()->switchPatientPostCan($this->user->id, $ref->id);
     }
     if ($postContent || (isset($option['attachmentIds']) && false == empty($option['attachmentIds'])))
     {
         $post = DoctorPatientPostClient::getInstance()->addPost($ref->id, $this->user->id, $postContent, $option);
         if (false == $post->isNull())
         {
             //系统日志
             try{
                 FlowClient::getInstance()->addLog($ref,$this->user, DoctorPatientLog::TYPE_SYSTEM_LOG, 'FlowController::createPost', $post);
             }catch(Exception $ex)
             {}
             //管理员给患者的提示信息失效
             NfsClient::getInstance()->disablePatientNotice($ref->id);
         }
         return $post->id;
     }
     return 0;
 }/*}}}*/
 private function categoryId_reportList($reportList)
 {
     /*{{{*/
     $res = NfsClient::getInstance()->getCategoryList4Report();
     $allCategoryList = $res['common'] + $res['other'];
     $resultArr = array();
     foreach ($allCategoryList as $category) {
         foreach ($reportList as $report) {
             if ($report->category->id == $category->id) {
                 $resultArr[$category->id][$report->id] = $report;
             }
         }
     }
     return $resultArr;
 }
Пример #10
0
    public function createPost($request, $response)
    {/*{{{*/
        $ref = DAL::get()->find('DoctorPatientRef', $request->refid);
        if ($ref->isNull() || ($this->user->id != $ref->user->id))
        {
            header('Location: '.$response->touchUrl);
            return;
        }

        // 如果还有继续能回复post的就打开post回复开关
        if ($ref->isClosePost())
        {
            DoctorPatientPostClient::getInstance()->switchPatientPostCan($this->user->id, $ref->id);
        }
        $option = array();
        $attachmentIds = ($request->attachIds != null) ? $request->attachIds : '';
        $attachmentArr = explode(',', $attachmentIds);
        $option['attachmentIds'] = $attachmentArr;
        $delAttIds = array();
        $paList = DAL::get()->find('PatientAttachment', $attachmentArr);
        foreach($paList as $index => $pa)
        {
            if($pa->isNull() || $pa->isDeleted())
            {
                $delAttIds[] = $pa->id;
            }
        }
        foreach ($attachmentArr as $attKey => $attachment)
        {
            if ($attachment == "" || in_array($attachment, $delAttIds))
            {
                unset($attachmentArr[$attKey]);
            }
        }

        //$postContent = XString::convertUTF8ToGBK($request->content);
        $postContent = $request->content;
        if(($postContent == '点击此处跟大夫对话!' || $postContent == '请填写咨询内容...' || $postContent == '') && false == empty($attachmentArr))
        {
            $postContent = '有新资料上传';
        }
        if (isset($_SESSION['flowMemory'][$ref->id]))
        {
            unset($_SESSION['flowMemory'][$ref->id]);
        }
        if ($postContent || false == empty($attachmentArr))
        {
            $post = DoctorPatientPostClient::getInstance()->addPost($ref->id, $this->user->id, $postContent, $option);


            if (false == $post->isNull())
            {
                //系统日志
                try{
                    FlowClient::getInstance()->addLog($ref,$this->user, DoctorPatientLog::TYPE_SYSTEM_LOG, 'FlowController::createPost', $post);
                }catch(Exception $ex)
                {}

                //管理员给患者的提示信息失效
                NfsClient::getInstance()->disablePatientNotice($ref->id);
            }
        }

        $url = $ref->getTouchUrl($this->touchDomain);
        $response->setRedirect($url);
    }/*}}}*/
Пример #11
0
 public function getAllPaiedFollowUpList($spaceId, $lastPostTime, $fetchCount)
 {/*{{{*/
     $res = NfsClient::getInstance()->getAllPaiedFollowUpList4Wap($spaceId, $fetchCount, $lastPostTime);
     $infos = array();
     foreach($res['list'] as $doctorpatientref)
     {
         $info = $this->_getPatientInfo($doctorpatientref->patient); 
         $info['id'] = $doctorpatientref->id;
         $followupOwner = $doctorpatientref->user->getFollowupPatientSignin($spaceId);
         $info['hospitalCaseNo'] = $followupOwner->hospitalCaseNO;
         $info['patientSignId'] = $followupOwner->id;
         $info['isRead'] = $doctorpatientref->isSpaceRead;
         $info['treatedTime'] = $doctorpatientref->treatedTime->toShortString();
         $info['lastPostTime'] = $doctorpatientref->lastPostTime;
         $info['lastPostUserName'] = ($doctorpatientref->patient->name == '')? $doctorpatientref->patient->user->name : $doctorpatientref->patient->name;
         if($doctorpatientref->isLastPostBySpace())
         {
             $info['lastPostUserName'] = $doctorpatientref->space->name;
         }
         $infos[] = $info;
     }
     $this->content = $infos;
 }/*}}}*/
Пример #12
0
 private function getAllFreeFollowupCount()
 {
     /*{{{*/
     return NfsClient::getInstance()->getRefsCount2FreeFollowupOwner($this->space->id);
 }
Пример #13
0
    private function getPagedUnFlows4Followup($space, $pageId, $pageSize)
    {/*{{{*/
        $res = NfsClient::getInstance()->getSpaceUnreadCaseFlows($space->id, $pageId, $pageSize);
        $flowsList = $res['list'];
        $unThreadList = array();
        if ($pageId == 1)  //第一页才取收费
        {
            $unPostThreadList = DAL::get()->find_all_spaceNotProcessList('proposal', $space, ServiceDef::TYPE_FLOW, array('isSpaceRead'=>0));
            $unThreadList = $this->getRecommendCaseAndNewThread($unPostThreadList, $space->id, false);
        }

        $flowList = $this->getOldThreadLists($space->user->id, $flowsList);
        $allList = array_merge($unThreadList, $flowList);

        $pageInfo = Pager::calcPageInfo($res['pageInfo']['total'], $pageId, $pageSize);
        $this->pageInfo = array("nowpage" => $pageId, 'pages' => $pageInfo['pages'], 
                'total'=>$pageInfo['total'], 'pagesize' => $pageSize);
        return $allList;
    }/*}}}*/
Пример #14
0
 public function addTemporaryTask($request, $response)
 {
     /*{{{*/
     // 跟进任务时间要晚于今天
     if (XDateTime::dayDiff(XDateTime::today(), XDateTime::valueOf($request->nfstasktime)) < 1) {
         echo '跟进任务日期要晚于今天';
         exit;
     }
     $doctorPatientRefId = $request->doctorPatientRefId;
     $doctorPatientRef = DAL::get()->find('DoctorPatientRef', $doctorPatientRefId);
     $qids = $request->var;
     $questions = array();
     $categories = array();
     $tpls = array();
     foreach ($qids as $qid) {
         $question = DAL::get()->find('nfsquestion', $qid);
         if ($question->isNull()) {
             $category = DAL::get()->find('questioncategory', $qid);
             if ($category->isScale()) {
                 $questionArr = $category->questions;
                 $firstQuestion = array_shift($questionArr);
                 $firstQuestionId = $firstQuestion->id;
                 $scaleTplId = NfsClient::getInstance()->createQuestionNaireTpl(array($category), $category->name, QuestionNaireTpl::TYPE_LINK, $firstQuestionId);
                 $scaleTpl = DAL::get()->find('questionnairetpl', $scaleTplId);
                 $tpls[] = $scaleTpl;
                 continue;
             }
             $categories[$category->id] = $category;
             $tmpQuestions = $category->getQuestions();
             foreach ($tmpQuestions as $tmpQuestion) {
                 $questions[$tmpQuestion->id] = $tmpQuestion;
             }
         } else {
             $questions[$question->id] = $question;
         }
     }
     $questionCates = array();
     $questionStr = "";
     foreach ($questions as $question) {
         $hasInclude = false;
         foreach ($categories as $category) {
             $questionCates[$category->id] = $category;
             if ($category->hasInclude($question->category)) {
                 $hasInclude = true;
             }
         }
         if ($hasInclude == false) {
             $questionCates[$question->category->id] = $question->category;
         }
         $questionStr .= $question->category->name . "-" . $question->title . " ";
     }
     $checkupName = $request->checkupname;
     if (empty($questionCates) == false) {
         $questionTplId = NfsClient::getInstance()->createQuestionNaireTpl($questionCates, $checkupName, QuestionNaireTpl::TYPE_CHECK, 0, QuestionNaireTpl::IS_SHOW_BUTTON_NO);
         $questionTpl = DAL::get()->find('QuestionNaireTpl', $questionTplId);
         $tpls[] = $questionTpl;
         $questionNaire = NfsClient::getInstance()->createQuNaire($doctorPatientRef->space, $questionTpl, $questions);
     }
     $description = $request->shuoming == null ? '' : $request->shuoming;
     $checkupDateTime = XDateTime::valueOf($request->checkuptime);
     $isCycleTemporaryTask = $request->iscycletemporarytask != null ? true : false;
     $cycleDay = $request->cycleday;
     $nfsDisease = DAL::get()->find('nfsDisease', $request->nfsdiseaseid);
     if ($nfsDisease->isNull()) {
         echo "随访的疾病不存在,请核实。。。";
         exit;
     }
     if ($isCycleTemporaryTask == true) {
         CheckupClient::getInstance()->addUserCycleTemporaryTask($nfsDisease, $doctorPatientRef->user->id, $doctorPatientRef->space->id, $checkupDateTime, $checkupName, $tpls, $cycleDay, $description);
     } else {
         CheckupClient::getInstance()->addUserTemporaryTask($nfsDisease, $doctorPatientRef->user->id, $doctorPatientRef->space->id, $checkupDateTime, $checkupName, $tpls, $description);
     }
     //添加电话任务
     $doctorPatientPost = DoctorPatientPostClient::getInstance()->getOnePostByRefId($doctorPatientRef->id);
     //电话咨询任务的模板
     $model = DAL::get()->find_by_title('nfsTaskModel', '临时复查跟踪任务');
     $desc = "复查名称:" . $checkupName . "\n复查日期:" . $checkupDateTime . "\n说明:" . $description . "\n复查项:" . $questionStr;
     if ($doctorPatientPost->isNull() == false && $model->isNull() == false) {
         $role = DAL::get()->find_by_name("followupAuditorRole", FollowupAuditorRole::NAME_ASSISTANTDOCTOROPERATION);
         $deadline = XDateTime::valueOf($request->nfstasktime);
         TaskClient::getInstance()->addTask(array($model), $doctorPatientPost, $doctorPatientRef->space, $doctorPatientRef->user, $this->auditor, $deadline, $desc, $role->id);
     }
     $response->setRedirect($response->router->urlfor('nfsaudit/managetemporarytask', array('refid' => $doctorPatientRefId)));
 }
Пример #15
0
<div style="margin-bottom:10px;">
<?php 
$groupAnwerList = NfsClient::getInstance()->getAnswerListByAnwNaire4group($answerNaireList[$flow->relatedObject->id]->id);
$i = 0;
foreach($groupAnwerList as $answer)
{
	$question = $answer->question;
	$anwHtml = '';
	if($question->isRadio())
	{
		$anwOption = DAL::get()->find('option', $answer->content);
		$anwHtml = $anwOption->title;
	}
	else
	{
		$anwHtml = $answer->content;
	}
	if($i % 2 == 0)
	{
		echo '<p style="padding-left:130px;">';
	}
	$i++;
	?>
	<span class="fb dil" style="width:220px;">
	   <?=$question->title ?>: <span class="fn"><?=$anwHtml ?></span>
	</span>
 <?php
	if($i % 2 == 0)
	{
		echo "</p>";
Пример #16
0
 private function searchDiary($request, $response)
 {
     /*{{{*/
     $vars = $request->vars == null ? array() : $request->vars;
     $search = $request->search;
     $params = $vars;
     $params['search'] = $search;
     //搜索方式
     $count = 15;
     $page = $request->getRequest('page', 1);
     $res = NfsClient::getInstance()->searchDiaries($page, $count, $params);
     $response->diaryList = $res['diaries'];
     $response->pagelink = '';
     if (false == empty($res['pageInfo'])) {
         $response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate('/followup/diarytask?search=' . $search . '&' . http_build_query(array('vars' => $params)) . '&page='), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
     }
     $response->vars = $vars;
 }
Пример #17
0
    public function uploadAttach($request, $response)
    {/*{{{*/
        $file = $_FILES['file'];
        if ($file['error']==0)
        {
            $bingLi = $this->attach2bingli($request->patientId, $file);

            //管理员后台批量上传生成复查报告
            $ticketId= $request->ticketid;
            $auditorId= $request->auditorid;
            if(false == $bingLi->isNull() && isset($ticketId) && isset($auditorId))
            {
                NfsClient::getInstance()->addCheckupReport4AuditorBatchUpload($bingLi->id, $ticketId, $auditorId);
            }
            echo "{".$bingLi->id."}";

        }
        return parent::DIRECT_OUTPUT;
    }/*}}}*/
Пример #18
0
<div class="adterOperation mt30 pt15"> 
    <h4>Êõºó»Ö¸´Çé¿ö£º</h4> 
<?php 
$i = 0;
foreach ($linkArr as $sourceEntity) {
    $i++;
    $space = DAL::get()->find('space', $checkupTicket->dispatcher->id);
    $quNaire = NfsClient::getInstance()->createQuNaire($space, $sourceEntity);
    $linkAnswerNaire = NfsClient::getInstance()->getUserValidAnswerNaire($user->id, $quNaire->id);
    $linkQuestionNaire = $quNaire;
    $questionNaireLinkTpl = $sourceEntity;
    if ($linkAnswerNaire->isNull() == false) {
        include '_nfsnaire_detail.php';
    } else {
        include '_add_nfsnaire.php';
    }
}
?>
<!--end feedback_form-->
    <script>
    function getCurrWinPosition()
    {
        var currWin=$('#feedback_form')
            var browserWidth=$(window).width();
        var browserHeight=$(window).height();
        var currentWidth=currWin.outerWidth(true);
        var currentHeight=currWin.outerHeight(true);
        var scrollLeft=$(window).scrollLeft();
        var scrollTop=$(window).scrollTop();
        var left=scrollLeft+(browserWidth-currentWidth)/2;
        var top=scrollTop+(browserHeight-currentHeight)/2;
Пример #19
0
 public function ajaxBuyPresent($request, $response)
 {
     /*{{{*/
     $patientId = $request->patientid;
     $presentId = $request->presentid;
     list($canSend, $errorMsg) = $this->canSendPresent($patientId, $presentId);
     $response->canSend = $canSend;
     $response->errorMsg = $errorMsg;
     if ($this->user->isNull()) {
         return 'ajaxfailsent';
     }
     if (false == $canSend) {
         return 'ajaxfailsent';
     }
     $isAllowSend = $this->isAllowSendPresent($response);
     if (false == $isAllowSend) {
         return 'notsend';
     }
     //处理老订单还是新订单
     $present = DAL::get()->find('Present', $presentId);
     $patient = DAL::get()->find('patient', $patientId);
     $presentOrder = PresentClient::getInstance()->createOrder($this->user, $patient, $this->space, $present, $request->wish, $request->old);
     $response->presentOrder = $presentOrder;
     $result = Account::PAY_RESULT_FAIL;
     $url = '';
     $couponId = 0;
     if (false == $presentOrder->isNull()) {
         $result = ScoreClient::getInstance()->payForPresent($this->user->id, $this->space->id, $presentOrder->id);
         $url = Account::resultUrl($result, 'present', $presentOrder->id);
     }
     $errorMsg = '';
     if (Account::PAY_RESULT_FAIL == $result) {
         $errorMsg = '订单提交失败';
     } else {
         if (Account::PAY_RESULT_FAIL_COUPON == $result) {
             $errorMsg = '代金券支付失败!';
         } else {
             if (Account::PAY_RESULT_NEED_RECHARGE != $result && Account::PAY_RESULT_NEED_EXCHANGE != $result && Account::PAY_RESULT_SUCC != $result) {
                 $errorMsg = '积分处理流程失败!';
             } else {
                 $ref = DAL::get()->find_by_spaceid_and_patientid_and_status('doctorpatientref', $this->space->id, $patientId, DoctorPatientRef::STATUS_INIT);
                 $response->ref = $ref;
                 $response->url = $url;
                 $response->score = $present->price;
                 $response->heartValue = $present->heartValue;
                 if (Account::PAY_RESULT_SUCC == $result) {
                     AsyncSendMessage::regAsyncMessage($presentOrder);
                     //发送站内信
                     if ($ref instanceof DoctorPatientRef) {
                         //管理员给患者的提示信息失效
                         NfsClient::getInstance()->disablePatientNotice($ref->id);
                     }
                 }
                 if ($presentOrder->isAudited()) {
                     return 'ajaxsuccesssent';
                 } else {
                     return 'ajaxsuccesscustom';
                 }
             }
         }
     }
     $response->errorMsg = $errorMsg;
     $response->result = $result;
     return 'ajaxfailsent';
 }
Пример #20
0
    private function getNextUnreadByCurrent($thread)
    {/*{{{*/
        $nextNeedAlert = false;
        $nextTip = '';
        $currentName = '';
        $nextName = '';
        $nextCount = 0;
        $nextList = $this->_newSpace->getUrl().'zixun/list.htm?type=';
        $nextUrl = '';

        $nextRecord = NfsClient::getInstance()->getNextUnreadOfVisit($this->_newSpace->id);
        $currentName = '求诊患者';

        if($nextRecord->isNull())
        {
            $nextNeedAlert = true;
            $nextCount = NfsClient::getInstance()->getRefsCount2UnreadPaidFollowupOwner($this->_newSpace->id);
            if($nextCount > 0)
            {
                $nextRecord = NfsClient::getInstance()->getRef2NextUnreadPaidFollowupOwner($this->_newSpace->id);
                $nextName = 'VIP随访患者';
                $nextList .= 'unreadVIPFollowup';
            }
        }

        if($nextCount > 0)
        {
            $nextTip = $currentName.'已经查看完毕,还有'.$nextCount.'条'.$nextName.'未读...';
        }
        elseif($nextRecord->isNull())
        {
            $nextTip = '未读患者查看完毕';
        }

        if($nextRecord->isNull()) {
            $nextList .= 'all';
        } else {
            $nextUrl = $nextRecord->getUrl();
        }

        return array('nextUrl'=>$nextUrl, 'nextList'=>$nextList
            , 'nextNeedAlert'=>$nextNeedAlert, 'nextTip'=>$nextTip);
    }/*}}}*/
Пример #21
0
    public function index($request,$response)
    {/*{{{*/
        if($this->user->isNull())
        {
            $response->setRedirect('http://'.URL_PREFIX.'passport.haodf.com/user/login');
            return;
        } 
        $user = $this->user;
        $signin = $this->user->getFollowupPatientSignin();
        if($signin->isNull() == false)
        {
            if($signin->isOpenFollowup() || $signin->isSuspendedFollowup())
            {
                header("Location: http://".URL_PREFIX."passport.haodf.com/myhealth/healthdiary");
                return;
            }
            //在审核通过与待审核状态下
            elseif(false == $signin->isCloseFollowup() && false == $signin->isRefused())
            {
                //同意条款,进中间页
                if($signin->isNoticedYes())
                {
                    $response->setRedirect('http://'.URL_PREFIX.'passport.haodf.com/myhealth/followupserviceinfo');
                    return;
                }
                //管理员拒绝前,未确认条款(也就是没点同意,也没有点不同意),进知情同意书
                if(false == $signin->isNoticed())
                {
                    $response->setRedirect('http://'.URL_PREFIX.'passport.haodf.com/myhealth/manhua');
                    return;
                }
            }
        }

        $limit = 10;
        $flows = DAL::get()->find_all_lastSpacePost_by_user('doctorpatientref', $this->user, $limit);
       // $telProposals = DAL::get()->find_all_by_servicedef_and_userId_and_status('proposal', $this->user, ServiceDef::TYPE_TELORDER, Proposal::STATUS_NORMAL);
        $statuses = array(TelDto::STATUS_UNPAID, TelDto::STATUS_WAITING);
        $telProposals = TelDto::getListByStatuses($this->user, $statuses);
        $bookingOrder = DAL::get()->find_all_by_userid_and_valid('bookingOrder', $this->user->id);

        $relatedObjs = array_merge($telProposals, $bookingOrder, $flows);
        $relatedObjs = $this->sortUpdateTime($relatedObjs);
        $response->relatedObjs = $relatedObjs;

        $indexCnt = 5;
        $myDoctorList = SubscriptionClient::getInstance()->getMyDoctorInfos( $this->user->id );
        $subList = SubscriptionClient::getInstance()->getSubcriptDiseaseList( $this->user->id, $indexCnt );
        $articleRes = SubscriptionClient::getInstance()->getUserSubscriptionArticleList4Web($this->user->id, $total=1);
        $response->articleRes = isset($articleRes['list']) ? $articleRes['list'] : array();
        $lastestTopics = ResidentEvilClient::getInstance()->getTopicsByUserId($this->user->id, 5);

        $answerNaireRes = NfsClient::getInstance()->getAnswerNaireList($user->id, 1, 5);
        $answerNaireList = $answerNaireRes['answerNaireList'];
        $response->answerNaireList = $answerNaireList;

        $response->user = $user;
        $response->lastestTopics = $lastestTopics;
        $response->myDoctorList = $myDoctorList;
        $response->subList = $subList;
    }/*}}}*/