|
@@ -386,6 +386,10 @@ public class EmrServer {
|
|
|
return ResultVoUtil.success(dao.selectEmrDeteles(patNo, times, TokenUtil.getTokenUserId()));
|
|
|
}
|
|
|
|
|
|
+ public ResultVo<JSONObject> getInvalidByDocumentId(String id) {
|
|
|
+ return ResultVoUtil.success(emr.getInvalidByDocumentIdApi(id));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 恢复电子病历
|
|
@@ -406,9 +410,13 @@ public class EmrServer {
|
|
|
param.put("_id", documentId);
|
|
|
param.put("valid", 1);
|
|
|
JSONObject json = emr.resumeMedicalRecords(documentId, param);
|
|
|
- dao.updateDeleteFlag(data.getId());
|
|
|
- log.info("恢复:{}", json);
|
|
|
- return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
|
|
|
+ log.info("恢复电子病历:{}", json);
|
|
|
+ if (json.getInteger("ok") == 1) {
|
|
|
+ dao.updateDeleteFlag(data.getId());
|
|
|
+ return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "病历恢复成功。");
|
|
|
+ } else {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "病历恢复失败,请重试!");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|