|
@@ -11,6 +11,7 @@ import com.diagbot.dto.DiagnosePageDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.VerifyDataDTO;
|
|
|
import com.diagbot.entity.CommonParam;
|
|
|
+import com.diagbot.entity.Concept;
|
|
|
import com.diagbot.entity.Diagnose;
|
|
|
import com.diagbot.entity.DiagnoseDetail;
|
|
|
import com.diagbot.entity.DiagnoseDetailSave;
|
|
@@ -146,7 +147,7 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<ConceptBaseDTO> indexFac(DiseaseIndexVO diseaseIndexVO) {
|
|
|
- // 设置量表类型
|
|
|
+ // 设置诊断类型
|
|
|
diseaseIndexVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
|
|
|
return this.index(diseaseIndexVO);
|
|
|
}
|
|
@@ -402,6 +403,7 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
// Set<String> set = libraryForDiagnoseDTOS.stream().map(row -> row.getName()+ "_"+row.getTypeId())
|
|
|
// .collect(Collectors.toSet());
|
|
|
Set<String> libSet = libraryInfoFacade.getLibraryForDiagnose2(); // 加载词库
|
|
|
+ Set<String> standardSet = libraryInfoFacade.getLibraryForStandard(); // 加载标准词词库数据
|
|
|
Set<String> lisMappingSet = lisMappingFacade.loadLisMappingFac(); // 加载公表项,需要关联同义词
|
|
|
Long time3 = System.currentTimeMillis();
|
|
|
res.append("加载词库:" + (time3 - time2) / 1000.0).append("秒,");
|
|
@@ -414,8 +416,8 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
codeList.add("拟诊"); // 公式校验手动添加拟诊文字
|
|
|
int j = 0;
|
|
|
if (ListUtil.isNotEmpty(detail)) {
|
|
|
- // 判断诊断名称是否在词库中
|
|
|
- flag = verifyExist(libSet, detail.get(0).getDisName(),
|
|
|
+ // 判断诊断名称是否在标准词库中
|
|
|
+ flag = verifyExist(standardSet, detail.get(0).getDisName(),
|
|
|
Arrays.asList(LexiconTypeEnum.DIAGNOSIS.getKey()));
|
|
|
if (!flag) {
|
|
|
DiagnoseQuestion diagnoseQuestion1 = createDiagnoseQuestion(detail.get(0).getDiagnoseId(),
|
|
@@ -716,9 +718,16 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
int j = param.getJ();
|
|
|
Set<String> questionSet = new HashSet<>(); // 问题词去重变量
|
|
|
|
|
|
- // 判断诊断名称是否在词库中
|
|
|
+ // 判断诊断名称是否在标准词库中
|
|
|
boolean flag = true;
|
|
|
- flag = verifyExist(set, diagnoseWrapper.getDisName(), Arrays.asList(LexiconTypeEnum.DIAGNOSIS.getKey()));
|
|
|
+ int count = conceptFacade.count(new QueryWrapper<Concept>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("lib_type", LexiconTypeEnum.DIAGNOSIS.getKey())
|
|
|
+ .eq("lib_name", diagnoseWrapper.getDisName())
|
|
|
+ );
|
|
|
+ if (count == 0) {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
if (!flag) {
|
|
|
DiagnoseQuestion diagnoseQuestion1 = createDiagnoseQuestion(diagnoseWrapper.getId(),
|
|
|
diagnoseWrapper.getDisName(), DiagnoseFeatureTypeEnum.Dis.getKey(),
|