|
|
@@ -223,7 +223,7 @@ public class YiZhuLuRuServer {
|
|
|
return ResultVoUtil.success(dao.getParentOrders(patNo, times));
|
|
|
}
|
|
|
|
|
|
- public void correctSubOrders(String patNo, Integer times) {
|
|
|
+ public ResultVo<String> correctSubOrders(String patNo, Integer times) {
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
qw.eq("a.inpatient_no", patNo)
|
|
|
.eq("a.admiss_times", times)
|
|
|
@@ -231,7 +231,7 @@ public class YiZhuLuRuServer {
|
|
|
.eq("a.enter_oper", TokenUtil.getTokenUserId());
|
|
|
List<XinZhenYzActOrder> list = dao.huoQuYiZhuShuJu(qw);
|
|
|
if (ListUtil.isBlank(list)) {
|
|
|
- return;
|
|
|
+ return ResultVoUtil.success();
|
|
|
}
|
|
|
// 父医嘱
|
|
|
Map<BigDecimal, XinZhenYzActOrder> parentOrder = new HashMap<>(list.size());
|
|
|
@@ -245,6 +245,7 @@ public class YiZhuLuRuServer {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ return ResultVoUtil.success();
|
|
|
}
|
|
|
|
|
|
private boolean updateSubOrders(XinZhenYzActOrder parent, XinZhenYzActOrder children) {
|
|
|
@@ -361,15 +362,13 @@ public class YiZhuLuRuServer {
|
|
|
if (count > 0) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "有未确认和未执行的长期医嘱,无法确认全排斥医嘱,请先确认其他医嘱。");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
dao.stopOrder(param.getInpatientNo(), param.getAdmissTimes(), excludeOrders, userCode, orderNo);
|
|
|
}
|
|
|
for (BigDecimal decimal : confirmOrderInformation) {
|
|
|
dao.confirmOrders(decimal, userCode, new Date());
|
|
|
}
|
|
|
getThis().drgOrderUpdate(patInfo.getInpatientNo() + "_" + patInfo.getAdmissTimes());
|
|
|
- log.info("确认的医嘱:{}", JSON.toJSONString(yiZhuList));
|
|
|
+ sendAMessageToTheNurse(param, userCode, patInfo, "新增医嘱");
|
|
|
return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
|
|
|
}
|
|
|
|
|
|
@@ -413,6 +412,23 @@ public class YiZhuLuRuServer {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void sendAMessageToTheNurse(XinZhenYiZhu param, String inputCode, XinZhenYiZhu patInfo, String name) {
|
|
|
+ List<String> content = new ArrayList<>();
|
|
|
+ for (XinZhenYzActOrder item : param.getList()) {
|
|
|
+ String sb = notificationStyle("医嘱名", "409eff", item.getOrderName()) +
|
|
|
+ notificationStyle("医嘱时间", "409eff", DateUtil.formatDatetime(item.getStartTime())) +
|
|
|
+ notificationStyle("床位", "409eff", patInfo.getBedNo()) +
|
|
|
+ notificationStyle("患者姓名", "409eff", patInfo.getName()) +
|
|
|
+ notificationStyle("频次", "409eff", item.getFrequCode());
|
|
|
+ content.add(sb);
|
|
|
+ }
|
|
|
+ publicServer.faSongXiaoXi(patInfo, content, name, inputCode);
|
|
|
+ }
|
|
|
+
|
|
|
+ private String notificationStyle(String name, String color, String content) {
|
|
|
+ return String.format("%s:<span style='color: #%s'>%s</span><br>", name, color, content);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 录入单条医嘱 新的 下面的保存医嘱的都无效了
|
|
|
*
|
|
|
@@ -1174,25 +1190,6 @@ public class YiZhuLuRuServer {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void sendAMessageToTheNurse(XinZhenYiZhu param, String inputCode, XinZhenYiZhu huanZheXinXi, String groupNo) {
|
|
|
- List<String> content = new ArrayList<>();
|
|
|
- for (XinZhenYzActOrder item : param.getList()) {
|
|
|
- if (StringUtil.isBlank(item.getDrugFlag())) {
|
|
|
- item.setDrugFlag("o");
|
|
|
- }
|
|
|
- if ("00".equals(item.getSerial().trim())) {
|
|
|
- item.setGroupNo("00");
|
|
|
- } else if ("01".equals(item.getSerial().trim()) || "99".equals(item.getSerial().trim())) {
|
|
|
- item.setGroupNo(groupNo);
|
|
|
- }
|
|
|
- if (item.getEndTime() != null) {
|
|
|
- item.setModifier(inputCode);
|
|
|
- }
|
|
|
- content.add(String.format("医嘱名:<span style='color:#409eff'>【%s】</span><br>" + "医嘱时间:<span style='color:#409eff'>【%tF %<tT】</span><br>" + "患者姓名:<span style='color:#409eff'>【%s】</span><br>" + "床位:<span style='color:#409eff'>【%s】</span><br>" + "频次:<span style='color:#409eff'>【%s】</span>", item.getOrderName(), item.getOrderTime(), huanZheXinXi.getName(), huanZheXinXi.getBedNo(), item.getFrequCode()));
|
|
|
- }
|
|
|
- publicServer.faSongXiaoXi(huanZheXinXi, content, "新增医嘱", inputCode);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取医嘱录入的模板1
|
|
|
*
|
|
|
@@ -1541,8 +1538,8 @@ public class YiZhuLuRuServer {
|
|
|
/**
|
|
|
* 确认出院带药医嘱
|
|
|
*
|
|
|
- * @param patNo
|
|
|
- * @param times
|
|
|
+ * @param patNo 住院号
|
|
|
+ * @param times 住院次数
|
|
|
* @return
|
|
|
*/
|
|
|
public ResultVo<Map<String, Object>> confirmTheDoctorSOrderWithMedicine(String patNo, Integer times) {
|
|
|
@@ -1612,6 +1609,7 @@ public class YiZhuLuRuServer {
|
|
|
for (int i = 0; i < takeTheMedicineList.size(); i++) {
|
|
|
pageNoList.add(publicServer.getTheDrugListNo());
|
|
|
}
|
|
|
+ sendAMessageToTheNurse(patInfo, userCode, dao.huoQuHuanZheXinXi(patNo, times), "出院带药");
|
|
|
return getThis().getMapResultVo(patInfo, userCode, takeTheMedicineList, pageNoList);
|
|
|
} else {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.ERROR_MESSAGE, "请修改有错误的医嘱。", check);
|