bugfix:修复位置名称没有的问题

dev_2.0.0
liu 1 year ago
parent 8ba94d592e
commit f5f91244fc

@ -29,6 +29,9 @@ public class AskAncillaryHistoryResVO {
@ApiModelProperty("辅助检查项结果") @ApiModelProperty("辅助检查项结果")
private String result; private String result;
@ApiModelProperty("位置名称")
private String locationName;
@ApiModelProperty("关联的初步诊断ID") @ApiModelProperty("关联的初步诊断ID")
private String primaryId; private String primaryId;

@ -47,6 +47,7 @@
t1.result as result, t1.result as result,
t1.assessment_result as assessmentResult, t1.assessment_result as assessmentResult,
t1.id as id, t1.id as id,
t2.location_name as locationName,
t3.diagnosis_assessment_flag as diagnosisAssessmentFlag, t3.diagnosis_assessment_flag as diagnosisAssessmentFlag,
t1.create_time as createTime t1.create_time as createTime
from vp_diagnosis_ancillary_record t1 from vp_diagnosis_ancillary_record t1

@ -203,7 +203,7 @@ public class AskServiceImpl implements AskService {
String rasaResult = RasaUtil.talkRasa(talkReqVO.getText(), UserUtil.getUser().getId(), process.getPatientId()); String rasaResult = RasaUtil.talkRasa(talkReqVO.getText(), UserUtil.getUser().getId(), process.getPatientId());
// 如果rasa没有识别出来,则返回默认值 // 如果rasa没有识别出来,则返回默认值
if (StrUtil.isBlank(rasaResult)) { if (StrUtil.isBlank(rasaResult)) {
downloadTalkVideo(defaultNoMatchId,response); downloadTalkVideo(defaultNoMatchId, response);
saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), null, "您好,我没有听懂您说什么"); saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), null, "您好,我没有听懂您说什么");
} }
TalkResultResVO talkResultResVO = new TalkResultResVO(); TalkResultResVO talkResultResVO = new TalkResultResVO();
@ -225,7 +225,7 @@ public class AskServiceImpl implements AskService {
AskTemplateQuestionLibrary library = askTemplateQuestionLibraryService.getById(rasaResult); AskTemplateQuestionLibrary library = askTemplateQuestionLibraryService.getById(rasaResult);
if (ObjectUtil.isEmpty(library)) { if (ObjectUtil.isEmpty(library)) {
log.info("{}:未从问题库中找到,回答未识别语句", rasaResult); log.info("{}:未从问题库中找到,回答未识别语句", rasaResult);
downloadTalkVideo(defaultNoMatchId,response); downloadTalkVideo(defaultNoMatchId, response);
saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), null, "您好,我没有听懂您说什么"); saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), null, "您好,我没有听懂您说什么");
} else { } else {
AskPatientAnswer askPatientAnswer = askPatientAnswerService.lambdaQuery().eq(AskPatientAnswer::getPatientId, process.getPatientId()) AskPatientAnswer askPatientAnswer = askPatientAnswerService.lambdaQuery().eq(AskPatientAnswer::getPatientId, process.getPatientId())
@ -236,7 +236,7 @@ public class AskServiceImpl implements AskService {
// 首先看看default里面是不是存在,如果存在,就从default里面去找 // 首先看看default里面是不是存在,如果存在,就从default里面去找
if (StrUtil.isNotEmpty(library.getDefaultAnswer())) { if (StrUtil.isNotEmpty(library.getDefaultAnswer())) {
String resText = library.getDefaultAnswer(); String resText = library.getDefaultAnswer();
downloadTalkVideo(defaultNoMatchId,response); downloadTalkVideo(library.getDefaultAnswerResourceId(), response);
// 保存记录 // 保存记录
saveQaRecord(talkReqVO.getProcessId(), "default", library.getId(), talkReqVO.getText(), library, resText); saveQaRecord(talkReqVO.getProcessId(), "default", library.getId(), talkReqVO.getText(), library, resText);
log.info("{}:找到了默认答案:{}", rasaResult, talkReqVO.getText()); log.info("{}:找到了默认答案:{}", rasaResult, talkReqVO.getText());
@ -257,13 +257,14 @@ public class AskServiceImpl implements AskService {
saveQaRecord(talkReqVO.getProcessId(), "default", library.getId(), talkReqVO.getText(), library, resText); saveQaRecord(talkReqVO.getProcessId(), "default", library.getId(), talkReqVO.getText(), library, resText);
} else { } else {
log.info("{}:病历配置的回答:{}:为空不为空,但在获取的时候,答案为空,但是获取默认语句也为空,那么回复未识别语句", rasaResult, askPatientAnswer.getId()); log.info("{}:病历配置的回答:{}:为空不为空,但在获取的时候,答案为空,但是获取默认语句也为空,那么回复未识别语句", rasaResult, askPatientAnswer.getId());
downloadTalkVideo(defaultNoMatchId,response); downloadTalkVideo(defaultNoMatchId, response);
saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), library, "您好,我没有听懂您说什么");
} }
} else { } else {
String resText = askPatientAnswer.getAnswer(); String resText = askPatientAnswer.getAnswer();
log.info("{}:找到了病历配置的回答语句:{},回答内容:{}", rasaResult, askPatientAnswer.getId(), resText); log.info("{}:找到了病历配置的回答语句:{},回答内容:{}", rasaResult, askPatientAnswer.getId(), resText);
downloadTalkVideo(askPatientAnswer.getAnswerResourceId(),response); downloadTalkVideo(askPatientAnswer.getAnswerResourceId(), response);
// 保存记录 // 保存记录
saveQaRecord(talkReqVO.getProcessId(), "patient", askPatientAnswer.getId(), talkReqVO.getText(), library, resText); saveQaRecord(talkReqVO.getProcessId(), "patient", askPatientAnswer.getId(), talkReqVO.getText(), library, resText);
} }
@ -273,9 +274,6 @@ public class AskServiceImpl implements AskService {
} }
talkResultResVO.setType(1); talkResultResVO.setType(1);
return talkResultResVO; return talkResultResVO;
//
// return null;
} }
private void downloadTalkVideo(String fileId, HttpServletResponse response) { private void downloadTalkVideo(String fileId, HttpServletResponse response) {

Loading…
Cancel
Save