| | |
| | | queueSaveReqVO.setPatId( appointment.getPatId()); |
| | | queueSaveReqVO.setPatName( appointment.getPatName() ); |
| | | queueSaveReqVO.setPatGender( appointment.getPatGender()); |
| | | queueSaveReqVO.setBookDate( appointment.getBookDate() ); |
| | | queueSaveReqVO.setBookTimeslot( appointment.getBookTimeslot() ); |
| | | queueSaveReqVO.setBookCheckType( appointment.getBookCheckType() ); |
| | | queueSaveReqVO.setPassed((byte)0); |
| | |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Schema(description = "管理后台 - 预约确认 Request VO") |
| | |
| | | |
| | | @Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | //@NotNull(message = "预约日期不能为空") |
| | | private LocalDateTime bookDate; |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | //@NotNull(message = "预约时间段不能为空") |
| | |
| | | package cn.lihu.jh.module.ecg.controller.admin.appointment.vo; |
| | | |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import cn.lihu.jh.framework.common.pojo.PageParam; |
| | |
| | | private String bookId; |
| | | |
| | | @Schema(description = "预约日期") |
| | | private LocalDateTime bookDate; |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "预约时间段") |
| | | private Integer bookTimeslot; |
| | |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.time.LocalDateTime; |
| | |
| | | |
| | | @Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @ExcelProperty("预约日期") |
| | | private LocalDateTime bookDate; |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @ExcelProperty("预约时间段") |
| | |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Schema(description = "管理后台 - 预约新增/修改 Request VO") |
| | |
| | | package cn.lihu.jh.module.ecg.controller.admin.doctor; |
| | | |
| | | import cn.lihu.jh.framework.apilog.core.annotation.ApiAccessLog; |
| | | import cn.lihu.jh.framework.common.exception.ErrorCode; |
| | | import cn.lihu.jh.framework.common.pojo.CommonResult; |
| | | import cn.lihu.jh.framework.common.pojo.PageParam; |
| | | import cn.lihu.jh.framework.common.pojo.PageResult; |
| | | import cn.lihu.jh.framework.common.util.object.BeanUtils; |
| | | import cn.lihu.jh.framework.excel.core.util.ExcelUtils; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.PatientStatisticVO; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueuePageReqVO; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueRespVO; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueSaveReqVO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO; |
| | | import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; |
| | | import cn.lihu.jh.module.ecg.service.queue.QueueService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static cn.lihu.jh.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.error; |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.success; |
| | | |
| | | @Tag(name = "管理后台 - 医生叫号") |
| | |
| | | return success(patientStatisticVO); |
| | | } |
| | | |
| | | @GetMapping("/passed-patient-return") |
| | | @Operation(summary = "过期病人回来") |
| | | @GetMapping("/recall-patient") |
| | | @Operation(summary = "过期病人召回") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @Parameter(name = "patId", description = "患者编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:patient')") |
| | | public CommonResult<String> passedPatientReturn( |
| | | public CommonResult<String> recallPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo, |
| | | @RequestParam("patId") String patId ) |
| | | { |
| | | Integer result = queueService.passedPatientReturn(roomId, bedNo, patId); |
| | | return success("success"); |
| | | } |
| | | Integer result = queueService.recallPatient(roomId, bedNo, patId); |
| | | if (null == result || 0 == result) |
| | | return error( new ErrorCode(201, "找不到患者") ); |
| | | |
| | | @GetMapping("/queuejump") |
| | | @Operation(summary = "插队") |
| | | @Parameter(name = "patId", description = "患者编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:patient')") |
| | | public CommonResult<String> queueJump( |
| | | @RequestParam("patId") String patId, |
| | | @RequestParam("jumpFlag") Byte jumpFlag) |
| | | { |
| | | Integer result = queueService.queueJump(patId, jumpFlag); |
| | | return success("success"); |
| | | } |
| | | |
| | |
| | | package cn.lihu.jh.module.ecg.controller.admin.queue; |
| | | |
| | | import cn.lihu.jh.framework.common.exception.ErrorCode; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import cn.lihu.jh.framework.common.pojo.PageResult; |
| | | import cn.lihu.jh.framework.common.pojo.CommonResult; |
| | | import cn.lihu.jh.framework.common.util.object.BeanUtils; |
| | | |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.error; |
| | | import static cn.lihu.jh.framework.common.pojo.CommonResult.success; |
| | | |
| | | import cn.lihu.jh.framework.excel.core.util.ExcelUtils; |
| | |
| | | return success(0); |
| | | } |
| | | |
| | | @GetMapping("/patient-jump") |
| | | @Operation(summary = "插队") |
| | | @Parameter(name = "patId", description = "患者编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:jump')") |
| | | public CommonResult<String> queueJump( |
| | | @RequestParam("patId") String patId, |
| | | @RequestParam("jumpFlag") Byte jumpFlag) |
| | | { |
| | | Integer result = queueService.patientJump(patId, jumpFlag); |
| | | if (null == result || 0 == result) |
| | | return error( new ErrorCode(201, "找不到患者") ); |
| | | |
| | | return success("success"); |
| | | } |
| | | |
| | | } |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import cn.lihu.jh.framework.common.pojo.PageParam; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import static cn.lihu.jh.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| | |
| | | @Schema(description = "患者性别") |
| | | private Boolean patGender; |
| | | |
| | | @Schema(description = "预约日期") |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "预约时间段") |
| | | private Integer bookTimeslot; |
| | | |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import com.alibaba.excel.annotation.*; |
| | | |
| | |
| | | @ExcelProperty("患者性别") |
| | | private Byte patGender; |
| | | |
| | | @Schema(description = "预约日期") |
| | | @ExcelProperty("预约日期") |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @ExcelProperty("预约时间段") |
| | | private Integer bookTimeslot; |
| | |
| | | |
| | | @Schema(description = "过号标记", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @ExcelProperty("过号标记") |
| | | private Boolean passed; |
| | | private Byte passed; |
| | | |
| | | @Schema(description = "预约过期标记", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @ExcelProperty("预约过期标记") |
| | | private Boolean expired; |
| | | private Byte expired; |
| | | |
| | | @Schema(description = "插队标记", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @ExcelProperty("插队标记") |
| | | private Byte jumpFlag; |
| | | |
| | | @Schema(description = "诊室编号") |
| | | @ExcelProperty("诊室编号") |
| | |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | |
| | |
| | | |
| | | @Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "预约日期不能为空") |
| | | private LocalDateTime bookDate; |
| | | private LocalDate bookDate; |
| | | |
| | | @Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "预约时间段不能为空") |
| | |
| | | package cn.lihu.jh.module.ecg.dal.dataobject.appointment; |
| | | |
| | | import lombok.*; |
| | | |
| | | import java.time.*; |
| | | import java.util.*; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalDateTime; |
| | |
| | | /** |
| | | * 预约日期 |
| | | */ |
| | | private LocalDateTime bookDate; |
| | | private LocalDate bookDate; |
| | | /** |
| | | * 预约时间段 |
| | | */ |
| | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import cn.lihu.jh.framework.mybatis.core.dataobject.BaseDO; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 预约日期 |
| | | */ |
| | | private LocalDateTime bookDate; |
| | | private LocalDate bookDate; |
| | | /** |
| | | * 预约时间段 |
| | | */ |
| | |
| | | @Param("seqNum")Integer seqNum, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus); |
| | | |
| | | @Update("update lihu.queue set status = #{newStatus} " + |
| | | " where pat_id = #{patId} amd status = #{curStatus} and room_id = #{roomId} and bed_no = #{bedNo}") |
| | | " where pat_id = #{patId} and status = #{curStatus} and room_id = #{roomId} and bed_no = #{bedNo}") |
| | | Integer passedPatientReturn(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("patId")String patId, |
| | | @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus); |
| | | |
| | | @Update("update lihu.queue set jumped = #{jumped} " + |
| | | " where pat_id = #{patId} amd status = #{curStatus}") |
| | | @Update("update lihu.queue set jump_flag = #{jumped} " + |
| | | " where pat_id = #{patId} and status = #{curStatus}") |
| | | Integer queueJump(@Param("patId")String patId, @Param("curStatus")Byte curStatus, @Param("jumped")Byte jumped ); |
| | | } |
| | | |
| | |
| | | |
| | | PatientStatisticVO getPatientStatistic(Long roomId, String bedNo); |
| | | |
| | | Integer passedPatientReturn(Long roomId, String bedNo, String patId); |
| | | Integer recallPatient(Long roomId, String bedNo, String patId); |
| | | |
| | | Integer queueJump( String patId, Byte jumped ); |
| | | Integer patientJump(String patId, Byte jumped ); |
| | | } |
| | |
| | | if (0 == openingFlag.get()) |
| | | return; |
| | | |
| | | singleThreadExecutor.execute( () -> { |
| | | hurryup(); |
| | | }); |
| | | startHurryUp(); |
| | | } |
| | | |
| | | private void nextPatient(Long roomId, String bedNo) { |
| | |
| | | priorityQueue.remove(bo); |
| | | priorityQueue.offer(bo); |
| | | |
| | | singleThreadExecutor.execute( () -> { |
| | | hurryup(); |
| | | }); |
| | | startHurryUp(); |
| | | } |
| | | |
| | | public void finishNextPatient(Long roomId, String bedNo) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer passedPatientReturn(Long roomId, String bedNo, String patId) { |
| | | public Integer recallPatient(Long roomId, String bedNo, String patId) { |
| | | Integer updateNum = queueMapper.passedPatientReturn(roomId, bedNo, patId, |
| | | QueueStatusEnum.PASSED.getStatus(), QueueStatusEnum.PASSED_RETURN.getStatus()); |
| | | startHurryUp(); |
| | | return updateNum; |
| | | } |
| | | |
| | | @Override |
| | | public Integer queueJump(String patId, Byte jumped) { |
| | | public Integer patientJump(String patId, Byte jumped) { |
| | | Integer updateNum = queueMapper.queueJump(patId, QueueStatusEnum.WAITING.getStatus(), jumped); |
| | | return null; |
| | | startHurryUp(); |
| | | return updateNum; |
| | | } |
| | | |
| | | private void startHurryUp() { |
| | | singleThreadExecutor.execute( () -> { |
| | | hurryup(); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | `pat_ward_desc` varchar(45) DEFAULT '' COMMENT '患者所在病区名称', |
| | | `pat_bed_no` varchar(45) DEFAULT '' COMMENT '床号', |
| | | `book_id` varchar(45) DEFAULT '' COMMENT '预约编号', |
| | | `book_date` datetime NOT NULL COMMENT '预约日期', |
| | | `book_date` date NOT NULL COMMENT '预约日期', |
| | | `book_timeslot` int NOT NULL COMMENT '预约时间段', |
| | | `book_time` datetime NOT NULL COMMENT '预约发生时间', |
| | | `book_check_type` tinyint(1) DEFAULT NULL COMMENT '预约检查类型', |
| | |
| | | `pat_id` varchar(30) NOT NULL COMMENT '患者编号', |
| | | `pat_name` varchar(10) NOT NULL COMMENT '患者姓名', |
| | | `pat_gender` tinyint DEFAULT NULL COMMENT '患者性别', |
| | | `book_date` dateTime NOT NULL COMMENT '预约日期', |
| | | `book_date` date NOT NULL COMMENT '预约日期', |
| | | `book_timeslot` int NOT NULL COMMENT '预约时间段', |
| | | `book_check_type` tinyint DEFAULT NULL COMMENT '预约检查类型', |
| | | `seq_num` int DEFAULT NULL COMMENT '排队序号', |