|
|
@ -110,6 +110,10 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
dto.setPriority(4);
|
|
|
|
dto.setPriority(4);
|
|
|
|
CommonResult<String> task = collectTaskService.compensateTask(dto);
|
|
|
|
CommonResult<String> task = collectTaskService.compensateTask(dto);
|
|
|
|
if (ResultCode.FAILED.getCode().equals(task.getCode())) {
|
|
|
|
if (ResultCode.FAILED.getCode().equals(task.getCode())) {
|
|
|
|
|
|
|
|
String data = task.getData();
|
|
|
|
|
|
|
|
if (Func.isNotBlank(data) && data.contains("出院")) {
|
|
|
|
|
|
|
|
throw new BaseException("患者未出院!");
|
|
|
|
|
|
|
|
}
|
|
|
|
throw new RuntimeException("补偿失败!");
|
|
|
|
throw new RuntimeException("补偿失败!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -121,6 +125,20 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
if (patientIds.size() > 1) {
|
|
|
|
if (patientIds.size() > 1) {
|
|
|
|
throw new BaseException("住院号+住院次数 ,系统中患者有多个!");
|
|
|
|
throw new BaseException("住院号+住院次数 ,系统中患者有多个!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isDischarge(patientIds.get(0))) {
|
|
|
|
|
|
|
|
throw new BaseException("该患者未出院!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 根据病案主键,获得该患者是否出院
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param patientId 病案主键
|
|
|
|
|
|
|
|
* @return 是否出院
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private boolean isDischarge(String patientId) {
|
|
|
|
|
|
|
|
int count = tBasicMapper.getDischargeCount(patientId);
|
|
|
|
|
|
|
|
return count > 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|