|
@@ -239,6 +239,70 @@ public class TestFacade {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 其他值提醒测试——化验
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ */
|
|
|
+ public Map<String, Object> testOtherTipLis(MultipartFile file, TestLineVO testLineVO) {
|
|
|
+ List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
|
|
|
+ List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
|
|
|
+ for (TestIndicationVO bean : data) {
|
|
|
+ if (StringUtil.isNotEmpty(testLineVO.getIdNum()) && !testLineVO.getIdNum().equals(bean.getIdNum())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ IndicationPushVO indicationPushVO = new IndicationPushVO();
|
|
|
+ indicationPushVO.setRuleType("4");
|
|
|
+ indicationPushVO.setIdNum(bean.getIdNum());
|
|
|
+
|
|
|
+ if ("药品通用名称".equals(bean.getOtherTipNodeType())) {
|
|
|
+ List<Drug> drug = new ArrayList<>();
|
|
|
+ Drug item = new Drug();
|
|
|
+ item.setUniqueName(bean.getOtherTipNodeName());
|
|
|
+ item.setName(bean.getOtherTipNodeName());
|
|
|
+ drug.add(item);
|
|
|
+ indicationPushVO.setDrug(drug);
|
|
|
+ } else if("医保疾病名称".equals(bean.getOtherTipNodeType())) {
|
|
|
+ List<Item> diag = new ArrayList<>();
|
|
|
+ Item item = new Item();
|
|
|
+ item.setUniqueName(bean.getOtherTipNodeName());
|
|
|
+ item.setName(bean.getOtherTipNodeName());
|
|
|
+ diag.add(item);
|
|
|
+ indicationPushVO.setDiag(diag);
|
|
|
+ }
|
|
|
+ List<Lis> lisList = new ArrayList<>();
|
|
|
+ Lis lis = new Lis();
|
|
|
+ lis.setName("套餐");
|
|
|
+ lis.setDetailName("明细");
|
|
|
+ lis.setUniqueName(bean.getOtherTipLisName());
|
|
|
+ lis.setValue(getValue(bean.getOtherTipLisSymbol(), bean.getOtherTipLisValue()));
|
|
|
+ lisList.add(lis);
|
|
|
+ indicationPushVO.setLis(lisList);
|
|
|
+ indicationPushVOList.add(indicationPushVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> map = new LinkedHashMap<>();
|
|
|
+
|
|
|
+ List<String> msg = new ArrayList<>();
|
|
|
+ List<String> errMsg = new ArrayList<>();
|
|
|
+ for (IndicationPushVO indicationPushVO : indicationPushVOList) {
|
|
|
+ try {
|
|
|
+ IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
|
|
|
+ if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
|
|
|
+ msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println(e.getMessage());
|
|
|
+ errMsg.add(indicationPushVO.getIdNum() + "行出错了");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.put("总条数", indicationPushVOList.size() + "条");
|
|
|
+ map.put("出错条数", msg.size() + "条");
|
|
|
+ map.put("出错信息", msg);
|
|
|
+ map.put("程序报错", errMsg);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 高危药品测试API
|
|
@@ -258,13 +322,13 @@ public class TestFacade {
|
|
|
IndicationPushVO indicationPushVO = new IndicationPushVO();
|
|
|
indicationPushVO.setRuleType("3");
|
|
|
indicationPushVO.setIdNum(bean.getIdNum());
|
|
|
- List<Drug> drugOrder = new ArrayList<>();
|
|
|
+ List<Drug> drug = new ArrayList<>();
|
|
|
Drug item = new Drug();
|
|
|
item.setUniqueName(bean.getDrugHighRisk());
|
|
|
item.setName(bean.getDrugHighRisk());
|
|
|
item.setForm(bean.getDrugForm());
|
|
|
- drugOrder.add(item);
|
|
|
- indicationPushVO.setDrugOrder(drugOrder);
|
|
|
+ drug.add(item);
|
|
|
+ indicationPushVO.setDrug(drug);
|
|
|
indicationPushVOList.add(indicationPushVO);
|
|
|
}
|
|
|
|
|
@@ -357,7 +421,6 @@ public class TestFacade {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 返回数值
|
|
|
*
|
|
@@ -366,9 +429,24 @@ public class TestFacade {
|
|
|
*/
|
|
|
public double getValue(String[] arr) {
|
|
|
if ("<".equals(arr[1]) || "≤".equals(arr[1])) {
|
|
|
- return Double.parseDouble(arr[2])-1;
|
|
|
+ return Double.parseDouble(arr[2]) - 0.1;
|
|
|
} else if (">".equals(arr[1]) || "≥".equals(arr[1])) {
|
|
|
- return Double.parseDouble(arr[2])+1;
|
|
|
+ return Double.parseDouble(arr[2]) + 0.1;
|
|
|
+ }
|
|
|
+ return 0.0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回数值
|
|
|
+ *
|
|
|
+ * @param dou
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public double getValue(String symbol, Double dou) {
|
|
|
+ if ("<".equals(symbol) || "≤".equals(symbol)) {
|
|
|
+ return dou - 0.1;
|
|
|
+ } else if (">".equals(symbol) || "≥".equals(symbol)) {
|
|
|
+ return dou + 0.1;
|
|
|
}
|
|
|
return 0.0;
|
|
|
}
|