|
|
|
@ -133,6 +133,7 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
askPatientAnswer.setMedicalId(medicalRecId);
|
|
|
|
|
askPatientAnswer.setAnswerResourceId(medicalRecQaVO.getAnswerResourceId());
|
|
|
|
|
askPatientAnswer.setAnswerType(answerType);
|
|
|
|
|
askPatientAnswer.setQuestion(CollUtil.getFirst(medicalRecQaVO.getQuestionList()));
|
|
|
|
|
askPatientAnswer.insert();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -215,6 +216,7 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
// 然后进行更新
|
|
|
|
|
existAnswer.setAnswer(medicalRecQaVO.getMedicalRecAnswer());
|
|
|
|
|
existAnswer.setAnswerResourceId(medicalRecQaVO.getAnswerResourceId());
|
|
|
|
|
existAnswer.setQuestion(CollUtil.getFirst(medicalRecQaVO.getQuestionList()));
|
|
|
|
|
existAnswer.updateById();
|
|
|
|
|
} else {
|
|
|
|
|
AskPatientAnswer askPatientAnswer = new AskPatientAnswer();
|
|
|
|
@ -222,6 +224,7 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
askPatientAnswer.setAnswer(medicalRecQaVO.getMedicalRecAnswer());
|
|
|
|
|
askPatientAnswer.setMedicalId(medicalRec.getId());
|
|
|
|
|
askPatientAnswer.setAnswerResourceId(medicalRecQaVO.getAnswerResourceId());
|
|
|
|
|
askPatientAnswer.setQuestion(CollUtil.getFirst(medicalRecQaVO.getQuestionList()));
|
|
|
|
|
askPatientAnswer.insert();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -260,6 +263,9 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
medicalRecQaVO.setAnswerType(Objects.isNull(e.getAnswerType()) ? 1 : e.getAnswerType());
|
|
|
|
|
// 病历的回答
|
|
|
|
|
medicalRecQaVO.setMedicalRecAnswer(e.getAnswer());
|
|
|
|
|
if (StrUtil.isNotEmpty(e.getQuestion())){
|
|
|
|
|
medicalRecQaVO.setQuestionList(CollUtil.newArrayList(e.getQuestion()));
|
|
|
|
|
}
|
|
|
|
|
medicalRecQaVO.setAnswerResourceId(e.getAnswerResourceId());
|
|
|
|
|
return medicalRecQaVO;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
@ -286,7 +292,16 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
AskTemplateQuestionLibrary questionLibrary = askQuestionMap.get(medicalRecQaVO.getLibraryQuestionId());
|
|
|
|
|
if (ObjectUtil.isNotEmpty(questionLibrary)) {
|
|
|
|
|
// 问题
|
|
|
|
|
medicalRecQaVO.setQuestionList(questionLibrary.getQuestion());
|
|
|
|
|
if (CollUtil.isNotEmpty(medicalRecQaVO.getQuestionList())){
|
|
|
|
|
if (CollUtil.isNotEmpty(questionLibrary.getQuestion())){
|
|
|
|
|
List<String> question = questionLibrary.getQuestion();
|
|
|
|
|
question.remove(CollUtil.getFirst(medicalRecQaVO.getQuestionList()));
|
|
|
|
|
medicalRecQaVO.getQuestionList().addAll(question);
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
medicalRecQaVO.setQuestionList(questionLibrary.getQuestion());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 类目
|
|
|
|
|
medicalRecQaVO.setDictId(questionLibrary.getDictId());
|
|
|
|
|
// 类目名称
|
|
|
|
|