|
@@ -255,7 +255,7 @@ public class CommonRule {
|
|
|
&& RegexUtil.getRegexRes(result, ruleBaseDTO.getBaseEqValue())) {
|
|
|
String dateValue = pacs.getDateValue(); // 结果日期
|
|
|
String orderDateValue = ruleSimpleDTO.getDateValue(); // 开单项日期
|
|
|
- int flag = CoreUtil.compareTime(dateValue, orderDateValue, 60L * 24 * 7, false);
|
|
|
+ int flag = CoreUtil.compareTime(dateValue, orderDateValue, 60L * 24 * 7, false, false);
|
|
|
if (flag == 1) {
|
|
|
ruleSimpleDTO.setContent(result);
|
|
|
ruleSimpleDTO.setConType(conType);
|
|
@@ -285,7 +285,7 @@ public class CommonRule {
|
|
|
if (CoreUtil.getMapFlag(lisMap)) {
|
|
|
String dateValue = lis.getDateValue(); // 结果日期
|
|
|
String orderDateValue = ruleSimpleDTO.getDateValue(); // 开单项日期
|
|
|
- int flag = CoreUtil.compareTime(dateValue, orderDateValue, 60L * 24 * 7, false);
|
|
|
+ int flag = CoreUtil.compareTime(dateValue, orderDateValue, 60L * 24 * 7, false, false);
|
|
|
if (flag == 1) { // 有效期范围内
|
|
|
ruleSimpleDTO.setContent(CoreUtil.getMapMsg(lisMap));
|
|
|
ruleSimpleDTO.setConType(conType);
|
|
@@ -394,7 +394,7 @@ public class CommonRule {
|
|
|
* @param ruleSimpleDTO
|
|
|
* @param set 用于记录:A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
*/
|
|
|
- public <T> void exclusionBill(List<T> orderList, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
|
|
|
+ public <T> void exclusionBillOrder(List<T> orderList, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
|
|
|
if (ListUtil.isNotEmpty(orderList) && orderList.size() > 1) {
|
|
|
// 不同的项目可能对应同一个uniqueName,提示显示多条
|
|
|
Map<String, List<T>> map = EntityUtil.makeEntityListMap(orderList, "uniqueName");
|
|
@@ -421,6 +421,89 @@ public class CommonRule {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 互斥开单项(结构化化验)
|
|
|
+ *
|
|
|
+ * @param orderList 开单列表
|
|
|
+ * @param ruleBaseDTO
|
|
|
+ * @param billMsgList
|
|
|
+ * @param ruleSimpleDTO
|
|
|
+ * @param set 用于记录:A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
+ */
|
|
|
+ public <T> void exclusionBillLis(List<T> orderList, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
|
|
|
+ if (ListUtil.isNotEmpty(orderList)) {
|
|
|
+ // 不同的项目可能对应同一个uniqueName,提示显示多条
|
|
|
+ Map<String, List<T>> map = EntityUtil.makeEntityListMap(orderList, "uniqueName");
|
|
|
+ List<T> orginNameList = map.get(ruleBaseDTO.getBaseLibName());
|
|
|
+ if (map.get(ruleBaseDTO.getBaseLibName()) != null) {
|
|
|
+ for (T bean : orginNameList) {
|
|
|
+ String detailName = ReflectUtil.getProperty(bean, "detailName");
|
|
|
+ if (StringUtil.isBlank(detailName)) { // 获取开单项信息,detail为空,说明是开单项
|
|
|
+ String finishDateValue = ReflectUtil.getProperty(bean, "finishDateValue");
|
|
|
+ // 报告时间不为空,说明已出报告,可以再次开单
|
|
|
+ if (StringUtil.isBlank(finishDateValue)) {
|
|
|
+ String orderDateValue = ReflectUtil.getProperty(ruleSimpleDTO, "dateValue");
|
|
|
+ String beanDateValue = ReflectUtil.getProperty(bean, "dateValue");
|
|
|
+ int dateFlag = CoreUtil.compareTime(beanDateValue, orderDateValue, 24 * 60L, false, false);
|
|
|
+ if (dateFlag == 1) {
|
|
|
+ String orginName = ReflectUtil.getProperty(bean, "name");
|
|
|
+ // A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
+ // if (!set.contains(ruleSimpleDTO.getLibName() + "******" + orginName)) {
|
|
|
+ // set.add(ruleSimpleDTO.getLibName() + "******" + orginName);
|
|
|
+ // set.add(orginName + "******" + ruleSimpleDTO.getLibName());
|
|
|
+ ruleSimpleDTO.setContent(orginName);
|
|
|
+ ruleSimpleDTO.setConType(conType);
|
|
|
+ BillMsg billMsg = msgNewUtil.getCommonBillMsg(ruleSimpleDTO);
|
|
|
+ CoreUtil.addBeanToList(billMsgList, billMsg);
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 互斥开单项(结构化辅检)
|
|
|
+ *
|
|
|
+ * @param orderList 开单列表
|
|
|
+ * @param ruleBaseDTO
|
|
|
+ * @param billMsgList
|
|
|
+ * @param ruleSimpleDTO
|
|
|
+ * @param set 用于记录:A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
+ */
|
|
|
+ public <T> void exclusionBillPacs(List<T> orderList, RuleBaseDTO ruleBaseDTO, List<BillMsg> billMsgList, String conType, RuleSimpleDTO ruleSimpleDTO, Set<String> set) {
|
|
|
+ if (ListUtil.isNotEmpty(orderList)) {
|
|
|
+ // 不同的项目可能对应同一个uniqueName,提示显示多条
|
|
|
+ Map<String, List<T>> map = EntityUtil.makeEntityListMap(orderList, "uniqueName");
|
|
|
+ List<T> orginNameList = map.get(ruleBaseDTO.getBaseLibName());
|
|
|
+ if (map.get(ruleBaseDTO.getBaseLibName()) != null) {
|
|
|
+ for (T bean : orginNameList) {
|
|
|
+ String finishDateValue = ReflectUtil.getProperty(bean, "finishDateValue");
|
|
|
+ // 报告时间不为空,说明已出报告,可以再次开单
|
|
|
+ if (StringUtil.isBlank(finishDateValue)) {
|
|
|
+ String orderDateValue = ReflectUtil.getProperty(ruleSimpleDTO, "dateValue");
|
|
|
+ String beanDateValue = ReflectUtil.getProperty(bean, "dateValue");
|
|
|
+ int dateFlag = CoreUtil.compareTime(beanDateValue, orderDateValue, 24 * 60L, false, false);
|
|
|
+ if (dateFlag == 1) {
|
|
|
+ String orginName = ReflectUtil.getProperty(bean, "name");
|
|
|
+ // A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
+ // if (!set.contains(ruleSimpleDTO.getLibName() + "******" + orginName)) {
|
|
|
+ // set.add(ruleSimpleDTO.getLibName() + "******" + orginName);
|
|
|
+ // set.add(orginName + "******" + ruleSimpleDTO.getLibName());
|
|
|
+ ruleSimpleDTO.setContent(orginName);
|
|
|
+ ruleSimpleDTO.setConType(conType);
|
|
|
+ BillMsg billMsg = msgNewUtil.getCommonBillMsg(ruleSimpleDTO);
|
|
|
+ CoreUtil.addBeanToList(billMsgList, billMsg);
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取频次分组
|
|
|
*
|