|
@@ -1,7 +1,7 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
-import com.diagbot.entity.node.*;
|
|
|
+import com.diagbot.entity.node.EntityInfo;
|
|
|
import com.diagbot.enums.LabelTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -343,16 +343,28 @@ public class EntityInfoFacade {
|
|
|
break;
|
|
|
case "药品注册名称":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- medRegNameRepository.create(entityInfo, entityInfo.getRisklevel(), entityInfo.getConflict_geiyao(), entityInfo.getConflict_gender(), entityInfo.getResult(), entityInfo.getAlias());
|
|
|
+ medRegNameRepository.create(entityInfo,
|
|
|
+ entityInfo.getRisklevel(),
|
|
|
+ entityInfo.getConflict_geiyao(),
|
|
|
+ entityInfo.getConflict_gender(),
|
|
|
+ entityInfo.getResult(),
|
|
|
+ entityInfo.getAlias());
|
|
|
} else {
|
|
|
- medRegNameRepository.update(entityInfo, entityInfo.getRisklevel(), entityInfo.getConflict_geiyao(), entityInfo.getConflict_gender(), entityInfo.getResult(), entityInfo.getAlias());
|
|
|
+ medRegNameRepository.update(entityInfo,
|
|
|
+ entityInfo.getRisklevel(),
|
|
|
+ entityInfo.getConflict_geiyao(),
|
|
|
+ entityInfo.getConflict_gender(),
|
|
|
+ entityInfo.getResult(),
|
|
|
+ entityInfo.getAlias());
|
|
|
}
|
|
|
break;
|
|
|
case "体征":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- vitalRepository.create(entityInfo, entityInfo.getUnit());
|
|
|
+ vitalRepository.create(entityInfo,
|
|
|
+ entityInfo.getUnit());
|
|
|
} else {
|
|
|
- vitalRepository.update(entityInfo, entityInfo.getUnit());
|
|
|
+ vitalRepository.update(entityInfo,
|
|
|
+ entityInfo.getUnit());
|
|
|
}
|
|
|
break;
|
|
|
case "药物过敏原":
|
|
@@ -360,241 +372,195 @@ public class EntityInfoFacade {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入药品类型");
|
|
|
}
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- medAllergenRepository.create(entityInfo, entityInfo.getMedtype(), entityInfo.getResult(), entityInfo.getAlias());
|
|
|
+ medAllergenRepository.create(entityInfo,
|
|
|
+ entityInfo.getMedtype(),
|
|
|
+ entityInfo.getResult(),
|
|
|
+ entityInfo.getAlias());
|
|
|
} else {
|
|
|
- medAllergenRepository.update(entityInfo, entityInfo.getMedtype(), entityInfo.getResult(), entityInfo.getAlias());
|
|
|
+ medAllergenRepository.update(entityInfo,
|
|
|
+ entityInfo.getMedtype(),
|
|
|
+ entityInfo.getResult(),
|
|
|
+ entityInfo.getAlias());
|
|
|
}
|
|
|
break;
|
|
|
case "实验室检查套餐名":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- LisSet lisSet = new LisSet();
|
|
|
- BeanUtil.copyProperties(entityInfo, lisSet);
|
|
|
- lisSetRepository.save(lisSet);
|
|
|
+ lisSetRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "药品通用名称":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Medicine medicine = new Medicine();
|
|
|
- BeanUtil.copyProperties(entityInfo, medicine);
|
|
|
- medicineRepository.save(medicine);
|
|
|
+ medicineRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "疾病":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Disease disease = new Disease();
|
|
|
- BeanUtil.copyProperties(entityInfo, disease);
|
|
|
- diseaseRepository.save(disease);
|
|
|
+ diseaseRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "化验提醒指标":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- LisRemind lisRemind = new LisRemind();
|
|
|
- BeanUtil.copyProperties(entityInfo, lisRemind);
|
|
|
- lisRemindRepository.save(lisRemind);
|
|
|
+ lisRemindRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "化验套餐名称":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- LisBigName lisBigName = new LisBigName();
|
|
|
- BeanUtil.copyProperties(entityInfo, lisBigName);
|
|
|
- lisBigNameRepository.save(lisBigName);
|
|
|
+ lisBigNameRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "辅助检查危急值":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- PacsCritical pacsCritical = new PacsCritical();
|
|
|
- BeanUtil.copyProperties(entityInfo, pacsCritical);
|
|
|
- pacsCriticalRepository.save(pacsCritical);
|
|
|
+ pacsCriticalRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "辅助检查名称描述":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- PacsDescribe pacsDescribe = new PacsDescribe();
|
|
|
- BeanUtil.copyProperties(entityInfo, pacsDescribe);
|
|
|
- pacsDescribeRepository.save(pacsDescribe);
|
|
|
+ pacsDescribeRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "辅助检查名称结果":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- PacsResult pacsResult = new PacsResult();
|
|
|
- BeanUtil.copyProperties(entityInfo, pacsResult);
|
|
|
- pacsResultRepository.save(pacsResult);
|
|
|
+ pacsResultRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "辅检提醒指标":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- PacsRemind pacsRemind = new PacsRemind();
|
|
|
- BeanUtil.copyProperties(entityInfo, pacsRemind);
|
|
|
- pacsRemindRepository.save(pacsRemind);
|
|
|
+ pacsRemindRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "药品类别":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- MedClass medClass = new MedClass();
|
|
|
- BeanUtil.copyProperties(entityInfo, medClass);
|
|
|
- medClassRepository.save(medClass);
|
|
|
+ medClassRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "药品治疗学类别":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- MedZhiLiaoClass medZhiLiaoClass = new MedZhiLiaoClass();
|
|
|
- BeanUtil.copyProperties(entityInfo, medZhiLiaoClass);
|
|
|
- medZhiLiaoClassRepository.save(medZhiLiaoClass);
|
|
|
+ medZhiLiaoClassRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "药品药理学类别":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- MedYaoLiClass medYaoLiClass = new MedYaoLiClass();
|
|
|
- BeanUtil.copyProperties(entityInfo, medYaoLiClass);
|
|
|
- medYaoLiClassRepository.save(medYaoLiClass);
|
|
|
+ medYaoLiClassRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "药品解剖学类别":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- MedJiePouClass medJiePouClass = new MedJiePouClass();
|
|
|
- BeanUtil.copyProperties(entityInfo, medJiePouClass);
|
|
|
- medJiePouClassRepository.save(medJiePouClass);
|
|
|
+ medJiePouClassRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "药品化学物质类别":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- MedChemClass medChemClass = new MedChemClass();
|
|
|
- BeanUtil.copyProperties(entityInfo, medChemClass);
|
|
|
- medChemClassRepository.save(medChemClass);
|
|
|
+ medChemClassRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "服用药品":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- OralMedicine oralMedicine = new OralMedicine();
|
|
|
- BeanUtil.copyProperties(entityInfo, oralMedicine);
|
|
|
- oralMedicineRepository.save(oralMedicine);
|
|
|
+ oralMedicineRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "禁忌医疗器械及物品":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- ConflictDevice conflictDevice = new ConflictDevice();
|
|
|
- BeanUtil.copyProperties(entityInfo, conflictDevice);
|
|
|
- conflictDeviceRepository.save(conflictDevice);
|
|
|
+ conflictDeviceRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "性别":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Gender gender = new Gender();
|
|
|
- BeanUtil.copyProperties(entityInfo, gender);
|
|
|
- genderRepository.save(gender);
|
|
|
+ genderRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "症状":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Symptom symptom = new Symptom();
|
|
|
- BeanUtil.copyProperties(entityInfo, symptom);
|
|
|
- symptomNameRepository.save(symptom);
|
|
|
+ symptomNameRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "临床表现":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- ClinicalFinding clinicalFinding = new ClinicalFinding();
|
|
|
- BeanUtil.copyProperties(entityInfo, clinicalFinding);
|
|
|
- clinicalFindingRepository.save(clinicalFinding);
|
|
|
+ clinicalFindingRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "科室":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Dept dept = new Dept();
|
|
|
- BeanUtil.copyProperties(entityInfo, dept);
|
|
|
- deptRepository.save(dept);
|
|
|
+ deptRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "开单项互斥":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- BillConflictItem billConflictItem = new BillConflictItem();
|
|
|
- BeanUtil.copyProperties(entityInfo, billConflictItem);
|
|
|
- billConflictItemRepository.save(billConflictItem);
|
|
|
+ billConflictItemRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "禁忌人群":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Group group = new Group();
|
|
|
- BeanUtil.copyProperties(entityInfo, group);
|
|
|
- groupRepository.save(group);
|
|
|
+ groupRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "建议输血提醒":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- TransfusionSuggest transfusionSuggest = new TransfusionSuggest();
|
|
|
- BeanUtil.copyProperties(entityInfo, transfusionSuggest);
|
|
|
- transfusionSuggestRepository.save(transfusionSuggest);
|
|
|
+ transfusionSuggestRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "过敏原":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- Allergen allergen = new Allergen();
|
|
|
- BeanUtil.copyProperties(entityInfo, allergen);
|
|
|
- allergenRepository.save(allergen);
|
|
|
+ allergenRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "食物过敏原":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- FoodAllergen foodAllergen = new FoodAllergen();
|
|
|
- BeanUtil.copyProperties(entityInfo, foodAllergen);
|
|
|
- foodAllergenRepository.save(foodAllergen);
|
|
|
+ foodAllergenRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|
|
|
break;
|
|
|
case "输血提醒指标":
|
|
|
if (entityInfo.getId() == null) {
|
|
|
- TransfusionRemind transfusionRemind = new TransfusionRemind();
|
|
|
- BeanUtil.copyProperties(entityInfo, transfusionRemind);
|
|
|
- transfusionRemindRepository.save(transfusionRemind);
|
|
|
+ transfusionRemindRepository.create(entityInfo);
|
|
|
} else {
|
|
|
entityInfoRepository.update(entityInfo);
|
|
|
}
|