|
@@ -60,12 +60,10 @@ public class TreatmentFacade {
|
|
|
if (disease == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "诊断不存在");
|
|
|
}
|
|
|
- if (treatmentMap == null || treatmentMap.size() == 0) {
|
|
|
+ if (treatmentMap == null || treatmentMap.size() == 0 || !treatmentMap.containsKey(diseaseName)) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "未找到治疗方案");
|
|
|
}
|
|
|
- if (!treatmentMap.containsKey(diseaseName)) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "诊断名不在诊断列表中");
|
|
|
- }
|
|
|
+
|
|
|
//治疗方案对应诊断
|
|
|
retMap.put("diseaseName", diseaseName);
|
|
|
|
|
@@ -100,7 +98,7 @@ public class TreatmentFacade {
|
|
|
conceptNameList.addAll(adNameList);
|
|
|
}
|
|
|
//概念
|
|
|
- List<Concept> conceptList=conceptFacade.getListByNames(conceptNameList);
|
|
|
+ List<Concept> conceptList = conceptFacade.getListByNames(conceptNameList);
|
|
|
//概念map
|
|
|
Map<String, Map<Long, Concept>> conceptMap = conceptList2Map(conceptList);
|
|
|
//说明信息是否存在
|
|
@@ -128,7 +126,7 @@ public class TreatmentFacade {
|
|
|
|
|
|
if (ListUtil.isNotEmpty(drugsList)) {
|
|
|
for (MedicitionClass medicitionClass : drugsList) {
|
|
|
- if (conceptMap != null && conceptMap.get(medicitionClass.getBigdrugsName()) != null && conceptMap.get(medicitionClass.getBigdrugsName()).containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
|
|
|
+ if (conceptMap != null && conceptMap.get(medicitionClass.getBigdrugsName()) != null && conceptMap.get(medicitionClass.getBigdrugsName()).containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
|
|
|
Concept cateBigConcept = conceptMap.get(medicitionClass.getBigdrugsName()).get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()));
|
|
|
if (cateBigConcept != null) {
|
|
|
medicitionClass.setBigdrugsConceptId(cateBigConcept.getId());
|
|
@@ -160,7 +158,7 @@ public class TreatmentFacade {
|
|
|
}
|
|
|
medicition.setLibType(LexiconTypeEnum.DRUGS.getKey());
|
|
|
medicition.setType(ConceptTypeEnum.Drug.getKey());
|
|
|
- if (hasConDetailMap != null &&hasConDetailMap.get(medicition.getMedicitionName()) != null && hasConDetailMap.get(medicition.getMedicitionName()).containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
|
|
|
+ if (hasConDetailMap != null && hasConDetailMap.get(medicition.getMedicitionName()) != null && hasConDetailMap.get(medicition.getMedicitionName()).containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
|
|
|
medicition.setShowInfo("1");
|
|
|
} else {
|
|
|
medicition.setShowInfo("0");
|