| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> keShiXX = (Map<String, Object>) yeWuXX.get("KeShiXX"); |
| | | ExternalDept externalDept = BeanUtil.mapToBean(keShiXX, ExternalDept.class, true); |
| | | if (ObjectUtils.isEmpty(externalDept)) { |
| | | throw new BaseException("externalDept是空的,没有数据!!!"); |
| | | } |
| | | SysDept sysDept = new SysDept(); |
| | | sysDept.setOrgid(externalDept.getZuZhiJGID()); |
| | | sysDept.setHisDeptId(externalDept.getKeShiID()); |
| | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> yongHuXX = (Map<String, Object>) yeWuXX.get("YongHuXX"); |
| | | ExternalUserInfo externalUserInfo = BeanUtil.mapToBean(yongHuXX, ExternalUserInfo.class, true); |
| | | if (ObjectUtils.isEmpty(externalUserInfo)) { |
| | | throw new BaseException("externalUserInfo是空的,没有数据!!!"); |
| | | } |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setGuid(externalUserInfo.getZuZhiJGID()); |
| | | sysUser.setUserName(externalUserInfo.getYongHuDLM()); |
| | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> ZuZhiJGXX = (Map<String, Object>) yeWuXX.get("ZuZhiJGXX"); |
| | | ExternalOrganInfo externalOrganInfo = BeanUtil.mapToBean(ZuZhiJGXX, ExternalOrganInfo.class, true); |
| | | if (ObjectUtils.isEmpty(externalOrganInfo)) { |
| | | throw new BaseException("externalOrganInfo是空的,没有数据!!!"); |
| | | } |
| | | BaseOrganization baseOrganization = new BaseOrganization(); |
| | | baseOrganization.setOrganizationID(externalOrganInfo.getZuZhiJGID()); |
| | | baseOrganization.setOrganizationName(externalOrganInfo.getZuZhiJGMC()); |
| | |
| | | public Boolean addInHospInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---addInHospInfo的新增的值为:{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | List<HashMap<String, Object>> epai = (List<HashMap<String, Object>>) yeWuXX.get("DiZhiXXList"); |
| | | List<HashMap<String, Object>> epli = (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList"); |
| | | List<HashMap<String, Object>> hospPatientDiagnoseInfos = (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("DiZhiXXList") : null; |
| | | List<HashMap<String, Object>> epli = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList") : null; |
| | | List<HashMap<String, Object>> hospPatientDiagnoseInfos = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList") : null; |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null; |
| | | ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null; |
| | |
| | | public Boolean cancelInHospInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---cancelInHospInfo的新增的值为:{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); |
| | |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) { |
| | | Map<String, Object> JiuZhenXX = (Map<String, Object>) yeWuXX.get("JiuZhenXX"); |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | PatMedInhosp patMedInhosp1 = patMedInhospList.get(0); |
| | | patMedInhosp1.setSchemestatus(3L); |
| | | patMedInhosp1.setDelFlag("1"); |
| | | patMedInhosp1.setOperator(JiuZhenXX.get("CaoZuoRXM").toString()); |
| | | patMedInhosp1.setOperatorId(JiuZhenXX.get("CaoZuoRID").toString()); |
| | | if (ObjectUtils.isNotEmpty(JiuZhenXX)) { |
| | | patMedInhosp1.setOperator(ObjectUtils.isNotEmpty(JiuZhenXX.get("CaoZuoRXM")) ? JiuZhenXX.get("CaoZuoRXM").toString() : null); |
| | | patMedInhosp1.setOperatorId(ObjectUtils.isNotEmpty(JiuZhenXX.get("CaoZuoRID")) ? JiuZhenXX.get("CaoZuoRID").toString() : null); |
| | | } |
| | | patMedInhosp1.setUpdateTime(new Date()); |
| | | int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | |
| | | public Boolean addOutHospInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---addOutHospInfo的新增的值为:{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | List<HashMap<String, Object>> epai = (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList"); |
| | | List<HashMap<String, Object>> epli = (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | Map<String, Object> ChuYuanJL = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ChuYuanJL") : null; |
| | | List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(BingRenXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null; |
| | | List<HashMap<String, Object>> epli = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList") : null; |
| | | Map<String, Object> SuiFangJH = ObjectUtils.isNotEmpty(ChuYuanJL) ? (Map<String, Object>) ChuYuanJL.get("SuiFangJH") : null; |
| | | |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null; |
| | | ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null; |
| | |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | Map<String, Object> JiuZhenXX = (Map<String, Object>) yeWuXX.get("JiuZhenXX"); |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | PatMedInhosp patMedInhosp1 = new PatMedInhosp(); |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) patMedInhosp1 = patMedInhospList.get(0); |
| | | patMedInhosp1.setSchemestatus(2L); |
| | |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | patMedInhosp1.setOperator(JiuZhenXX.get("CaoZuoRXM").toString()); |
| | | patMedInhosp1.setOperatorId(JiuZhenXX.get("CaoZuoRID").toString()); |
| | | if (ObjectUtils.isNotEmpty(JiuZhenXX)) { |
| | | patMedInhosp1.setOperator(ObjectUtils.isNotEmpty(JiuZhenXX.get("CaoZuoRXM")) ? JiuZhenXX.get("CaoZuoRXM").toString() : null); |
| | | patMedInhosp1.setOperatorId(ObjectUtils.isNotEmpty(JiuZhenXX.get("CaoZuoRID")) ? JiuZhenXX.get("CaoZuoRID").toString() : null); |
| | | patMedInhosp1.setDrname(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZhuZhiYSXM")) ? JiuZhenXX.get("ZhuZhiYSXM").toString() : null); |
| | | patMedInhosp1.setDrcode(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZhuZhiYSID")) ? JiuZhenXX.get("ZhuZhiYSID").toString() : null); |
| | | patMedInhosp1.setNurseName(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSXM")) ? JiuZhenXX.get("ZeRenHSXM").toString() : null); |
| | | patMedInhosp1.setNurseId(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSID")) ? JiuZhenXX.get("ZeRenHSID").toString() : null); |
| | | patMedInhosp1.setBedNo(ObjectUtils.isNotEmpty(JiuZhenXX.get("DangQianCWMC")) ? JiuZhenXX.get("DangQianCWMC").toString() : null); |
| | | } |
| | | patMedInhosp1.setUpdateTime(new Date()); |
| | | patMedInhosp1.setDrname(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZhuZhiYSXM")) ? JiuZhenXX.get("ZhuZhiYSXM").toString() : null); |
| | | patMedInhosp1.setDrcode(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZhuZhiYSID")) ? JiuZhenXX.get("ZhuZhiYSID").toString() : null); |
| | | patMedInhosp1.setNurseName(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSXM")) ? JiuZhenXX.get("ZeRenHSXM").toString() : null); |
| | | patMedInhosp1.setNurseId(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSID")) ? JiuZhenXX.get("ZeRenHSID").toString() : null); |
| | | patMedInhosp1.setBedNo(ObjectUtils.isNotEmpty(JiuZhenXX.get("DangQianCWMC")) ? JiuZhenXX.get("DangQianCWMC").toString() : null); |
| | | patMedInhosp1.setTelcode(patArchive.getTelcode()); |
| | | patMedInhosp1.setLeavehospitaldistrictcode(externalInHospPatientInfo.getDangQianBQID()); |
| | | patMedInhosp1.setLeavehospitaldistrictname(externalInHospPatientInfo.getDangQianBQMC()); |
| | |
| | | patMedInhosp1.setDeptname(externalInHospPatientInfo.getDangQianKSMC()); |
| | | patMedInhosp1.setLeaveldeptcode(externalInHospPatientInfo.getDangQianKSID()); |
| | | patMedInhosp1.setDeptcode(externalInHospPatientInfo.getDangQianKSID()); |
| | | List<HashMap<String, Object>> zhenDuanList = (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList"); |
| | | List<ExternalInHospPatientDiagnoseInfo> hospPatientDiagnoseInfos2 = zhenDuanList.stream().map(map -> { |
| | | ExternalInHospPatientDiagnoseInfo info = new ExternalInHospPatientDiagnoseInfo(); |
| | | info.setZhenDuanID((String) map.get("ZhenDuanID")); |
| | | info.setZhenDuanMC((String) map.get("ZhenDuanMC")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | patMedInhosp1.setLeaveicd10code(StringUtils.isNotEmpty(patMedInhosp1.getLeaveicd10code()) ? patMedInhosp1.getLeaveicd10code() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanID() : hospPatientDiagnoseInfos2.get(0).getZhenDuanID()); |
| | | patMedInhosp1.setLeavediagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC()); |
| | | patMedInhosp1.setDiagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC()); |
| | | // patMedInhosp1.setIcd10code(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC()); |
| | | |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH)) { |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : null); |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangRQ"))) { |
| | | try { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | patMedInhosp1.setFudate(simpleDateFormat.parse(SuiFangJH.get("SuiFangRQ").toString())); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | patMedInhosp1.setFuperiod(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangZQJY")) ? SuiFangJH.get("SuiFangZQJY").toString() : null); |
| | | patMedInhosp1.setFutypecode(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSDM")) ? SuiFangJH.get("SuiFangFSDM").toString() : null); |
| | | patMedInhosp1.setFutypedesc(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSMC")) ? SuiFangJH.get("SuiFangFSMC").toString() : null); |
| | | patMedInhosp1.setFuadivce(ObjectUtils.isNotEmpty(SuiFangJH.get("FuZhenZD")) ? SuiFangJH.get("FuZhenZD").toString() : null); |
| | | patMedInhosp1.setFuspecialadvice(ObjectUtils.isNotEmpty(SuiFangJH.get("QiTaZKJBSF")) ? SuiFangJH.get("QiTaZKJBSF").toString() : null); |
| | | } |
| | | |
| | | List<HashMap<String, Object>> zhenDuanList = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList") : null; |
| | | if (CollectionUtils.isNotEmpty(zhenDuanList)) { |
| | | List<ExternalInHospPatientDiagnoseInfo> hospPatientDiagnoseInfos2 = zhenDuanList.stream().map(map -> { |
| | | ExternalInHospPatientDiagnoseInfo info = new ExternalInHospPatientDiagnoseInfo(); |
| | | info.setZhenDuanID((String) map.get("ZhenDuanID")); |
| | | info.setZhenDuanMC((String) map.get("ZhenDuanMC")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | patMedInhosp1.setLeaveicd10code(StringUtils.isNotEmpty(patMedInhosp1.getLeaveicd10code()) ? patMedInhosp1.getLeaveicd10code() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanID() : hospPatientDiagnoseInfos2.get(0).getZhenDuanID()); |
| | | patMedInhosp1.setLeavediagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC()); |
| | | patMedInhosp1.setDiagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC()); |
| | | } |
| | | |
| | | patMedInhosp1.setInhospstate("1"); |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) { |
| | | patMedInhosp1.setUpdateTime(new Date()); |
| | | patMedInhosp1.setOrgid(BingRenXX.get("ZuZhiJGID").toString()); |
| | | patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX) && ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); |
| | | int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | | } else { |
| | | patMedInhosp1.setHospitalname(BingRenXX.get("ZuZhiJGMC").toString()); |
| | | patMedInhosp1.setHospitalcode(BingRenXX.get("ZuZhiJGID").toString()); |
| | | patMedInhosp1.setLeavehospitaldistrictname(BingRenXX.get("DangQianBQMC").toString()); |
| | | patMedInhosp1.setLeavehospitaldistrictcode(BingRenXX.get("DangQianBQID").toString()); |
| | | if (ObjectUtils.isNotEmpty(BingRenXX)) { |
| | | patMedInhosp1.setHospitalname(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGMC")) ? BingRenXX.get("ZuZhiJGMC").toString() : null); |
| | | patMedInhosp1.setHospitalcode(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); |
| | | patMedInhosp1.setLeavehospitaldistrictname(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianBQMC")) ? BingRenXX.get("DangQianBQMC").toString() : null); |
| | | patMedInhosp1.setLeavehospitaldistrictcode(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianBQID")) ? BingRenXX.get("DangQianBQID").toString() : null); |
| | | patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); |
| | | patMedInhosp1.setPatno(ObjectUtils.isNotEmpty(BingRenXX.get("BingRenID")) ? BingRenXX.get("BingRenID").toString() : null); |
| | | patMedInhosp1.setInhospno(ObjectUtils.isNotEmpty(BingRenXX.get("BingAnHao")) ? BingRenXX.get("BingAnHao").toString() : null); |
| | | patMedInhosp1.setSerialnum(ObjectUtils.isNotEmpty(BingRenXX.get("BingAnHao")) ? BingRenXX.get("BingAnHao").toString() : null); |
| | | } |
| | | patMedInhosp1.setPatid(patArchive.getId()); |
| | | patMedInhosp1.setPatname(patArchive.getName()); |
| | | patMedInhosp1.setOrgid(BingRenXX.get("ZuZhiJGID").toString()); |
| | | patMedInhosp1.setPatno(BingRenXX.get("BingRenID").toString()); |
| | | patMedInhosp1.setInhospno(BingRenXX.get("BingAnHao").toString()); |
| | | patMedInhosp1.setSerialnum(BingRenXX.get("BingAnHao").toString()); |
| | | |
| | | patMedInhosp1.setCreateTime(new Date()); |
| | | int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | |
| | | public Boolean cancelOutHospInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---cancelOutHospInfo的新增的值为:{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); |
| | |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) { |
| | | Map<String, Object> JiuZhenXX = (Map<String, Object>) yeWuXX.get("JiuZhenXX"); |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | PatMedInhosp patMedInhosp1 = patMedInhospList.get(0); |
| | | patMedInhosp1.setSchemestatus(4L); |
| | | patMedInhosp1.setOperator(JiuZhenXX.get("CaoZuoRXM").toString()); |
| | | patMedInhosp1.setOperatorId(JiuZhenXX.get("CaoZuoRID").toString()); |
| | | if (ObjectUtils.isNotEmpty(JiuZhenXX)) { |
| | | patMedInhosp1.setOperator(ObjectUtils.isNotEmpty(JiuZhenXX.get("CaoZuoRXM")) ? JiuZhenXX.get("CaoZuoRXM").toString() : null); |
| | | patMedInhosp1.setOperatorId(ObjectUtils.isNotEmpty(JiuZhenXX.get("CaoZuoRXM")) ? JiuZhenXX.get("CaoZuoRID").toString() : null); |
| | | } |
| | | patMedInhosp1.setUpdateTime(new Date()); |
| | | int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | |
| | | Map XiaoXiTou = (Map) dataMap.get("XiaoXiTou"); |
| | | String FaSongJGID = ObjectUtils.isNotEmpty(XiaoXiTou.get("FaSongJGID")) ? XiaoXiTou.get("FaSongJGID").toString() : null; |
| | | |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | Map<String, Object> JiuZhenXX = (Map<String, Object>) yeWuXX.get("JiuZhenXX"); |
| | | List<HashMap<String, Object>> ZhenDuanList = (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList"); |
| | | List<HashMap<String, Object>> externalWZInfos = (List<HashMap<String, Object>>) yeWuXX.get("WenZhenList"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null; |
| | | List<HashMap<String, Object>> ZhenDuanList = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList") : null; |
| | | List<HashMap<String, Object>> externalWZInfos = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("WenZhenList") : null; |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | //病人信息里没有组织机构ID |
| | | externalInHospPatientInfo.setZuZhiJGID(FaSongJGID); |
| | | |
| | | ExternalJZInfo externalJZInfo = BeanUtil.mapToBean(JiuZhenXX, ExternalJZInfo.class, true); |
| | | List<ExternalDiagnosisInfo> externalDiagnosisInfoList = ZhenDuanList.stream().map(map -> { |
| | | ExternalDiagnosisInfo info = new ExternalDiagnosisInfo(); |
| | | info.setZhenDuanYSID((String) map.get("ZhenDuanYSID")); |
| | | info.setZhenDuanYSXM((String) map.get("ZhenDuanYSXM")); |
| | | info.setZhenDuanID((String) map.get("ZhenDuanID")); |
| | | info.setZhenDuanMC((String) map.get("ZhenDuanMC")); |
| | | info.setZhenDuanLBDM((String) map.get("ZhenDuanLBDM")); |
| | | info.setZhenDuanLBMC((String) map.get("ZhenDuanLBMC")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | List<ExternalDiagnosisInfo> externalDiagnosisInfoList = null; |
| | | if (CollectionUtils.isNotEmpty(ZhenDuanList)) { |
| | | externalDiagnosisInfoList = ZhenDuanList.stream().map(map -> { |
| | | ExternalDiagnosisInfo info = new ExternalDiagnosisInfo(); |
| | | info.setZhenDuanYSID((String) map.get("ZhenDuanYSID")); |
| | | info.setZhenDuanYSXM((String) map.get("ZhenDuanYSXM")); |
| | | info.setZhenDuanID((String) map.get("ZhenDuanID")); |
| | | info.setZhenDuanMC((String) map.get("ZhenDuanMC")); |
| | | info.setZhenDuanLBDM((String) map.get("ZhenDuanLBDM")); |
| | | info.setZhenDuanLBMC((String) map.get("ZhenDuanLBMC")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | List<ExternalWZInfo> ExternalWZInfoList = externalWZInfos.stream().map(map -> { |
| | | ExternalWZInfo info = new ExternalWZInfo(); |
| | | info.setWenZhenLXMC((String) map.get("WenZhenLXMC")); |
| | |
| | | for (ExternalDiagnosisInfo externalDiagnosisInfo : externalDiagnosisInfoList) { |
| | | if (externalDiagnosisInfo.getZhenDuanLBMC().equals("主诊断")) { |
| | | patMedOuthosp.setDiagname(externalDiagnosisInfo.getZhenDuanMC()); |
| | | patMedOuthosp.setIcd10code(externalDiagnosisInfo.getZhenDuanID()); |
| | | patMedOuthosp.setDrcode(externalDiagnosisInfo.getZhenDuanYSID()); |
| | | patMedOuthosp.setDrname(externalDiagnosisInfo.getZhenDuanYSXM()); |
| | | patMedOuthosp.setIcd10code(externalDiagnosisInfo.getIcd10()); |
| | |
| | | public Boolean addDiseaseInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---addDiseaseInfo的新增的值为:{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> JiBing = (Map<String, Object>) yeWuXX.get("JiBingMLXX"); |
| | | Map<String, Object> JiBing = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiBingMLXX") : null; |
| | | ExternalDiseaseInfo externalDiseaseInfo = BeanUtil.mapToBean(JiBing, ExternalDiseaseInfo.class, true); |
| | | Map XiaoXiTou = (Map) dataMap.get("XiaoXiTou"); |
| | | String FaSongJGID = XiaoXiTou.get("FaSongJGID").toString(); |
| | | String FaSongJGID = ObjectUtils.isNotEmpty(XiaoXiTou) && ObjectUtils.isNotEmpty(XiaoXiTou.get("FaSongJGID")) ? XiaoXiTou.get("FaSongJGID").toString() : null; |
| | | Icd10 icd10 = new Icd10(); |
| | | icd10.setIcdcode(externalDiseaseInfo.getIcD10()); |
| | | icd10.setDelFlag("0"); |
| | |
| | | public Boolean addWardAreaInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---addWardAreaInfo的新增的值为:{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> bqxx = (Map<String, Object>) yeWuXX.get("BingQuXX"); |
| | | Map<String, Object> bqxx = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingQuXX") : null; |
| | | ExternalWardArea externalWardArea = BeanUtil.mapToBean(bqxx, ExternalWardArea.class, true); |
| | | SysDept sysDept = new SysDept(); |
| | | sysDept.setGuid(externalWardArea.getZuZhiJGID()); |
| | |
| | | log.error("ServiceExternalServiceImpl---addOperationInfo的新增的值为:{}", dataMap); |
| | | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | |
| | | PatArchive patArchive = addPatArchive(externalInHospPatientInfo, null, null); |
| | | |
| | | |
| | | //手术信息新增 |
| | | Map<String, Object> ssxx = (Map<String, Object>) yeWuXX.get("ShouShuSQ"); |
| | | Map<String, Object> ssxx = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ShouShuSQ") : null; |
| | | //手术更新 |
| | | Map<String, Object> ssgx = (Map<String, Object>) yeWuXX.get("ShouShuGX"); |
| | | Map<String, Object> ssgx = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ShouShuGX") : null; |
| | | //手术撤销 |
| | | Map<String, Object> sscx = (Map<String, Object>) yeWuXX.get("ShouShuCX"); |
| | | Map<String, Object> sscx = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ShouShuCX") : null; |
| | | ExternalOperationInfo externalOperationInfo = null; |
| | | if (ObjectUtils.isNotEmpty(ssxx)) |
| | | externalOperationInfo = BeanUtil.mapToBean(ssxx, ExternalOperationInfo.class, true); |
| | |
| | | patMedOperation.setPatid(patArchive.getId()); |
| | | patMedOperation.setPatcode(externalInHospPatientInfo.getBingRenID()); |
| | | patMedOperation.setPaname(externalInHospPatientInfo.getXingMing()); |
| | | // patMedOperation.setOpreqid(externalOperationInfo.getShenQingDID()); |
| | | patMedOperation.setOpreqcode(externalOperationInfo.getShenQingDID()); |
| | | //查询一下,该患者是否已经有这些数据 |
| | | List<PatMedOperation> patMedOperations = patMedOperationMapper.selectPatMedOperationList(patMedOperation); |
| | | |
| | | patMedOperation.setOpsstatus(null); |
| | | patMedOperation.setOptypecode(externalOperationInfo.getShouShuLBDM()); |
| | | patMedOperation.setOptypename(externalOperationInfo.getShouShuLBMC()); |
| | | patMedOperation.setOperatortime(externalOperationInfo.getYaoQiuSJ()); |
| | | patMedOperation.setOpreqtime(externalOperationInfo.getShenQingSJ()); |
| | | patMedOperation.setReqdoccode(externalOperationInfo.getShenQingYSID()); |
| | | patMedOperation.setReqdocname(externalOperationInfo.getShenQingYSXM()); |
| | | patMedOperation.setReqdeptcode(externalOperationInfo.getShenQingKSID()); |
| | | patMedOperation.setReqdeptname(externalOperationInfo.getShenQingKSMC()); |
| | | patMedOperation.setReqloccode(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setReqlocname(externalOperationInfo.getShouShuKSMC()); |
| | | patMedOperation.setSurgeoncode(externalOperationInfo.getZhuDaoYSID()); |
| | | patMedOperation.setSurgeonname(externalOperationInfo.getSanZhuYSXM()); |
| | | patMedOperation.setFirasscode(externalOperationInfo.getYiZhuID()); |
| | | patMedOperation.setFirassname(externalOperationInfo.getYiZhuMC()); |
| | | patMedOperation.setSecasscode(externalOperationInfo.getErZhuYSID()); |
| | | patMedOperation.setSecassname(externalOperationInfo.getErZhuYSXM()); |
| | | patMedOperation.setThrasscode(externalOperationInfo.getSanZhuYSID()); |
| | | patMedOperation.setThrassname(externalOperationInfo.getSanZhuYSXM()); |
| | | if (ObjectUtils.isNotEmpty(externalOperationInfo)) { |
| | | patMedOperation.setOptypecode(externalOperationInfo.getShouShuLBDM()); |
| | | patMedOperation.setOptypename(externalOperationInfo.getShouShuLBMC()); |
| | | patMedOperation.setOperatortime(externalOperationInfo.getYaoQiuSJ()); |
| | | patMedOperation.setOpreqtime(externalOperationInfo.getShenQingSJ()); |
| | | patMedOperation.setReqdoccode(externalOperationInfo.getShenQingYSID()); |
| | | patMedOperation.setReqdocname(externalOperationInfo.getShenQingYSXM()); |
| | | patMedOperation.setReqdeptcode(externalOperationInfo.getShenQingKSID()); |
| | | patMedOperation.setReqdeptname(externalOperationInfo.getShenQingKSMC()); |
| | | patMedOperation.setReqloccode(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setReqlocname(externalOperationInfo.getShouShuKSMC()); |
| | | patMedOperation.setSurgeoncode(externalOperationInfo.getZhuDaoYSID()); |
| | | patMedOperation.setSurgeonname(externalOperationInfo.getSanZhuYSXM()); |
| | | patMedOperation.setFirasscode(externalOperationInfo.getYiZhuID()); |
| | | patMedOperation.setFirassname(externalOperationInfo.getYiZhuMC()); |
| | | patMedOperation.setSecasscode(externalOperationInfo.getErZhuYSID()); |
| | | patMedOperation.setSecassname(externalOperationInfo.getErZhuYSXM()); |
| | | patMedOperation.setThrasscode(externalOperationInfo.getSanZhuYSID()); |
| | | patMedOperation.setThrassname(externalOperationInfo.getSanZhuYSXM()); |
| | | patMedOperation.setDeptid(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setDeptcode(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setDeptname(externalOperationInfo.getShouShuKSMC()); |
| | | patMedOperation.setDrcode(externalOperationInfo.getZhuDaoYSID()); |
| | | patMedOperation.setDrname(externalOperationInfo.getZhuDaoYSXM()); |
| | | } |
| | | patMedOperation.setCanceltime(null); |
| | | patMedOperation.setCancelreason(null); |
| | | patMedOperation.setCancelcode(null); |
| | |
| | | patMedOperation.setDelFlag("0"); |
| | | patMedOperation.setIsupload(null); |
| | | patMedOperation.setUploadTime(null); |
| | | patMedOperation.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patMedOperation.setInhospstate(null); |
| | | patMedOperation.setPatno(externalInHospPatientInfo.getBingRenID()); |
| | | patMedOperation.setPatname(externalInHospPatientInfo.getXingMing()); |
| | | patMedOperation.setVisitid(null); |
| | | patMedOperation.setSerialnum(externalInHospPatientInfo.getZhuYuanHao()); |
| | | patMedOperation.setInhospno(externalInHospPatientInfo.getBingAnHao()); |
| | | patMedOperation.setHospitalname(externalInHospPatientInfo.getZuZhiJGMC()); |
| | | patMedOperation.setHospitalcode(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patMedOperation.setDeptid(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setDeptcode(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setDeptname(externalOperationInfo.getShouShuKSMC()); |
| | | patMedOperation.setInhospstate(null); |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientInfo)) { |
| | | patMedOperation.setPatno(externalInHospPatientInfo.getBingRenID()); |
| | | patMedOperation.setPatname(externalInHospPatientInfo.getXingMing()); |
| | | patMedOperation.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patMedOperation.setSerialnum(externalInHospPatientInfo.getZhuYuanHao()); |
| | | patMedOperation.setInhospno(externalInHospPatientInfo.getBingAnHao()); |
| | | patMedOperation.setHospitalname(externalInHospPatientInfo.getZuZhiJGMC()); |
| | | patMedOperation.setHospitalcode(externalInHospPatientInfo.getZuZhiJGID()); |
| | | } |
| | | patMedOperation.setHospitaldistrictcode(null); |
| | | patMedOperation.setHospitaldistrictname(null); |
| | | patMedOperation.setRoomno(null); |
| | | patMedOperation.setBedNo(null); |
| | | patMedOperation.setDrcode(externalOperationInfo.getZhuDaoYSID()); |
| | | patMedOperation.setDrname(externalOperationInfo.getZhuDaoYSXM()); |
| | | |
| | | patMedOperation.setNurseId(null); |
| | | patMedOperation.setNurseName(null); |
| | | if (CollectionUtils.isNotEmpty(patMedOperations)) { |
| | |
| | | if (ObjectUtils.isNotEmpty(ssxx)) { |
| | | List<HashMap<String, Object>> ShouShuMXList = (List<HashMap<String, Object>>) ssxx.get("ShouShuMXList"); |
| | | |
| | | List<ExternalOperationDetail> externalOperationDetails = ShouShuMXList.stream().map(map -> { |
| | | List<ExternalOperationDetail> externalOperationDetails = ObjectUtils.isNotEmpty(ShouShuMXList) ? ShouShuMXList.stream().map(map -> { |
| | | ExternalOperationDetail info = new ExternalOperationDetail(); |
| | | info.setShouShuMCID((String) map.get("ShouShuMCID")); |
| | | info.setShouShuMC((String) map.get("ShouShuMC")); |
| | |
| | | info.setShouShuMCQZ((String) map.get("ShouShuMCQZ")); |
| | | info.setShouShuMCHZ((String) map.get("ShouShuMCHZ")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | }).collect(Collectors.toList()) : null; |
| | | |
| | | //addMianTableFalg是否需要将主手术的信息放到PatMedOperation表中(只有第一个主手术信息需要放,后面的都不需要放了,也就是说,第一个放完后,就要把这个flag改成false) |
| | | Boolean addMianTableFalg = true; |
| | |
| | | patArchive.setSex(Long.valueOf(externalInHospPatientInfo.getXingBieDM())); |
| | | patArchive.setNation(externalInHospPatientInfo.getMinZuMC()); |
| | | patArchive.setNativePlace(externalInHospPatientInfo.getGuoJiMC()); |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientAddrInfo)) { |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientInfo.getXianZhuZXX())) { |
| | | patArchive.setPlaceOfResidence(externalInHospPatientInfo.getXianZhuZXX()); |
| | | } else if (ObjectUtils.isNotEmpty(externalInHospPatientAddrInfo)) { |
| | | String por = null; |
| | | if (StringUtils.isNotEmpty(externalInHospPatientAddrInfo.getDiZhiXX())) { |
| | | por = externalInHospPatientAddrInfo.getDiZhiXX(); |
| | |
| | | por = externalInHospPatientAddrInfo.getShengFenMC() + externalInHospPatientAddrInfo.getShiDiQMC() + externalInHospPatientAddrInfo.getXianQuMC() + externalInHospPatientAddrInfo.getXiangZhenMC() + externalInHospPatientAddrInfo.getCunJiMC() + externalInHospPatientAddrInfo.getQiTaXX(); |
| | | } |
| | | patArchive.setPlaceOfResidence(por.replace("null", "")); |
| | | patArchive.setBirthplace(por.replace("null", "")); |
| | | // patArchive.setBirthplace(por.replace("null", "")); |
| | | } |
| | | |
| | | if (ObjectUtils.isNotEmpty(parse)) { |
| | |
| | | String ageUnit2 = null; |
| | | Integer age2 = null; |
| | | |
| | | if (totalDays < 30) { |
| | | if (totalDays < 90) { |
| | | // 小于 1 个月,按天计算 |
| | | ageUnit = "天"; |
| | | age = (int) totalDays; |
| | |
| | | ageMap.put("ageUnit", ageUnit); |
| | | ageMap.put("age2", null); |
| | | ageMap.put("ageUnit2", null); |
| | | } else if (totalMonths < 12) { |
| | | } else if (totalMonths < 36) { |
| | | // 小于 1 年,按月 + 天计算 |
| | | ageUnit = "月"; |
| | | age = (int) totalMonths; |