|
@@ -252,7 +252,7 @@ public class YiZhuLuRuServer {
|
|
|
}
|
|
|
|
|
|
// 合理用药校验
|
|
|
-// Map<String, List<String>> rationalUseOfMedicine = rationalUseServer.jiaoYan(param);
|
|
|
+ Map<String, List<String>> rationalUseOfMedicine = rationalUseServer.jiaoYan(param);
|
|
|
|
|
|
String userCode = TokenUtil.getTokenUserId();
|
|
|
// 获取医生开药品的权限
|
|
@@ -283,6 +283,17 @@ public class YiZhuLuRuServer {
|
|
|
|
|
|
confirmOrderInformation.add(item.getActOrderNo());
|
|
|
Map<String, Object> errorMessageMap = checkData(item, drug, project, huanZheXinXi, doctorLevel);
|
|
|
+ String key = item.getId();
|
|
|
+ if (rationalUseOfMedicine.containsKey(key)) {
|
|
|
+ List<String> temp = (List<String>) errorMessageMap.get("error");
|
|
|
+ if (temp == null) {
|
|
|
+ errorMessageMap.put("error", rationalUseOfMedicine.get(key));
|
|
|
+ } else {
|
|
|
+ temp.addAll(rationalUseOfMedicine.get(key));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("错误信息:{}", JSON.toJSONString(errorMessageMap));
|
|
|
if (!errorMessageMap.isEmpty()) {
|
|
|
if (!isThereAnyErrorMessage && errorMessageMap.containsKey("error")) {
|
|
|
isThereAnyErrorMessage = true;
|
|
@@ -294,13 +305,15 @@ public class YiZhuLuRuServer {
|
|
|
if (isThereAnyErrorMessage) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.ERROR_MESSAGE, "请修改错误的医嘱", map);
|
|
|
}
|
|
|
-
|
|
|
+ if (true) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "测试");
|
|
|
+ }
|
|
|
if (excludeOrders != null) {
|
|
|
int count = dao.thereAreUnexecutedOrders(param.getInpatientNo(), param.getAdmissTimes(), orderNo);
|
|
|
if (count > 0) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "有未确认和未执行的医嘱,无法确认全排斥医嘱。");
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "有未确认和未执行的长期医嘱,无法确认全排斥医嘱,请先确认其他医嘱。");
|
|
|
}
|
|
|
- dao.stopOrder(param.getInpatientNo(), param.getAdmissTimes(), excludeOrders, userCode);
|
|
|
+ dao.stopOrder(param.getInpatientNo(), param.getAdmissTimes(), excludeOrders, userCode, orderNo);
|
|
|
}
|
|
|
dischargeMedicineList(takeTheMedicineList, huanZheXinXi);
|
|
|
dao.confirmOrders(confirmOrderInformation, TokenUtil.getTokenUserId(), param.getInpatientNo(), param.getAdmissTimes());
|