|
@@ -2,7 +2,7 @@ package com.diagbot.util;
|
|
|
|
|
|
import com.diagbot.biz.push.entity.Lis;
|
|
|
import com.diagbot.dto.BillMsg;
|
|
|
-import com.diagbot.enums.NeoEnum;
|
|
|
+import com.diagbot.enums.ConEnum;
|
|
|
import com.diagbot.enums.TypeEnum;
|
|
|
|
|
|
/**
|
|
@@ -15,18 +15,29 @@ public class MsgUtil {
|
|
|
/**
|
|
|
* 高危药品、手术通用提示信息
|
|
|
*
|
|
|
- * @param name
|
|
|
- * @param highLevel
|
|
|
- * @param type
|
|
|
+ * @param content
|
|
|
+ * @param name 名称
|
|
|
+ * @param type 类型
|
|
|
* @return
|
|
|
*/
|
|
|
- public static BillMsg getCommonHighRiskMsg(String name, String highLevel, String type) {
|
|
|
+ public static BillMsg getCommonHighRiskMsg(String content, String name, String type) {
|
|
|
BillMsg billMsg = new BillMsg();
|
|
|
+ String msg = "";
|
|
|
if (TypeEnum.operation.getName().equals(type)) {
|
|
|
- billMsg.setMsg(name + "为高风险手术,请留意");
|
|
|
+ if (StringUtil.isBlank(content)) {
|
|
|
+ // 本身高危手术
|
|
|
+ msg = String.format("%s为高风险手术,请留意", name);
|
|
|
+ } else {
|
|
|
+ // 复杂情况高危手术
|
|
|
+ msg = String.format("该患者%s,%s为高风险手术,请留意", content, name);
|
|
|
+ billMsg.setContent(content);
|
|
|
+ }
|
|
|
} else if (TypeEnum.drug.getName().equals(type)) {
|
|
|
- billMsg.setMsg(name + "为" + highLevel + "药品,请留意");
|
|
|
+ msg = String.format("%s为%s药品,请留意", name, content);
|
|
|
+ billMsg.setContent(content);
|
|
|
}
|
|
|
+ billMsg.setOrderName(name);
|
|
|
+ billMsg.setMsg(msg);
|
|
|
billMsg.setType(type);
|
|
|
return billMsg;
|
|
|
}
|
|
@@ -35,7 +46,7 @@ public class MsgUtil {
|
|
|
* 危急值通用提示信息
|
|
|
*
|
|
|
* @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
+ * @param type 类型
|
|
|
* @return
|
|
|
*/
|
|
|
public static BillMsg getCommonCriticalMsg(String content, String type) {
|
|
@@ -51,88 +62,7 @@ public class MsgUtil {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 开单合理性通用提示信息
|
|
|
- *
|
|
|
- * @param orderName 原开单项
|
|
|
- * @param orderStandName 标准开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
- * @param type 开单项类型
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getCommonBillMsg(String orderName, String orderStandName, String content, String type, String orderType) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("该患者%s,不宜开%s", content, orderName);
|
|
|
- // 输血提示语是另一种写法
|
|
|
- if (TypeEnum.transfusion.getName().equals(orderType)) {
|
|
|
- msg = String.format("该患者%s,谨慎输注%s", content, orderName);
|
|
|
- }
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setOrderName(orderName);
|
|
|
- billMsg.setOrderStandName(orderStandName);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 开单合理性通用提示信息
|
|
|
- *
|
|
|
- * @param orderName 原开单项
|
|
|
- * @param orderStandName 标准开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getBillLisOrderMsg(String orderName, String orderStandName, String content, String type) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("该患者可能正在用药%s,会影响%s结果,请留意", content, orderName);
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setOrderName(orderName);
|
|
|
- billMsg.setOrderStandName(orderStandName);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 开单合理性——互斥提示信息
|
|
|
- *
|
|
|
- * @param complexOrderName 多个开单项
|
|
|
- * @param orderName 原开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getBillExclusionMsg(String orderName, String content, String complexOrderName, String type) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("检查项目互斥:%s与%s不宜同时进行", orderName, content);
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setOrderName(complexOrderName);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 复杂情况高危手术提示
|
|
|
- *
|
|
|
- * @param content
|
|
|
- * @param name
|
|
|
- * @param type
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getComplexOperationMsg(String name, String content, String type) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("该患者%s,%s为高风险手术,请留意", name, content);
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 其他提醒——化验
|
|
|
+ * 其他值通用提示信息
|
|
|
*
|
|
|
* @param content
|
|
|
* @param name
|
|
@@ -140,141 +70,90 @@ public class MsgUtil {
|
|
|
* @param lis
|
|
|
* @return
|
|
|
*/
|
|
|
- public static BillMsg getCommonOtherTipLisMsg(String content, String name, String type, Lis lis) {
|
|
|
+ public static BillMsg getCommonOtherMsg(String otherType, String content, String name, String type, Lis lis) {
|
|
|
BillMsg billMsg = new BillMsg();
|
|
|
String msg = "";
|
|
|
- if (TypeEnum.disease.getName().equals(type)) {
|
|
|
- msg = String.format("该患者%s,患有%s,请留意", content, name);
|
|
|
- } else if (TypeEnum.drug.getName().equals(type)) {
|
|
|
- msg = String.format("该患者%s,可能正在服用%s,请留意", content, name);
|
|
|
- } else if (NeoEnum.group.getName().equals(type)) {
|
|
|
- msg = String.format("该患者%s,%s,请留意", content, name);
|
|
|
+ switch (TypeEnum.getEnum(otherType)) {
|
|
|
+ case lis: // 其他值提醒——化验
|
|
|
+ if (TypeEnum.disease.getName().equals(type)) {
|
|
|
+ msg = String.format("该患者%s,患有%s,请留意", content, name);
|
|
|
+ } else if (TypeEnum.drug.getName().equals(type)) {
|
|
|
+ msg = String.format("该患者%s,可能正在服用%s,请留意", content, name);
|
|
|
+ } else if (ConEnum.group.getName().equals(type)) {
|
|
|
+ msg = String.format("该患者%s,%s,请留意", content, name);
|
|
|
+ }
|
|
|
+ billMsg.setType(type);
|
|
|
+ billMsg.setOrderName(lis.getName());
|
|
|
+ billMsg.setOrderDetailName(lis.getDetailName());
|
|
|
+ break;
|
|
|
+ case pacs: // 其他值提醒——辅检
|
|
|
+ msg = content;
|
|
|
+ break;
|
|
|
+ case transfusion: // 其他值提醒——输血
|
|
|
+ msg = String.format("该患者%s,建议输注%s", content, name);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
billMsg.setMsg(msg);
|
|
|
billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- billMsg.setOrderName(lis.getName());
|
|
|
- billMsg.setOrderDetailName(lis.getDetailName());
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 其他提醒——辅检
|
|
|
- *
|
|
|
- * @param content
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getCommonOtherTipPacsMsg(String content) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- billMsg.setMsg(content);
|
|
|
- billMsg.setContent(content);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 其他提醒——输血
|
|
|
- *
|
|
|
- * @param content
|
|
|
- * @param name
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getCommonOtherTipTransfusionMsg(String content, String name) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("该患者%s,建议输注%s", content, name);
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setContent(content);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 开单合理性24小时重复开通用提示信息
|
|
|
- *
|
|
|
- * @param orderName 原开单项
|
|
|
- * @param orderStandName 标准开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getBill24RepeatMsg(String orderName, String orderStandName, String content, String type) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("%s重复开立", orderName);
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setOrderName(orderName);
|
|
|
- billMsg.setOrderStandName(orderStandName);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 无需重复辅检开单项
|
|
|
- *
|
|
|
- * @param orderName 原开单项
|
|
|
- * @param orderStandName 标准开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getNeedlessRepeatOrderMsg(String orderName, String orderStandName, String content, String type) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("重复开立:该患者近期做过%s,且结果无异常", content);
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setOrderName(orderName);
|
|
|
- billMsg.setOrderStandName(orderStandName);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
return billMsg;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
- * 开单合理性禁忌医疗器械及物品提示信息
|
|
|
+ * 开单合理性通用提示信息
|
|
|
*
|
|
|
- * @param orderName 原开单项
|
|
|
+ * @param orderName 原开单项
|
|
|
* @param orderStandName 标准开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
+ * @param content 匹配内容
|
|
|
+ * @param conType 禁忌类型
|
|
|
+ * @param orderType 开单项类型
|
|
|
* @return
|
|
|
*/
|
|
|
- public static BillMsg getBillMedEquMsg(String orderName, String orderStandName, String content, String type, String orderType) {
|
|
|
+ public static BillMsg getCommonBillMsg(String orderName, String orderStandName, String content, String conType, String orderType) {
|
|
|
BillMsg billMsg = new BillMsg();
|
|
|
- if (content.startsWith("具有")) {
|
|
|
- content = content.replaceFirst("具有", ""); // 将“具有”替换成空
|
|
|
- }
|
|
|
- String msg = String.format("该患者具有%s,不宜开%s", content, orderName);
|
|
|
- // 输血提示语是另一种写法
|
|
|
- if (TypeEnum.transfusion.getName().equals(orderType)) {
|
|
|
- msg = String.format("该患者具有%s,谨慎输注%s", content, orderName);
|
|
|
+ // 禁忌项拼接提示语
|
|
|
+ switch (ConEnum.getEnum(conType)) {
|
|
|
+ case oralmeds: // 服用药品
|
|
|
+ content = "可能正在用药" + content;
|
|
|
+ break;
|
|
|
+ case allergicmeds: // 禁忌药品
|
|
|
+ content = content + "过敏";
|
|
|
+ break;
|
|
|
+ case operations: // 手术
|
|
|
+ content = "有" + content + "史";
|
|
|
+ break;
|
|
|
+ case medEqu: // 禁忌医疗器械及物品
|
|
|
+ if (!content.startsWith("具有")) {
|
|
|
+ content = "具有" + content;
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
- billMsg.setMsg(msg);
|
|
|
- billMsg.setOrderName(orderName);
|
|
|
- billMsg.setOrderStandName(orderStandName);
|
|
|
- billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
- return billMsg;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 开单合理性手术提示信息
|
|
|
- *
|
|
|
- * @param orderName 原开单项
|
|
|
- * @param orderStandName 标准开单项
|
|
|
- * @param content 匹配内容
|
|
|
- * @param type 类型
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BillMsg getCommonSurgeryMsg(String orderName, String orderStandName, String content, String type, String orderType) {
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
- String msg = String.format("该患者有%s史,不宜开%s", content, orderName);
|
|
|
- // 输血提示语是另一种写法
|
|
|
+ // 通用提示语
|
|
|
+ String msg = String.format("该患者%s,不宜开%s", content, orderName);
|
|
|
+ // 特殊情况下提示语
|
|
|
if (TypeEnum.transfusion.getName().equals(orderType)) {
|
|
|
- msg = String.format("该患者有%s史,谨慎输注%s", content, orderName);
|
|
|
+ // 输血开单项提示语
|
|
|
+ msg = String.format("该患者%s,谨慎输注%s", content, orderName);
|
|
|
+ } else if (TypeEnum.lis.getName().equals(orderType) && ConEnum.oralmeds.getName().equals(conType)) {
|
|
|
+ // 化验开单项 + 禁忌服用药品提示语
|
|
|
+ msg = String.format("该患者%s,会影响%s结果,请留意", content, orderName);
|
|
|
+ } else if (ConEnum.repeat24.getName().equals(conType)) {
|
|
|
+ // 24小时重复开立
|
|
|
+ msg = String.format("%s重复开立", orderName);
|
|
|
+ } else if (ConEnum.repeat.getName().equals(conType)) {
|
|
|
+ // 辅检正常项目无需重复开立
|
|
|
+ msg = String.format("重复开立:该患者近期做过%s,且结果无异常", content);
|
|
|
+ } else if (ConEnum.exclusion.getName().equals(conType)) {
|
|
|
+ // 开单项互斥
|
|
|
+ msg = String.format("检查项目互斥:%s与%s不宜同时进行", orderName, content);
|
|
|
+ billMsg.setMsg(msg);
|
|
|
}
|
|
|
billMsg.setMsg(msg);
|
|
|
billMsg.setOrderName(orderName);
|
|
|
billMsg.setOrderStandName(orderStandName);
|
|
|
billMsg.setContent(content);
|
|
|
- billMsg.setType(type);
|
|
|
+ billMsg.setType(conType);
|
|
|
return billMsg;
|
|
|
}
|
|
|
}
|