|
@@ -448,27 +448,31 @@ public class CaseFrontSheetService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public ResultVo<List<PureCodeName>> infoVerification(OpCaseFrontsheet param) {
|
|
|
+ public ResultVo<Map<String, List<PureCodeName>>> infoVerification(OpCaseFrontsheet param) {
|
|
|
CaseFrontsheetMain sheet = param.getSheet();
|
|
|
if (sheet.getFileStatus() == 2) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "已最终归档病案首页无法打印!");
|
|
|
}
|
|
|
- List<PureCodeName> message = VerifyCaseFrontSheet.getInstance().printVerify(sheet);
|
|
|
+ List<PureCodeName> force = VerifyCaseFrontSheet.getInstance().printVerify(sheet);
|
|
|
+ List<PureCodeName> advice = new ArrayList<>();
|
|
|
JSONObject powersi = qualityControl(sheet);
|
|
|
JSONObject responseEntity = powersi.getJSONObject("responseEntity");
|
|
|
if (null != responseEntity) {
|
|
|
JSONArray retarr = responseEntity.getJSONArray("newSettleMemInfo");
|
|
|
if (null != retarr && retarr.size() > 0) {
|
|
|
for (int i = 0; i < retarr.size(); i++) {
|
|
|
- message.add(new PureCodeName("", retarr.getJSONObject(i).getString("result_msg")));
|
|
|
+ advice.add(new PureCodeName("", retarr.getJSONObject(i).getString("result_msg")));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- log.info("打印前病案逻辑校验, 操作员:{} >>> {}", param.getStaffId(), message);
|
|
|
- if (message.isEmpty()) {
|
|
|
+ log.info("打印前病案逻辑校验, 操作员:{} >>> {}", param.getStaffId(), force);
|
|
|
+ if (force.isEmpty() && advice.isEmpty()) {
|
|
|
return ResultVoUtil.success();
|
|
|
}
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, "校验未通过。", message);
|
|
|
+ Map<String, List<PureCodeName>> map = new HashMap<>();
|
|
|
+ map.put("force", force);
|
|
|
+ map.put("advice", advice);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, "校验未通过。", map);
|
|
|
}
|
|
|
|
|
|
public ResultVo<List<PureCodeName>> saveVerify(OpCaseFrontsheet info) {
|
|
@@ -515,15 +519,20 @@ public class CaseFrontSheetService {
|
|
|
public ResultVo<String> saveYbDiags(SaveYbDiagParam param) {
|
|
|
dao.updateOperation(param.getBah(), param.getOperation());
|
|
|
dao.deleteOldYbDiag(param.getBah(), param.getTimes());
|
|
|
+ List<String> diagCodes = new ArrayList<>();
|
|
|
for (int i = 0; i < param.getYbDiags().size(); i++) {
|
|
|
YiBaoDisdiag diag = param.getYbDiags().get(i);
|
|
|
if (diag.getCode() == null) {
|
|
|
break;
|
|
|
}
|
|
|
+ if (diagCodes.contains(diag.getCode())) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "【诊断编码:" + diag.getCode() + "】请勿填入重复的诊断!");
|
|
|
+ }
|
|
|
+ diagCodes.add(diag.getCode());
|
|
|
diag.setNo(i + 1);
|
|
|
diag.setBah(param.getBah());
|
|
|
diag.setTimes(param.getTimes());
|
|
|
- dao.saveYbDiag(diag);
|
|
|
+ dao.insertNewYbDiag(diag);
|
|
|
log.info("保存医保诊断>>> {}", diag);
|
|
|
}
|
|
|
return ResultVoUtil.success();
|