| | |
| | | patMedInhosp1.setDeptcode(externalInHospPatientInfo.getDangQianKSID()); |
| | | |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH)) { |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : null); |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : "1"); |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangRQ"))) { |
| | | try { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | patMedInhosp1.setInhospstate("1"); |
| | | if (deathFlag) { |
| | | //病人死亡无须随访 |
| | | patMedInhosp1.setFuflag("1"); |
| | | patMedInhosp1.setFuflag("0"); |
| | | //更新病人 notrequiredFlag |
| | | patArchive.setNotrequiredFlag("1"); |
| | | patArchive.setNotrequiredreason("患者已离世"); |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | | //对已经生成的随访任务进行处理 |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | |
| | | serviceSubtaskVO.setSendstate(2L); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setRemark(serviceSubtask.getRemark() + ";病人已死亡,不随访"); |
| | | serviceSubtask.setSendstate(4L); |
| | | serviceSubtask.setRemark(serviceSubtask.getRemark() + ";患者已离世,不随访"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | } |
| | |
| | | patMedInhosp1.setCampusid("1"); |
| | | if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { |
| | | //不需要长期任务随访 |
| | | patMedInhosp1.setFuflag("1"); |
| | | patMedInhosp1.setFuflag("0"); |
| | | } |
| | | int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | |
| | | patMedInhosp1.setCreateTime(new Date()); |
| | | if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { |
| | | //不需要长期任务随访 |
| | | patMedInhosp1.setFuflag("1"); |
| | | patMedInhosp1.setFuflag("0"); |
| | | } |
| | | |
| | | int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1); |
| | |
| | | patMedInhosp1.setDeptcode(externalInHospPatientInfo.getDangQianKSID()); |
| | | |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH)) { |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : null); |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : "1"); |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangRQ"))) { |
| | | try { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX) && ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); |
| | | if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { |
| | | //不需要长期任务随访 |
| | | patMedInhosp1.setFuflag("1"); |
| | | patMedInhosp1.setFuflag("0"); |
| | | } |
| | | int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | |
| | | patMedInhosp1.setCreateTime(new Date()); |
| | | if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { |
| | | //不需要长期任务随访 |
| | | patMedInhosp1.setFuflag("1"); |
| | | patMedInhosp1.setFuflag("0"); |
| | | } |
| | | int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | |
| | | patMedInhosp1.setDeptcode(externalInHospPatientInfo.getDangQianKSID()); |
| | | |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH)) { |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : null); |
| | | patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : "1"); |
| | | if (ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangRQ"))) { |
| | | try { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | patMedOuthosp.setDrcode(externalDiagnosisInfo.getZhenDuanYSID()); |
| | | patMedOuthosp.setDrname(externalDiagnosisInfo.getZhenDuanYSXM()); |
| | | patMedOuthosp.setIcd10code(externalDiagnosisInfo.getIcd10()); |
| | | patMedOuthosp.setFuflag("0"); |
| | | patMedOuthosp.setFuflag("1"); |
| | | } |
| | | } |
| | | for (ExternalWZInfo externalWZInfo : ExternalWZInfoList) { |
| | |
| | | patMedOuthosp.setUpdateTime(new Date()); |
| | | if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedOuthosp.getOrgid())) { |
| | | //不需要长期任务随访,由医生自己去随访(丽水中医院首次提出) |
| | | patMedOuthosp.setFuflag("1"); |
| | | patMedOuthosp.setFuflag("0"); |
| | | } |
| | | i = patMedOuthospService.updatePatMedOuthosp(patMedOuthosp); |
| | | } else { |
| | |
| | | patMedOuthosp.setUpdateTime(new Date()); |
| | | if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedOuthosp.getOrgid())) { |
| | | //不需要长期任务随访 |
| | | patMedOuthosp.setFuflag("1"); |
| | | patMedOuthosp.setFuflag("0"); |
| | | } |
| | | i = patMedOuthospService.insertPatMedOuthosp(patMedOuthosp); |
| | | |