| | |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | // log.error("serviceSubtask---------进来了吗?{}", serviceSubtask); |
| | | boolean dateToday = isDateToday(serviceSubtask.getLongSendTime()); |
| | | if (dateToday) { |
| | | try { |
| | |
| | | |
| | | /** |
| | | * 获取患者出入院信息 |
| | | * |
| | | * @param cry 出入院类型:0-入院,1-出院 |
| | | * @param startTime 开始时间 |
| | | * @param endTime 结束时间 |
| | |
| | | Gson gson = new Gson(); |
| | | JsonObject jsonObject = gson.fromJson(result, JsonObject.class); |
| | | JsonArray resultArray = jsonObject.getAsJsonObject("data").getAsJsonArray("result"); |
| | | Type resultType = new TypeToken<List<ThiedInhospInfo>>() {}.getType(); |
| | | Type resultType = new TypeToken<List<ThiedInhospInfo>>() { |
| | | }.getType(); |
| | | return gson.fromJson(resultArray, resultType); |
| | | } catch (Exception e) { |
| | | log.error("【parseResponseData】解析响应数据异常,原始数据:{}", result, e); |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | errorCount++; |
| | | log.error("【processPatientData】处理患者数据异常,患者ID:{}", |
| | | thiedInhospInfo.getPatiMediaNo(), e); |
| | | log.error("【processPatientData】处理患者数据异常,患者ID:{}", thiedInhospInfo.getPatiMediaNo(), e); |
| | | } |
| | | } |
| | | |
| | | log.info("【processPatientData】患者数据处理完成,成功:{},跳过:{},失败:{}", |
| | | successCount, skipCount, errorCount); |
| | | log.info("【processPatientData】患者数据处理完成,成功:{},跳过:{},失败:{}", successCount, skipCount, errorCount); |
| | | } |
| | | |
| | | /** |
| | |
| | | private boolean processSinglePatient(ThiedInhospInfo thiedInhospInfo, String cry) { |
| | | // 验证身份证号 |
| | | if (StringUtils.isEmpty(thiedInhospInfo.getPatiIdCardNo())) { |
| | | log.warn("【processSinglePatient】患者身份证号为空,跳过处理,患者编号:{}", |
| | | thiedInhospInfo.getPatiMediaNo()); |
| | | log.warn("【processSinglePatient】患者身份证号为空,跳过处理,患者编号:{}", thiedInhospInfo.getPatiMediaNo()); |
| | | return false; |
| | | } |
| | | |
| | |
| | | if (CollectionUtils.isNotEmpty(existingInhosps)) { |
| | | patMedInhosp.setInhospid(existingInhosps.get(0).getInhospid()); |
| | | patMedInhospService.updatePatMedInhosp(patMedInhosp); |
| | | log.debug("【processPatientInhospInfo】更新住院信息,患者编号:{},流水号:{}", |
| | | patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | log.debug("【processPatientInhospInfo】更新住院信息,患者编号:{},流水号:{}", patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | } else { |
| | | patMedInhospService.insertPatMedInhosp(patMedInhosp); |
| | | log.debug("【processPatientInhospInfo】新增住院信息,患者编号:{},流水号:{}", |
| | | patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | log.debug("【processPatientInhospInfo】新增住院信息,患者编号:{},流水号:{}", patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | } |
| | | } |
| | | |
| | |
| | | patMedInhosp.setFuflag("1"); |
| | | patMedInhosp.setInhospstate("0".equals(cry) ? "0" : "1"); |
| | | |
| | | // 医院和科室信息 |
| | | // 医院和床位信息 |
| | | patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId()); |
| | | patMedInhosp.setDeptcode(thiedInhospInfo.getAdmissDeptId()); |
| | | patMedInhosp.setDeptid(thiedInhospInfo.getAdmissDeptId()); |
| | | patMedInhosp.setDeptname(thiedInhospInfo.getAdmissDeptName()); |
| | | patMedInhosp.setBedNo(thiedInhospInfo.getAdmissBedNo()); |
| | | |
| | | // 诊断信息 |
| | | patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setDiagname(thiedInhospInfo.getDiagName()); |
| | | |
| | | // 时间信息 |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getAdmissDate())) { |
| | |
| | | } |
| | | |
| | | // 出院信息 |
| | | if (cry.equals("1")) { |
| | | patMedInhosp.setLeaveldeptcode(thiedInhospInfo.getCurrDeptId()); |
| | | patMedInhosp.setLeaveldeptname(thiedInhospInfo.getCurrDeptName()); |
| | | patMedInhosp.setLeavediagname(thiedInhospInfo.getDiagName()); |
| | | patMedInhosp.setLeaveicd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setOutWayId(thiedInhospInfo.getOutWayId()); |
| | | patMedInhosp.setOutWayName(thiedInhospInfo.getOutWayName()); |
| | | |
| | | // 医生信息 |
| | | patMedInhosp.setDrname(thiedInhospInfo.getDoctName()); |
| | | patMedInhosp.setDrcode(thiedInhospInfo.getDoctId()); |
| | | |
| | | // 病区信息 |
| | | patMedInhosp.setLeavehospitaldistrictid(thiedInhospInfo.getCurrWardCode()); |
| | | patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId()); |
| | | patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName()); |
| | | patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode()); |
| | | } else { |
| | | //入院 |
| | | patMedInhosp.setDeptcode(thiedInhospInfo.getCurrDeptId()); |
| | | patMedInhosp.setDeptname(thiedInhospInfo.getCurrDeptName()); |
| | | patMedInhosp.setDiagname(thiedInhospInfo.getDiagName()); |
| | | patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setHospitaldistrictid(thiedInhospInfo.getAdmissWardCode()); |
| | | patMedInhosp.setHospitaldistrictcode(thiedInhospInfo.getAdmissWardId()); |
| | | patMedInhosp.setHospitaldistrictname(thiedInhospInfo.getAdmissWardName()); |
| | | } |
| | | |
| | | // 医生信息 |
| | | patMedInhosp.setDrname(thiedInhospInfo.getDoctName()); |
| | | patMedInhosp.setDrcode(thiedInhospInfo.getDoctId()); |
| | | |
| | | |
| | | // 状态信息 |
| | | patMedInhosp.setSchemestatus("0".equals(cry) ? 1L : 2L); |