|
@@ -387,6 +387,91 @@ public class TestFacade {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 其他值提醒测试——辅检
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ */
|
|
|
+ public Map<String, Object> testOtherTipPacs(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.getSexStr())) {
|
|
|
+ indicationPushVO.setSex(1);
|
|
|
+ } else if ("女性".equals(bean.getSexStr())) {
|
|
|
+ indicationPushVO.setSex(2);
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(bean.getDisName())) {
|
|
|
+ List<Item> diag = new ArrayList<>();
|
|
|
+ Item item = new Item();
|
|
|
+ item.setUniqueName(bean.getDisName());
|
|
|
+ item.setName(bean.getDisName());
|
|
|
+ diag.add(item);
|
|
|
+ indicationPushVO.setDiag(diag);
|
|
|
+ }
|
|
|
+ if (bean.getAgeRange() != null) {
|
|
|
+ if (bean.getAgeRange() == 0) {
|
|
|
+ if (bean.getAgeMin() != null) {
|
|
|
+ indicationPushVO.setAge(bean.getAgeMin() + 1);
|
|
|
+ } else if (bean.getAgeMax() != null) {
|
|
|
+ indicationPushVO.setAge(bean.getAgeMin() - 1);
|
|
|
+ }
|
|
|
+ } else if (bean.getAgeRange() == 1) {
|
|
|
+ if (bean.getAgeMin() != null) {
|
|
|
+ indicationPushVO.setAge(bean.getAgeMin() - 1);
|
|
|
+ } else if (bean.getAgeMax() != null) {
|
|
|
+ indicationPushVO.setAge(bean.getAgeMax() + 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(bean.getPacsDesc())) {
|
|
|
+ Pacs pacs = new Pacs();
|
|
|
+ pacs.setName("胸部CT");
|
|
|
+ pacs.setUniqueName("胸部CT");
|
|
|
+ pacs.setResult(bean.getPacsDesc());
|
|
|
+ indicationPushVO.getPacs().add(pacs);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtil.isNotBlank(bean.getPacsDescHas())) {
|
|
|
+ Pacs pacs = new Pacs();
|
|
|
+ pacs.setName("CT");
|
|
|
+ pacs.setUniqueName("CT");
|
|
|
+ pacs.setResult(bean.getPacsDescHas());
|
|
|
+ indicationPushVO.getPacs().add(pacs);
|
|
|
+ }
|
|
|
+
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 其他值提醒测试——输血
|
|
|
*
|