From 6560540c4a8b5349181369edca3af58376402506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AA=E5=AF=92?= <2533659732@qq.com> Date: Mon, 1 Apr 2024 10:26:15 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xinelu/common/constant/Constants.java | 32 +- .../domain/patientinfo/PatientInfo.java | 209 ++-- .../mapper/patientinfo/PatientInfoMapper.java | 9 +- .../manage/patientinfo/PatientInfoMapper.xml | 921 +++++++++--------- 4 files changed, 628 insertions(+), 543 deletions(-) diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java index 7e48add1..38f7bd83 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java @@ -194,25 +194,25 @@ public class Constants { */ public static final String TASK_STATUS_CODE = "TSC"; - /** - * 门诊患者 - */ - public static final String OUTPATIENT = "outpatient"; + /** + * 门诊患者 + */ + public static final String OUTPATIENT = "outpatient"; - /** - * 预住院 - */ - public static final String PRE_HOSPITALIZED = "prehospitalized"; + /** + * 预住院 + */ + public static final String PRE_HOSPITALIZED = "prehospitalized"; - /** - * 在院 - */ - public static final String IN_HOSPITAL = "inhospital"; + /** + * 在院 + */ + public static final String IN_HOSPITAL = "inhospital"; - /** - * 出院 - */ - public static final String DISCHARGED = "discharged"; + /** + * 出院 + */ + public static final String DISCHARGED = "discharged"; /** * 字段信息编码前缀 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java index 07711912..7269bcd5 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java @@ -5,13 +5,14 @@ import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.time.LocalDate; -import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import java.time.LocalDate; +import java.time.LocalDateTime; + /** * 患者信息对象 patient_info * @@ -25,187 +26,261 @@ import lombok.NoArgsConstructor; @ApiModel(value = "患者信息对象", description = "patient_info") public class PatientInfo extends BaseEntity { - private static final long serialVersionUID=1L; + private static final long serialVersionUID = 1L; - /** 主键id */ + /** + * 主键id + */ private Long id; - /** 居民信息表id */ - @ApiModelProperty(value = "居民信息表id") - private Long residentId; + /** + * 居民信息表id + */ + @ApiModelProperty(value = "居民信息表id") + private Long residentId; - /** 患者姓名 */ + /** + * 患者姓名 + */ @ApiModelProperty(value = "患者姓名") @Excel(name = "患者姓名") private String patientName; - /** 患者电话 */ + /** + * 患者电话 + */ @ApiModelProperty(value = "患者电话") @Excel(name = "患者电话") private String patientPhone; - /** 家属电话 */ + /** + * 家属电话 + */ @ApiModelProperty(value = "家属电话") private String familyMemberPhone; - /** 出生日期,格式:yyyy-MM-dd */ + /** + * 出生日期,格式:yyyy-MM-dd + */ @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") private LocalDate birthDate; - /** 身份证号 */ + /** + * 身份证号 + */ @ApiModelProperty(value = "身份证号") private String cardNo; - /** 性别,男:MALE,女:FEMALE */ + /** + * 性别,男:MALE,女:FEMALE + */ @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") @Excel(name = "性别,男:MALE,女:FEMALE") private String sex; - /** 住址 */ + /** + * 住址 + */ @ApiModelProperty(value = "住址") @Excel(name = "住址") private String address; - /** 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT, -签约患者:CONTRACTED_PATIENT */ + /** + * 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT, + * 签约患者:CONTRACTED_PATIENT + */ @ApiModelProperty(value = "患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,签约患者:CONTRACTED_PATIENT") private String patientType; - /** - * 签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 服务到期:EXPIRE_SIGN - */ - @ApiModelProperty(value = "签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 过期:EXPIRE_SIGN") - private String signStatus; + /** + * 签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 服务到期:EXPIRE_SIGN + */ + @ApiModelProperty(value = "签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 过期:EXPIRE_SIGN") + private String signStatus; - @ApiModelProperty(value = "签约记录表id") - private Long signPatientRecordId; + @ApiModelProperty(value = "签约记录表id") + private Long signPatientRecordId; - /** - * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END - */ - @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") - private String serviceStatus; + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; - /** 签约时间,格式:yyyy-MM-dd HH:mm:ss */ + /** + * 签约时间,格式:yyyy-MM-dd HH:mm:ss + */ @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "签约时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") private LocalDateTime signTime; - /** 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL */ + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") @Excel(name = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") private String visitMethod; - /** 主治医生id */ - @ApiModelProperty(value = "主治医生id") - @Excel(name = "主治医生id") - private Long attendingPhysicianId; + /** + * 主治医生id + */ + @ApiModelProperty(value = "主治医生id") + @Excel(name = "主治医生id") + private Long attendingPhysicianId; - /** 主治医生姓名 */ - @ApiModelProperty(value = "主治医生姓名") - @Excel(name = "主治医生姓名") - private String attendingPhysicianName; + /** + * 主治医生姓名 + */ + @ApiModelProperty(value = "主治医生姓名") + @Excel(name = "主治医生姓名") + private String attendingPhysicianName; - /** 主要诊断 */ + /** + * 主要诊断 + */ @ApiModelProperty(value = "主要诊断") private String mainDiagnosis; - /** 所属医院id */ + /** + * 所属医院id + */ @ApiModelProperty(value = "所属医院id") private Long hospitalAgencyId; - /** 所属医院名称 */ + /** + * 所属医院名称 + */ @ApiModelProperty(value = "所属医院名称") @Excel(name = "所属医院名称") private String hospitalAgencyName; - /** 所属院区id */ + /** + * 所属院区id + */ @ApiModelProperty(value = "所属院区id") private Long campusAgencyId; - /** 所属院区名称 */ + /** + * 所属院区名称 + */ @ApiModelProperty(value = "所属院区名称") @Excel(name = "所属院区名称") private String campusAgencyName; - /** 所属科室id */ + /** + * 所属科室id + */ @ApiModelProperty(value = "所属科室id") private Long departmentId; - /** 所属科室名称 */ + /** + * 所属科室名称 + */ @ApiModelProperty(value = "所属科室名称") @Excel(name = "所属科室名称") private String departmentName; - /** 所属病区id */ + /** + * 所属病区id + */ @ApiModelProperty(value = "所属病区id") private Long wardId; - /** 所属病区名称 */ + /** + * 所属病区名称 + */ @ApiModelProperty(value = "所属病区名称") @Excel(name = "所属病区名称") private String wardName; - /** 责任护士 */ + /** + * 责任护士 + */ @ApiModelProperty(value = "责任护士") private String responsibleNurse; - /** 最新一条就诊记录id */ - @ApiModelProperty(value = "最新一条就诊记录id") - private Long patientVisitRecordId; + /** + * 最新一条就诊记录id + */ + @ApiModelProperty(value = "最新一条就诊记录id") + private Long patientVisitRecordId; - /** 就诊流水号 */ + /** + * 就诊流水号 + */ @ApiModelProperty(value = "就诊流水号") private String visitSerialNumber; - /** 入院时间,时间格式:yyyy-MM-dd */ + /** + * 入院时间,时间格式:yyyy-MM-dd + */ @ApiModelProperty(value = "入院时间") private LocalDateTime admissionTime; - /** 出院时间(出院患者),时间格式:yyyy-MM-dd */ + /** + * 出院时间(出院患者),时间格式:yyyy-MM-dd + */ @ApiModelProperty(value = "出院时间(出院患者)") private LocalDateTime dischargeTime; - /** 预约治疗组(取值以及枚举未知?) */ + /** + * 预约治疗组(取值以及枚举未知?) + */ @ApiModelProperty(value = "预约治疗组(取值以及枚举未知?)") private String appointmentTreatmentGroup; - /** 登记号(预住院患者) */ + /** + * 登记号(预住院患者) + */ @ApiModelProperty(value = "登记号(预住院患者)") private String registrationNo; - /** 登记日期(预住院患者),时间格式:yyyy-MM-dd */ + /** + * 登记日期(预住院患者),时间格式:yyyy-MM-dd + */ @ApiModelProperty(value = "登记日期(预住院患者),时间格式:yyyy-MM-dd") private LocalDate registrationDate; - /** 预约时间(预住院患者),时间格式:yyyy-MM-dd */ + /** + * 预约时间(预住院患者),时间格式:yyyy-MM-dd + */ @ApiModelProperty(value = "预约时间(预住院患者),时间格式:yyyy-MM-dd") private LocalDate appointmentDate; - /** 门诊/住院号 */ + /** + * 门诊/住院号 + */ @ApiModelProperty(value = "门诊/住院号 ") @Excel(name = "门诊/住院号 ", readConverterExp = "门诊/住院号 ") private String inHospitalNumber; - /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ - @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "就诊时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") - private LocalDateTime visitDate; + /** + * 就诊时间,格式:yyyy-MM-dd HH:mm:ss + */ + @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "就诊时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") + private LocalDateTime visitDate; - /** 出院方式(出院患者) */ + /** + * 出院方式(出院患者) + */ @ApiModelProperty(value = "出院方式") @Excel(name = "出院方式", readConverterExp = "出=院患者") private String dischargeMethod; - /** 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END */ + /** + * 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END + */ @ApiModelProperty(value = "患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END") @Excel(name = "患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END") private String patientSource; - /** 删除标识,0:未删除,1:已删除 */ + /** + * 删除标识,0:未删除,1:已删除 + */ private Integer delFlag; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java index 4f34621f..bf7905c2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java @@ -3,6 +3,7 @@ package com.xinelu.manage.mapper.patientinfo; import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; import com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo; + import java.util.List; /** @@ -20,7 +21,13 @@ public interface PatientInfoMapper { */ public PatientInfo selectPatientInfoById(Long id); - public PatientBaseInfoVo getPatientBaseInfo(Long id); + /** + * 查询患者信息 + * + * @param id 主键id + * @return 患者信息 + */ + public PatientBaseInfoVo getPatientBaseInfo(Long id); /** * 查询患者信息列表 diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml index 612e8499..dca7f846 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml @@ -1,56 +1,56 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + select id,resident_id, patient_name, patient_phone, @@ -71,428 +71,431 @@ from patient_info - + - + - select id, resident_id, patient_name, patient_phone, family_member_phone, birth_date, card_no, sex, address from patient_info where id = #{id} - - insert into patient_info - - - resident_id, - - - patient_name, - - patient_phone, - - family_member_phone, - - birth_date, - - card_no, - - sex, - - address, - - patient_type, - - sign_status, - - sign_patient_record_id, - - service_status, - - sign_time, - - visit_method, - - attending_physician_id, - - attending_physician_name, - - main_diagnosis, - - hospital_agency_id, - - hospital_agency_name, - - campus_agency_id, - - campus_agency_name, - - department_id, - - department_name, - - ward_id, - - ward_name, - - - responsible_nurse, - - - patient_visit_record_id, - - - visit_serial_number, - - - admission_time, - - - discharge_time, - - appointment_treatment_group, - - registration_no, - - registration_date, - - appointment_date, - - in_hospital_number, - - visit_date, - - discharge_method, - - patient_source, - - del_flag, - - create_by, - - create_time, - - update_by, - - update_time, - - - - #{residentId}, - - #{patientName}, - - #{patientPhone}, - - #{familyMemberPhone}, - - #{birthDate}, - - #{cardNo}, - - #{sex}, - - #{address}, - - #{patientType}, - - #{signStatus}, - - #{signPatientRecordId}, - - #{serviceStatus}, - - #{signTime}, - - #{visitMethod}, - - #{attendingPhysicianId}, - - #{attendingPhysicianName}, - - #{mainDiagnosis}, - - #{hospitalAgencyId}, - - #{hospitalAgencyName}, - - #{campusAgencyId}, - - #{campusAgencyName}, - - #{departmentId}, - - #{departmentName}, - - #{wardId}, - - #{wardName}, - - #{responsibleNurse}, - - #{patientVisitRecordId}, - - #{visitSerialNumber}, - - #{admissionTime}, - - #{dischargeTime}, - - #{appointmentTreatmentGroup}, - - #{registrationNo}, - - #{registrationDate}, - - #{appointmentDate}, - - #{inHospitalNumber}, - - #{visitDate}, - - #{dischargeMethod}, - - #{patientSource}, - - #{delFlag}, - - #{createBy}, - - #{createTime}, - - #{updateBy}, - - #{updateTime}, - - - + + insert into patient_info + + + resident_id, + + + patient_name, + + patient_phone, + + family_member_phone, + + birth_date, + + card_no, + + sex, + + address, + + patient_type, + + sign_status, + + sign_patient_record_id, + + service_status, + + sign_time, + + visit_method, + + attending_physician_id, + + attending_physician_name, + + main_diagnosis, + + hospital_agency_id, + + hospital_agency_name, + + campus_agency_id, + + campus_agency_name, + + department_id, + + department_name, + + ward_id, + + ward_name, + + + responsible_nurse, + + + patient_visit_record_id, + + + visit_serial_number, + + + admission_time, + + + discharge_time, + + appointment_treatment_group, + + registration_no, + + registration_date, + + appointment_date, + + in_hospital_number, + + visit_date, + + discharge_method, + + patient_source, + + del_flag, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{residentId}, + + #{patientName}, + + #{patientPhone}, + + #{familyMemberPhone}, + + #{birthDate}, + + #{cardNo}, + + #{sex}, + + #{address}, + + #{patientType}, + + #{signStatus}, + + #{signPatientRecordId}, + + #{serviceStatus}, + + #{signTime}, + + #{visitMethod}, + + #{attendingPhysicianId}, + + #{attendingPhysicianName}, + + #{mainDiagnosis}, + + #{hospitalAgencyId}, + + #{hospitalAgencyName}, + + #{campusAgencyId}, + + #{campusAgencyName}, + + #{departmentId}, + + #{departmentName}, + + #{wardId}, + + #{wardName}, + + #{responsibleNurse}, + + #{patientVisitRecordId}, + + #{visitSerialNumber}, + + #{admissionTime}, + + #{dischargeTime}, + + #{appointmentTreatmentGroup}, + + #{registrationNo}, + + #{registrationDate}, + + #{appointmentDate}, + + #{inHospitalNumber}, + + #{visitDate}, + + #{dischargeMethod}, + + #{patientSource}, + + #{delFlag}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + - - update patient_info - - - resident_id = #{residentId}, - - - patient_name = #{patientName}, - - - patient_phone = #{patientPhone}, - - - family_member_phone = #{familyMemberPhone}, - - - birth_date = #{birthDate}, - - - card_no = #{cardNo}, - - - sex = #{sex}, - - - address = #{address}, - - - patient_type = #{patientType}, - - sign_status = - #{signStatus}, - - sign_patient_record_id = #{signPatientRecordId}, - - service_status = #{serviceStatus}, - - sign_time = - #{signTime}, - - visit_method = - #{visitMethod}, - - attending_physician_id = - #{attendingPhysicianId}, - - attending_physician_name = - #{attendingPhysicianName}, - - main_diagnosis = - #{mainDiagnosis}, - - hospital_agency_id = - #{hospitalAgencyId}, - - hospital_agency_name = - #{hospitalAgencyName}, - - campus_agency_id = - #{campusAgencyId}, - - campus_agency_name = - #{campusAgencyName}, - - department_id = - #{departmentId}, - - department_name = - #{departmentName}, - - ward_id = - #{wardId}, - - ward_name = - #{wardName}, - - responsible_nurse = - #{responsibleNurse}, - - patient_visit_record_id = - #{patientVisitRecordId}, - - visit_serial_number = - #{visitSerialNumber}, - - - admission_time = #{admissionTime}, - - - discharge_time = #{dischargeTime}, - - appointment_treatment_group = - #{appointmentTreatmentGroup}, - - registration_no = - #{registrationNo}, - - registration_date = - #{registrationDate}, - - appointment_date = - #{appointmentDate}, - - in_hospital_number = - #{inHospitalNumber}, - - visit_date = - #{visitDate}, - - discharge_method = - #{dischargeMethod}, - - patient_source = - #{patientSource}, - - del_flag = - #{delFlag}, - - create_by = - #{createBy}, - - create_time = - #{createTime}, - - update_by = - #{updateBy}, - - update_time = - #{updateTime}, - - - where id = #{id} - + + update patient_info + + + resident_id = #{residentId}, + + + patient_name = #{patientName}, + + + patient_phone = #{patientPhone}, + + + family_member_phone = #{familyMemberPhone}, + + + birth_date = #{birthDate}, + + + card_no = #{cardNo}, + + + sex = #{sex}, + + + address = #{address}, + + + patient_type = #{patientType}, + + sign_status = + #{signStatus}, + + sign_patient_record_id = #{signPatientRecordId}, + + service_status = #{serviceStatus}, + + sign_time = + #{signTime}, + + visit_method = + #{visitMethod}, + + attending_physician_id = + #{attendingPhysicianId}, + + attending_physician_name = + #{attendingPhysicianName}, + + main_diagnosis = + #{mainDiagnosis}, + + hospital_agency_id = + #{hospitalAgencyId}, + + hospital_agency_name = + #{hospitalAgencyName}, + + campus_agency_id = + #{campusAgencyId}, + + campus_agency_name = + #{campusAgencyName}, + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + ward_id = + #{wardId}, + + ward_name = + #{wardName}, + + responsible_nurse = + #{responsibleNurse}, + + patient_visit_record_id = + #{patientVisitRecordId}, + + visit_serial_number = + #{visitSerialNumber}, + + + admission_time = #{admissionTime}, + + + discharge_time = #{dischargeTime}, + + appointment_treatment_group = + #{appointmentTreatmentGroup}, + + registration_no = + #{registrationNo}, + + registration_date = + #{registrationDate}, + + appointment_date = + #{appointmentDate}, + + in_hospital_number = + #{inHospitalNumber}, + + visit_date = + #{visitDate}, + + discharge_method = + #{dischargeMethod}, + + patient_source = + #{patientSource}, + + del_flag = + #{delFlag}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + - + update patient_info set del_flag = 1 where id = #{id} - - update patient_info set del_flag = 1 where id in - - #{id} - - + + update patient_info set del_flag = 1 where id in + + #{id} + + \ No newline at end of file From c5809651392cc8e40b62ca5523825ea4cdae8051 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Mon, 1 Apr 2024 17:13:42 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=B8=93=E7=97=85=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LabelFieldInfoController.java | 8 +++++ .../LabelFieldContentMapper.java | 9 ++++++ .../labelfieldinfo/LabelFieldInfoMapper.java | 9 ++++++ .../impl/DepartmentServiceImpl.java | 22 +++++++------- .../ILabelFieldInfoService.java | 9 ++++++ .../impl/LabelFieldInfoServiceImpl.java | 29 ++++++++++++++++++ .../LabelFieldContentVO.java | 21 +++++++++++++ .../vo/labelfieldinfo/LabelFieldVO.java | 29 ++++++++++++++++++ .../SpecialDiseaseRouteVO.java | 2 +- .../LabelFieldContentMapper.xml | 22 ++++++++++++++ .../labelfieldinfo/LabelFieldInfoMapper.xml | 30 +++++++++++++------ 11 files changed, 169 insertions(+), 21 deletions(-) create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelFieldContentVO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldinfo/LabelFieldVO.java diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldinfo/LabelFieldInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldinfo/LabelFieldInfoController.java index 2effbdce..e5a6072e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldinfo/LabelFieldInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldinfo/LabelFieldInfoController.java @@ -51,6 +51,14 @@ public class LabelFieldInfoController extends BaseController { return AjaxResult.success(labelFieldInfoService.selectLabelFieldInfoList(labelFieldInfo)); } + /** + * 查询标签字段信息列表树图 + */ + @GetMapping("/labelFieldList") + public AjaxResult labelFieldList(String fieldType) { + return AjaxResult.success(labelFieldInfoService.labelFieldList(fieldType)); + } + /** * 导出标签字段信息列表 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java index b32368b3..1024a50a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldcontent/LabelFieldContentMapper.java @@ -1,6 +1,7 @@ package com.xinelu.manage.mapper.labelfieldcontent; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; +import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -69,4 +70,12 @@ public interface LabelFieldContentMapper { * 检查除去当前记录外有没有重复内容名称 */ int existCountByContentNameExcludingId(@Param("id") Long id, @Param("fieldId") Long fieldId, @Param("contentName") String contentName); + + /** + * 查询标签信息根据标签字段信息表 + * + * @param labelFieldIds 标签字段信息表 + * @return LabelFieldContentVO + */ + List selectLabelFieldContent(@Param("labelFieldIds") List labelFieldIds); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java index 43a9103e..641bd40b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/labelfieldinfo/LabelFieldInfoMapper.java @@ -1,6 +1,7 @@ package com.xinelu.manage.mapper.labelfieldinfo; import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; +import com.xinelu.manage.vo.labelfieldinfo.LabelFieldVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -28,6 +29,14 @@ public interface LabelFieldInfoMapper { */ public List selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo); + /** + * 查询标签字段信息列表 + * + * @param fieldType 标签字段信息 + * @return 标签字段信息集合 + */ + List selectLabelFieldList(String fieldType); + /** * 新增标签字段信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java index efb7fe44..da78de81 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java @@ -153,8 +153,8 @@ public class DepartmentServiceImpl implements IDepartmentService { /** * 查询科室信息列表及包含话术数量 * - * @param departmentDto - * @return + * @param departmentDto 科室信息 + * @return 结果 */ @Override public List selectDepartmentListScriptNum(DepartmentDTO departmentDto) { @@ -164,8 +164,8 @@ public class DepartmentServiceImpl implements IDepartmentService { /** * 查询科室信息列表及包含手术数量 * - * @param departmentDto - * @return + * @param departmentDto 科室信息 + * @return 结果 */ @Override public List selectDepartmentListOperationNum(DepartmentDTO departmentDto) { @@ -175,8 +175,8 @@ public class DepartmentServiceImpl implements IDepartmentService { /** * 查询科室信息列表及包含微信库数量 * - * @param departmentDto - * @return + * @param departmentDto 科室信息 + * @return 结果 */ @Override public List selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) { @@ -186,8 +186,8 @@ public class DepartmentServiceImpl implements IDepartmentService { /** * 查询科室信息列表及包含短信库数量 * - * @param departmentDto - * @return + * @param departmentDto 科室信息 + * @return 结果 */ @Override public List selectDepartmentListMessageNum(DepartmentDTO departmentDto) { @@ -198,7 +198,7 @@ public class DepartmentServiceImpl implements IDepartmentService { * 科室信息导入 * * @param departmentList 科室信息 - * @return + * @return 结果 */ @Transactional(rollbackFor = Exception.class) @@ -244,8 +244,8 @@ public class DepartmentServiceImpl implements IDepartmentService { /** * 查询科室信息列表及包含服务包数量 * - * @param departmentDto - * @return + * @param departmentDto 科室 + * @return 结果 */ @Override public List selectListServicePackageNum(DepartmentDTO departmentDto) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/ILabelFieldInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/ILabelFieldInfoService.java index b8f060c8..9d7d3aac 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/ILabelFieldInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/ILabelFieldInfoService.java @@ -1,5 +1,6 @@ package com.xinelu.manage.service.labelfieldinfo; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO; @@ -28,6 +29,14 @@ public interface ILabelFieldInfoService { */ List selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo); + /** + * 标签字段信息表 查询标签字段信息列表树图 + * + * @param fieldType 字段类型 + * @return AjaxResult + */ + AjaxResult labelFieldList(String fieldType); + /** * 新增标签字段信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java index 89a7a503..4c8df070 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldinfo/impl/LabelFieldInfoServiceImpl.java @@ -1,13 +1,17 @@ package com.xinelu.manage.service.labelfieldinfo.impl; import com.xinelu.common.constant.Constants; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO; +import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper; import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper; import com.xinelu.manage.service.labelfieldinfo.ILabelFieldInfoService; +import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO; +import com.xinelu.manage.vo.labelfieldinfo.LabelFieldVO; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; @@ -17,6 +21,7 @@ import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; /** @@ -33,6 +38,9 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService { @Resource private GenerateSystemCodeUtil systemCodeUtil; + @Resource + private LabelFieldContentMapper labelFieldContentMapper; + /** * 查询标签字段信息 * @@ -55,6 +63,27 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService { return labelFieldInfoMapper.selectLabelFieldInfoList(labelFieldInfo); } + /** + * 查询标签字段信息列表树图 + * + * @param fieldType 字段类型 + * @return AjaxResult + */ + @Override + public AjaxResult labelFieldList(String fieldType) { + List labelFieldList = labelFieldInfoMapper.selectLabelFieldList(fieldType); + List labelFieldIds = labelFieldList.stream().filter(Objects::nonNull).map(LabelFieldVO::getLabelFieldId).filter(Objects::nonNull).collect(Collectors.toList()); + if (labelFieldIds.size() == 0) { + return AjaxResult.success(labelFieldList); + } + List labelFieldContentList = labelFieldContentMapper.selectLabelFieldContent(labelFieldIds); + for (LabelFieldVO labelField : labelFieldList) { + List collect = labelFieldContentList.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getFieldId()) && labelField.getLabelFieldId().equals(item.getFieldId())).collect(Collectors.toList()); + labelField.setLabelFieldContentList(collect); + } + return AjaxResult.success(labelFieldList); + } + /** * 新增标签字段信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelFieldContentVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelFieldContentVO.java new file mode 100644 index 00000000..e7c7e8b7 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldcontent/LabelFieldContentVO.java @@ -0,0 +1,21 @@ +package com.xinelu.manage.vo.labelfieldcontent; + +import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 标签字段内容信息对象 label_field_content + * + * @author xinelu + * @date 2024-03-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class LabelFieldContentVO extends LabelFieldContent { + + /** + * 标签内容表 + */ + private Long LabelFieldContentId; +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldinfo/LabelFieldVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldinfo/LabelFieldVO.java new file mode 100644 index 00000000..271d1b26 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/labelfieldinfo/LabelFieldVO.java @@ -0,0 +1,29 @@ +package com.xinelu.manage.vo.labelfieldinfo; + +import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo; +import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * 标签字段信息对象 label_field_info + * + * @author xinelu + * @date 2024-03-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class LabelFieldVO extends LabelFieldInfo { + + /** + * 标签字段表 + */ + private Long LabelFieldId; + + /** + * 标签内容 + */ + private List labelFieldContentList; +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseaseroute/SpecialDiseaseRouteVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseaseroute/SpecialDiseaseRouteVO.java index 64972be2..0d3dcc69 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseaseroute/SpecialDiseaseRouteVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseaseroute/SpecialDiseaseRouteVO.java @@ -30,7 +30,7 @@ public class SpecialDiseaseRouteVO extends SpecialDiseaseRoute { List specialDiseaseNodeList; /** - * 节点信息 + * 触发条件信息 */ List triggerConditionList; } \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml index 1ec4b231..22d2dff0 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml @@ -212,4 +212,26 @@ #{id} + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml index cd9ad500..11332dab 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldinfo/LabelFieldInfoMapper.xml @@ -59,6 +59,18 @@ + + + - select sdr.id specialDiseaseRouteId, + select sdr.id specialDiseaseRouteId, sdr.department_id, sdr.department_name, sdr.disease_type_id, @@ -295,7 +297,7 @@ sdr.suit_range, sdr.route_sort, sdr.route_remark, - sdtc.id triggerConditionId, + sdtc.id triggerConditionId, sdtc.route_id, sdtc.route_name, sdtc.trigger_condition_code, @@ -303,8 +305,16 @@ sdtc.trigger_condition_operator, sdtc.trigger_condition_value, sdtc.trigger_condition_sort, - sdtc.trigger_condition_remark + sdtc.trigger_condition_remark, + (select COUNT(1) + from special_disease_node + where route_id = specialDiseaseRouteId) totalNumber, + (select COUNT(1) + from special_disease_node + where route_id = specialDiseaseRouteId + and route_check_status = 'AGREE') agreeNumber from special_disease_route sdr + LEFT JOIN special_disease_node sdn ON sdn.route_id = sdr.id LEFT JOIN special_disease_trigger_condition sdtc ON sdr.id = sdtc.route_id where sdr.id = #{id} From 74144fad23898a779dc7ef97c781b772b8c22dab Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 2 Apr 2024 13:48:45 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=B8=93=E7=97=85=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postdischarge-admin/src/main/resources/application.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/postdischarge-admin/src/main/resources/application.yml b/postdischarge-admin/src/main/resources/application.yml index ad357f09..b68e18b0 100644 --- a/postdischarge-admin/src/main/resources/application.yml +++ b/postdischarge-admin/src/main/resources/application.yml @@ -24,6 +24,8 @@ xinelu: captchaType: math # 话术图片路径图片上传 script-file-url: /scriptFileUrl + # 获取管理端富文本的上传路径 + rich-text-picture-url: /richTextPictureUrl # 开发环境配置 server: @@ -179,6 +181,6 @@ xss: # 过滤开关 enabled: true # 排除链接(多个用逗号分隔) - excludes: /system/notice + excludes: /system/notice,/system/specialDiseaseNode/add,/system/specialDiseaseNode/edit # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* From f9ca8abfd8347da5ecaf4c2ed4dab7ca5a5f1326 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 2 Apr 2024 16:55:08 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=B8=93=E7=97=85=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/agency/AgencyController.java | 3 + .../SignPatientManageRouteController.java | 35 +++++------ .../SignPatientManageRouteNodeMapper.java | 11 +++- .../manage/service/agency/IAgencyService.java | 6 ++ .../agency/impl/AgencyServiceImpl.java | 9 +++ .../ISignPatientManageRouteService.java | 15 +++-- .../SignPatientManageRouteServiceImpl.java | 60 ++++++++++++++++--- .../SignPatientManageRouteVO.java | 7 +++ .../SignPatientManageRouteNodeMapper.xml | 6 ++ 9 files changed, 117 insertions(+), 35 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agency/AgencyController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agency/AgencyController.java index fd670f1f..75578486 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agency/AgencyController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agency/AgencyController.java @@ -146,6 +146,9 @@ public class AgencyController extends BaseController { return agencyService.insertAgencyImportList(list); } + /** + * 医院园区科室病区联动查询 + */ @GetMapping("/getAgencyList") public AjaxResult getAgencyList(HospitalDTO hospitalDTO) { return agencyService.getAgencyList(hospitalDTO); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java index 9df698d9..268e2aee 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java @@ -8,18 +8,13 @@ import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService; -import java.util.List; +import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import java.util.List; /** * 签约患者管理任务路径Controller @@ -33,11 +28,11 @@ public class SignPatientManageRouteController extends BaseController { @Resource private ISignPatientManageRouteService signPatientManageRouteService; -/** - * 查询签约患者管理任务路径列表 - */ -@PreAuthorize("@ss.hasPermi('manage:signroute:list')") -@GetMapping("/list") + /** + * 查询签约患者管理任务路径列表 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:list')") + @GetMapping("/list") public TableDataInfo list(SignPatientManageRoute signPatientManageRoute) { startPage(); List list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); @@ -52,7 +47,7 @@ public class SignPatientManageRouteController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, SignPatientManageRoute signPatientManageRoute) { List list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); - ExcelUtil util = new ExcelUtil(SignPatientManageRoute. class); + ExcelUtil util = new ExcelUtil(SignPatientManageRoute.class); util.exportExcel(response, list, "签约患者管理任务路径数据"); } @@ -71,8 +66,8 @@ public class SignPatientManageRouteController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:signroute:add')") @Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT) @PostMapping("/add") - public AjaxResult add(@RequestBody SignPatientManageRoute signPatientManageRoute) { - return toAjax(signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute)); + public AjaxResult add(@RequestBody SignPatientManageRouteVO signPatientManageRoute) { + return signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute); } /** @@ -81,8 +76,8 @@ public class SignPatientManageRouteController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:signroute:edit')") @Log(title = "签约患者管理任务路径", businessType = BusinessType.UPDATE) @PutMapping("/edit") - public AjaxResult edit(@RequestBody SignPatientManageRoute signPatientManageRoute) { - return toAjax(signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute)); + public AjaxResult edit(@RequestBody SignPatientManageRouteVO signPatientManageRoute) { + return signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index 0174be35..d3198be2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -1,9 +1,10 @@ package com.xinelu.manage.mapper.signpatientmanageroutenode; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; -import java.util.List; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 签约患者管理任务路径节点Mapper接口 * @@ -60,4 +61,12 @@ public interface SignPatientManageRouteNodeMapper { * @return 结果 */ public int deleteSignPatientManageRouteNodeByIds(Long[] ids); + + /** + * 批量删除签约患者管理任务路径节点 + * + * @param manageRouteId 需要删除的数据 + * @return 结果 + */ + int deleteRouteNodeByManageRouteId(Long manageRouteId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/IAgencyService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/IAgencyService.java index f0e90cd4..b7925abd 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/IAgencyService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/IAgencyService.java @@ -88,5 +88,11 @@ public interface IAgencyService { **/ AjaxResult insertAgencyImportList(List agencyList); + /** + * 医院园区科室病区联动查询 + * + * @param hospitalDTO 信息 + * @return AjaxResult + */ AjaxResult getAgencyList(HospitalDTO hospitalDTO); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java index 6b58c9d5..443309c3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java @@ -224,8 +224,15 @@ public class AgencyServiceImpl implements IAgencyService { return AjaxResult.success(); } + /** + * 医院园区科室病区联动查询 + * + * @param hospitalDTO 信息 + * @return AjaxResult + */ @Override public AjaxResult getAgencyList(HospitalDTO hospitalDTO) { + //只选医院 HospitalVO hospitalVO = new HospitalVO(); if (StringUtils.isNotBlank(hospitalDTO.getNodeType()) && NodeTypeEnum.HOSPITAL.getInfo().equals(hospitalDTO.getNodeType()) && Objects.nonNull(hospitalDTO.getHospitalId())) { Agency agency = new Agency(); @@ -242,6 +249,7 @@ public class AgencyServiceImpl implements IAgencyService { List wardList = departmentMapper.selectDepartmentList(department); hospitalVO.setWardList(wardList); } + //选到园区 if (StringUtils.isNotBlank(hospitalDTO.getNodeType()) && NodeTypeEnum.CAMPUS.getInfo().equals(hospitalDTO.getNodeType()) && Objects.nonNull(hospitalDTO.getCampusId())) { Department department = new Department(); department.setNodeType(NodeTypeEnum.DEPARTMENT.getInfo()); @@ -252,6 +260,7 @@ public class AgencyServiceImpl implements IAgencyService { List wardList = departmentMapper.selectDepartmentList(department); hospitalVO.setWardList(wardList); } + //选到科室 if (StringUtils.isNotBlank(hospitalDTO.getNodeType()) && NodeTypeEnum.DEPARTMENT.getInfo().equals(hospitalDTO.getNodeType()) && Objects.nonNull(hospitalDTO.getDepartmentId())) { Department department = new Department(); department.setNodeType(NodeTypeEnum.WARD.getInfo()); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java index 3cdf8c1c..ee4ed148 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java @@ -1,6 +1,9 @@ package com.xinelu.manage.service.signpatientmanageroute; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO; + import java.util.List; @@ -17,7 +20,7 @@ public interface ISignPatientManageRouteService { * @param id 签约患者管理任务路径主键 * @return 签约患者管理任务路径 */ - public SignPatientManageRoute selectSignPatientManageRouteById(Long id); + SignPatientManageRoute selectSignPatientManageRouteById(Long id); /** * 查询签约患者管理任务路径列表 @@ -25,7 +28,7 @@ public interface ISignPatientManageRouteService { * @param signPatientManageRoute 签约患者管理任务路径 * @return 签约患者管理任务路径集合 */ - public List selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute); + List selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute); /** * 新增签约患者管理任务路径 @@ -33,7 +36,7 @@ public interface ISignPatientManageRouteService { * @param signPatientManageRoute 签约患者管理任务路径 * @return 结果 */ - public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute); + AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute); /** * 修改签约患者管理任务路径 @@ -41,7 +44,7 @@ public interface ISignPatientManageRouteService { * @param signPatientManageRoute 签约患者管理任务路径 * @return 结果 */ - public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute); + AjaxResult updateSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute); /** * 批量删除签约患者管理任务路径 @@ -49,7 +52,7 @@ public interface ISignPatientManageRouteService { * @param ids 需要删除的签约患者管理任务路径主键集合 * @return 结果 */ - public int deleteSignPatientManageRouteByIds(Long[] ids); + int deleteSignPatientManageRouteByIds(Long[] ids); /** * 删除签约患者管理任务路径信息 @@ -57,5 +60,5 @@ public interface ISignPatientManageRouteService { * @param id 签约患者管理任务路径主键 * @return 结果 */ - public int deleteSignPatientManageRouteById(Long id); + int deleteSignPatientManageRouteById(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index b0f6cf75..3addbd74 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -1,12 +1,19 @@ package com.xinelu.manage.service.signpatientmanageroute.impl; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.utils.SecurityUtils; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; +import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService; +import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; -import javax.annotation.Resource; -import org.springframework.stereotype.Service; /** * 签约患者管理任务路径Service业务层处理 @@ -18,6 +25,8 @@ import org.springframework.stereotype.Service; public class SignPatientManageRouteServiceImpl implements ISignPatientManageRouteService { @Resource private SignPatientManageRouteMapper signPatientManageRouteMapper; + @Resource + private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper; /** * 查询签约患者管理任务路径 @@ -47,10 +56,26 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout * @param signPatientManageRoute 签约患者管理任务路径 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override - public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) { - signPatientManageRoute.setCreateTime(LocalDateTime.now()); - return signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); + public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) { + signPatientManageRoute.setCreateBy(SecurityUtils.getUsername()); + signPatientManageRoute.setCreateTime(LocalDateTime.now()); + int insertRoute = signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); + if (insertRoute < 0) { + return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!"); + } + List routeNodeList = signPatientManageRoute.getRouteNodeList(); + for (SignPatientManageRouteNode signPatientManageRouteNode : routeNodeList) { + signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId()); + signPatientManageRouteNode.setCreateTime(LocalDateTime.now()); + signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername()); + } + int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(routeNodeList); + if (insertBatchCount < 0) { + return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!"); + } + return AjaxResult.success(); } /** @@ -60,9 +85,28 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout * @return 结果 */ @Override - public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) { - signPatientManageRoute.setUpdateTime(LocalDateTime.now()); - return signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute); + public AjaxResult updateSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) { + signPatientManageRoute.setUpdateBy(SecurityUtils.getUsername()); + signPatientManageRoute.setUpdateTime(LocalDateTime.now()); + int updateCount = signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute); + if (updateCount < 0) { + return AjaxResult.error("修改签约患者管理任务路径失败!请联系管理员!"); + } + int deleteCount = signPatientManageRouteNodeMapper.deleteRouteNodeByManageRouteId(signPatientManageRoute.getSignPatientManageRouteId()); + if (deleteCount < 0) { + return AjaxResult.error("修改签约患者管理任务路径失败!请联系管理员!"); + } + List routeNodeList = signPatientManageRoute.getRouteNodeList(); + for (SignPatientManageRouteNode signPatientManageRouteNode : routeNodeList) { + signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getSignPatientManageRouteId()); + signPatientManageRouteNode.setCreateTime(LocalDateTime.now()); + signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername()); + } + int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(routeNodeList); + if (insertBatchCount < 0) { + return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!"); + } + return AjaxResult.success(); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteVO.java index 0124efa5..1be11586 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteVO.java @@ -17,7 +17,14 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) public class SignPatientManageRouteVO extends SignPatientManageRoute { + /** + * 患者管理任务路径id + */ + private Long SignPatientManageRouteId; + /** + * 节点信息 + */ List routeNodeList; } diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml index ad5eae43..2131d9d3 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -716,4 +716,10 @@ #{id} + + + delete + from sign_patient_manage_route_node + where manage_route_id = #{manageRouteId} + \ No newline at end of file From f34dbc1d41846673e40bf538e4712899768deb54 Mon Sep 17 00:00:00 2001 From: youxilong Date: Tue, 2 Apr 2024 17:23:32 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E9=9A=8F=E8=AE=BF?= =?UTF-8?q?=E4=BB=A3=E5=8A=9E=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignPatientManageRouteController.java | 39 +++++--- .../dto/manualfollowup/ManualFollowUpDTO.java | 97 +++++++++++++++++++ .../SignPatientManageRouteMapper.java | 11 +++ .../ISignPatientManageRouteService.java | 10 ++ .../SignPatientManageRouteServiceImpl.java | 20 +++- .../vo/manualfollowup/ManualFollowUpVO.java | 95 ++++++++++++++++++ .../SignPatientManageRouteMapper.xml | 91 +++++++++++++++++ 7 files changed, 344 insertions(+), 19 deletions(-) create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java index 9a0ba9ca..04624567 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java @@ -7,19 +7,15 @@ import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO; import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService; -import java.util.List; +import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import java.util.List; /** * 签约患者管理任务路径Controller @@ -33,11 +29,11 @@ public class SignPatientManageRouteController extends BaseController { @Resource private ISignPatientManageRouteService signPatientManageRouteService; -/** - * 查询签约患者管理任务路径列表 - */ -@PreAuthorize("@ss.hasPermi('manage:signroute:list')") -@GetMapping("/list") + /** + * 查询签约患者管理任务路径列表 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:list')") + @GetMapping("/list") public TableDataInfo list(SignPatientManageRoute signPatientManageRoute) { startPage(); List list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); @@ -52,7 +48,7 @@ public class SignPatientManageRouteController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, SignPatientManageRoute signPatientManageRoute) { List list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); - ExcelUtil util = new ExcelUtil(SignPatientManageRoute. class); + ExcelUtil util = new ExcelUtil(SignPatientManageRoute.class); util.exportExcel(response, list, "签约患者管理任务路径数据"); } @@ -94,4 +90,15 @@ public class SignPatientManageRouteController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(signPatientManageRouteService.deleteSignPatientManageRouteByIds(ids)); } + + /** + * 查询人工随访代办列表 + */ + @GetMapping("/manualFollowUpList") + public TableDataInfo getManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO) { + startPage(); + List list = signPatientManageRouteService.selectManualFollowUpList(manualFollowUpDTO); + return getDataTable(list); + } + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java new file mode 100644 index 00000000..ab6bf5f6 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java @@ -0,0 +1,97 @@ +package com.xinelu.manage.dto.manualfollowup; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 人工随访查询DTO + * + * @author : youxilong + * @date : 2024/4/2 10:36 + */ +@Data +public class ManualFollowUpDTO { + + + @ApiModelProperty(value = "随访开始时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime followStartTime; + + @ApiModelProperty(value = "随访结束时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime followEndTime; + + @ApiModelProperty(value = "患者姓名") + private String patientName; + + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + @ApiModelProperty(value = "所属医院名称") + private String hospitalAgencyName; + + @ApiModelProperty(value = "所属院区id") + private Long campusAgencyId; + + @ApiModelProperty(value = "所属院区名称") + private String campusAgencyName; + + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + @ApiModelProperty(value = "所属科室名称") + private String departmentName; + + @ApiModelProperty(value = "所属病区id") + private Long wardId; + + @ApiModelProperty(value = "所属病区名称") + private String wardName; + + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + @ApiModelProperty(value = "入院开始时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime admissionStartTime; + + @ApiModelProperty(value = "入院结束时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime admissionEndTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "门诊(门诊患者)开始时间") + private LocalDateTime clinicalStartTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "门诊(门诊患者)结束时间") + private LocalDateTime clinicalEndTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "出院时间(出院患者)开始时间") + private LocalDateTime dischargeStartTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "门诊/出院时间(出院患者)结束时间") + private LocalDateTime dischargeEndTime; + + @ApiModelProperty(value = "主要诊断") + private String mainDiagnosis; + + @ApiModelProperty(value = "主治医生id") + private Long attendingPhysicianId; + + @ApiModelProperty(value = "主治医生姓名") + private String attendingPhysicianName; + + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java index 66c696ed..08103b83 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java @@ -1,6 +1,9 @@ package com.xinelu.manage.mapper.signpatientmanageroute; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO; +import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO; + import java.util.List; @@ -58,4 +61,12 @@ public interface SignPatientManageRouteMapper { * @return 结果 */ public int deleteSignPatientManageRouteByIds(Long[] ids); + + /** + * 查询人工随访代办列表 + * @param manualFollowUpDTO 人工随访查询DTO + * @return ManualFollowUpVO 人工随访代办VO + */ + List selectManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO); + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java index 3cdf8c1c..c18bdfca 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java @@ -1,6 +1,9 @@ package com.xinelu.manage.service.signpatientmanageroute; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO; +import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO; + import java.util.List; @@ -58,4 +61,11 @@ public interface ISignPatientManageRouteService { * @return 结果 */ public int deleteSignPatientManageRouteById(Long id); + + /** + * 查询人工随访代办列表 + * @param manualFollowUpDTO 人工随访查询DTO + * @return ManualFollowUpVO 人工随访代办VO + */ + List selectManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index b0f6cf75..e84e4874 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -1,11 +1,15 @@ package com.xinelu.manage.service.signpatientmanageroute.impl; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO; import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService; + import java.time.LocalDateTime; import java.util.List; import javax.annotation.Resource; + +import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO; import org.springframework.stereotype.Service; /** @@ -49,8 +53,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout */ @Override public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) { - signPatientManageRoute.setCreateTime(LocalDateTime.now()); - return signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); + signPatientManageRoute.setCreateTime(LocalDateTime.now()); + return signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); } /** @@ -61,7 +65,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout */ @Override public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) { - signPatientManageRoute.setUpdateTime(LocalDateTime.now()); + signPatientManageRoute.setUpdateTime(LocalDateTime.now()); return signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute); } @@ -86,4 +90,14 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout public int deleteSignPatientManageRouteById(Long id) { return signPatientManageRouteMapper.deleteSignPatientManageRouteById(id); } + + /** + * 查询人工随访代办列表 + * @param manualFollowUpDTO 人工随访查询DTO + * @return ManualFollowUpVO 人工随访代办VO + */ + @Override + public List selectManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO) { + return signPatientManageRouteMapper.selectManualFollowUpList(manualFollowUpDTO); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java new file mode 100644 index 00000000..72251e82 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java @@ -0,0 +1,95 @@ +package com.xinelu.manage.vo.manualfollowup; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 人工随访代办VO + * + * @author : youxilong + * @date : 2024/4/2 10:36 + */ +@Data +public class ManualFollowUpVO { + + @ApiModelProperty(value = "患者姓名") + private String patientName; + + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + private String sex; + + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + @ApiModelProperty(value = "所属医院名称") + private String hospitalAgencyName; + + @ApiModelProperty(value = "所属院区id") + private Long campusAgencyId; + + @ApiModelProperty(value = "所属院区名称") + private String campusAgencyName; + + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + @ApiModelProperty(value = "所属科室名称") + private String departmentName; + + @ApiModelProperty(value = "所属病区id") + private Long wardId; + + @ApiModelProperty(value = "所属病区名称") + private String wardName; + + @ApiModelProperty(value = "门诊/住院号 ") + private String inHospitalNumber; + + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + @ApiModelProperty(value = "主要诊断") + private String mainDiagnosis; + + @ApiModelProperty(value = "手术名称") + private String surgicalName; + + @ApiModelProperty(value = "主治医生id") + private Long attendingPhysicianId; + + @ApiModelProperty(value = "主治医生姓名") + private String attendingPhysicianName; + + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + @ApiModelProperty(value = "入院时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime admissionTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "门诊/出院时间") + private LocalDateTime visitOrDischargeTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "随访时间") + private LocalDateTime executeTime; + + @ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + private String taskType; + + @ApiModelProperty(value = "随访模板") + private String templateName; + + @ApiModelProperty(value = "模板id") + private String templateId; + + +} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml index 907848b4..064372a2 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml @@ -93,6 +93,97 @@ where id = #{id} + + insert into sign_patient_manage_route From 6d6ef3b94d01f354e70d9de5ee70a2ebd31ed2b3 Mon Sep 17 00:00:00 2001 From: youxilong Date: Tue, 2 Apr 2024 21:32:31 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=E5=B7=A5?= =?UTF-8?q?=E9=9A=8F=E8=AE=BF=E4=BB=A3=E5=8A=9E=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/manualfollowup/ManualFollowUpDTO.java | 12 ------------ .../SignPatientManageRouteMapper.xml | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java index ab6bf5f6..0825e086 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java @@ -33,27 +33,15 @@ public class ManualFollowUpDTO { @ApiModelProperty(value = "所属医院id") private Long hospitalAgencyId; - @ApiModelProperty(value = "所属医院名称") - private String hospitalAgencyName; - @ApiModelProperty(value = "所属院区id") private Long campusAgencyId; - @ApiModelProperty(value = "所属院区名称") - private String campusAgencyName; - @ApiModelProperty(value = "所属科室id") private Long departmentId; - @ApiModelProperty(value = "所属科室名称") - private String departmentName; - @ApiModelProperty(value = "所属病区id") private Long wardId; - @ApiModelProperty(value = "所属病区名称") - private String wardName; - @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") private String visitMethod; diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml index 064372a2..d2ae084d 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml @@ -136,23 +136,30 @@ LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id pi.del_flag = '0' AND spmrn.node_execute_status = 'UNEXECUTED' + AND spmrn.task_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP') - AND pi.patient_name = #{patientName} + AND pi.patient_name LIKE concat('%', #{patientName}, '%') - AND pi.patient_phone = #{patientPhone} + AND pi.patient_phone LIKE concat('%', #{patientPhone}, '%') AND pi.hospital_agency_id = #{hospitalAgencyId} - - AND pi.hospital_agency_name LIKE concat('%', #{hospitalAgencyName}, '%') + + AND pi.campus_agency_id = #{campusAgencyId} + + + AND pi.department_id = #{departmentId} + + + AND pi.ward_id = #{wardId} AND pi.visit_method = #{visitMethod} - AND pi.visit_serial_number = #{visitSerialNumber} + AND pi.visit_serial_number LIKE concat('%', #{visitSerialNumber}, '%') AND pi.visit_date >= #{clinicalStartTime} @@ -179,7 +186,7 @@ AND pi.attending_physician_id = #{attendingPhysicianId} - AND pi.attending_physician_name = #{attendingPhysicianName} + AND pi.attending_physician_name LIKE concat('%',#{attendingPhysicianName}, '%') From d4e43fa250412bae16d85a359fe8ebc6d6f97544 Mon Sep 17 00:00:00 2001 From: youxilong Date: Tue, 2 Apr 2024 22:02:13 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=E5=B7=A5?= =?UTF-8?q?=E9=9A=8F=E8=AE=BF=E4=BB=A3=E5=8A=9E=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java index 0825e086..0e4e3e08 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java @@ -69,7 +69,7 @@ public class ManualFollowUpDTO { private LocalDateTime dischargeStartTime; @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "门诊/出院时间(出院患者)结束时间") + @ApiModelProperty(value = "出院时间(出院患者)结束时间") private LocalDateTime dischargeEndTime; @ApiModelProperty(value = "主要诊断")