陈昶聿
9 天以前 af6c73841b54f0c9002ce85b8c0d1679e25d5d7c
【景宁】任务组开发
已修改3个文件
80 ■■■■■ 文件已修改
smartor/src/main/java/com/smartor/domain/PatMedOperationItem.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedOperationItem.java
@@ -8,6 +8,7 @@
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
 * 患者检查检验记录子对象 pat_med_operation_item
@@ -216,5 +217,11 @@
    @ApiModelProperty("护士姓名")
    @Excel(name = "护士姓名")
    private String nurseName;
    @ApiModelProperty(value = "病区编码集合")
    private List<String> wardCodes;
    @ApiModelProperty(value = "部门编码集合")
    private List<String> deptCodes;
}
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -364,10 +364,13 @@
                        String opLevelCodes = serviceTaskSchedule.getOplevelCodes();
                        List<String> icd10CodeList = new ArrayList<>();
                        List<String> opLevelList = new ArrayList<>();
                        List<String> opLevelCodeList = new ArrayList<>();
                        List<String> deptCodeList = new ArrayList<>();
                        List<String> wardCodeList = new ArrayList<>();
                        /**
                         * 随访类型(1-科室,2-病区,3-疾病 4-入院科室 5-入院病区 6-手术)
                         */
                        Integer type = 1;
                        if (StringUtils.isNotEmpty(deptCodes)) {
                            type = 1;
@@ -382,9 +385,15 @@
                            icd10CodeList = Arrays.asList(icd10Codes.split(","));
                        }
                        if (StringUtils.isNotEmpty(opLevelCodes)) {
                            opLevelList = Arrays.asList(opLevelCodes.split(","));
                            type = 6;
                            opLevelCodeList = Arrays.asList(opLevelCodes.split(","));
                        }
                        //非手术处理方式
                        if(type != 6){
                        PatMedInhosp patMedInhospVo = new PatMedInhosp();
                            patMedInhospVo.setScheduleCheckFlag("0");
                            patMedInhospVo.setInhospstate("1");
                            patMedInhospVo.setFuflag("1");
                        patMedInhospVo.setDeptcodeList(deptCodeList);
                        patMedInhospVo.setLeavehospitaldistrictcodes(wardCodeList);
                        patMedInhospVo.setIcd10codeList(icd10CodeList);
@@ -397,7 +406,6 @@
                            scheduleDetailVo.setScheduleid(serviceTaskSchedule.getId());
                            List<ServiceTaskScheduleDetail> serviceTaskScheduleDetails = serviceTaskScheduleDetailMapper.selectServiceTaskScheduleDetailList(scheduleDetailVo);
                            List<ServiceSubtaskPreachform> serviceSubtaskPreachformList = new ArrayList<>();
                            PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp.getPatid());
                            if (Objects.isNull(patArchive)) {
                                break;
@@ -415,6 +423,51 @@
                            }
                            scheduleSubtaskBuilder.buildSubtasksForPatient(serviceTask, serviceTaskSchedule, serviceTaskScheduleDetails, serviceSubtask, preachformList);
                        }
                        }else {
                            //任务组 - 手术随访
                            if(CollectionUtils.isNotEmpty(opLevelCodeList)){
                                //目前仅限单一手术等级
                                String opLevelCode = opLevelCodeList.get(0);
                                PatMedOperationItem pmoi = new PatMedOperationItem();
                                //获取需要出院疾病随访,未处理的数据
                                pmoi.setOpercheckFlag("0");
                                pmoi.setMainFlag("1");
                                pmoi.setOplevelcode(opLevelCode);
                                pmoi.setDeptCodes(deptCodeList);
                                pmoi.setWardCodes(wardCodeList);
                                List<PatMedOperationItem> patMedOperationItems = patMedOperationItemMapper.selectOperationItemList(pmoi);
                                for(PatMedOperationItem patMedOperationItem : patMedOperationItems){
                                    PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOperationItem.getPatid());
                                    if (Objects.isNull(patArchive)) {
                                        break;
                                    }
                                    PatMedInhosp patMedInhospVo = new PatMedInhosp();
                                    patMedInhospVo.setPatid((patMedOperationItem.getPatid()));
                                    patMedInhospVo.setScheduleCheckFlag("0");
                                    patMedInhospVo.setInhospstate("1");
                                    patMedInhospVo.setFuflag("1");
                                    List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhospVo);
                                    if(CollectionUtils.isNotEmpty(patMedInhospList)){
                                        ServiceTaskScheduleDetail scheduleDetailVo = new ServiceTaskScheduleDetail();
                                        scheduleDetailVo.setTaskid(serviceTask.getTaskid());
                                        scheduleDetailVo.setScheduleid(serviceTaskSchedule.getId());
                                        List<ServiceTaskScheduleDetail> serviceTaskScheduleDetails = serviceTaskScheduleDetailMapper.selectServiceTaskScheduleDetailList(scheduleDetailVo);
                                        //封装serviceSubtask
                                        ServiceSubtask serviceSubtask = boxedServiceSubtaskForOp(serviceTask, patMedInhospList.get(0), patMedOperationItem, patArchive, config);
                                        List<Map<String, Object>> preachformList = new ArrayList<>();
                                        if(StringUtils.isNotEmpty(serviceTask.getPreachformDesc())){
                                            try {
                                                ObjectMapper objectMapper = new ObjectMapper();
                                                preachformList = objectMapper.readValue(serviceTask.getPreachformDesc(), List.class);
                                            }catch (Exception e){
                                                break;
                                            }
                                        }
                                        scheduleSubtaskBuilder.buildSubtasksForPatient(serviceTask, serviceTaskSchedule, serviceTaskScheduleDetails, serviceSubtask, preachformList);
                                    }
                                }
                            }
                        }
                    }
                }
            }
smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
@@ -486,6 +486,20 @@
        <if test="patid != null">
            and pmo.patid = #{patid}
        </if>
        <if test="deptCodes != null and deptCodes.size()>0">
            AND pmo.deptcode IN
            <foreach collection="deptCodes" item="deptcode" open="(" separator=","
                     close=")">
                #{deptcode}
            </foreach>
        </if>
        <if test="wardCodes != null and wardCodes.size()>0">
            AND pmo.hospitaldistrictcode IN
            <foreach collection="wardCodes" item="wardCode" open="(" separator=","
                     close=")">
                #{wardCode}
            </foreach>
        </if>
    </select>
</mapper>