| | |
| | | */ |
| | | @Override |
| | | public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp) { |
| | | //入院床位排序只在「在院」查询(cry=0)下生效,其它查询一律忽略,保证原有排序不变 |
| | | patMedInhosp.setBedSort(normalizeBedSort(patMedInhosp.getCry(), patMedInhosp.getBedSort())); |
| | | if (patMedInhosp.getCry() != null && patMedInhosp.getCry() == 0) { |
| | | patMedInhosp.setDeptcodeList(patMedInhosp.getLeaveldeptcodes()); |
| | | patMedInhosp.setHospitaldistrictcodeList(patMedInhosp.getLeavehospitaldistrictcodes()); |
| | |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | return patMedInhospList; |
| | | } |
| | | |
| | | /** |
| | | * 归一化入院床位排序参数 |
| | | * <p> |
| | | * asc / 1 -> asc(床位正序),desc / 2 -> desc(床位倒序),其余(含不传)-> null(不排序)。 |
| | | * 只对「在院」患者查询(cry=0)生效,出院/转科等查询忽略该参数。 |
| | | * |
| | | * @param cry 出入院标识:0入院 1出院 2转科 3预入院 |
| | | * @param bedSort 前端传入的床位排序值 |
| | | * @return 归一化后的排序值(asc / desc / null) |
| | | */ |
| | | private String normalizeBedSort(Integer cry, String bedSort) { |
| | | if (cry == null || cry != 0 || StringUtils.isEmpty(bedSort)) return null; |
| | | String value = bedSort.trim().toLowerCase(); |
| | | if ("asc".equals(value) || "1".equals(value)) return "asc"; |
| | | if ("desc".equals(value) || "2".equals(value)) return "desc"; |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | // } |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtask.setOrgid(serviceTask.getOrgid()); |
| | | serviceSubtask.setCampusid(serviceTask.getCampusid()); |
| | | if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid())) |
| | | serviceSubtask.setLibtemplateid(Long.valueOf(serviceTask.getLibtemplateid())); |
| | | serviceSubtask.setNurseId(patMedInhosp1.getNurseId()); |
| | |
| | | private ServiceSubtask boxedServiceSubtaskForOp(ServiceTask serviceTask, PatMedInhosp patMedInhosp1, PatMedOperationItem patMedOperationItem, PatArchive patArchive, String config) { |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtask.setOrgid(serviceTask.getOrgid()); |
| | | serviceSubtask.setCampusid(serviceTask.getCampusid()); |
| | | if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid())) |
| | | serviceSubtask.setLibtemplateid(Long.valueOf(serviceTask.getLibtemplateid())); |
| | | serviceSubtask.setNurseId(patMedInhosp1.getNurseId()); |