eight
2024-11-29 04480e19c8b47c2cb469811d47679c923b82710d
update
已修改9个文件
56 ■■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentConfirmReqVO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentPageReqVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentRespVO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentSaveReqVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentConfirmReqVO.java
@@ -1,5 +1,6 @@
package cn.lihu.jh.module.ecg.controller.admin.appointment.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -13,6 +14,9 @@
public class AppointmentConfirmReqVO {
    private Long id;
    @Schema(description = "预约申请号", example = "2024435")
    private String applyNo;
    @Schema(description = "就诊流水号", example = "2024546")
    //@NotEmpty(message = "就诊流水号")
@@ -29,10 +33,6 @@
    @Schema(description = "患者性别", requiredMode = Schema.RequiredMode.REQUIRED)
    //@NotNull(message = "患者性别不能为空")
    private Byte patGender;
    @Schema(description = "预约编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "27849")
    //@NotEmpty(message = "预约编号不能为空")
    private String bookId;
    @Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED)
    //@NotNull(message = "预约日期不能为空")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentPageReqVO.java
@@ -1,5 +1,6 @@
package cn.lihu.jh.module.ecg.controller.admin.appointment.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.time.LocalDate;
@@ -16,6 +17,9 @@
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AppointmentPageReqVO extends PageParam {
    @Schema(description = "预约申请号", example = "2024435")
    private String applyNo;
    @Schema(description = "就诊流水号", example = "2024546")
    private String episodeId;
@@ -58,9 +62,6 @@
    @Schema(description = "床号")
    private String patBedNo;
    @Schema(description = "预约编号", example = "27849")
    private String bookId;
    @Schema(description = "预约日期")
    private LocalDate bookDate;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentRespVO.java
@@ -18,10 +18,18 @@
    private Long id;
    @Schema(description = "预约申请号", example = "2024435")
    @ExcelProperty("预约申请号")
    private String applyNo;
    @Schema(description = "就诊流水号", example = "2024546")
    @ExcelProperty("就诊流水号")
    private String episodeId;
    @Schema(description = "患者来源", example = "2024546")
    @ExcelProperty("患者来源")
    private Integer patSrc;
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29034")
    @ExcelProperty("患者编号")
    private String patId;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentSaveReqVO.java
@@ -15,6 +15,9 @@
    private Long id;
    @Schema(description = "预约申请号", example = "2024435")
    private String applyNo;
    @Schema(description = "就诊流水号", example = "2024546")
    //@NotEmpty(message = "就诊流水号")
    private String episodeId;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java
@@ -102,10 +102,6 @@
     */
    private String patBedNo;
    /**
     * 预约编号
     */
    private String bookId;
    /**
     * 预约日期
     */
    private LocalDate bookDate;
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
@@ -23,6 +23,8 @@
    default PageResult<AppointmentDO> selectPage(AppointmentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AppointmentDO>()
                .eqIfPresent(AppointmentDO::getApplyNo, reqVO.getApplyNo())
                .eqIfPresent(AppointmentDO::getEpisodeId, reqVO.getEpisodeId())
                .eqIfPresent(AppointmentDO::getPatId, reqVO.getPatId())
                .likeIfPresent(AppointmentDO::getPatName, reqVO.getPatName())
                .eqIfPresent(AppointmentDO::getPatGender, reqVO.getPatGender())
@@ -36,7 +38,6 @@
                .eqIfPresent(AppointmentDO::getPatWardCode, reqVO.getPatWardCode())
                .eqIfPresent(AppointmentDO::getPatWardDesc, reqVO.getPatWardDesc())
                .eqIfPresent(AppointmentDO::getPatBedNo, reqVO.getPatBedNo())
                .eqIfPresent(AppointmentDO::getBookId, reqVO.getBookId())
                .eqIfPresent(AppointmentDO::getBookDate, reqVO.getBookDate())
                .eqIfPresent(AppointmentDO::getBookTimeslot, reqVO.getBookTimeslot())
                .betweenIfPresent(AppointmentDO::getBookTime, reqVO.getBookTime())
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/checktype/CheckTypeMapper.java
@@ -51,7 +51,7 @@
    @Select("SELECT * FROM lihu.check_type;")
    @Results({
            @Result(property = "displayBarcode", column = "display_barcode", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
            @Result(property = "displayBarcode", column = "display_barcode", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class),
            @Result(property = "affinityCheckTypes", column = "affinity_check_types", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    })
    List<CheckTypeDO> simpleCheckTypeList();
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java
@@ -218,6 +218,7 @@
            " (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )")
    Integer updateBedQueueStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Integer curStatus, @Param("newStatus")Integer newStatus);
    // 弃用原因:需要先获取,判断逻辑处理后,再更新
    // 某个诊室范围内 [已领用] [已召回-安装] 人员 抢占, 会更新 [工位号]
    // 没有限定检查类型,不要使用时间槽
    @Update("<script> " +
@@ -234,9 +235,6 @@
            "</script>"
    )
    Integer preemptToBeInstalledPatient(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatusList")List<Integer> curStatusList, @Param("newStatus")Integer newStatus);
    @Update("update lihu.queue set status = #{newStatus} where pat_id = #{patId} and status = #{curStatus}")
    Integer updatePatientQueueStatus(@Param("patId")String patId, @Param("curStatus")Integer curStatus, @Param("newStatus")Integer newStatus);
    // 整个系统范围内 [排队中]人员 [被工位医生]抢占
    @Update("update lihu.queue set status = #{newStatus}, room_id = #{roomId}, room_name = #{roomName}, \n" +
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -199,10 +199,9 @@
            appointmentDO.setPatWardDesc(appointmentExternal.getPatLocWardDesc());
            appointmentDO.setPatMobile(appointmentExternal.getPhone());
            appointmentDO.setPatBedNo(appointmentExternal.getEnBedno());
            appointmentDO.setBookId(appointmentExternal.getReqIdeApplyno());
            appointmentDO.setBookCheckType(getCorrespondingCheckType(appointmentExternal.getPlanDefItemList().getPlanDefItem().getPlanDefItemcode()));
            appointmentDO.setBookTime(DateUtils.ofUTC(appointmentExternal.getReqAuthoredOn()));  // 开单时间
            appointmentDO.setBookSrc( getBookSource(appointmentExternal.getAdmTypeCode()) );
            appointmentDO.setBookSrc( 0 );
            // 光开单的情况,没有预约时间
            if (null != appointmentExternal.getReqExtBooktime() ) {
@@ -245,6 +244,7 @@
        try {
            QueueSaveReqVO queueSaveReqVO = new QueueSaveReqVO();
            queueSaveReqVO.setApplyNo( appointment.getApplyNo() );
            queueSaveReqVO.setEpisodeId( appointment.getEpisodeId() );
            queueSaveReqVO.setAppointId(appointment.getId());
            queueSaveReqVO.setPatId(appointment.getPatId());
@@ -264,19 +264,6 @@
        }
        return newSeqNo;
    }
    private Integer getBookSource(String admTypeCode) {
        if (admTypeCode.equals("AMB"))        // 门诊
            return 1;
        else if (admTypeCode.equals("EMER"))  // 急诊
            return 2;
        else if (admTypeCode.equals("PHY"))  // 体检
            return 3;
        else if (admTypeCode.equals("IMP"))   // 住院
            return 4;
        return 1;
    }
    private Integer getCorrespondingCheckType(String strPlanDefItemcode) {