| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("人员处理出异常了:{}", e.getMessage()); |
| | | log.error("人员科室处理出异常了:{}", e.getMessage()); |
| | | patMedInhosp1.setDeptcheckFlag("2"); |
| | | patMedInhosp1.setLongTaskReason("人员科室处理异常:" + e.getMessage()); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("人员处理出异常了:{}", e.getMessage()); |
| | | log.error("人员病区处理出异常了:{}", e.getMessage()); |
| | | pmiBQ1.setWardcheckFlag("2"); |
| | | pmiBQ1.setLongTaskReason("人员病区处理异常:" + e.getMessage()); |
| | | patMedInhospMapper.updatePatMedInhosp(pmiBQ1); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("人员处理出异常了:{}", e.getMessage()); |
| | | log.error("人员疾病处理出异常了:{}", e.getMessage()); |
| | | pmiJB.setDiagcheckFlag("2"); |
| | | pmiJB.setLongTaskReason("人员疾病处理异常:" + e.getMessage()); |
| | | patMedInhospMapper.updatePatMedInhosp(pmiJB); |
| | | } |
| | | } |
| | | } |
| | |
| | | //将患者放到subtask中 |
| | | private void writeInSubTask(Long taskid, Boolean check, PatMedInhosp patMedInhosp1, PatArchive patArchive, Integer type, String config) { |
| | | String longTaskReason = patMedInhosp1.getLongTaskReason(); |
| | | String orgId = patMedInhosp1.getOrgid(); |
| | | if (StringUtils.isEmpty(longTaskReason)) longTaskReason = ""; |
| | | ServiceTask st = new ServiceTask(); |
| | | st.setTaskid(taskid); |
| | |
| | | if (aBoolean) i = 1; |
| | | continue; |
| | | } |
| | | if (endTime1.before(endTime) && serviceSubtask1.getServiceType().equals("2")) { |
| | | //再入院逻辑 |
| | | //景宁 出院首次(7天)随访一定要做 |
| | | // boolean firstVisit = false; |
| | | // if (orgId.equals("47255004333112711A1001") |
| | | // && serviceSubtask1.getVisitCount() != null && serviceSubtask1.getVisitCount() == 1){ |
| | | // firstVisit = true; |
| | | // } |
| | | if (endTime1.before(endTime) && serviceSubtask1.getServiceType().equals("2") |
| | | // && !firstVisit |
| | | ) { |
| | | //如果当前循环的子任务的出院时间在“准备新增的子任务”的出院时间之前,则将循环的子任务停掉 |
| | | serviceSubtask1.setSendstate(4L); |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getRemark())) |
| | |
| | | //如果是通知的话,需要提前几天将通过短信发出去(具体几天,这个可以配置在sys_conf表中) |
| | | if ("3".equals(serviceTask.getType())) { |
| | | serviceSubtask.setVisitTime(minusDay(newDate, StringUtils.isNotEmpty(config) ? Integer.parseInt(config) : 0)); |
| | | //判断是不是景宁 |
| | | if (patMedInhosp1.getOrgid().equals("47255004333112711A1001")) |
| | | serviceSubtask.setVisitTime(null); |
| | | |
| | | //如果该出院记录有随访时间,则用他自己的随访时间 |
| | | if (patMedInhosp1.getFudate() != null) |
| | | serviceSubtask.setVisitTime(minusDay(patMedInhosp1.getFudate(), StringUtils.isNotEmpty(config) ? Integer.parseInt(config) : 0)); |
| | | if (patMedInhosp1.getFudate() != null){ |
| | | serviceSubtask.setVisitTime(minusDay(patMedInhosp1.getFudate(), |
| | | StringUtils.isNotEmpty(config) ? Integer.parseInt(config) : 0)); |
| | | }else{ |
| | | //判断是不是景宁 |
| | | if (patMedInhosp1.getOrgid().equals("47255004333112711A1001")) |
| | | { |
| | | serviceSubtask.setVisitTime(null); |
| | | //不执行 |
| | | serviceSubtask.setSendstate(4L); |
| | | serviceSubtask.setRemark("景宁没有给随访时间,不发送通知短信"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //患者发送时间 |