|
@@ -68,9 +68,6 @@ public class CommonRule {
|
|
|
@Autowired
|
|
|
MsgNewUtil msgNewUtil;
|
|
|
|
|
|
- // 重复开立的时间间隔( xxL表示xx小时)
|
|
|
- public static final Long REPEAT_DATA = 12L * 60;
|
|
|
-
|
|
|
/**
|
|
|
* 比较阳性属性是否匹配
|
|
|
*
|
|
@@ -352,22 +349,25 @@ public class CommonRule {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 24小时重复开单总入口
|
|
|
+ * xx小时重复开单总入口
|
|
|
*
|
|
|
* @param wordCrfDTO
|
|
|
* @param billMsgList
|
|
|
*/
|
|
|
- public void repeat24Bill(WordCrfDTO wordCrfDTO, List<BillMsg> billMsgList) {
|
|
|
+ public void repeatBill(WordCrfDTO wordCrfDTO, List<BillMsg> billMsgList) {
|
|
|
+ Integer repeat = redisUtil.getByKeyAndField(RedisEnum.dateInterval.getName(), "重复开立时间间隔");
|
|
|
+ // 转换为分钟
|
|
|
+ Long repeatDate = 60L * repeat;
|
|
|
// 当前开单项与当前开单项重复开立
|
|
|
- repeat24BillWithOrder(billMsgList, wordCrfDTO.getLisOrder(), TypeEnum.lis.getName(), ConEnum.repeat24.getName()); // 化验重复开单
|
|
|
- repeat24BillWithOrder(billMsgList, wordCrfDTO.getPacsOrder(), TypeEnum.pacs.getName(), ConEnum.repeat24.getName()); // 辅检重复开单
|
|
|
+ repeatBillWithOrder(billMsgList, wordCrfDTO.getLisOrder(), TypeEnum.lis.getName(), ConEnum.repeat24.getName(), repeatDate); // 化验重复开单
|
|
|
+ repeatBillWithOrder(billMsgList, wordCrfDTO.getPacsOrder(), TypeEnum.pacs.getName(), ConEnum.repeat24.getName(), repeatDate); // 辅检重复开单
|
|
|
// repeat24BillWithType(billMsgList, wordCrfDTO.getDrugOrder(), TypeEnum.drug.getName(), ConEnum.repeat24.getName()); // 药品重复开单
|
|
|
// repeat24BillWithType(billMsgList, wordCrfDTO.getOperationOrder(), TypeEnum.operation.getName(), ConEnum.repeat24.getName()); // 手术重复开单
|
|
|
// repeat24BillWithType(billMsgList, wordCrfDTO.getTransfusionOrder(), TypeEnum.transfusion.getName(), ConEnum.repeat24.getName()); // 输血重复开单
|
|
|
|
|
|
// 当前开单项和结构化开单项重复开立
|
|
|
- repeat24BillWithStruct(billMsgList, wordCrfDTO.getLisOrder(), wordCrfDTO.getLis(), TypeEnum.lis.getName(), ConEnum.repeat24.getName()); // 化验重复开单
|
|
|
- repeat24BillWithStruct(billMsgList, wordCrfDTO.getPacsOrder(), wordCrfDTO.getPacs(), TypeEnum.pacs.getName(), ConEnum.repeat24.getName()); // 辅检重复开单
|
|
|
+ repeatBillWithStruct(billMsgList, wordCrfDTO.getLisOrder(), wordCrfDTO.getLis(), TypeEnum.lis.getName(), ConEnum.repeat24.getName(), repeatDate); // 化验重复开单
|
|
|
+ repeatBillWithStruct(billMsgList, wordCrfDTO.getPacsOrder(), wordCrfDTO.getPacs(), TypeEnum.pacs.getName(), ConEnum.repeat24.getName(), repeatDate); // 辅检重复开单
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -496,15 +496,16 @@ public class CommonRule {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 24小时重复开单入口——与开单项比较
|
|
|
+ * xx小时重复开单入口——与开单项比较
|
|
|
*
|
|
|
* @param billMsgList
|
|
|
* @param itemList
|
|
|
* @param type
|
|
|
* @param conType 禁忌条件
|
|
|
+ * @param repeatDate
|
|
|
* @param <T>
|
|
|
*/
|
|
|
- public <T> void repeat24BillWithOrder(List<BillMsg> billMsgList, List<T> itemList, String type, String conType) {
|
|
|
+ public <T> void repeatBillWithOrder(List<BillMsg> billMsgList, List<T> itemList, String type, String conType, Long repeatDate) {
|
|
|
if (ListUtil.isEmpty(itemList)) {
|
|
|
return;
|
|
|
}
|
|
@@ -522,7 +523,7 @@ public class CommonRule {
|
|
|
T itNext = items.get(j);
|
|
|
String nextDateValue = ReflectUtil.getProperty(itNext, "dateValue");
|
|
|
if (StringUtil.isNotBlank(nextDateValue)) {
|
|
|
- int dateFlag = CoreUtil.compareTime(curDateValue, nextDateValue, REPEAT_DATA, false, true);
|
|
|
+ int dateFlag = CoreUtil.compareTime(curDateValue, nextDateValue, repeatDate, false, true);
|
|
|
if (dateFlag == 1
|
|
|
&& getFrquenceType(ReflectUtil.getProperty(it, "frequency"))
|
|
|
.equals(getFrquenceType(ReflectUtil.getProperty(itNext, "frequency")))) {
|
|
@@ -541,16 +542,17 @@ public class CommonRule {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 24小时重复开单——与结构化比较
|
|
|
+ * xx小时重复开单——与结构化比较
|
|
|
*
|
|
|
* @param billMsgList
|
|
|
* @param orderList
|
|
|
* @param itemList
|
|
|
* @param type
|
|
|
* @param conType
|
|
|
+ * @param repeatDate
|
|
|
* @param <T>
|
|
|
*/
|
|
|
- public <T> void repeat24BillWithStruct(List<BillMsg> billMsgList, List<T> orderList, List<T> itemList, String type, String conType) {
|
|
|
+ public <T> void repeatBillWithStruct(List<BillMsg> billMsgList, List<T> orderList, List<T> itemList, String type, String conType, Long repeatDate) {
|
|
|
if (ListUtil.isEmpty(itemList) || ListUtil.isEmpty(orderList)) {
|
|
|
return;
|
|
|
}
|
|
@@ -574,7 +576,7 @@ public class CommonRule {
|
|
|
if (StringUtil.isBlank(finishDateValue)) {
|
|
|
String curDateValue = ReflectUtil.getProperty(order, "dateValue"); // 当前开单时间
|
|
|
String pastDateValue = ReflectUtil.getProperty(it, "dateValue"); // 历史开单时间
|
|
|
- int dateFlag = CoreUtil.compareTime(pastDateValue, curDateValue, REPEAT_DATA, false, false);
|
|
|
+ int dateFlag = CoreUtil.compareTime(pastDateValue, curDateValue, repeatDate, false, false);
|
|
|
// 规定时间内,并且频次相同
|
|
|
if (dateFlag == 1 &&
|
|
|
getFrquenceType(ReflectUtil.getProperty(it, "frequency"))
|