|
@@ -142,90 +142,90 @@ public class ExportFacade {
|
|
|
private void graphNodeDeal() {
|
|
|
//疾病处理
|
|
|
List<ExportNode> nodes = new ArrayList<>();
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDisease();
|
|
|
-// nodes.addAll(exportNodeRepository.getDisease2());
|
|
|
-// import2MySql(nodes, 100);
|
|
|
-// //药品通用名
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDrug();
|
|
|
-// import2MySql(nodes, 101);
|
|
|
-// //药品剂型
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDrugForm();
|
|
|
-// import2MySql(nodes, 102);
|
|
|
-// //症状
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getSymptom();
|
|
|
-// import2MySql(nodes, 103);
|
|
|
-// //体格检查结果
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getVital();
|
|
|
-// import2MySql(nodes, 105);
|
|
|
-// //手术和操作
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getOeration();
|
|
|
-// import2MySql(nodes, 106);
|
|
|
-// //实验室检查套餐
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getLisPackage();
|
|
|
-// import2MySql(nodes, 107);
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDisease();
|
|
|
+ nodes.addAll(exportNodeRepository.getDisease2());
|
|
|
+ import2MySql(nodes, 100);
|
|
|
+ //药品通用名
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDrug();
|
|
|
+ import2MySql(nodes, 101);
|
|
|
+ //药品剂型
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDrugForm();
|
|
|
+ import2MySql(nodes, 102);
|
|
|
+ //症状
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getSymptom();
|
|
|
+ import2MySql(nodes, 103);
|
|
|
+ //体格检查结果
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getVital();
|
|
|
+ import2MySql(nodes, 105);
|
|
|
+ //手术和操作
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getOeration();
|
|
|
+ import2MySql(nodes, 106);
|
|
|
+ //实验室检查套餐
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getLisPackage();
|
|
|
+ import2MySql(nodes, 107);
|
|
|
//实验室检查子项目
|
|
|
nodes.clear();
|
|
|
nodes = exportNodeRepository.getLisItem();
|
|
|
import2MySql(nodes, 108);
|
|
|
-// //辅助检查项目
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getPacs();
|
|
|
-// import2MySql(nodes, 109);
|
|
|
-// //辅助检查子项目
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getPacsSubItem();
|
|
|
-// import2MySql(nodes, 110);
|
|
|
-// //辅助检查描述
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getPacsDesc();
|
|
|
-// import2MySql(nodes, 111);
|
|
|
-// //辅助检查结果
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getPacsResult();
|
|
|
-// import2MySql(nodes, 112);
|
|
|
-// //输血类型
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getTransfusion();
|
|
|
-// import2MySql(nodes, 113);
|
|
|
-// //科室
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDept();
|
|
|
-// import2MySql(nodes, 115);
|
|
|
-// //性别
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getSex();
|
|
|
-// import2MySql(nodes, 116);
|
|
|
-// //其他过敏原
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getAllergen();
|
|
|
-// import2MySql(nodes, 119);
|
|
|
-// //医疗器械及物品
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getApparatus();
|
|
|
-// import2MySql(nodes, 120);
|
|
|
-// //药品化学物质类别
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDrugTypeA();
|
|
|
-// import2MySql(nodes, 301);
|
|
|
-// //药品治疗学类别
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDrugTypeB();
|
|
|
-// import2MySql(nodes, 302);
|
|
|
-// //药品药理学类别
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDrugTypeC();
|
|
|
-// import2MySql(nodes, 303);
|
|
|
-// //药品解剖学类别
|
|
|
-// nodes.clear();
|
|
|
-// nodes = exportNodeRepository.getDrugTypeD();
|
|
|
-// import2MySql(nodes, 304);
|
|
|
+ //辅助检查项目
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getPacs();
|
|
|
+ import2MySql(nodes, 109);
|
|
|
+ //辅助检查子项目
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getPacsSubItem();
|
|
|
+ import2MySql(nodes, 110);
|
|
|
+ //辅助检查描述
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getPacsDesc();
|
|
|
+ import2MySql(nodes, 111);
|
|
|
+ //辅助检查结果
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getPacsResult();
|
|
|
+ import2MySql(nodes, 112);
|
|
|
+ //输血类型
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getTransfusion();
|
|
|
+ import2MySql(nodes, 113);
|
|
|
+ //科室
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDept();
|
|
|
+ import2MySql(nodes, 115);
|
|
|
+ //性别
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getSex();
|
|
|
+ import2MySql(nodes, 116);
|
|
|
+ //其他过敏原
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getAllergen();
|
|
|
+ import2MySql(nodes, 119);
|
|
|
+ //医疗器械及物品
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getApparatus();
|
|
|
+ import2MySql(nodes, 120);
|
|
|
+ //药品化学物质类别
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDrugTypeA();
|
|
|
+ import2MySql(nodes, 301);
|
|
|
+ //药品治疗学类别
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDrugTypeB();
|
|
|
+ import2MySql(nodes, 302);
|
|
|
+ //药品药理学类别
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDrugTypeC();
|
|
|
+ import2MySql(nodes, 303);
|
|
|
+ //药品解剖学类别
|
|
|
+ nodes.clear();
|
|
|
+ nodes = exportNodeRepository.getDrugTypeD();
|
|
|
+ import2MySql(nodes, 304);
|
|
|
}
|
|
|
|
|
|
private void import2MySql(List<ExportNode> nodes, Integer type) {
|
|
@@ -474,23 +474,23 @@ public class ExportFacade {
|
|
|
Map<String, KlConcept> map
|
|
|
= EntityUtil.makeEntityMapByKeys(klConcepts, "_", "libName", "libType");
|
|
|
//开单合理性(除输血外)
|
|
|
- //allOrder(mapPath, map);
|
|
|
+ allOrder(mapPath, map);
|
|
|
//开单合理性_输血
|
|
|
- //transfusionOrder(mapPath, map);
|
|
|
+ transfusionOrder(mapPath, map);
|
|
|
//高危药品
|
|
|
- //drugHighRisk(mapPath, map);
|
|
|
+ drugHighRisk(mapPath, map);
|
|
|
//高危手术
|
|
|
- //optHighRisk(mapPath, map);
|
|
|
+ optHighRisk(mapPath, map);
|
|
|
//危急值化验
|
|
|
- //lisCriticalValues(mapPath, map);
|
|
|
+ lisCriticalValues(mapPath, map);
|
|
|
//危急值辅检
|
|
|
- //pacsCriticalValues(mapPath, map);
|
|
|
+ pacsCriticalValues(mapPath, map);
|
|
|
//其他值提醒_化验
|
|
|
- //lisOtherValues(mapPath, map);
|
|
|
+ lisOtherValues(mapPath, map);
|
|
|
//其他值提醒_辅检
|
|
|
pacsOtherValues(mapPath, map);
|
|
|
//其他值提醒_输血
|
|
|
- //transfusionOtherValues(mapPath, map);
|
|
|
+ transfusionOtherValues(mapPath, map);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
@@ -821,21 +821,21 @@ public class ExportFacade {
|
|
|
klRuleBase.setEqValue(klRuleConditionVO.getValue());
|
|
|
klRuleBase.setEqUnit(klRuleConditionVO.getUnit());
|
|
|
} else if (operator_gt.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMaxOperator(">");
|
|
|
- klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
- klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
- } else if (operator_ge.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMaxOperator(">=");
|
|
|
- klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
- klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
- } else if (operator_lt.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMinOperator("<");
|
|
|
+ klRuleBase.setMinOperator(">");
|
|
|
klRuleBase.setMinValue(klRuleConditionVO.getValue());
|
|
|
klRuleBase.setMinUnit(klRuleConditionVO.getUnit());
|
|
|
- } else if (operator_le.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMinOperator("<=");
|
|
|
+ } else if (operator_ge.contains(klRuleConditionVO.getOperator())) {
|
|
|
+ klRuleBase.setMinOperator(">=");
|
|
|
klRuleBase.setMinValue(klRuleConditionVO.getValue());
|
|
|
klRuleBase.setMinUnit(klRuleConditionVO.getUnit());
|
|
|
+ } else if (operator_lt.contains(klRuleConditionVO.getOperator())) {
|
|
|
+ klRuleBase.setMaxOperator("<");
|
|
|
+ klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
+ klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
+ } else if (operator_le.contains(klRuleConditionVO.getOperator())) {
|
|
|
+ klRuleBase.setMaxOperator("<=");
|
|
|
+ klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
+ klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
} else {
|
|
|
/*DO Nothing*/
|
|
|
}
|
|
@@ -867,18 +867,18 @@ public class ExportFacade {
|
|
|
klRuleBase.setConceptId(map.get(importDataVO.getStandName() + "_108").getId());
|
|
|
if (operator_lt.contains(importDataVO.getSymbol())) {
|
|
|
klRuleBase.setType(2);
|
|
|
- klRuleBase.setMinOperator("<");
|
|
|
- klRuleBase.setMinValue(importDataVO.getValue().toString());
|
|
|
+ klRuleBase.setMaxOperator("<");
|
|
|
+ klRuleBase.setMaxValue(importDataVO.getValue().toString());
|
|
|
if (StringUtil.isNotBlank(importDataVO.getUnit())) {
|
|
|
- klRuleBase.setMinUnit(importDataVO.getUnit().trim());
|
|
|
+ klRuleBase.setMaxUnit(importDataVO.getUnit().trim());
|
|
|
}
|
|
|
}
|
|
|
if (operator_gt.contains(importDataVO.getSymbol())) {
|
|
|
klRuleBase.setType(2);
|
|
|
- klRuleBase.setMaxOperator(">");
|
|
|
- klRuleBase.setMaxValue(importDataVO.getValue().toString());
|
|
|
+ klRuleBase.setMinOperator(">");
|
|
|
+ klRuleBase.setMinValue(importDataVO.getValue().toString());
|
|
|
if (StringUtil.isNotBlank(importDataVO.getUnit())) {
|
|
|
- klRuleBase.setMaxUnit(importDataVO.getUnit().trim());
|
|
|
+ klRuleBase.setMinUnit(importDataVO.getUnit().trim());
|
|
|
}
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(importDataVO.getUnit())) {
|
|
@@ -1127,21 +1127,21 @@ public class ExportFacade {
|
|
|
klRuleBase.setEqValue(klRuleConditionVO.getValue());
|
|
|
klRuleBase.setEqUnit(klRuleConditionVO.getUnit());
|
|
|
} else if (operator_gt.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMaxOperator(">");
|
|
|
- klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
- klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
- } else if (operator_ge.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMaxOperator(">=");
|
|
|
- klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
- klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
- } else if (operator_lt.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMinOperator("<");
|
|
|
+ klRuleBase.setMinOperator(">");
|
|
|
klRuleBase.setMinValue(klRuleConditionVO.getValue());
|
|
|
klRuleBase.setMinUnit(klRuleConditionVO.getUnit());
|
|
|
- } else if (operator_le.contains(klRuleConditionVO.getOperator())) {
|
|
|
- klRuleBase.setMinOperator("<=");
|
|
|
+ } else if (operator_ge.contains(klRuleConditionVO.getOperator())) {
|
|
|
+ klRuleBase.setMinOperator(">=");
|
|
|
klRuleBase.setMinValue(klRuleConditionVO.getValue());
|
|
|
klRuleBase.setMinUnit(klRuleConditionVO.getUnit());
|
|
|
+ } else if (operator_lt.contains(klRuleConditionVO.getOperator())) {
|
|
|
+ klRuleBase.setMaxOperator("<");
|
|
|
+ klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
+ klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
+ } else if (operator_le.contains(klRuleConditionVO.getOperator())) {
|
|
|
+ klRuleBase.setMaxOperator("<=");
|
|
|
+ klRuleBase.setMaxValue(klRuleConditionVO.getValue());
|
|
|
+ klRuleBase.setMaxUnit(klRuleConditionVO.getUnit());
|
|
|
} else {
|
|
|
/*DO Nothing*/
|
|
|
}
|
|
@@ -1245,18 +1245,18 @@ public class ExportFacade {
|
|
|
klRuleBase.setConceptId(map.get(importDataVO.getLisGBName() + "_108").getId());
|
|
|
if (operator_lt.contains(importDataVO.getSymbol())) {
|
|
|
klRuleBase.setType(2);
|
|
|
- klRuleBase.setMinOperator("<");
|
|
|
- klRuleBase.setMinValue(importDataVO.getValue().toString());
|
|
|
+ klRuleBase.setMaxOperator("<");
|
|
|
+ klRuleBase.setMaxValue(importDataVO.getValue().toString());
|
|
|
if (StringUtil.isNotBlank(importDataVO.getUnit())) {
|
|
|
- klRuleBase.setMinUnit(importDataVO.getUnit().trim());
|
|
|
+ klRuleBase.setMaxUnit(importDataVO.getUnit().trim());
|
|
|
}
|
|
|
}
|
|
|
if (operator_gt.contains(importDataVO.getSymbol())) {
|
|
|
klRuleBase.setType(2);
|
|
|
- klRuleBase.setMaxOperator(">");
|
|
|
- klRuleBase.setMaxValue(importDataVO.getValue().toString());
|
|
|
+ klRuleBase.setMinOperator(">");
|
|
|
+ klRuleBase.setMinValue(importDataVO.getValue().toString());
|
|
|
if (StringUtil.isNotBlank(importDataVO.getUnit())) {
|
|
|
- klRuleBase.setMaxUnit(importDataVO.getUnit().trim());
|
|
|
+ klRuleBase.setMinUnit(importDataVO.getUnit().trim());
|
|
|
}
|
|
|
}
|
|
|
klRuleBase.setDescription(importDataVO.getLisGBName() + importDataVO.getSymbol()
|
|
@@ -1279,8 +1279,9 @@ public class ExportFacade {
|
|
|
} else if (importDataVO.getOtherTipNodeType().equals("禁忌人群")) {
|
|
|
klRuleBase.setConceptId(map.get(importDataVO.getOtherTipNodeName() + "_117").getId());
|
|
|
} else {
|
|
|
-
|
|
|
+ /*Do Nothing*/
|
|
|
}
|
|
|
+ klRuleBase.setDescription(importDataVO.getOtherTipNodeType() + "_" + importDataVO.getOtherTipNodeName());
|
|
|
klRuleBaseService.save(klRuleBase);
|
|
|
KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
klRuleCondition.setGroupType(1);
|
|
@@ -1324,22 +1325,11 @@ public class ExportFacade {
|
|
|
klRuleBase.setType(2);
|
|
|
klRuleBase.setDescription("年龄范围");
|
|
|
if (null != importDataVO.getAgeMax()) {
|
|
|
- if (importDataVO.getAgeRange().equals(0)){
|
|
|
- klRuleBase.setMaxOperator("<=");
|
|
|
- }
|
|
|
- if (importDataVO.getAgeRange().equals(1)){
|
|
|
- klRuleBase.setMaxOperator(">=");
|
|
|
- }
|
|
|
-
|
|
|
+ klRuleBase.setMaxOperator("<=");
|
|
|
klRuleBase.setMaxValue(importDataVO.getAgeMax().toString());
|
|
|
}
|
|
|
if (null != importDataVO.getAgeMin()) {
|
|
|
- if (importDataVO.getAgeRange().equals(0)){
|
|
|
- klRuleBase.setMinOperator(">=");
|
|
|
- }
|
|
|
- if (importDataVO.getAgeRange().equals(1)){
|
|
|
- klRuleBase.setMinOperator("<=");
|
|
|
- }
|
|
|
+ klRuleBase.setMinOperator(">=");
|
|
|
klRuleBase.setMinValue(importDataVO.getAgeMin().toString());
|
|
|
}
|
|
|
klRuleBaseService.save(klRuleBase);
|
|
@@ -1438,8 +1428,13 @@ public class ExportFacade {
|
|
|
klRuleBase.setMinUnit(importDataVO.getUnit().trim());
|
|
|
}
|
|
|
}
|
|
|
- klRuleBase.setDescription(importDataVO.getItemName() + importDataVO.getSymbol()
|
|
|
- + importDataVO.getValue() + " " + importDataVO.getUnit());
|
|
|
+ if (StringUtil.isNotBlank(importDataVO.getUnit())) {
|
|
|
+ klRuleBase.setDescription(importDataVO.getItemName() + importDataVO.getSymbol()
|
|
|
+ + importDataVO.getValue() + " " + importDataVO.getUnit());
|
|
|
+ } else {
|
|
|
+ klRuleBase.setDescription(importDataVO.getItemName() + importDataVO.getSymbol()
|
|
|
+ + importDataVO.getValue() + " ");
|
|
|
+ }
|
|
|
klRuleBaseService.save(klRuleBase);
|
|
|
KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
klRuleCondition.setGroupType(1);
|