<?php

$keyWords = array();
if (isset($proposal) && false == $proposal->isNull()) {
    $bingLiSet = BingLiDtoClient::getInstance()->getBingLiByRelatedObj($proposal);
    $bingLiSetArray = BingLiDto::transBingLiDtoInfos2Array($bingLiSet);
    $sensitiveWords = BeanFinder::get('ContentFilter')->getSensitiveWordsRecursive("Flow", $bingLiSetArray);
    $words = $proposal->getNecessaryWords();
    $keyWords = array_values(array_unique(array_merge($sensitiveWords, $words)));
}
?>

<script type="text/javascript" src="http://i1.hdfimg.com/js/highlighter/highlight.js?1"></script>
<script>
function highlightWords()
{
    heightLight($('.highlight'), <?php 
echo json_encode(XString::convertEncoding($keyWords, 'utf-8', 'gbk'));
?>
);
}
window.onload=highlightWords;

</script>

Ejemplo n.º 2
0
 private function collectMedicineInfo($request, $response)
 {/*{{{*/
     if(XString::getLengthOfGBKString($_REQUEST['medname'])<1 || XString::getLengthOfGBKString($_REQUEST['medname'])>35)
     {
         throw new BizException('用药名称为必填信息且不能超过35字');
     }
     if(XString::getLengthOfGBKString($_REQUEST['meddesc'])<1 || XString::getLengthOfGBKString($_REQUEST['meddesc'])>100)
     {
         throw new BizException('服用说明必填信息且不能超过100字');
     }
     $medicineName = XString::convertUTF8ToGBK(ltrim($request->medicineName));
     $medicineDesc = XString::convertUTF8ToGBK(ltrim($request->medicineDesc));
     $medicine = BingLiDto::createMedicineDto($medicineName, $medicineDesc);
     return $medicine;
 }/*}}}*/
 public function ajaxAddBookingDto($request, $response)
 {
     /*{{{*/
     $proposal = DAL::get()->mustFind($request->proposalClass, $request->proposalId);
     list($time, $locationOfDay) = explode(',', $request->transfer);
     $schedule = ScheduleOfDate::getBySpaceAndTime($proposal->space, XDateTime::valueOf($time), $locationOfDay);
     NodeClient::getInstance()->removeBingLiByTypeList($proposal, array(BingLiDto::NODE_DEFINE_SCHEDULE, BingLiDto::NODE_DEFINE_SCHEDULESTR, BingLiDto::NODE_DEFINE_ADDRESS));
     $dtos = array();
     $dtos[] = BingLiDto::createScheduleDto($schedule->time->toString(), $proposal->patient->id);
     $dtos[] = BingLiDto::createScheduleStrDto($schedule->getLocationOfDayDesc(), $proposal->patient->id);
     $dtos[] = BingLiDto::createAddressDto($schedule->address, $proposal->patient->id);
     foreach ($dtos as $dto) {
         NodeClient::getInstance()->addBingLi4RelatedObj($proposal, $dto);
     }
     echo NotificationRuleFactory::create($proposal)->alterWarningAndCheckOther();
     //加号方案的检查
     return self::DIRECT_OUTPUT;
 }
Ejemplo n.º 4
0
 public function saveHopeHelp($request, $response)
 {/*{{{*/
     try{
         $hopeHelp = XString::convertToGbk($request->hopehelp);
         $hopeHelpDto = BingLiDto::createHopeHelpDto($hopeHelp);
         AskSessionInfo::modifyHopeHelp($hopeHelpDto);
         $hopeHelp = $hopeHelpDto->hopeHelp;
         echo nl2br($hopeHelp);
         return parent::DIRECT_OUTPUT; 
     }
     catch (IllegalWordsException $ex){
         echo '非法词汇';
         return parent::DIRECT_OUTPUT; 
     }
 }/*}}}*/
