|
@@ -12,6 +12,7 @@ import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.Drug;
|
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
|
+import com.diagbot.vo.ItemExt;
|
|
|
import com.diagbot.vo.StandConvertCrfVO;
|
|
|
import com.diagbot.vo.TestIndicationVO;
|
|
|
import com.diagbot.vo.TestLineVO;
|
|
@@ -188,6 +189,89 @@ public class TestFacade {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 开单项数据测试——输血
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ */
|
|
|
+ public Map<String, Object> testIndicationTransfusion(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;
|
|
|
+ }
|
|
|
+ if (StringUtil.isBlank(bean.getTransfusionNodeName())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ IndicationPushVO indicationPushVO = new IndicationPushVO();
|
|
|
+ indicationPushVO.setRuleType("2");
|
|
|
+ indicationPushVO.setIdNum(bean.getIdNum());
|
|
|
+ if (StringUtil.isNotBlank(bean.getTransfusionName())) {
|
|
|
+ List<ItemExt> transfusionOrder = new ArrayList<>();
|
|
|
+ ItemExt item = new ItemExt();
|
|
|
+ item.setName(bean.getTransfusionName());
|
|
|
+ item.setUniqueName(bean.getTransfusionName());
|
|
|
+ transfusionOrder.add(item);
|
|
|
+ indicationPushVO.setTransfusionOrder(transfusionOrder);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtil.isNotEmpty(bean.getTransfusionNodeName())) {
|
|
|
+ switch (bean.getTransfusionNodeName()) {
|
|
|
+ case "手术和操作" : // 手术和操作
|
|
|
+ List<Item> operation = new ArrayList<>();
|
|
|
+ Item item = new Item();
|
|
|
+ item.setName(bean.getStandName());
|
|
|
+ item.setUniqueName(bean.getStandName());
|
|
|
+ operation.add(item);
|
|
|
+ indicationPushVO.setOperation(operation);
|
|
|
+ break;
|
|
|
+ case "医保疾病名称" : // 医保疾病名称
|
|
|
+ List<Item> diag = new ArrayList<>();
|
|
|
+ Item itemDiag = new Item();
|
|
|
+ itemDiag.setName(bean.getStandName());
|
|
|
+ itemDiag.setUniqueName(bean.getStandName());
|
|
|
+ diag.add(itemDiag);
|
|
|
+ indicationPushVO.setDiag(diag);
|
|
|
+ break;
|
|
|
+ case "实验室检查" : // 实验室检查
|
|
|
+ List<Lis> lisList = new ArrayList<>();
|
|
|
+ Lis lisBean = new Lis();
|
|
|
+ lisBean.setUniqueName(bean.getStandName());
|
|
|
+ lisBean.setName(bean.getStandName());
|
|
|
+ lisBean.setDetailName(bean.getStandName());
|
|
|
+ lisBean.setValue(getValue(bean.getOtherTipLisSymbol(), bean.getOtherTipLisValue()));
|
|
|
+ lisList.add(lisBean);
|
|
|
+ indicationPushVO.setLis(lisList);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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.getBillMsgList())) {
|
|
|
+ msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println(indicationPushVO.getIdNum() + "行出错了!" + e.getMessage());
|
|
|
+ errMsg.add(indicationPushVO.getIdNum() + "行出错了");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.put("总条数", indicationPushVOList.size() + "条");
|
|
|
+ map.put("出错条数", msg.size() + "条");
|
|
|
+ map.put("出错信息", msg);
|
|
|
+ map.put("程序报错", errMsg);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 高危手术测试API
|