|
@@ -7,6 +7,7 @@ import com.diagbot.entity.ResultCritical;
|
|
|
import com.diagbot.entity.node.BillItem;
|
|
|
import com.diagbot.entity.node.LisCritical;
|
|
|
import com.diagbot.entity.node.MedNameRegName;
|
|
|
+import com.diagbot.entity.node.PacsCritical;
|
|
|
import com.diagbot.entity.node.TransfusionRemind;
|
|
|
import com.diagbot.enums.GraphLabelEnum;
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
@@ -285,7 +286,12 @@ public class RuleConvertFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 开单规则转换-输血
|
|
|
+ * @param items
|
|
|
+ * @param hospitalId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public List<ResultBill> billRuleConvert_transfusion(List<TransfusionRemind> items,Long hospitalId) {
|
|
|
List<ResultBill> retList = Lists.newLinkedList();
|
|
|
List<ResultBill> resultBillList = Lists.newLinkedList();
|
|
@@ -392,6 +398,12 @@ public class RuleConvertFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 危急值规则转换-检验
|
|
|
+ * @param items
|
|
|
+ * @param hospitalId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public List<ResultCritical> criticalRuleConvert_lis(List<LisCritical> items,Long hospitalId) {
|
|
|
List<ResultCritical> retList = Lists.newLinkedList();
|
|
|
List<ResultCritical> resultList = Lists.newLinkedList();
|
|
@@ -466,6 +478,54 @@ public class RuleConvertFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 危急值规则转换-检查
|
|
|
+ * @param items
|
|
|
+ * @param hospitalId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<ResultCritical> criticalRuleConvert_pacs(List<PacsCritical> items,Long hospitalId) {
|
|
|
+ List<ResultCritical> retList = Lists.newLinkedList();
|
|
|
+ List<ResultCritical> resultList = Lists.newLinkedList();
|
|
|
+ List<ResultCritical> resultMappingList = Lists.newArrayList();
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(items)) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Map<String, List<Long>>> pacsConfigMap = pacsConfigFacade.getUniqueConfigMap(hospitalId, null, null);
|
|
|
+
|
|
|
+ for (PacsCritical item : items) {
|
|
|
+ //基础属性复制
|
|
|
+ ResultCritical result = new ResultCritical();
|
|
|
+ result.setCriticalType(2);
|
|
|
+ result.setCriticalItemType(GraphLabelEnum.PacsCatalogue.getName());
|
|
|
+ result.setCriticalItemName(item.getPacsname());
|
|
|
+ result.setReferenceValue(item.getName());
|
|
|
+ result.setInputValue(item.getVal());
|
|
|
+ resultList.add(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ //医院端映射
|
|
|
+ for (ResultCritical result : resultList) {
|
|
|
+ Map<String, List<Long>> hisMap = pacsConfigMap.get(result.getCriticalItemName());
|
|
|
+ if (hisMap != null && hisMap.size() > 0) {
|
|
|
+ hisMap.entrySet().forEach(entry -> {
|
|
|
+ result.setCriticalItemHisName(entry.getKey());
|
|
|
+ resultMappingList.add(result);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ result.setSuccess(0);
|
|
|
+ result.setMessage("开单项缺少医院端映射;");
|
|
|
+ resultMappingList.add(result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //模拟数据输入
|
|
|
+ retList = createCriticalInputValue(resultMappingList);
|
|
|
+
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
|
|
|
public MappingShortEntity setMappingShortEntity(String name, String hisName, String hisDetailName) {
|
|
|
MappingShortEntity item = new MappingShortEntity();
|
|
@@ -730,7 +790,7 @@ public class RuleConvertFacade {
|
|
|
}
|
|
|
billMsg = MsgUtil.getCommonCriticalMsg(content, TypeEnum.lis.getName());
|
|
|
} else if (resultCritical.getCriticalItemType().equals(GraphLabelEnum.PacsCritical.getName())) {
|
|
|
- billMsg = MsgUtil.getCommonCriticalMsg("", TypeEnum.pacs.getName());
|
|
|
+ billMsg = MsgUtil.getCommonCriticalMsg(resultCritical.getCriticalItemHisName(), TypeEnum.pacs.getName());
|
|
|
}
|
|
|
return billMsg;
|
|
|
}
|