| | |
| | | try { |
| | | Map<String, Object> requestParams = buildRequestParams(reqVO); |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", new Gson().toJson(requestParams), headers); |
| | | log.info("请求参数出院数据地址:{},appKey:{}", sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", APP_KEY); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", new Gson().toJson(requestParams), headers); |
| | | |
| | | String cry = determineCry(reqVO); |
| | | log.info("cry的值为:{}", cry); |
| | |
| | | return serviceSLTDInhospResDTOS; |
| | | } catch (Exception e) { |
| | | log.error("【queryHealthcareRecordList】调用省立同德健康记录查询接口异常,请求参数:{}", reqVO, e); |
| | | throw new RuntimeException("调用省立同德健康记录查询接口失败", e); |
| | | throw new RuntimeException("调用省立同德健康记录查询接口失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | queryInhosp.setSerialnum(StringUtils.trim(patMedInhosp.getSerialnum())); |
| | | queryInhosp.setOrgid(StringUtils.trim(dto.getOrgId())); |
| | | queryInhosp.setInhospstate(cry); |
| | | queryInhosp.setSchemestatus(0L); |
| | | log.info("----------------这里的入参为:{},{}", queryInhosp.getPatno(), queryInhosp.getSerialnum()); |
| | | List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhosp(queryInhosp); |
| | | |
| | |
| | | patMedInhosp.setSerialnum(dto.getHealthcareRecordNo()); |
| | | patMedInhosp.setInhospno(dto.getHealthcareRecordNo()); |
| | | patMedInhosp.setFuflag("1"); |
| | | |
| | | |
| | | if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) |
| | | patMedInhosp.setFuflag("0"); |
| | | if ("0".equals(cry)) patMedInhosp.setInhospstate("0"); |
| | | if ("1".equals(cry)) patMedInhosp.setInhospstate("1"); |
| | | if ("3".equals(cry)) patMedInhosp.setInhospstate("3"); |
| | | if ("0".equals(cry)) { |
| | | patMedInhosp.setInhospstate("0"); |
| | | if (CollectionUtils.isNotEmpty(dto.getDiagnosisList()) && dto.getDiagnosisList().size() > 0) { |
| | | for (ServiceSLTDDiagnosisResDTO diagnosis : dto.getDiagnosisList()) { |
| | | if (diagnosis.getIsMainDiagnosis() == 1) { |
| | | patMedInhosp.setDiagname(diagnosis.getDiagnosisDictName() == null ? "" : diagnosis.getDiagnosisDictName()); |
| | | patMedInhosp.setIcd10code(diagnosis.getDiagnosisDictCode() == null ? "" : diagnosis.getDiagnosisDictCode()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if ("1".equals(cry)) { |
| | | patMedInhosp.setInhospstate("1"); |
| | | if (CollectionUtils.isNotEmpty(dto.getDiagnosisList()) && dto.getDiagnosisList().size() > 0) { |
| | | for (ServiceSLTDDiagnosisResDTO diagnosis : dto.getDiagnosisList()) { |
| | | if (diagnosis.getIsMainDiagnosis() == 1) { |
| | | patMedInhosp.setLeavediagname(diagnosis.getDiagnosisDictName() == null ? "" : diagnosis.getDiagnosisDictName()); |
| | | patMedInhosp.setLeaveicd10code(diagnosis.getDiagnosisDictCode() == null ? "" : diagnosis.getDiagnosisDictCode()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if ("3".equals(cry)) { |
| | | patMedInhosp.setInhospstate("3"); |
| | | if (CollectionUtils.isNotEmpty(dto.getDiagnosisList()) && dto.getDiagnosisList().size() > 0) { |
| | | for (ServiceSLTDDiagnosisResDTO diagnosis : dto.getDiagnosisList()) { |
| | | if (diagnosis.getIsMainDiagnosis() == 1) { |
| | | patMedInhosp.setDiagname(diagnosis.getDiagnosisDictName() == null ? "" : diagnosis.getDiagnosisDictName()); |
| | | patMedInhosp.setIcd10code(diagnosis.getDiagnosisDictCode() == null ? "" : diagnosis.getDiagnosisDictCode()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | patMedInhosp.setHospitalcode(dto.getOrgId()); |
| | | patMedInhosp.setBedNo(dto.getBedNumber()); |
| | | patMedInhosp.setStarttime(parseDate(dto.getStartTime())); |
| | |
| | | queryByPatientNo.setIdcardno(StringUtils.isNotEmpty(dto.getIdCardNo()) ? dto.getIdCardNo().trim() : null); |
| | | existingArchives = patArchiveService.selectPatArchiveList(queryByPatientNo); |
| | | } |
| | | // if (CollectionUtils.isEmpty(existingArchives) && !StringUtils.isEmpty(dto.getIdCardNo())) { |
| | | // PatArchive queryByIdCard = new PatArchive(); |
| | | // queryByIdCard.setIdcardno(dto.getIdCardNo().trim()); |
| | | // existingArchives = patArchiveService.selectPatArchiveList(queryByIdCard); |
| | | // } |
| | | |
| | | PatArchive patArchive = buildPatientArchive(dto); |
| | | |
| | | if (CollectionUtils.isEmpty(existingArchives)) { |