From f5f91244fcf156320120302f71413c1b1572d53c Mon Sep 17 00:00:00 2001 From: liu Date: Mon, 25 Dec 2023 14:59:24 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E4=BF=AE=E5=A4=8D=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=B2=A1=E6=9C=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/ask/AskAncillaryHistoryResVO.java | 3 +++ .../mapper/DiagnosisAncillaryRecordMapper.xml | 1 + .../supervision/service/impl/AskServiceImpl.java | 14 ++++++-------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/virtual-patient-model/src/main/java/com/supervision/vo/ask/AskAncillaryHistoryResVO.java b/virtual-patient-model/src/main/java/com/supervision/vo/ask/AskAncillaryHistoryResVO.java index c84a8d42..4fc4a8b9 100644 --- a/virtual-patient-model/src/main/java/com/supervision/vo/ask/AskAncillaryHistoryResVO.java +++ b/virtual-patient-model/src/main/java/com/supervision/vo/ask/AskAncillaryHistoryResVO.java @@ -29,6 +29,9 @@ public class AskAncillaryHistoryResVO { @ApiModelProperty("辅助检查项结果") private String result; + @ApiModelProperty("位置名称") + private String locationName; + @ApiModelProperty("关联的初步诊断ID") private String primaryId; diff --git a/virtual-patient-model/src/main/resources/mapper/DiagnosisAncillaryRecordMapper.xml b/virtual-patient-model/src/main/resources/mapper/DiagnosisAncillaryRecordMapper.xml index fd671f04..bddca72f 100644 --- a/virtual-patient-model/src/main/resources/mapper/DiagnosisAncillaryRecordMapper.xml +++ b/virtual-patient-model/src/main/resources/mapper/DiagnosisAncillaryRecordMapper.xml @@ -47,6 +47,7 @@ t1.result as result, t1.assessment_result as assessmentResult, t1.id as id, + t2.location_name as locationName, t3.diagnosis_assessment_flag as diagnosisAssessmentFlag, t1.create_time as createTime from vp_diagnosis_ancillary_record t1 diff --git a/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java b/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java index 4e1d8e59..4639a2bf 100644 --- a/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java +++ b/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java @@ -203,7 +203,7 @@ public class AskServiceImpl implements AskService { String rasaResult = RasaUtil.talkRasa(talkReqVO.getText(), UserUtil.getUser().getId(), process.getPatientId()); // 如果rasa没有识别出来,则返回默认值 if (StrUtil.isBlank(rasaResult)) { - downloadTalkVideo(defaultNoMatchId,response); + downloadTalkVideo(defaultNoMatchId, response); saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), null, "您好,我没有听懂您说什么"); } TalkResultResVO talkResultResVO = new TalkResultResVO(); @@ -225,7 +225,7 @@ public class AskServiceImpl implements AskService { AskTemplateQuestionLibrary library = askTemplateQuestionLibraryService.getById(rasaResult); if (ObjectUtil.isEmpty(library)) { log.info("{}:未从问题库中找到,回答未识别语句", rasaResult); - downloadTalkVideo(defaultNoMatchId,response); + downloadTalkVideo(defaultNoMatchId, response); saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), null, "您好,我没有听懂您说什么"); } else { AskPatientAnswer askPatientAnswer = askPatientAnswerService.lambdaQuery().eq(AskPatientAnswer::getPatientId, process.getPatientId()) @@ -236,7 +236,7 @@ public class AskServiceImpl implements AskService { // 首先看看default里面是不是存在,如果存在,就从default里面去找 if (StrUtil.isNotEmpty(library.getDefaultAnswer())) { String resText = library.getDefaultAnswer(); - downloadTalkVideo(defaultNoMatchId,response); + downloadTalkVideo(library.getDefaultAnswerResourceId(), response); // 保存记录 saveQaRecord(talkReqVO.getProcessId(), "default", library.getId(), talkReqVO.getText(), library, resText); log.info("{}:找到了默认答案:{}", rasaResult, talkReqVO.getText()); @@ -257,13 +257,14 @@ public class AskServiceImpl implements AskService { saveQaRecord(talkReqVO.getProcessId(), "default", library.getId(), talkReqVO.getText(), library, resText); } else { log.info("{}:病历配置的回答:{}:为空不为空,但在获取的时候,答案为空,但是获取默认语句也为空,那么回复未识别语句", rasaResult, askPatientAnswer.getId()); - downloadTalkVideo(defaultNoMatchId,response); + downloadTalkVideo(defaultNoMatchId, response); + saveQaRecord(talkReqVO.getProcessId(), "default", null, talkReqVO.getText(), library, "您好,我没有听懂您说什么"); } } else { String resText = askPatientAnswer.getAnswer(); log.info("{}:找到了病历配置的回答语句:{},回答内容:{}", rasaResult, askPatientAnswer.getId(), resText); - downloadTalkVideo(askPatientAnswer.getAnswerResourceId(),response); + downloadTalkVideo(askPatientAnswer.getAnswerResourceId(), response); // 保存记录 saveQaRecord(talkReqVO.getProcessId(), "patient", askPatientAnswer.getId(), talkReqVO.getText(), library, resText); } @@ -273,9 +274,6 @@ public class AskServiceImpl implements AskService { } talkResultResVO.setType(1); return talkResultResVO; - -// -// return null; } private void downloadTalkVideo(String fileId, HttpServletResponse response) {