예제 #1
0
 private function saveHopeHelpInfoNotTreated($request, $response)
 {/*{{{*/
     if(XString::getLengthOfGBKString($_REQUEST['hopeHelp'])<10 || XString::getLengthOfGBKString($_REQUEST['hopeHelp'])>1000)
     {
         throw new BizException('请控制需要得到的帮助在10~1000字之间');
     }
     $hopeHelp = XString::convertUTF8ToGBK(ltrim($request->hopeHelp));
     $hopeHelp = BingLiDto::createHopeHelpDto($hopeHelp);
     $hopeHelpKey = AskSessionInfo::addPatientInfo(BingLiDto::NODE_DEFINE_HOPEHELP, $hopeHelp);
     AskSessionInfo::bindPatientInfos(NodeObj::NODE_DEFINE_HOPEHELP, array($hopeHelpKey));
 }/*}}}*/
예제 #2
0
 private function saveDiseaseInfoNotTreated($request, $response)
 {/*{{{*/
     if(XString::getLengthOfGBKString($_REQUEST['conditionDesc'])<5 || XString::getLengthOfGBKString($_REQUEST['conditionDesc'])>20)
     {
         throw new BizException('没去过医院,请控制您哪里不舒服项字数在5~20字之间');
     }
     $patientDisease = BingLiDto::createDiseaseDto(ltrim($request->conditionDesc));
     $diseaseKey = AskSessionInfo::addPatientInfo(NodeObj::NODE_DEFINE_DISEASE, $patientDisease);
     AskSessionInfo::bindPatientInfos(NodeObj::NODE_DEFINE_DISEASE, array($diseaseKey));
 }/*}}}*/