Ejemplo n.º 5
0
	public function addAttach($request, $response)
	{/*{{{*/
		if (isset($_FILES['attach'])) {
            $file = $_FILES['attach'];
            if ($file['error']==0) {
                $file['name'] = XString::convertToGbk($file['name']);
                $file['name'] = TuClient::getInstance()->checkFileSuffixName($file);
                $filePath = TuClient::getInstance()->uploadAttach($file);
                if(empty($filePath))
                {
                    exit();
                }
                if($this->_newUser->isNull())
                {
                    $this->_newUser = DAL::get()->find('user',PatientAttachment::DEFAULT_USERID);
                }
                $attach = AttachClient::getInstance()->addAttach($this->_newUser->id, $file['name'], $filePath, $file['type'], $file['size'], Attachment::TYPE_JPG, '', '');
                // 传入默认的patientid
                $user = $this->_newUser;
                $patientId = $request->patientId;
                if(empty($patientId) || $patientId == "all")
                {
                    $patientId = PatientAttachment::DEFAULT_PATIENTID;
                } else
                {
                    //传过来patient以后,要用patient的user
                    $patient = DAL::get()->find('Patient', $patientId);
                    $user = $patient->user;
                }
                $checkTime = $request->date;
                $hospitalId = $request->hoskey;
                $hospitalName = $request->hospitalName;
                $facultyName = $request->facultyName;
                $itemName = $request->itemName;
                $hospitalId   = isset($hospitalId)?$hospitalId:'';
                $checkTime    = isset($checkTime)?$checkTime:'';
                $hospitalName = isset($hospitalName)?$hospitalName:'';
                $facultyName  = isset($facultyName)?$facultyName:'';
                $itemName     = isset($itemName)?$itemName:'';
				$bingLi = BingLiClient::getInstance()->addBingLi($user->id, $patientId, '', PatientAttachment::TYPE_PIC, 0, '', $checkTime, $attach->id, $hospitalName, $facultyName, $itemName, $hospitalId);
                $patientAttachment = BingLiDto::createPatientAttachmentDto($bingLi->id, $hospitalId, $patientId);
                AskSessionInfo::addPatientInfo(NodeObj::NODE_DEFINE_ATTACHMENT, $patientAttachment);

                //随访复查报告
                $ticketId= $request->ticketid;
                if(isset($ticketId))
                {
                    if(CheckupTicket::NONE_TICKETID != $ticketId)
                    {
                        echo "<script>parent.addCheckupReportLeft($ticketId,$bingLi->id)</script>";
                    }
                    else
                    {//无指定复查直接上传附件
                        echo "<script>parent.afterUpload();</script>";
                    }
                }
                else
                {
                    echo "<script>parent.tb_remove();parent.showMyAttach('el_my_attachment', 0, '".$bingLi->id."');</script>";
                }
			}
		}
        return parent::DIRECT_OUTPUT;
	}/*}}}*/
Ejemplo n.º 6
0
<?php $treated = BingLiDto::getOne($bingliSet, BingLiDto::NODE_DEFINE_TREATED);?>
<?php if($treated->isNull() || (false == $treated->isNull() && $treated->treated)) { //找这个医生看过病?>
<li>
    <p class="black">所就诊医院科室:</p>
    <div class="pl10 pt5 hh">
        <p><?=$dto->hospitalName?>,<?=$dto->facultyName?></p>
    </div>
</li>
<?php } ?>
Ejemplo n.º 7
0
    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)));
    }/*}}}*/
Ejemplo n.º 8
0
<li>
    <p class="black">ÉêÇë¼ÓºÅʱ¼ä£º</p>
    <div class="pl10 pt5">
        <p class="hh"><?=XDateTime::valueOf($dto->schedule)->toShortString()?>£¬<?=BingLiDto::getOne($bingliSet, BingLiDto::NODE_DEFINE_SCHEDULESTR)->scheduleStr?></p>
    </div>
</li>