保存的索引即是住院的交叉索引

3.2.4.44
wyb 2 years ago
parent aff2e801d8
commit 55e0c14708

@ -11,12 +11,21 @@ import java.util.List;
*/
public interface ShunDePeopleService {
/**
*
*
*
* @param sdRyIndex
* @return
* @return
*/
List<String> getSdRyReportJxIds(String sdRyIndex);
List<String> getSdRyMzReportJxIds(String sdRyIndex);
/**
*
*
* @param sdRyIndex
* @return
*/
List<String> getSdRyZyReportJxIds(String sdRyIndex);
/**
*

@ -54,9 +54,9 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
String respBody = this.sendPost(url, requestParam);
log.info("查询检查报告请求成功,响应参数:{}", respBody);
TimeUnit.MILLISECONDS.sleep(sdRyReportQueryConfig.getReportQueryInspectInterval());
return respBody;
return respBody;
} catch (Exception ex) {
log.error("查询检查报告失败:"+ex.getMessage(), ex);
log.error("查询检查报告失败:" + ex.getMessage(), ex);
return "";
} finally {
INSPECT_REPORT_LOCK.unlock();
@ -73,9 +73,9 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
String respBody = this.sendPost(url, requestParam);
log.info("查询LIS检验报告请求成功,响应参数:{}", respBody);
TimeUnit.MILLISECONDS.sleep(sdRyReportQueryConfig.getReportQueryLisInterval());
return respBody;
return respBody;
} catch (Exception ex) {
log.error("查询LIS检验报告失败"+ex.getMessage(), ex);
log.error("查询LIS检验报告失败" + ex.getMessage(), ex);
return "";
} finally {
LIS_REPORT_LOCK.unlock();
@ -83,17 +83,36 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
}
@Override
public List<String> getSdRyReportJxIds(String sdRyIndex) {
public List<String> getSdRyMzReportJxIds(String sdRyIndex) {
List<String> indexes = new ArrayList<>();
try {
String zyParam = organizationQuerySdRyReportIndexParam(sdRyIndex, 3);
String mzParam = organizationQuerySdRyReportIndexParam(sdRyIndex, 1);
String[] zyParams = {"HIP1179", zyParam};
String[] mzParams = {"HIP1179", mzParam};
List<String> zyIndex = getIndex(zyParams);
return getSdRyReportJxIds(mzParams);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
return indexes;
}
@Override
public List<String> getSdRyZyReportJxIds(String sdRyIndex) {
List<String> indexes = new ArrayList<>();
try {
String zyParam = organizationQuerySdRyReportIndexParam(sdRyIndex, 3);
String[] zyParams = {"HIP1179", zyParam};
return getSdRyReportJxIds(zyParams);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
return indexes;
}
private List<String> getSdRyReportJxIds(String[] qrIndexParams) {
List<String> indexes = new ArrayList<>();
try {
List<String> zyIndex = getIndex(qrIndexParams);
indexes.addAll(zyIndex);
List<String> mzIndex = getIndex(mzParams);
indexes.addAll(mzIndex);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
@ -140,13 +159,14 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
+ "&creationTime=" + Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
}
private String organizationQuerySdRyInspectReportParam(SdJxReportDto dto) {
String patientId = dto.getPatientId();
if("1".equals(dto.getPatentTypeCode())){
patientId="m"+patientId;
if ("1".equals(dto.getPatentTypeCode())) {
patientId = "m" + patientId;
}
if("3".equals(dto.getPatentTypeCode())){
patientId="z"+patientId;
if ("3".equals(dto.getPatentTypeCode())) {
patientId = "z" + patientId;
}
HashMap<Object, Object> map = new HashMap<>(7);
map.put("isPage", dto.isPage());
@ -170,11 +190,11 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
private String organizationQuerySdRyLisReportParam(SdJxReportDto dto) {
String patientId = dto.getPatientId();
if("1".equals(dto.getPatentTypeCode())){
patientId="m"+patientId;
if ("1".equals(dto.getPatentTypeCode())) {
patientId = "m" + patientId;
}
if("3".equals(dto.getPatentTypeCode())){
patientId="z"+patientId;
if ("3".equals(dto.getPatentTypeCode())) {
patientId = "z" + patientId;
}
HashMap<Object, Object> map = new HashMap<>(7);
map.put("isPage", dto.isPage());
@ -189,8 +209,6 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
}
private String getPdfReportBase64InputString(String examNo, String reportNo, SdPacsServerConfig config) {
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<!-- PDF报告请求消息 -->\n" +

@ -155,17 +155,22 @@ public class ReportJob {
}
private List<ReportDto> getInspectReportList(TBasic tBasic) {
List<ReportDto> reportDtoList = new ArrayList<>();
// 根据基础信息查顺德报告业务系统索引,查 交叉索引
List<String> sdRyReportPatientIds = getSdRyReportPatientIds(tBasic.getPatientId());
if (sdRyReportPatientIds.isEmpty()) {
log.warn("patientId{} 未查询到检查报告患者交叉索引", tBasic.getPatientId());
return new ArrayList<>();
List<String> sdRyMzReportPatientIds = getSdRyMzReportPatientIds(tBasic.getPatientId());
if (sdRyMzReportPatientIds.isEmpty()) {
log.warn("patientId{} 未查询到门诊检查报告患者交叉索引", tBasic.getPatientId());
} else {
// 根据门诊交叉索引查询报告
for (String mzSdRyReportPatientId : sdRyMzReportPatientIds) {
List<ReportDto> reportDtoList2 = getMzInspectReportBySdRyJxId(mzSdRyReportPatientId, tBasic);
reportDtoList.addAll(reportDtoList2);
}
}
List<ReportDto> reportDtoList = new ArrayList<>();
// 根据交叉索引查询报告
for (String sdRyReportPatientId : sdRyReportPatientIds) {
List<ReportDto> reportDtoList2 = getInspectReportBySdRyJxId(sdRyReportPatientId, tBasic);
reportDtoList.addAll(reportDtoList2);
String sDryIndex = tBasicMapper.getSdRyIndexByPatientId(tBasic.getPatientId());
if (Func.isNotBlank(sDryIndex)) {
List<ReportDto> zyInspectReportDtos = getZyInspectReportBySdRyJxId(sDryIndex, tBasic);
reportDtoList.addAll(zyInspectReportDtos);
}
return reportDtoList;
}
@ -261,7 +266,6 @@ public class ReportJob {
sdJxReportDto.setPatentTypeCode("3");
sdJxReportDto.setOrgCode("4560886379");
String respBody = shunDePeopleService.getInspectReportByJxId(sdJxReportDto);
List<ReportDto> reportDtoList = parseQuerySdRyInspectReport(respBody, tBasic);
if (reportDtoList.isEmpty()) {
break;
@ -343,7 +347,7 @@ public class ReportJob {
}
private String saveBase64(String base64) throws IOException {
private String saveBase64(String base64) throws IOException {
String dir;
try {
File current = new File(".");
@ -392,14 +396,14 @@ public class ReportJob {
private List<ReportDto> getLisReportList(TBasic tBasic) {
// 根据基础信息查顺德报告业务系统索引,查 交叉索引
List<String> sdRyReportPatientIds = getSdRyReportPatientIds(tBasic.getPatientId());
if (sdRyReportPatientIds.isEmpty()) {
log.warn("patientId{} 未查询到Lis检验报告患者交叉索引", tBasic.getPatientId());
List<String> sdRyMzReportPatientIds = getSdRyMzReportPatientIds(tBasic.getPatientId());
if (sdRyMzReportPatientIds.isEmpty()) {
log.warn("patientId{} 未查询到门诊Lis检验报告患者交叉索引", tBasic.getPatientId());
return new ArrayList<>();
}
List<ReportDto> reportDtoList = new ArrayList<>();
// 根据交叉索引查询报告
for (String sdRyReportPatientId : sdRyReportPatientIds) {
for (String sdRyReportPatientId : sdRyMzReportPatientIds) {
List<ReportDto> reportDtoList2 = getLisReportBySdRyJxId(sdRyReportPatientId, tBasic);
reportDtoList.addAll(reportDtoList2);
}
@ -577,25 +581,44 @@ public class ReportJob {
/**
*
*
*
* @param patientId
* @return
* @return
*/
private List<String> getSdRyReportPatientIds(String patientId) {
private List<String> getSdRyMzReportPatientIds(String patientId) {
try {
String sDryIndex = tBasicMapper.getSdRyIndexByPatientId(patientId);
if (Func.isBlank(sDryIndex)) {
log.warn("归档系统 patientId:{} 未关联到第三方索引", patientId);
return new ArrayList<>();
}
return shunDePeopleService.getSdRyReportJxIds(sDryIndex);
return shunDePeopleService.getSdRyMzReportJxIds(sDryIndex);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
return new ArrayList<>();
}
}
/**
*
*
* @param patientId
* @return
*/
private List<String> getSdRyZyReportPatientIds(String patientId) {
try {
String sDryIndex = tBasicMapper.getSdRyIndexByPatientId(patientId);
if (Func.isBlank(sDryIndex)) {
log.warn("归档系统 patientId:{} 未关联到第三方索引", patientId);
return new ArrayList<>();
}
return shunDePeopleService.getSdRyZyReportJxIds(sDryIndex);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
return new ArrayList<>();
}
}
private void refreshTime(AfJobTime afJobTime) {
if (afJobTime.getId() == null) {

Loading…
Cancel
Save