diff --git a/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java b/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java index 7e2f7e67..4ef7d94e 100644 --- a/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java +++ b/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java @@ -4,6 +4,7 @@ import com.xinelu.common.annotation.Log; import com.xinelu.common.constant.UserConstants; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; import com.xinelu.common.core.domain.entity.SysRole; import com.xinelu.common.core.domain.entity.SysUser; import com.xinelu.common.core.page.TableDataInfo; @@ -15,6 +16,8 @@ import com.xinelu.system.domain.vo.AgencyNameVO; import com.xinelu.system.service.ISysPostService; import com.xinelu.system.service.ISysRoleService; import com.xinelu.system.service.ISysUserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.ArrayUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -31,6 +34,7 @@ import java.util.stream.Collectors; * * @author xinelu */ +@Api(tags = "用户信息控制器") @RestController @RequestMapping("/system/user") public class SysUserController extends BaseController { @@ -54,6 +58,19 @@ public class SysUserController extends BaseController { return getDataTable(list); } + /** + * 获取用户列表 + * @param user + * @return + */ + @ApiOperation("获取用户列表") + @PreAuthorize("@ss.hasPermi('system:user:list')") + @GetMapping("/getList") + public R> getList(SysUser user) { + List list = userService.selectUserList(user); + return R.ok(list); + } + @Log(title = "用户管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") diff --git a/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx b/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx index 708660df..595b974a 100644 Binary files a/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx and b/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx differ 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 fef06939..91318554 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 @@ -180,15 +180,20 @@ public class Constants { public static final String SERVICE_MODE_ENCODING = "SME"; /** - * 服务方式编码 + * 任务类型编码 */ public static final String TASK_TYPE_CODE = "TTC"; /** - * 服务方式编码 + * 任务细分编码 */ public static final String TASK_PARTITION_CODE = "TPC"; + /** + * 任务状态编码 + */ + public static final String TASK_STATUS_CODE = "TSC"; + /** * 门诊患者 */ @@ -209,6 +214,16 @@ public class Constants { */ public static final String DISCHARGED = "discharged"; + /** + * 字段信息编码前缀 + */ + public static final String FIELD_ENCODING = "FE"; + + /** + * 字段内容编码前缀 + */ + public static final String CONTENT_ENCODING = "CE"; + /** * 院后微信小程序accessToken的redis的键前缀 */ diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/LabelFieldInfoFieldTypeConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/LabelFieldInfoFieldTypeConstants.java deleted file mode 100644 index 0bbaa866..00000000 --- a/postdischarge-common/src/main/java/com/xinelu/common/constant/LabelFieldInfoFieldTypeConstants.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xinelu.common.constant; - -/** - * 字段标签信息字段类型 - * - * @author : youxilong - * @date : 2024/3/11 10:19 - */ -public class LabelFieldInfoFieldTypeConstants { - /** - * 画像标签字段 - */ - public static final String PORTRAIT_LABEL_FIELD = "PORTRAIT_LABEL_FIELD"; - - /** - * 知识库字段 - */ - public static final String KNOWLEDGE_FIELD = "KNOWLEDGE_FIELD"; - - /** - * 字段信息编码前缀 - */ - public static final String FIELD_ENCODING = "FE"; - - /** - * 字段内容编码前缀 - */ - public static final String CONTENT_ENCODING = "CE"; -} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java new file mode 100644 index 00000000..77cf4ea4 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java @@ -0,0 +1,19 @@ +package com.xinelu.common.constant; + +/** + * @description: 任务创建类型常量 + * @author: haown + * @create: 2024-03-18 16:24 + **/ +public class TaskCreateTypeConstant { + + /** + * 手动创建 + */ + public static final String MANUAL_CREATE = "MANUAL_CREATE"; + + /** + * 自动匹配 + */ + public static final String MANUAL_MATCHE = "MANUAL_MATCHE"; +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitTypeConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitMethodConstants.java similarity index 71% rename from postdischarge-common/src/main/java/com/xinelu/common/constant/VisitTypeConstants.java rename to postdischarge-common/src/main/java/com/xinelu/common/constant/VisitMethodConstants.java index f60b8d78..f1c892d8 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitTypeConstants.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitMethodConstants.java @@ -5,7 +5,7 @@ package com.xinelu.common.constant; * @author: haown * @create: 2024-03-07 15:45 **/ -public class VisitTypeConstants { +public class VisitMethodConstants { /** * 门诊 @@ -15,5 +15,5 @@ public class VisitTypeConstants { /** * 住院 */ - public static final String BE_HOSPITALIZED = "BE_HOSPITALIZED"; + public static final String BE_IN_HOSPITAL = "BE_IN_HOSPITAL"; } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/AgencyCategoryManageLevelEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/AgencyCategoryManageLevelEnum.java new file mode 100644 index 00000000..69bcebc4 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/AgencyCategoryManageLevelEnum.java @@ -0,0 +1,34 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +/** + * @Description 机构分类管理类别 + * @Author zh + * @Date 2024-03-19 + */ +@Getter +public enum AgencyCategoryManageLevelEnum { + + /** + * 非营利性医疗机构 + */ + NON_PROFIT_MEDICAL_AGENCY("NON_PROFIT_MEDICAL_AGENCY"), + + /** + * 营利性医疗机构 + */ + FOR_PROFIT_MEDICAL_AGENCY("FOR_PROFIT_MEDICAL_AGENCY"), + + /** + * 其他卫生机构 + */ + OTHER_HEALTH_AGENCY("OTHER_HEALTH_AGENCY"), + ; + + final private String info; + + AgencyCategoryManageLevelEnum(String info) { + this.info = info; + } +} \ No newline at end of file diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/AgencyStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/AgencyStatusEnum.java new file mode 100644 index 00000000..2de1d909 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/AgencyStatusEnum.java @@ -0,0 +1,29 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +/** + * @Description 机构状态 + * @Author zh + * @Date 2024-03-19 + */ +@Getter +public enum AgencyStatusEnum { + + /** + * 启用 + */ + ON("ON"), + + /** + * 禁用 + */ + OFF("OFF"), + ; + + final private String info; + + AgencyStatusEnum(String info) { + this.info = info; + } +} \ No newline at end of file diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/HardWareTypeEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/HardWareTypeEnum.java new file mode 100644 index 00000000..d843676e --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/HardWareTypeEnum.java @@ -0,0 +1,25 @@ +package com.xinelu.common.enums; + +/** + * 硬件类型标识 + * + * @author : youxilong + * @date : 2024/3/19 10:09 + */ +public enum HardWareTypeEnum { + + /** + * 硬件类型:血压仪 + */ + BLOOD_PRESSURE, + + /** + * 硬件类型:血糖仪 + */ + GLUCOSE_METER, + + /** + * 硬件类型:心电仪 + */ + ELECTROCARDIOGRA +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/LabelFieldTypeEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/LabelFieldTypeEnum.java new file mode 100644 index 00000000..cae16b00 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/LabelFieldTypeEnum.java @@ -0,0 +1,20 @@ +package com.xinelu.common.enums; + +/** + * 字段类型标识 + * + * @author : youxilong + * @date : 2024/3/19 10:22 + */ +public enum LabelFieldTypeEnum { + + /** + * 字段类型:画像标签字段 + */ + PORTRAIT_LABEL_FIELD, + + /** + * 字段类型:知识库字段 + */ + KNOWLEDGE_FIELD +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeTypeEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeTypeEnum.java new file mode 100644 index 00000000..6bdd3148 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeTypeEnum.java @@ -0,0 +1,64 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +/** + * @Description 节点类型 + * @Author zh + * @Date 2024-03-19 + */ +@Getter +public enum NodeTypeEnum { + + /** + * 卫健委 + */ + HEALTH_COMMISSION("HEALTH_COMMISSION"), + + /** + * 医保局 + */ + MEDICAL_INSURANCE_BUREAU("MEDICAL_INSURANCE_BUREAU"), + + /** + * 医院 + */ + HOSPITAL("HOSPITAL"), + + /** + * 院区 + */ + CAMPUS("CAMPUS"), + + /** + * 药店 + */ + PHARMACY("PHARMACY"), + + /** + * 科室 + */ + DEPARTMENT("DEPARTMENT"), + + /** + * 病区 + */ + WARD("WARD"), + + /** + * 中国 + */ + CHINA("CHINA"), + + /** + * 省份: + */ + PROVINCE("PROVINCE"), + ; + + final private String info; + + NodeTypeEnum(String info) { + this.info = info; + } +} \ No newline at end of file diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/PatientSourceEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/PatientSourceEnum.java new file mode 100644 index 00000000..3905e6a2 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/PatientSourceEnum.java @@ -0,0 +1,21 @@ +package com.xinelu.common.enums; + +/** + * @Description 患者来源枚举类 + * @Author haown + * @Date 2024-03-21 + */ +public enum PatientSourceEnum { + /** + * 微信小程序 + */ + WE_CHAT_APPLET, + /** + * 微信公众号 + */ + WE_CHAT_OFFICIAL_ACCOUNT, + /** + * 管理端 + */ + MANAGE_END +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/ScriptStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/ScriptStatusEnum.java new file mode 100644 index 00000000..cdc5fb1f --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/ScriptStatusEnum.java @@ -0,0 +1,25 @@ +package com.xinelu.common.enums; + +/** + * 话术状态标识 + * + * @author : youxilong + * @date : 2024/3/19 10:06 + */ +public enum ScriptStatusEnum { + + /** + * 话术状态,正常 + */ + NORMAL, + + /** + * 话术状态:下架 + */ + OFF_SHELF, + + /** + * 话术状态:暂停 + */ + SUSPEND +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceFrequencyTypeEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceFrequencyTypeEnum.java new file mode 100644 index 00000000..e8d7a93f --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceFrequencyTypeEnum.java @@ -0,0 +1,20 @@ +package com.xinelu.common.enums; + +/** + * 服务频次标识 + * + * @author : youxilong + * @date : 2024/3/19 10:12 + */ +public enum ServiceFrequencyTypeEnum { + + /** + * 服务频次类型:数字:DIGIT + */ + DIGIT, + + /** + * 服务频次类型:文本:TEXT + */ + TEXT +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceWayContentServiceType.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceTypeEnum.java similarity index 57% rename from postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceWayContentServiceType.java rename to postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceTypeEnum.java index 985ddcbe..f2ef49e7 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceWayContentServiceType.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/ServiceTypeEnum.java @@ -6,7 +6,7 @@ package com.xinelu.common.enums; * @author : youxilong * @date : 2024/2/29 20:08 */ -public enum ServiceWayContentServiceType { +public enum ServiceTypeEnum { /** * 服务方式 @@ -21,16 +21,6 @@ public enum ServiceWayContentServiceType { /** * 服务频次 */ - SERVICE_FREQUENCY, - - /** - * 服务频次类型:数字:DIGIT - */ - DIGIT, - - /** - * 服务频次类型:文本:TEXT - */ - TEXT + SERVICE_FREQUENCY } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/TextMessageChannelEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/TextMessageChannelEnum.java new file mode 100644 index 00000000..45ecb75c --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/TextMessageChannelEnum.java @@ -0,0 +1,15 @@ +package com.xinelu.common.enums; + +/** + * 短信通道标识 + * + * @author : youxilong + * @date : 2024/3/19 10:14 + */ +public enum TextMessageChannelEnum { + + /** + * 短信通道:水滴平台 + */ + WATER_DROPLET_PLATFORM +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/TextMessageStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/TextMessageStatusEnum.java new file mode 100644 index 00000000..4c1a23b3 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/TextMessageStatusEnum.java @@ -0,0 +1,20 @@ +package com.xinelu.common.enums; + +/** + * 短信状态标识 + * + * @author : youxilong + * @date : 2024/3/19 10:15 + */ +public enum TextMessageStatusEnum { + + /** + * 短信状态:上架 + */ + GROUNDING, + + /** + * 短信状态:下架: + */ + OFF_SHELF +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/WeChatTemplateSourceEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/WeChatTemplateSourceEnum.java new file mode 100644 index 00000000..daa49c6b --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/WeChatTemplateSourceEnum.java @@ -0,0 +1,21 @@ +package com.xinelu.common.enums; + +/** + * 微信模板来源 + * + * @author : youxilong + * @date : 2024/3/19 10:19 + */ +public enum WeChatTemplateSourceEnum { + + /** + * 模板来源:小程序 + */ + WE_CHAT_APPLET, + + /** + * 模板来源:公众号 + */ + WE_CHAT_OFFICIAL_ACCOUNT + +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/utils/AgeUtil.java b/postdischarge-common/src/main/java/com/xinelu/common/utils/AgeUtil.java new file mode 100644 index 00000000..5c9d13d0 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/utils/AgeUtil.java @@ -0,0 +1,67 @@ +package com.xinelu.common.utils; + +import com.xinelu.common.exception.ServiceException; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Calendar; +import java.util.GregorianCalendar; + +/** + * @author ljh + * @version 1.0 + * Create by 2023/2/27 11:45 + */ +public class AgeUtil { + + /** + * 根据出生日期计算年龄数值 + * + * @param date 出生日期 + * @return 年龄数值 + */ + public static Long getAgeMonth(String date) { + if (StringUtils.isBlank(date)) { + throw new ServiceException("请输入正确的出生日期!"); + } + String[] data = StringUtils.split(date, "-"); + if (data.length < 3) { + throw new ServiceException("请输入正确的出生日期!"); + } + Calendar birthday = new GregorianCalendar(Integer.parseInt(data[0]), Integer.parseInt(data[1]), Integer.parseInt(data[2])); + Calendar now = Calendar.getInstance(); + int day = now.get(Calendar.DAY_OF_MONTH) - birthday.get(Calendar.DAY_OF_MONTH); + //月份从0开始计算,所以需要+1 + int month = now.get(Calendar.MONTH) + 1 - birthday.get(Calendar.MONTH); + BigDecimal monthFraction; + int year = now.get(Calendar.YEAR) - birthday.get(Calendar.YEAR); + //按照减法原理,先day相减,不够向month借;然后month相减,不够向year借;最后year相减。 + if (day < 0) { + month -= 1; + //得到上一个月,用来得到上个月的天数。 + now.add(Calendar.MONTH, -1); + } + if (month < 0) { + //当前月份加12个月 + monthFraction = BigDecimal.valueOf(month).add(BigDecimal.valueOf(12)).divide(BigDecimal.valueOf(12), 1, RoundingMode.HALF_UP); + year--; + } else { + //当前月份 + monthFraction = BigDecimal.valueOf(month).divide(BigDecimal.valueOf(12), 1, RoundingMode.HALF_UP); + } + BigDecimal bigDecimal = BigDecimal.ZERO; + if (year >= 0) { + bigDecimal = bigDecimal.add(BigDecimal.valueOf(year)); + } + if ((monthFraction.compareTo(BigDecimal.ZERO) > 0)) { + bigDecimal = bigDecimal.add(monthFraction); + } + //今天出生 + if (year == 0 && month == 0 && day == 0) { + return BigDecimal.ZERO.longValue(); + } + return Math.round(bigDecimal.doubleValue()); + } + +} + diff --git a/postdischarge-common/src/main/java/com/xinelu/common/utils/poi/ExcelUtil.java b/postdischarge-common/src/main/java/com/xinelu/common/utils/poi/ExcelUtil.java index 32541cd9..e26e3452 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/utils/poi/ExcelUtil.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/utils/poi/ExcelUtil.java @@ -13,6 +13,7 @@ import com.xinelu.common.utils.file.FileTypeUtils; import com.xinelu.common.utils.file.FileUtils; import com.xinelu.common.utils.file.ImageUtils; import com.xinelu.common.utils.reflect.ReflectUtils; +import java.time.ZoneId; import org.apache.commons.lang3.RegExUtils; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ooxml.POIXMLDocumentPart; @@ -269,6 +270,13 @@ public class ExcelUtil { } else if (val instanceof Double) { val = DateUtil.getJavaDate((Double) val); } + } else if (LocalDate.class == fieldType) { + if (val instanceof String) { + val = DateUtils.parseDate(val); + } else if (val instanceof Double) { + val = DateUtil.getJavaDate((Double) val); + } + val = ((Date) val).toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); } else if (Boolean.TYPE == fieldType || Boolean.class == fieldType) { val = Convert.toBool(val, false); } 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 960ba87a..fd670f1f 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 @@ -8,6 +8,7 @@ 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.agency.Agency; +import com.xinelu.manage.dto.agency.HospitalDTO; import com.xinelu.manage.service.agency.IAgencyService; import org.apache.commons.lang3.StringUtils; import org.springframework.security.access.prepost.PreAuthorize; @@ -58,7 +59,7 @@ public class AgencyController extends BaseController { if (Objects.isNull(agency) || Objects.isNull(agency.getParentId())) { return AjaxResult.success(); } - return agencyService.subordinateAgencyList(agency); + return agencyService.selectAgencyByIdList(agency); } /** @@ -144,4 +145,9 @@ public class AgencyController extends BaseController { List list = util.importExcel(file.getInputStream()); 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/labelfieldinfo/LabelFieldInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/labelfieldinfo/LabelFieldInfoController.java index 185f35cf..2effbdce 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 @@ -43,6 +43,14 @@ public class LabelFieldInfoController extends BaseController { return getDataTable(list); } + /** + * 查询标签字段信息列表 不分页 + */ + @GetMapping("/labelFieldInfoList") + public AjaxResult labelFieldInfoList(LabelFieldInfo labelFieldInfo) { + return AjaxResult.success(labelFieldInfoService.selectLabelFieldInfoList(labelFieldInfo)); + } + /** * 导出标签字段信息列表 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientinfo/PatientInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientinfo/PatientInfoController.java index 20572c49..4e17302b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientinfo/PatientInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientinfo/PatientInfoController.java @@ -3,6 +3,7 @@ package com.xinelu.manage.controller.patientinfo; import com.xinelu.common.annotation.Log; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; @@ -10,6 +11,7 @@ import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; import com.xinelu.manage.service.patientinfo.IPatientInfoService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; @@ -39,9 +41,11 @@ public class PatientInfoController extends BaseController { /** * 查询患者信息列表 */ + @ApiOperation("患者档案列表") @PreAuthorize("@ss.hasPermi('manage:patientInfo:list')") @GetMapping("/list") public TableDataInfo list(PatientInfoDto patientInfo) { + // 根据用户权限判断查询数据权限 startPage(); List list = patientInfoService.selectPatientInfoList(patientInfo); return getDataTable(list); @@ -74,8 +78,8 @@ public class PatientInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:patientInfo:add')") @Log(title = "患者信息", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody PatientInfo patientInfo) { - return toAjax(patientInfoService.insertPatientInfo(patientInfo)); + public R add(@RequestBody PatientInfo patientInfo) { + return R.ok(patientInfoService.insertPatientInfo(patientInfo)); } /** @@ -84,8 +88,8 @@ public class PatientInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:patientInfo:edit')") @Log(title = "患者信息", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody PatientInfo patientInfo) { - return toAjax(patientInfoService.updatePatientInfo(patientInfo)); + public R edit(@RequestBody PatientInfo patientInfo) { + return R.ok(patientInfoService.updatePatientInfo(patientInfo)); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionoptionresult/PatientQuestionOptionResultController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionoptionresult/PatientQuestionOptionResultController.java new file mode 100644 index 00000000..5678af2a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionoptionresult/PatientQuestionOptionResultController.java @@ -0,0 +1,91 @@ +package com.xinelu.manage.controller.patientquestionoptionresult; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.patientquestionoptionresult.PatientQuestionOptionResult; +import com.xinelu.manage.service.patientquestionoptionresult.IPatientQuestionOptionResultService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 患者问卷题目选项提交结果信息Controller + * + * @author xinelu + * @date 2024-03-28 + */ +@RestController +@RequestMapping("/system/patientQuestionOptionResult") +public class PatientQuestionOptionResultController extends BaseController { + @Resource + private IPatientQuestionOptionResultService patientQuestionOptionResultService; + + /** + * 查询患者问卷题目选项提交结果信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionOptionResult:list')") + @GetMapping("/list") + public TableDataInfo list(PatientQuestionOptionResult patientQuestionOptionResult) { + startPage(); + List list = patientQuestionOptionResultService.selectPatientQuestionOptionResultList(patientQuestionOptionResult); + return getDataTable(list); + } + + /** + * 导出患者问卷题目选项提交结果信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionOptionResult:export')") + @Log(title = "患者问卷题目选项提交结果信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PatientQuestionOptionResult patientQuestionOptionResult) { + List list = patientQuestionOptionResultService.selectPatientQuestionOptionResultList(patientQuestionOptionResult); + ExcelUtil util = new ExcelUtil<>(PatientQuestionOptionResult.class); + util.exportExcel(response, list, "患者问卷题目选项提交结果信息数据"); + } + + /** + * 获取患者问卷题目选项提交结果信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionOptionResult:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(patientQuestionOptionResultService.selectPatientQuestionOptionResultById(id)); + } + + /** + * 新增患者问卷题目选项提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionOptionResult:add')") + @Log(title = "患者问卷题目选项提交结果信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PatientQuestionOptionResult patientQuestionOptionResult) { + return toAjax(patientQuestionOptionResultService.insertPatientQuestionOptionResult(patientQuestionOptionResult)); + } + + /** + * 修改患者问卷题目选项提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionOptionResult:edit')") + @Log(title = "患者问卷题目选项提交结果信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PatientQuestionOptionResult patientQuestionOptionResult) { + return toAjax(patientQuestionOptionResultService.updatePatientQuestionOptionResult(patientQuestionOptionResult)); + } + + /** + * 删除患者问卷题目选项提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionOptionResult:remove')") + @Log(title = "患者问卷题目选项提交结果信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(patientQuestionOptionResultService.deletePatientQuestionOptionResultByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionsubjectresult/PatientQuestionSubjectResultController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionsubjectresult/PatientQuestionSubjectResultController.java new file mode 100644 index 00000000..14992127 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionsubjectresult/PatientQuestionSubjectResultController.java @@ -0,0 +1,92 @@ +package com.xinelu.manage.controller.patientquestionsubjectresult; + + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.patientquestionsubjectresult.PatientQuestionSubjectResult; +import com.xinelu.manage.service.patientquestionsubjectresult.IPatientQuestionSubjectResultService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 患者问卷题目提交结果信息Controller + * + * @author xinelu + * @date 2024-03-28 + */ +@RestController +@RequestMapping("/system/patientQuestionSubjectResult") +public class PatientQuestionSubjectResultController extends BaseController { + @Resource + private IPatientQuestionSubjectResultService patientQuestionSubjectResultService; + + /** + * 查询患者问卷题目提交结果信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubjectResult:list')") + @GetMapping("/list") + public TableDataInfo list(PatientQuestionSubjectResult patientQuestionSubjectResult) { + startPage(); + List list = patientQuestionSubjectResultService.selectPatientQuestionSubjectResultList(patientQuestionSubjectResult); + return getDataTable(list); + } + + /** + * 导出患者问卷题目提交结果信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubjectResult:export')") + @Log(title = "患者问卷题目提交结果信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PatientQuestionSubjectResult patientQuestionSubjectResult) { + List list = patientQuestionSubjectResultService.selectPatientQuestionSubjectResultList(patientQuestionSubjectResult); + ExcelUtil util = new ExcelUtil<>(PatientQuestionSubjectResult.class); + util.exportExcel(response, list, "患者问卷题目提交结果信息数据"); + } + + /** + * 获取患者问卷题目提交结果信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubjectResult:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(patientQuestionSubjectResultService.selectPatientQuestionSubjectResultById(id)); + } + + /** + * 新增患者问卷题目提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubjectResult:add')") + @Log(title = "患者问卷题目提交结果信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PatientQuestionSubjectResult patientQuestionSubjectResult) { + return toAjax(patientQuestionSubjectResultService.insertPatientQuestionSubjectResult(patientQuestionSubjectResult)); + } + + /** + * 修改患者问卷题目提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubjectResult:edit')") + @Log(title = "患者问卷题目提交结果信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PatientQuestionSubjectResult patientQuestionSubjectResult) { + return toAjax(patientQuestionSubjectResultService.updatePatientQuestionSubjectResult(patientQuestionSubjectResult)); + } + + /** + * 删除患者问卷题目提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubjectResult:remove')") + @Log(title = "患者问卷题目提交结果信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(patientQuestionSubjectResultService.deletePatientQuestionSubjectResultByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionsubmitresult/PatientQuestionSubmitResultController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionsubmitresult/PatientQuestionSubmitResultController.java new file mode 100644 index 00000000..568e9899 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientquestionsubmitresult/PatientQuestionSubmitResultController.java @@ -0,0 +1,91 @@ +package com.xinelu.manage.controller.patientquestionsubmitresult; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.patientquestionsubmitresult.PatientQuestionSubmitResult; +import com.xinelu.manage.service.patientquestionsubmitresult.IPatientQuestionSubmitResultService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 患者问卷提交结果信息Controller + * + * @author xinelu + * @date 2024-03-28 + */ +@RestController +@RequestMapping("/system/patientQuestionSubmitResult") +public class PatientQuestionSubmitResultController extends BaseController { + @Resource + private IPatientQuestionSubmitResultService patientQuestionSubmitResultService; + + /** + * 查询患者问卷提交结果信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubmitResult:list')") + @GetMapping("/list") + public TableDataInfo list(PatientQuestionSubmitResult patientQuestionSubmitResult) { + startPage(); + List list = patientQuestionSubmitResultService.selectPatientQuestionSubmitResultList(patientQuestionSubmitResult); + return getDataTable(list); + } + + /** + * 导出患者问卷提交结果信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubmitResult:export')") + @Log(title = "患者问卷提交结果信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PatientQuestionSubmitResult patientQuestionSubmitResult) { + List list = patientQuestionSubmitResultService.selectPatientQuestionSubmitResultList(patientQuestionSubmitResult); + ExcelUtil util = new ExcelUtil<>(PatientQuestionSubmitResult.class); + util.exportExcel(response, list, "患者问卷提交结果信息数据"); + } + + /** + * 获取患者问卷提交结果信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubmitResult:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(patientQuestionSubmitResultService.selectPatientQuestionSubmitResultById(id)); + } + + /** + * 新增患者问卷提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubmitResult:add')") + @Log(title = "患者问卷提交结果信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody PatientQuestionSubmitResult patientQuestionSubmitResult) { + return toAjax(patientQuestionSubmitResultService.insertPatientQuestionSubmitResult(patientQuestionSubmitResult)); + } + + /** + * 修改患者问卷提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubmitResult:edit')") + @Log(title = "患者问卷提交结果信息", businessType = BusinessType.UPDATE) + @PutMapping("/edit") + public AjaxResult edit(@RequestBody PatientQuestionSubmitResult patientQuestionSubmitResult) { + return toAjax(patientQuestionSubmitResultService.updatePatientQuestionSubmitResult(patientQuestionSubmitResult)); + } + + /** + * 删除患者问卷提交结果信息 + */ + @PreAuthorize("@ss.hasPermi('system:patientQuestionSubmitResult:remove')") + @Log(title = "患者问卷提交结果信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(patientQuestionSubmitResultService.deletePatientQuestionSubmitResultByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patienttaskexecuterecord/PatientTaskExecuteRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patienttaskexecuterecord/PatientTaskExecuteRecordController.java new file mode 100644 index 00000000..34c5485f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patienttaskexecuterecord/PatientTaskExecuteRecordController.java @@ -0,0 +1,95 @@ +package com.xinelu.manage.controller.patienttaskexecuterecord; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; +import com.xinelu.manage.service.patienttaskexecuterecord.IPatientTaskExecuteRecordService; +import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + + +/** + * 患者管理任务执行记录Controller + * + * @author xinelu + * @date 2024-03-25 + */ +@RestController +@RequestMapping("/system/taskExecuteRecord") +public class PatientTaskExecuteRecordController extends BaseController { + @Resource + private IPatientTaskExecuteRecordService patientTaskExecuteRecordService; + + /** + * 查询患者管理任务执行记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:taskExecuteRecord:list')") + @GetMapping("/list") + public TableDataInfo list(PatientTaskExecuteRecordVO patientTaskExecuteRecord) { + startPage(); + List list = patientTaskExecuteRecordService.selectPatientTaskExecuteRecordList(patientTaskExecuteRecord); + return getDataTable(list); + } + + /** + * 获取患者管理任务执行记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:taskExecuteRecord:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(patientTaskExecuteRecordService.selectPatientTaskExecuteRecordById(id)); + } + + /** + * 新增患者管理任务执行记录 + */ + @PreAuthorize("@ss.hasPermi('system:taskExecuteRecord:add')") + @Log(title = "患者管理任务执行记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PatientTaskExecuteRecord patientTaskExecuteRecord) { + return toAjax(patientTaskExecuteRecordService.insertPatientTaskExecuteRecord(patientTaskExecuteRecord)); + } + + /** + * 修改患者管理任务执行记录 + */ + @PreAuthorize("@ss.hasPermi('system:taskExecuteRecord:edit')") + @Log(title = "患者管理任务执行记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PatientTaskExecuteRecord patientTaskExecuteRecord) { + return toAjax(patientTaskExecuteRecordService.updatePatientTaskExecuteRecord(patientTaskExecuteRecord)); + } + + /** + * 删除患者管理任务执行记录 + */ + @PreAuthorize("@ss.hasPermi('system:taskExecuteRecord:remove')") + @Log(title = "患者管理任务执行记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(patientTaskExecuteRecordService.deletePatientTaskExecuteRecordByIds(ids)); + } + + /** + * 根据患者信息查询就诊记录 + */ + @GetMapping("/selectVisitRecord") + public AjaxResult selectVisitRecord(Long id) { + return patientTaskExecuteRecordService.selectVisitRecord(id); + } + + /** + * 根据任务执行记录查询患者问卷信息 + */ + @GetMapping("/selectPatientQuestionSubmit") + public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) { + return patientTaskExecuteRecordService.selectPatientQuestionSubmit(taskExecuteRecordId); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patienttaskpushrecord/PatientTaskPushRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patienttaskpushrecord/PatientTaskPushRecordController.java new file mode 100644 index 00000000..db90879a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patienttaskpushrecord/PatientTaskPushRecordController.java @@ -0,0 +1,97 @@ +package com.xinelu.manage.controller.patienttaskpushrecord; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.patienttaskpushrecord.PatientTaskPushRecord; +import com.xinelu.manage.service.patienttaskpushrecord.IPatientTaskPushRecordService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 患者管理任务推送方式记录Controller + * + * @author xinelu + * @date 2024-03-21 + */ +@RestController +@RequestMapping("/system/taskPushRecord") +public class PatientTaskPushRecordController extends BaseController { + @Resource + private IPatientTaskPushRecordService patientTaskPushRecordService; + + /** + * 查询患者管理任务推送方式记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:taskPushRecord:list')") + @GetMapping("/list") + public TableDataInfo list(PatientTaskPushRecord patientTaskPushRecord) { + startPage(); + List list = patientTaskPushRecordService.selectPatientTaskPushRecordList(patientTaskPushRecord); + return getDataTable(list); + } + + /** + * 导出患者管理任务推送方式记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:taskPushRecord:export')") + @Log(title = "患者管理任务推送方式记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PatientTaskPushRecord patientTaskPushRecord) { + List list = patientTaskPushRecordService.selectPatientTaskPushRecordList(patientTaskPushRecord); + ExcelUtil util = new ExcelUtil<>(PatientTaskPushRecord.class); + util.exportExcel(response, list, "患者管理任务推送方式记录数据"); + } + + /** + * 获取患者管理任务推送方式记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:taskPushRecord:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(patientTaskPushRecordService.selectPatientTaskPushRecordById(id)); + } + + /** + * 新增患者管理任务推送方式记录 + */ + @PreAuthorize("@ss.hasPermi('system:taskPushRecord:add')") + @Log(title = "患者管理任务推送方式记录", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody PatientTaskPushRecord patientTaskPushRecord) { + return toAjax(patientTaskPushRecordService.insertPatientTaskPushRecord(patientTaskPushRecord)); + } + + /** + * 修改患者管理任务推送方式记录 + */ + @PreAuthorize("@ss.hasPermi('system:taskPushRecord:edit')") + @Log(title = "患者管理任务推送方式记录", businessType = BusinessType.UPDATE) + @PutMapping("/edit") + public AjaxResult edit(@RequestBody PatientTaskPushRecord patientTaskPushRecord) { + return toAjax(patientTaskPushRecordService.updatePatientTaskPushRecord(patientTaskPushRecord)); + } + + /** + * 删除患者管理任务推送方式记录 + */ + @PreAuthorize("@ss.hasPermi('system:taskPushRecord:remove')") + @Log(title = "患者管理任务推送方式记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(patientTaskPushRecordService.deletePatientTaskPushRecordByIds(ids)); + } + + + @GetMapping("/getManageRouteNode") + public AjaxResult getManageRouteNode(Long manageRouteNodeId) { + return AjaxResult.success(patientTaskPushRecordService.getManageRouteNode(manageRouteNodeId)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java index 35a9076d..0a65b5a4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java @@ -5,12 +5,12 @@ import com.xinelu.common.constant.Constants; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.R; -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.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordImportDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordInfoSaveDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordSaveDto; import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; import io.swagger.annotations.Api; @@ -19,9 +19,9 @@ import java.util.List; import java.util.Objects; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import org.apache.commons.lang3.StringUtils; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -47,17 +47,6 @@ public class PatientVisitRecordController extends BaseController { @Resource private IPatientVisitRecordService patientVisitRecordService; - /** - * 查询患者就诊记录基本信息列表 - */ - @PreAuthorize("@ss.hasPermi('manage:visit:list')") - @GetMapping("/list") - public TableDataInfo list(PatientVisitRecordDto patientVisitRecord) { - startPage(); - List list = patientVisitRecordService.selectPatientVisitRecordList(patientVisitRecord); - return getDataTable(list); - } - /** * 查询患者就诊记录基本信息列表 */ @@ -93,13 +82,26 @@ public class PatientVisitRecordController extends BaseController { /** * 新增患者就诊记录基本信息 */ + @ApiOperation("新增患者就诊记录基本信息") @PreAuthorize("@ss.hasPermi('manage:visit:add')") @Log(title = "患者就诊记录基本信息", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody PatientVisitRecord patientVisitRecord) { - return toAjax(patientVisitRecordService.insertPatientVisitRecord(patientVisitRecord)); + public R add(@Valid @RequestBody PatientVisitRecordSaveDto patientVisitRecord) { + patientVisitRecordService.insertPatientVisitRecord(patientVisitRecord); + return R.ok(); } + /** + * 修改患者就诊记录基本信息 + */ + @ApiOperation("修改患者就诊记录基本信息") + @PreAuthorize("@ss.hasPermi('manage:visit:edit')") + @Log(title = "患者就诊记录基本信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Valid @RequestBody PatientVisitRecord patientVisitRecord) { + return toAjax(patientVisitRecordService.updatePatientVisitRecord(patientVisitRecord)); + } + /** * 患者配置——就诊信息保存 */ @@ -107,7 +109,7 @@ public class PatientVisitRecordController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:visit:add')") @Log(title = "患者就诊记录基本信息", businessType = BusinessType.INSERT) @PostMapping("saveRecord") - public R saveRecord(@Validated @RequestBody PatientVisitRecordSaveDto saveDto) { + public R saveRecord(@Valid @RequestBody PatientVisitRecordInfoSaveDto saveDto) { patientVisitRecordService.saveRecord(saveDto); return R.ok(); } @@ -116,11 +118,12 @@ public class PatientVisitRecordController extends BaseController { /** * 修改患者就诊记录基本信息 */ + @ApiOperation("患者配置——就诊信息修改") @PreAuthorize("@ss.hasPermi('manage:visit:edit')") @Log(title = "患者就诊记录基本信息", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody PatientVisitRecordSaveDto patientVisitRecord) { - return toAjax(patientVisitRecordService.updatePatientVisitRecord(patientVisitRecord)); + @PutMapping("updateRecord") + public AjaxResult updateRecord(@Valid @RequestBody PatientVisitRecordInfoSaveDto patientVisitRecord) { + return toAjax(patientVisitRecordService.updateRecord(patientVisitRecord)); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java index 5aff982f..2b53fbc4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java @@ -10,9 +10,11 @@ import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; +import com.xinelu.manage.dto.propagandainfo.PropagandaInfoSaveDto; import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto; import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService; import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; @@ -71,8 +73,8 @@ public class PropagandaInfoController extends BaseController { @ApiOperation("根据id获取宣教库管理详细信息") @PreAuthorize("@ss.hasPermi('manage:propaganda:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(propagandaInfoService.selectPropagandaInfoById(id)); + public R getInfo(@PathVariable("id") Long id) { + return R.ok(propagandaInfoService.selectPropagandaInfoById(id)); } /** @@ -82,8 +84,8 @@ public class PropagandaInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:propaganda:add')") @Log(title = "宣教库管理", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody PropagandaInfo propagandaInfo) { - return toAjax(propagandaInfoService.insertPropagandaInfo(propagandaInfo)); + public AjaxResult add(@RequestBody PropagandaInfoSaveDto propagandaInfoSaveDto) { + return toAjax(propagandaInfoService.insertPropagandaInfo(propagandaInfoSaveDto)); } /** @@ -93,8 +95,8 @@ public class PropagandaInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:propaganda:edit')") @Log(title = "宣教库管理", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody PropagandaInfo propagandaInfo) { - return toAjax(propagandaInfoService.updatePropagandaInfo(propagandaInfo)); + public AjaxResult edit(@RequestBody PropagandaInfoSaveDto propagandaInfoSaveDto) { + return toAjax(propagandaInfoService.updatePropagandaInfo(propagandaInfoSaveDto)); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java index 888cba85..0ff43d1a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java @@ -105,4 +105,12 @@ public class QuestionInfoController extends BaseController { public AjaxResult updateQuestionByDepartment(@RequestBody QuestionInfo questionInfo) { return questionInfoService.updateQuestionByDepartment(questionInfo); } + + /** + * 科室问卷数量 + */ + @GetMapping("/departmentQuestionCount") + public AjaxResult departmentQuestionCount(String departmentName) { + return questionInfoService.departmentQuestionCount(departmentName); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java index 75276816..7589985b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java @@ -3,6 +3,7 @@ package com.xinelu.manage.controller.servicepackage; import com.xinelu.common.annotation.Log; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; @@ -12,12 +13,18 @@ import com.xinelu.manage.service.servicepackage.IServicePackageService; import com.xinelu.manage.vo.servicepackage.ServicePackageVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - +import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; -import java.util.List; +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; /** * 服务包基础信息Controller @@ -35,13 +42,23 @@ public class ServicePackageController extends BaseController { /** * 查询服务包基础信息列表 */ - @ApiOperation("查询服务包基础信息列表") + @ApiOperation("分页查询服务包基础信息列表") @PreAuthorize("@ss.hasPermi('manage:servicepackage:list')") @GetMapping("/list") public TableDataInfo list(ServicePackage servicePackage) { return servicePackageService.selectServicePackageList(servicePackage); } + /** + * 查询服务包基础信息列表 + */ + @ApiOperation("查询服务包基础信息列表") + @PreAuthorize("@ss.hasPermi('manage:servicepackage:list')") + @GetMapping("/getList") + public R> getList(ServicePackage servicePackage) { + return R.ok(servicePackageService.selectList(servicePackage)); + } + /** * 导出服务包基础信息列表 */ @@ -66,6 +83,16 @@ public class ServicePackageController extends BaseController { return AjaxResult.success(servicePackageService.selectServicePackageById(id)); } + /** + * 获取服务包基础信息 + */ + @ApiOperation("获取服务包基础信息") + @PreAuthorize("@ss.hasPermi('manage:servicepackage:query')") + @GetMapping(value = "/getById/{id}") + public R getById(@PathVariable("id") Long id) { + return R.ok(servicePackageService.getById(id)); + } + /** * 新增服务包基础信息 */ @@ -101,10 +128,6 @@ public class ServicePackageController extends BaseController { /** * 修改服务包发布状态 - * - * @param id - * @param whetherRelease - * @return */ @ApiOperation("修改服务包发布状态") @PutMapping("/editReleaseStatus") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java index 1b608f73..97c67c2a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java @@ -37,10 +37,6 @@ public class ServiceWayContentController extends BaseController { /** * 查询服务方式列表 - * - * @param serviceWayName - * @param id - * @return */ @ApiOperation("查询服务方式列表") @GetMapping("/serviceWayList") @@ -51,9 +47,6 @@ public class ServiceWayContentController extends BaseController { /** * 根据服务方式id获取服务方式 - * - * @param id - * @return */ @ApiOperation("根据服务方式id获取服务方式") @GetMapping(value = "/serviceWay/{id}") @@ -63,9 +56,6 @@ public class ServiceWayContentController extends BaseController { /** * 新增服务方式 - * - * @param serviceWayContent - * @return */ @ApiOperation("新增服务方式") @PostMapping("/addServiceWay") @@ -75,9 +65,6 @@ public class ServiceWayContentController extends BaseController { /** * 修改服务方式 - * - * @param serviceWayContent - * @return */ @ApiOperation("修改服务方式") @PutMapping("/editServiceWay") @@ -87,9 +74,6 @@ public class ServiceWayContentController extends BaseController { /** * 根据id删除服务方式 - * - * @param id - * @return */ @ApiOperation("根据id删除服务方式") @DeleteMapping("/removeServiceWay/{id}") 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 new file mode 100644 index 00000000..9a0ba9ca --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java @@ -0,0 +1,97 @@ +package com.xinelu.manage.controller.signpatientmanageroute; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.service.signpatientmanageroute.ISignPatientManageRouteService; +import java.util.List; +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; + +/** + * 签约患者管理任务路径Controller + * + * @author haown + * @date 2024-03-18 + */ +@RestController +@RequestMapping("/manage/signroute") +public class SignPatientManageRouteController extends BaseController { + @Resource + private ISignPatientManageRouteService signPatientManageRouteService; + +/** + * 查询签约患者管理任务路径列表 + */ +@PreAuthorize("@ss.hasPermi('manage:signroute:list')") +@GetMapping("/list") + public TableDataInfo list(SignPatientManageRoute signPatientManageRoute) { + startPage(); + List list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); + return getDataTable(list); + } + + /** + * 导出签约患者管理任务路径列表 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:export')") + @Log(title = "签约患者管理任务路径", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SignPatientManageRoute signPatientManageRoute) { + List list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); + ExcelUtil util = new ExcelUtil(SignPatientManageRoute. class); + util.exportExcel(response, list, "签约患者管理任务路径数据"); + } + + /** + * 获取签约患者管理任务路径详细信息 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(signPatientManageRouteService.selectSignPatientManageRouteById(id)); + } + + /** + * 新增签约患者管理任务路径 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:add')") + @Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SignPatientManageRoute signPatientManageRoute) { + return toAjax(signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute)); + } + + /** + * 修改签约患者管理任务路径 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:edit')") + @Log(title = "签约患者管理任务路径", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SignPatientManageRoute signPatientManageRoute) { + return toAjax(signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute)); + } + + /** + * 删除签约患者管理任务路径 + */ + @PreAuthorize("@ss.hasPermi('manage:signroute:remove')") + @Log(title = "签约患者管理任务路径", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(signPatientManageRouteService.deleteSignPatientManageRouteByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientrecord/SignPatientRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientrecord/SignPatientRecordController.java index 2d15c929..492f19fa 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientrecord/SignPatientRecordController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientrecord/SignPatientRecordController.java @@ -3,6 +3,7 @@ package com.xinelu.manage.controller.signpatientrecord; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto; @@ -14,6 +15,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; import javax.annotation.Resource; +import javax.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -47,13 +49,24 @@ public class SignPatientRecordController extends BaseController { return getDataTable(list); } + /** + * 意向签约 + */ + @ApiOperation("意向签约") + @PreAuthorize("@ss.hasPermi('manage:signRecord:add')") + @PostMapping("/intentionalSign") + public R intentionalSign(@Valid @RequestBody IntentionalSignDto body) { + int flag = signPatientRecordService.intentionalSign(body); + return flag > 0 ? R.ok() : R.fail(); + } + /** * 签约 */ @ApiOperation("签约/续约") @PreAuthorize("@ss.hasPermi('manage:signRecord:add')") @PostMapping("/sign") - public R sign(@RequestBody SignPatientAddDto body) { + public R sign(@Valid @RequestBody SignPatientAddDto body) { int flag = signPatientRecordService.add(body); return flag > 0 ? R.ok() : R.fail(); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasenode/SpecialDiseaseNodeController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasenode/SpecialDiseaseNodeController.java index ce3bc1a0..b0906816 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasenode/SpecialDiseaseNodeController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasenode/SpecialDiseaseNodeController.java @@ -8,6 +8,7 @@ import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -64,9 +65,9 @@ public class SpecialDiseaseNodeController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:specialDiseaseNode:add')") @Log(title = "专病路径-管理节点信息", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody SpecialDiseaseNode specialDiseaseNode) { - return toAjax(specialDiseaseNodeService.insertSpecialDiseaseNode(specialDiseaseNode)); + @PostMapping("/add") + public AjaxResult add(@RequestBody SpecialDiseaseRouteVO specialDiseaseNode) { + return specialDiseaseNodeService.insertSpecialDiseaseNode(specialDiseaseNode); } /** @@ -74,9 +75,9 @@ public class SpecialDiseaseNodeController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:specialDiseaseNode:edit')") @Log(title = "专病路径-管理节点信息", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody SpecialDiseaseNode specialDiseaseNode) { - return toAjax(specialDiseaseNodeService.updateSpecialDiseaseNode(specialDiseaseNode)); + @PutMapping("/edit") + public AjaxResult edit(@RequestBody SpecialDiseaseRouteVO specialDiseaseNode) { + return specialDiseaseNodeService.updateSpecialDiseaseNode(specialDiseaseNode); } /** @@ -88,4 +89,12 @@ public class SpecialDiseaseNodeController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(specialDiseaseNodeService.deleteSpecialDiseaseNodeByIds(ids)); } + + /** + * 查询专病路径-管理节点信息列表 + */ + @GetMapping("/selectSpecialDisease") + public AjaxResult selectSpecialDisease(Long specialDiseaseRouteId) { + return specialDiseaseNodeService.selectSpecialDisease(specialDiseaseRouteId); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java new file mode 100644 index 00000000..22ccdf40 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java @@ -0,0 +1,99 @@ +package com.xinelu.manage.controller.specialdiseaseroute; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.specialdiseaseroute.SpecialDiseaseRoute; +import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 专病路径信息Controller + * + * @author xinelu + * @date 2024-03-13 + */ +@RestController +@RequestMapping("/system/specialDiseaseRoute") +public class SpecialDiseaseRouteController extends BaseController { + @Resource + private ISpecialDiseaseRouteService specialDiseaseRouteService; + + /** + * 查询专病路径信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:list')") + @GetMapping("/list") + public TableDataInfo list(SpecialDiseaseRoute specialDiseaseRoute) { + startPage(); + List list = specialDiseaseRouteService.selectSpecialDiseaseRouteList(specialDiseaseRoute); + return getDataTable(list); + } + + /** + * 导出专病路径信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:export')") + @Log(title = "专病路径信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SpecialDiseaseRoute specialDiseaseRoute) { + List list = specialDiseaseRouteService.selectSpecialDiseaseRouteList(specialDiseaseRoute); + ExcelUtil util = new ExcelUtil(SpecialDiseaseRoute.class); + util.exportExcel(response, list, "专病路径信息数据"); + } + + /** + * 获取专病路径信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(specialDiseaseRouteService.selectSpecialDiseaseRouteById(id)); + } + + /** + * 新增专病路径信息 + */ + @PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:add')") + @Log(title = "专病路径信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody SpecialDiseaseRoute specialDiseaseRoute) { + return toAjax(specialDiseaseRouteService.insertSpecialDiseaseRoute(specialDiseaseRoute)); + } + + /** + * 修改专病路径信息 + */ + @PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:edit')") + @Log(title = "专病路径信息", businessType = BusinessType.UPDATE) + @PutMapping("/edit") + public AjaxResult edit(@RequestBody SpecialDiseaseRoute specialDiseaseRoute) { + return toAjax(specialDiseaseRouteService.updateSpecialDiseaseRoute(specialDiseaseRoute)); + } + + /** + * 删除专病路径信息 + */ + @PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:remove')") + @Log(title = "专病路径信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(specialDiseaseRouteService.deleteSpecialDiseaseRouteByIds(ids)); + } + + /** + * 科室路径数量 + */ + @GetMapping("/departmentRouteCount") + public AjaxResult departmentRouteCount(String departmentName) { + return specialDiseaseRouteService.departmentRouteCount(departmentName); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionController.java new file mode 100644 index 00000000..4be8d296 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionController.java @@ -0,0 +1,105 @@ +package com.xinelu.manage.controller.specialdiseasetriggercondition; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +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.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; +import com.xinelu.manage.dto.specialdiseasetriggercondition.TriggerConditionDTO; +import com.xinelu.manage.service.specialdiseasetriggercondition.ISpecialDiseaseTriggerConditionService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * 触发条件关系Controller + * + * @author xinelu + * @date 2024-03-18 + */ +@RestController +@RequestMapping("/system/triggerCondition") +public class SpecialDiseaseTriggerConditionController extends BaseController { + @Resource + private ISpecialDiseaseTriggerConditionService specialDiseaseTriggerConditionService; + + /** + * 查询触发条件关系列表 + */ + @PreAuthorize("@ss.hasPermi('system:triggerCondition:list')") + @GetMapping("/list") + public TableDataInfo list(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) { + startPage(); + List list = specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition); + return getDataTable(list); + } + + /** + * 查询触发条件关系列表 + */ + @GetMapping("/triggerConditionList") + public AjaxResult triggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) { + if (Objects.isNull(specialDiseaseTriggerCondition) || Objects.isNull(specialDiseaseTriggerCondition.getRouteId())) { + return AjaxResult.success(new ArrayList<>()); + } + return AjaxResult.success(specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition)); + } + + /** + * 导出触发条件关系列表 + */ + @PreAuthorize("@ss.hasPermi('system:triggerCondition:export')") + @Log(title = "触发条件关系", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) { + List list = specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition); + ExcelUtil util = new ExcelUtil(SpecialDiseaseTriggerCondition.class); + util.exportExcel(response, list, "触发条件关系数据"); + } + + /** + * 获取触发条件关系详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:triggerCondition:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(specialDiseaseTriggerConditionService.selectSpecialDiseaseTriggerConditionById(id)); + } + + /** + * 新增触发条件关系 + */ + @PreAuthorize("@ss.hasPermi('system:triggerCondition:add')") + @Log(title = "触发条件关系", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody TriggerConditionDTO triggerConditionList) { + return toAjax(specialDiseaseTriggerConditionService.insertSpecialDiseaseTriggerCondition(triggerConditionList)); + } + + /** + * 修改触发条件关系 + */ + @PreAuthorize("@ss.hasPermi('system:triggerCondition:edit')") + @Log(title = "触发条件关系", businessType = BusinessType.UPDATE) + @PutMapping("/edit") + public AjaxResult edit(@RequestBody SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) { + return toAjax(specialDiseaseTriggerConditionService.updateSpecialDiseaseTriggerCondition(specialDiseaseTriggerCondition)); + } + + /** + * 删除触发条件关系 + */ + @PreAuthorize("@ss.hasPermi('system:triggerCondition:remove')") + @Log(title = "触发条件关系", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(specialDiseaseTriggerConditionService.deleteSpecialDiseaseTriggerConditionByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskpartitiondict/TaskPartitionDictController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskpartitiondict/TaskPartitionDictController.java index df21c00e..5723a447 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskpartitiondict/TaskPartitionDictController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskpartitiondict/TaskPartitionDictController.java @@ -38,6 +38,15 @@ public class TaskPartitionDictController extends BaseController { return getDataTable(list); } + + /** + * 查询任务细分字典列表 - 不分页 + */ + @GetMapping("/taskPartitionList") + public AjaxResult taskPartitionList(TaskPartitionDict taskPartitionDict) { + return AjaxResult.success(taskPartitionDictService.selectTaskPartitionDictList(taskPartitionDict)); + } + /** * 导出任务细分字典列表 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskstatusdict/TaskStatusDictController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskstatusdict/TaskStatusDictController.java index 2200722a..427cbda5 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskstatusdict/TaskStatusDictController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/taskstatusdict/TaskStatusDictController.java @@ -38,6 +38,11 @@ public class TaskStatusDictController extends BaseController { return getDataTable(list); } + @GetMapping("/taskStatusDictList") + public AjaxResult taskStatusDictList(TaskStatusDict taskStatusDict) { + return AjaxResult.success(taskStatusDictService.selectTaskStatusDictList(taskStatusDict)); + } + /** * 导出任务状态字典列表 */ @@ -64,7 +69,7 @@ public class TaskStatusDictController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:taskStatus:add')") @Log(title = "任务状态字典", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") public AjaxResult add(@RequestBody TaskStatusDict taskStatusDict) { return toAjax(taskStatusDictService.insertTaskStatusDict(taskStatusDict)); } @@ -74,7 +79,7 @@ public class TaskStatusDictController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:taskStatus:edit')") @Log(title = "任务状态字典", businessType = BusinessType.UPDATE) - @PutMapping + @PutMapping("/edit") public AjaxResult edit(@RequestBody TaskStatusDict taskStatusDict) { return toAjax(taskStatusDictService.updateTaskStatusDict(taskStatusDict)); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java index 80ebf3af..32f9cf2d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java @@ -50,7 +50,7 @@ public class TextMessageController extends BaseController { List list = textMessageService.selectTextMessageList(textMessageDTO); //处理上面查询的list集合 int num = list.size(); - list = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); + list = list.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); TableDataInfo rspData = new TableDataInfo(); rspData.setCode(HttpStatus.SUCCESS); rspData.setRows(list); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/wechattemplate/WechatTemplateController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/wechattemplate/WechatTemplateController.java index 33825bf1..d4b19733 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/wechattemplate/WechatTemplateController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/wechattemplate/WechatTemplateController.java @@ -49,7 +49,7 @@ public class WechatTemplateController extends BaseController { List list = wechatTemplateService.selectWechatTemplateList(wechatTemplateDto); //处理上面查询的list集合 int num = list.size(); - list = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); + list = list.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); TableDataInfo rspData = new TableDataInfo(); rspData.setCode(HttpStatus.SUCCESS); rspData.setRows(list); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java index cf21cff6..4e2d3884 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import java.util.Date; +import java.time.LocalDate; /** * 科室信息对象 department @@ -166,7 +166,7 @@ public class Department extends BaseEntity { @ApiModelProperty(value = "成立日期") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date establishDate; + private LocalDate establishDate; /** * 撤销日期 @@ -174,7 +174,7 @@ public class Department extends BaseEntity { @ApiModelProperty(value = "撤销日期") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "撤销日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date revokeDate; + private LocalDate revokeDate; @Override public String toString() { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/materialsinfo/MaterialsInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/materialsinfo/MaterialsInfo.java index 1bd68273..1db8142a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/materialsinfo/MaterialsInfo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/materialsinfo/MaterialsInfo.java @@ -118,4 +118,7 @@ public class MaterialsInfo extends BaseEntity { @Excel(name = "素材排序,值越小排序越靠前") private Integer materialsSort; + /** 删除标识,0:未删除,1:已删除 */ + private Integer delFlag; + } 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 c7873400..e6cf4157 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 @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import java.time.LocalDateTime; -import java.util.Date; +import java.time.LocalDate; /** * 患者信息对象 patient_info @@ -33,6 +33,15 @@ public class PatientInfo extends BaseEntity { */ private Long id; + /** + * 患者姓名 + */ + /** + * 居民信息表id + */ + @ApiModelProperty(value = "居民信息表id") + private Long residentId; + /** * 患者姓名 */ @@ -58,7 +67,7 @@ public class PatientInfo extends BaseEntity { */ @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; + private LocalDate birthDate; /** * 身份证号 @@ -110,6 +119,9 @@ public class PatientInfo extends BaseEntity { @Excel(name = "签约时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") private LocalDateTime signTime; + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ /** * 开证医生(预住院患者) */ @@ -124,6 +136,23 @@ public class PatientInfo extends BaseEntity { @Excel(name = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") private String visitMethod; + /** + * 主治医生id + */ + @ApiModelProperty(value = "主治医生id") + @Excel(name = "主治医生id") + private Long attendingPhysicianId; + + /** + * 主治医生姓名 + */ + @ApiModelProperty(value = "主治医生姓名") + @Excel(name = "主治医生姓名") + private String attendingPhysicianName; + + /** + * 主要诊断 + */ /** * 主要诊断 */ @@ -137,6 +166,9 @@ public class PatientInfo extends BaseEntity { @Excel(name = "主治医生") private String attendingPhysician; + /** + * 所属医院id + */ /** * 所属医院id */ @@ -189,6 +221,9 @@ public class PatientInfo extends BaseEntity { @Excel(name = "所属病区名称") private String wardName; + /** + * 责任护士 + */ /** * 住院号 */ @@ -202,6 +237,15 @@ public class PatientInfo extends BaseEntity { @ApiModelProperty(value = "责任护士") private String responsibleNurse; + /** + * 最新一条就诊记录id + */ + @ApiModelProperty(value = "最新一条就诊记录id") + private Long patientVisitRecordId; + + /** + * 就诊流水号 + */ /** * 就诊流水号 */ @@ -214,18 +258,24 @@ public class PatientInfo extends BaseEntity { @ApiModelProperty(value = "手术名称") private String surgicalName; + /** + * 入院时间,时间格式:yyyy-MM-dd + */ /** * 入院时间,时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "入院时间") - private Date admissionDate; + private LocalDateTime admissionTime; /** * 出院时间(出院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "出院时间(出院患者)") - private Date dischargeDate; + private LocalDateTime dischargeTime; + /** + * 预约治疗组(取值以及枚举未知?) + */ /** * 病历内容 */ @@ -248,14 +298,20 @@ public class PatientInfo extends BaseEntity { * 登记日期(预住院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "登记日期(预住院患者),时间格式:yyyy-MM-dd") - private Date registrationDate; + private LocalDate registrationDate; /** * 预约时间(预住院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "预约时间(预住院患者),时间格式:yyyy-MM-dd") - private Date appointmentDate; + private LocalDate appointmentDate; + /** + * 门诊/住院号 + */ + @ApiModelProperty(value = "门诊/住院号 ") + @Excel(name = "门诊/住院号 ", readConverterExp = "门诊/住院号 ") + private String inHospitalNumber; /** * 门诊号(门诊患者) */ @@ -263,12 +319,19 @@ public class PatientInfo extends BaseEntity { @Excel(name = "门诊号", readConverterExp = "门=诊患者") private String outpatientNumber; + /** + * 就诊时间,格式: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 */ @ApiModelProperty(value = "就诊时间") @Excel(name = "就诊时间", readConverterExp = "门=诊患者") - private Date visitTime; + private LocalDate visitTime; /** * 出院方式(出院患者) @@ -277,6 +340,9 @@ public class PatientInfo extends BaseEntity { @Excel(name = "出院方式", readConverterExp = "出=院患者") private String dischargeMethod; + /** + * 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END + */ /** * 微信小程序openid,微信小程序唯一标识 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java index 8315c9d5..d354e8bb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java @@ -1,9 +1,10 @@ package com.xinelu.manage.domain.patientprehospitalization; +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.util.Date; +import java.time.LocalDate; import lombok.Data; /** @@ -19,6 +20,12 @@ public class PatientPreHospitalization extends BaseEntity { */ @ApiModelProperty("主键Id") private Long id; + /** + * 居民信息表id + */ + @ApiModelProperty("居民信息表id") + private Long residentId; + /** * 患者表id */ @@ -28,31 +35,37 @@ public class PatientPreHospitalization extends BaseEntity { * 姓名 */ @ApiModelProperty("姓名") + @Excel(name = "姓名") private String patientName; /** * 患者电话 */ @ApiModelProperty("患者电话") + @Excel(name = "电话") private String patientPhone; /** * 身份证号 */ @ApiModelProperty("身份证号") + @Excel(name = "身份证号") private String cardNo; /** * 性别,男:MALE,女:FEMALE */ @ApiModelProperty("性别,男:MALE,女:FEMALE") + @Excel(name = "性别",readConverterExp = "MALE=男,FEMALE=女") private String sex; /** * 出生日期,格式:yyyy-MM-dd */ @ApiModelProperty("出生日期,格式:yyyy-MM-dd") - private Date birthDate; + @Excel(name = "出生日期") + private LocalDate birthDate; /** * 家属电话 */ @ApiModelProperty("家属电话") + @Excel(name = "家属电话") private String familyMemberPhone; /** * 住址 @@ -63,6 +76,7 @@ public class PatientPreHospitalization extends BaseEntity { * 主要诊断 */ @ApiModelProperty("主要诊断") + @Excel(name = "诊断") private String mainDiagnosis; /** * 所属医院id @@ -93,6 +107,7 @@ public class PatientPreHospitalization extends BaseEntity { * 所属科室名称 */ @ApiModelProperty("所属科室名称") + @Excel(name = "科室名称") private String departmentName; /** * 所属病区id @@ -102,28 +117,33 @@ public class PatientPreHospitalization extends BaseEntity { /** * 所属病区名称 */ + @Excel(name = "预约病区") @ApiModelProperty("所属病区名称") private String wardName; /** * 预约治疗组(取值以及枚举未知?) */ @ApiModelProperty("预约治疗组(取值以及枚举未知?)") + @Excel(name = "预约治疗组") private String appointmentTreatmentGroup; /** * 登记号(预住院患者) */ @ApiModelProperty("登记号(预住院患者)") + @Excel(name = "登记号") private String registrationNo; /** * 登记日期(预住院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty("登记日期(预住院患者),时间格式:yyyy-MM-dd") - private Date registrationDate; + @Excel(name = "登记日期") + private LocalDate registrationDate; /** * 预约时间(预住院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty("预约时间(预住院患者),时间格式:yyyy-MM-dd") - private Date appointmentDate; + @Excel(name = "预约日期") + private LocalDate appointmentDate; /** * 开证医生id */ @@ -133,6 +153,7 @@ public class PatientPreHospitalization extends BaseEntity { * 开证医生姓名 */ @ApiModelProperty("开证医生姓名") + @Excel(name = "开证医生") private String certificateIssuingDoctorName; /** * 责任护士 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionoptionresult/PatientQuestionOptionResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionoptionresult/PatientQuestionOptionResult.java new file mode 100644 index 00000000..d56413ea --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionoptionresult/PatientQuestionOptionResult.java @@ -0,0 +1,126 @@ +package com.xinelu.manage.domain.patientquestionoptionresult; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; + +/** + * 患者问卷题目选项提交结果信息对象 patient_question_option_result + * + * @author xinelu + * @date 2024-03-28 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "患者问卷题目选项提交结果信息对象", description = "patient_question_option_result") +public class PatientQuestionOptionResult extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 问卷题目提交结果信息表id + */ + @ApiModelProperty(value = "问卷题目提交结果信息表id") + @Excel(name = "问卷题目提交结果信息表id") + private Long questionSubjectResultId; + + /** + * 问卷题目表id + */ + @ApiModelProperty(value = "问卷题目表id") + @Excel(name = "问卷题目表id") + private Long questionnaireSubjectId; + + /** + * 题目名称 + */ + @ApiModelProperty(value = "题目名称") + @Excel(name = "题目名称") + private String questionName; + + /** + * 选项名称 + */ + @ApiModelProperty(value = "选项名称") + @Excel(name = "选项名称") + private String optionName; + + /** + * 选项答案 + */ + @ApiModelProperty(value = "选项答案") + @Excel(name = "选项答案") + private String optionAnswer; + + /** + * 选项分值 + */ + @ApiModelProperty(value = "选项分值") + @Excel(name = "选项分值") + private BigDecimal optionScore; + + /** + * 题目选项选择标识,0:已选择,1:未选择 + */ + @ApiModelProperty(value = "题目选项选择标识,0:已选择,1:未选择") + @Excel(name = "题目选项选择标识,0:已选择,1:未选择") + private Integer optionChooseSign; + + /** + * 选项题目提交答案 + */ + @ApiModelProperty(value = "选项题目提交答案") + @Excel(name = "选项题目提交答案") + private String optionSubmitAnswer; + + /** + * 选项排序 + */ + @ApiModelProperty(value = "选项排序") + @Excel(name = "选项排序") + private Integer optionSort; + + /** + * 选项备注 + */ + @ApiModelProperty(value = "选项备注") + @Excel(name = "选项备注") + private String optionRemark; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("questionSubjectResultId", getQuestionSubjectResultId()) + .append("questionnaireSubjectId", getQuestionnaireSubjectId()) + .append("questionName", getQuestionName()) + .append("optionName", getOptionName()) + .append("optionAnswer", getOptionAnswer()) + .append("optionScore", getOptionScore()) + .append("optionChooseSign", getOptionChooseSign()) + .append("optionSubmitAnswer", getOptionSubmitAnswer()) + .append("optionSort", getOptionSort()) + .append("optionRemark", getOptionRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java new file mode 100644 index 00000000..4f498b01 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubjectresult/PatientQuestionSubjectResult.java @@ -0,0 +1,147 @@ +package com.xinelu.manage.domain.patientquestionsubjectresult; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; + +/** + * 患者问卷题目提交结果信息对象 patient_question_subject_result + * + * @author xinelu + * @date 2024-03-28 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "患者问卷题目提交结果信息对象", description = "patient_question_subject_result") +public class PatientQuestionSubjectResult extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 问卷提交结果信息表id + */ + @ApiModelProperty(value = "问卷提交结果信息表id") + @Excel(name = "问卷提交结果信息表id") + private Long questionSubmitResultId; + + /** + * 问卷表id + */ + @ApiModelProperty(value = "问卷表id") + @Excel(name = "问卷表id") + private Long questionInfoId; + + /** + * 题目序号 + */ + @ApiModelProperty(value = "题目序号") + @Excel(name = "题目序号") + private BigDecimal questionNumber; + + /** + * 题目类型,单选题:MULTIPLE_CHOICE,多选题:MULTIPLE_CHOICE_QUESTIONS,填空题:FILL_IN_THE_BLANKS,打分题:SCORING_QUESTIONS, + * 组合单选题:COMBINATION_RADIO_SUBJECT,组合多选题:COMBINATION_MULTIPLE_SUBJECT,组合填空题:COMBINATION_BLANKS_SUBJECT, + * 组合打分题:COMBINATION_SCORING_SUBJECT,日期填空题:DATE_BLANKS_SUBJECT,时间填空题:TIME_BLANKS_SUBJECT + */ + @ApiModelProperty(value = "题目类型,单选题:MULTIPLE_CHOICE,多选题:MULTIPLE_CHOICE_QUESTIONS,填空题:FILL_IN_THE_BLANKS,打分题:SCORING_QUESTIONS, 组合单选题:COMBINATION_RADIO_SUBJECT,组合多选题:COMBINATION_MULTIPLE_SUBJECT,组合填空题:COMBINATION_BLANKS_SUBJECT, 组合打分题:COMBINATION_SCORING_SUBJECT,日期填空题:DATE_BLANKS_SUBJECT,时间填空题:TIME_BLANKS_SUBJECT") + @Excel(name = "题目类型,单选题:MULTIPLE_CHOICE,多选题:MULTIPLE_CHOICE_QUESTIONS,填空题:FILL_IN_THE_BLANKS,打分题:SCORING_QUESTIONS, 组合单选题:COMBINATION_RADIO_SUBJECT,组合多选题:COMBINATION_MULTIPLE_SUBJECT,组合填空题:COMBINATION_BLANKS_SUBJECT, 组合打分题:COMBINATION_SCORING_SUBJECT,日期填空题:DATE_BLANKS_SUBJECT,时间填空题:TIME_BLANKS_SUBJECT") + private String questionType; + + /** + * 题目名称 + */ + @ApiModelProperty(value = "题目名称") + @Excel(name = "题目名称") + private String questionName; + + /** + * 题目说明 + */ + @ApiModelProperty(value = "题目说明") + @Excel(name = "题目说明") + private String questionDescription; + + /** + * 填写说明 + */ + @ApiModelProperty(value = "填写说明") + @Excel(name = "填写说明") + private String writeDescription; + + /** + * 回答(填空题) + */ + @ApiModelProperty(value = "回答") + @Excel(name = "回答", readConverterExp = "填=空题") + private String fillBlanksAnswer; + + /** + * 选项个数(打分题) + */ + @ApiModelProperty(value = "选项个数") + @Excel(name = "选项个数", readConverterExp = "打=分题") + private Integer optionCount; + + /** + * 是否计分,0:否,1:是 + */ + @ApiModelProperty(value = "是否计分,0:否,1:是") + @Excel(name = "是否计分,0:否,1:是") + private Integer whetherScore; + + /** + * 计分方式,每个选项都有对应分值:NOT_UNIQUE_ANSWER,全部答对才得分:UNIQUE_ANSWER + */ + @ApiModelProperty(value = "计分方式,每个选项都有对应分值:NOT_UNIQUE_ANSWER,全部答对才得分:UNIQUE_ANSWER") + @Excel(name = "计分方式,每个选项都有对应分值:NOT_UNIQUE_ANSWER,全部答对才得分:UNIQUE_ANSWER") + private String scoringMethod; + + /** + * 计分说明 + */ + @ApiModelProperty(value = "计分说明") + @Excel(name = "计分说明") + private String scoringDescription; + + /** + * 题目分值 + */ + @ApiModelProperty(value = "题目分值") + @Excel(name = "题目分值") + private BigDecimal questionScore; + + /** + * 题目排序 + */ + @ApiModelProperty(value = "题目排序") + @Excel(name = "题目排序") + private Integer questionSort; + + /** + * 题目备注 + */ + @ApiModelProperty(value = "题目备注") + @Excel(name = "题目备注") + private String questionRemark; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("questionSubmitResultId", getQuestionSubmitResultId()).append("questionInfoId", getQuestionInfoId()).append("questionNumber", getQuestionNumber()).append("questionType", getQuestionType()).append("questionName", getQuestionName()).append("questionDescription", getQuestionDescription()).append("writeDescription", getWriteDescription()).append("fillBlanksAnswer", getFillBlanksAnswer()).append("optionCount", getOptionCount()).append("whetherScore", getWhetherScore()).append("scoringMethod", getScoringMethod()).append("scoringDescription", getScoringDescription()).append("questionScore", getQuestionScore()).append("questionSort", getQuestionSort()).append("questionRemark", getQuestionRemark()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubmitresult/PatientQuestionSubmitResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubmitresult/PatientQuestionSubmitResult.java new file mode 100644 index 00000000..cff3107e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientquestionsubmitresult/PatientQuestionSubmitResult.java @@ -0,0 +1,200 @@ +package com.xinelu.manage.domain.patientquestionsubmitresult; + + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; + +/** + * 患者问卷提交结果信息对象 patient_question_submit_result + * + * @author xinelu + * @date 2024-03-28 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "患者问卷提交结果信息对象", description = "patient_question_submit_result") +public class PatientQuestionSubmitResult extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 管理任务执行记录表id + */ + @ApiModelProperty(value = "管理任务执行记录表id") + @Excel(name = "管理任务执行记录表id") + private Long taskExecuteRecordId; + + /** + * 患者表id + */ + @ApiModelProperty(value = "患者表id") + @Excel(name = "患者表id") + private Long patientId; + + /** + * 签约患者管理任务表id + */ + @ApiModelProperty(value = "签约患者管理任务表id") + @Excel(name = "签约患者管理任务表id") + private Long manageRouteId; + + /** + * 签约患者管理任务节点表id + */ + @ApiModelProperty(value = "签约患者管理任务节点表id") + @Excel(name = "签约患者管理任务节点表id") + private Long manageRouteNodeId; + + /** + * 患者姓名(提交者姓名) + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "患者姓名", readConverterExp = "提=交者姓名") + private String patientName; + + /** + * 签约患者管理任务名称 + */ + @ApiModelProperty(value = "签约患者管理任务名称") + @Excel(name = "签约患者管理任务名称") + private String manageRouteName; + + /** + * 签约患者管理路径节点名称 + */ + @ApiModelProperty(value = "签约患者管理路径节点名称") + @Excel(name = "签约患者管理路径节点名称") + private String manageRouteNodeName; + + /** + * 问卷表id + */ + @ApiModelProperty(value = "问卷表id") + @Excel(name = "问卷表id") + private Long questionInfoId; + + /** + * 所属科室id + */ + @ApiModelProperty(value = "所属科室id") + @Excel(name = "所属科室id") + private Long departmentId; + + /** + * 所属科室名称 + */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "所属科室名称") + private String departmentName; + + /** + * 病种id + */ + @ApiModelProperty(value = "病种id") + @Excel(name = "病种id") + private Long diseaseTypeId; + + /** + * 病种名称 + */ + @ApiModelProperty(value = "病种名称") + @Excel(name = "病种名称") + private String diseaseTypeName; + + /** + * 问卷标题 + */ + @ApiModelProperty(value = "问卷标题") + @Excel(name = "问卷标题") + private String questionnaireName; + + /** + * 问卷说明 + */ + @ApiModelProperty(value = "问卷说明") + @Excel(name = "问卷说明") + private String questionnaireDescription; + + /** + * 作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION + */ + @ApiModelProperty(value = "作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION") + @Excel(name = "作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION") + private String answeringMethod; + + /** + * 问卷ID + */ + @ApiModelProperty(value = "问卷ID") + @Excel(name = "问卷ID") + private String questionnaireId; + + /** + * 问题个数 + */ + @ApiModelProperty(value = "问题个数") + @Excel(name = "问题个数") + private Integer questionCount; + + /** + * 问卷总分值,小数点后两位 + */ + @ApiModelProperty(value = "问卷总分值,小数点后两位") + @Excel(name = "问卷总分值,小数点后两位") + private BigDecimal questionnaireTotalScore; + + /** + * 问卷总得分,根据患者提交问卷得出的分值 + */ + @ApiModelProperty(value = "问卷总得分,根据患者提交问卷得出的分值") + @Excel(name = "问卷总得分,根据患者提交问卷得出的分值") + private BigDecimal totalScore; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("taskExecuteRecordId", getTaskExecuteRecordId()) + .append("patientId", getPatientId()) + .append("manageRouteId", getManageRouteId()) + .append("manageRouteNodeId", getManageRouteNodeId()) + .append("patientName", getPatientName()) + .append("manageRouteName", getManageRouteName()) + .append("manageRouteNodeName", getManageRouteNodeName()) + .append("questionInfoId", getQuestionInfoId()) + .append("departmentId", getDepartmentId()) + .append("departmentName", getDepartmentName()) + .append("diseaseTypeId", getDiseaseTypeId()) + .append("diseaseTypeName", getDiseaseTypeName()) + .append("questionnaireName", getQuestionnaireName()) + .append("questionnaireDescription", getQuestionnaireDescription()) + .append("answeringMethod", getAnsweringMethod()) + .append("questionnaireId", getQuestionnaireId()) + .append("questionCount", getQuestionCount()) + .append("questionnaireTotalScore", getQuestionnaireTotalScore()) + .append("totalScore", getTotalScore()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patienttaskexecuterecord/PatientTaskExecuteRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patienttaskexecuterecord/PatientTaskExecuteRecord.java new file mode 100644 index 00000000..6bbd0bdf --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patienttaskexecuterecord/PatientTaskExecuteRecord.java @@ -0,0 +1,140 @@ +package com.xinelu.manage.domain.patienttaskexecuterecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + + +/** + * 患者管理任务执行记录对象 patient_task_execute_record + * + * @author xinelu + * @date 2024-03-25 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "患者管理任务执行记录对象", description = "patient_task_execute_record") +public class PatientTaskExecuteRecord extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 患者表id + */ + @ApiModelProperty(value = "患者表id") + @Excel(name = "患者表id") + private Long patientId; + + /** + * 签约患者管理任务表id + */ + @ApiModelProperty(value = "签约患者管理任务表id") + @Excel(name = "签约患者管理任务表id") + private Long manageRouteId; + + /** + * 签约患者管理任务节点表id + */ + @ApiModelProperty(value = "签约患者管理任务节点表id") + @Excel(name = "签约患者管理任务节点表id") + private Long manageRouteNodeId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "患者姓名") + private String patientName; + + /** + * 签约患者管理任务名称 + */ + @ApiModelProperty(value = "签约患者管理任务名称") + @Excel(name = "签约患者管理任务名称") + private String manageRouteName; + + /** + * 签约患者管理路径节点名称 + */ + @ApiModelProperty(value = "签约患者管理路径节点名称") + @Excel(name = "签约患者管理路径节点名称") + private String manageRouteNodeName; + + /** + * 任务内容,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP + */ + @ApiModelProperty(value = "任务内容,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + @Excel(name = "任务内容,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + private String taskContent; + + /** + * 任务执行时间,格式: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 Date executeTime; + + /** + * 执行人姓名,手动执行时记录 + */ + @ApiModelProperty(value = "执行人姓名,手动执行时记录") + @Excel(name = "执行人姓名,手动执行时记录") + private String executePerson; + + /** + * 任务执行方式,人工执行:MANUAL_EXECUTE,系统自动执行:SYSTEM_AUTOMATIC_EXECUTE + */ + @ApiModelProperty(value = "任务执行方式,人工执行:MANUAL_EXECUTE,系统自动执行:SYSTEM_AUTOMATIC_EXECUTE") + @Excel(name = "任务执行方式,人工执行:MANUAL_EXECUTE,系统自动执行:SYSTEM_AUTOMATIC_EXECUTE") + private String executeType; + + /** + * 备注信息 + */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String executeRemark; + + @ApiModelProperty(value = "患者就诊记录基本信息表id") + @Excel(name = "患者就诊记录基本信息表id") + private Long visitRecordId; + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("patientId", getPatientId()) + .append("manageRouteId", getManageRouteId()) + .append("manageRouteNodeId", getManageRouteNodeId()) + .append("patientName", getPatientName()) + .append("manageRouteName", getManageRouteName()) + .append("manageRouteNodeName", getManageRouteNodeName()) + .append("taskContent", getTaskContent()) + .append("executeTime", getExecuteTime()) + .append("executePerson", getExecutePerson()) + .append("executeType", getExecuteType()) + .append("executeRemark", getExecuteRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patienttaskpushrecord/PatientTaskPushRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patienttaskpushrecord/PatientTaskPushRecord.java new file mode 100644 index 00000000..c016f63c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patienttaskpushrecord/PatientTaskPushRecord.java @@ -0,0 +1,104 @@ +package com.xinelu.manage.domain.patienttaskpushrecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * 患者管理任务推送方式记录对象 patient_task_push_record + * + * @author xinelu + * @date 2024-03-21 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "患者管理任务推送方式记录对象", description = "patient_task_push_record") +public class PatientTaskPushRecord extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 患者表id + */ + @ApiModelProperty(value = "患者表id") + @Excel(name = "患者表id") + private Long patientId; + + /** + * 签约患者管理任务节点表id + */ + @ApiModelProperty(value = "签约患者管理任务节点表id") + @Excel(name = "签约患者管理任务节点表id") + private Long manageRouteNodeId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "患者姓名") + private String patientName; + + /** + * 管理路径节点名称 + */ + @ApiModelProperty(value = "管理路径节点名称") + @Excel(name = "管理路径节点名称") + private String routeNodeName; + + /** + * 管理任务推送方式,微信小程序:微信公众号:,短信:,IM: + */ + @ApiModelProperty(value = "管理任务推送方式,微信小程序:微信公众号:,短信:,IM:") + @Excel(name = "管理任务推送方式,微信小程序:微信公众号:,短信:,IM:") + private String taskPushType; + + /** + * 管理任务推送时间,格式: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 Date taskPushDate; + + /** + * 管理任务推送备注 + */ + @ApiModelProperty(value = "管理任务推送备注") + @Excel(name = "管理任务推送备注") + private String taskPushRemark; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("patientId", getPatientId()) + .append("manageRouteNodeId", getManageRouteNodeId()) + .append("patientName", getPatientName()) + .append("routeNodeName", getRouteNodeName()) + .append("taskPushType", getTaskPushType()) + .append("taskPushDate", getTaskPushDate()) + .append("taskPushRemark", getTaskPushRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitinhospital/PatientVisitInHospital.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitinhospital/PatientVisitInHospital.java index 28a3f5d5..c360204b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitinhospital/PatientVisitInHospital.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitinhospital/PatientVisitInHospital.java @@ -5,7 +5,7 @@ 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.util.Date; +import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -82,7 +82,7 @@ public class PatientVisitInHospital extends BaseEntity { @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 Date signatureDate; + private LocalDateTime signatureDate; /** 体格检查 */ @ApiModelProperty(value = "体格检查") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitoperation/PatientVisitOperation.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitoperation/PatientVisitOperation.java index 956184e2..628545f9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitoperation/PatientVisitOperation.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitoperation/PatientVisitOperation.java @@ -5,7 +5,7 @@ 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.util.Date; +import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -42,7 +42,7 @@ public class PatientVisitOperation extends BaseEntity { @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 Date operationDate; + private LocalDateTime operationDate; /** 手术麻醉方式,全身麻醉:GENERAL_ANESTHESIA,局部麻醉:LOCAL_ANESTHESIA */ @ApiModelProperty(value = "手术麻醉方式,全身麻醉:GENERAL_ANESTHESIA,局部麻醉:LOCAL_ANESTHESIA") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java index a7d2ee8f..13553315 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java @@ -5,7 +5,8 @@ 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.util.Date; +import java.time.LocalDate; +import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -28,6 +29,10 @@ public class PatientVisitRecord extends BaseEntity { /** 主键Id */ private Long id; + /** 居民信息表id */ + @ApiModelProperty(value = "居民信息表id") + private Long residentId; + /** 患者表id */ @ApiModelProperty(value = "患者表id") @Excel(name = "患者表id") @@ -67,7 +72,7 @@ public class PatientVisitRecord extends BaseEntity { @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "出生日期,格式:yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd") - private Date birthDate; + private LocalDate birthDate; /** 年龄 */ @ApiModelProperty(value = "年龄") @@ -79,16 +84,16 @@ public class PatientVisitRecord extends BaseEntity { @Excel(name = "民族") private String nation; - /** 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED */ - @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") - @Excel(name = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") - private String visitType; + /** 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL */ + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + @Excel(name = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @Excel(name = "就诊时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") - private Date visitDate; + private LocalDateTime visitDate; /** 就诊名称 */ @ApiModelProperty(value = "就诊名称") @@ -162,20 +167,20 @@ public class PatientVisitRecord extends BaseEntity { /** 入院时间 */ @ApiModelProperty(value = "入院时间") - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @Excel(name = "入院时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date admissionTime; + private LocalDateTime admissionTime; /** 出院时间 */ @ApiModelProperty(value = "出院时间") - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") @Excel(name = "出院时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date dischargeTime; + private LocalDateTime dischargeTime; /** _记录时间(入院记录) */ @ApiModelProperty(value = "_记录时间") - @Excel(name = "_记录时间", readConverterExp = "入=院记录") - private Date recordTime; + @Excel(name = "_记录时间", readConverterExp = "入院记录") + private LocalDateTime recordTime; /** 门诊记录信息(就诊记录-门诊记录) */ @ApiModelProperty(value = "门诊记录信息") @@ -217,4 +222,11 @@ public class PatientVisitRecord extends BaseEntity { @Excel(name = "手术名称") private String surgicalName; + /** 手术记录 */ + @ApiModelProperty(value = "手术记录") + private String surgicalRecord; + + /** 删除标识,0:未删除,1:已删除 */ + private Integer delFlag; + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java index 6ecf5942..474bb080 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java @@ -3,7 +3,8 @@ package com.xinelu.manage.domain.projectbatch; import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; +import java.time.LocalDateTime; import lombok.Data; /** @@ -38,7 +39,7 @@ public class ProjectBatch extends BaseEntity { * 出生日期,格式:yyyy-MM-dd */ @ApiModelProperty("出生日期,格式:yyyy-MM-dd") - private Date birthDate; + private LocalDate birthDate; /** * 身份证号 */ @@ -73,7 +74,7 @@ public class ProjectBatch extends BaseEntity { * 批次创建时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiModelProperty("批次创建时间,格式:yyyy-MM-dd HH:mm:ss") - private Date batchDate; + private LocalDateTime batchDate; /** * 删除标识,0:否,1:是 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java index 2f3ecfcc..17037dca 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java @@ -5,7 +5,7 @@ import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import java.util.Date; +import java.time.LocalDateTime; import lombok.Data; /** @@ -115,7 +115,7 @@ public class ProjectLastResult extends BaseEntity { * 检测时间 */ @ApiModelProperty("检测时间") - private Date measureTime; + private LocalDateTime measureTime; /** * 检测人姓名,自动上传时为空,手动上传为上传人姓名 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java index 73ad82cf..4de8bb58 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java @@ -6,7 +6,7 @@ import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import java.util.Date; +import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -124,7 +124,7 @@ private static final long serialVersionUID=1L; @ApiModelProperty(value = "检测时间") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "检测时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date measureTime; + private LocalDateTime measureTime; /** 检测人姓名,自动上传时为空,手动上传为上传人姓名 */ @ApiModelProperty(value = "检测人姓名,自动上传时为空,手动上传为上传人姓名") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/propagandamaterials/PropagandaMaterials.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/propagandamaterials/PropagandaMaterials.java index f8b09c39..e06d1de5 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/propagandamaterials/PropagandaMaterials.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/propagandamaterials/PropagandaMaterials.java @@ -33,7 +33,7 @@ public class PropagandaMaterials extends BaseEntity { /** 宣教名称(宣教标题) */ @ApiModelProperty(value = "宣教名称") - @Excel(name = "宣教名称", readConverterExp = "宣=教标题") + @Excel(name = "宣教名称", readConverterExp = "宣教标题") private String propagandaTitle; /** 素材表id */ @@ -46,5 +46,6 @@ public class PropagandaMaterials extends BaseEntity { @Excel(name = "素材名称") private String materialsName; - + /** 删除标识,0:未删除,1:已删除 */ + private Integer delFlag; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/residentinfo/ResidentInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/residentinfo/ResidentInfo.java new file mode 100644 index 00000000..d55ecabd --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/residentinfo/ResidentInfo.java @@ -0,0 +1,81 @@ +package com.xinelu.manage.domain.residentinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +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 lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 居民信息对象 resident_info + * + * @author haown + * @date 2024-03-27 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "居民信息对象", description = "resident_info") +public class ResidentInfo extends BaseEntity { + private static final long serialVersionUID=1L; + + /** 主键id */ + private Long id; + + /** 姓名 */ + @ApiModelProperty(value = "姓名") + @Excel(name = "姓名") + private String patientName; + + /** 电话 */ + @ApiModelProperty(value = "电话") + @Excel(name = "电话") + private String patientPhone; + + /** 家属电话 */ + @ApiModelProperty(value = "家属电话") + @Excel(name = "家属电话") + private String familyMemberPhone; + + /** 出生日期,格式:yyyy-MM-dd */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate birthDate; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + @Excel(name = "身份证号") + private String cardNo; + + /** 性别,男:MALE,女:FEMALE */ + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + @Excel(name = "性别,男:MALE,女:FEMALE") + private String sex; + + /** 住址 */ + @ApiModelProperty(value = "住址") + @Excel(name = "住址") + private String address; + + /** 微信小程序openid,微信小程序唯一标识 */ + @ApiModelProperty(value = "微信小程序openid,微信小程序唯一标识") + @Excel(name = "微信小程序openid,微信小程序唯一标识") + private String openId; + + /** 微信unionid,微信小程序和微信公众号统一标识 */ + @ApiModelProperty(value = "微信unionid,微信小程序和微信公众号统一标识") + @Excel(name = "微信unionid,微信小程序和微信公众号统一标识") + private String unionId; + + /** 微信公众号openid,微信公众号唯一标识 */ + @ApiModelProperty(value = "微信公众号openid,微信公众号唯一标识") + @Excel(name = "微信公众号openid,微信公众号唯一标识") + private String officialAccountOpenid; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java new file mode 100644 index 00000000..ef213555 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java @@ -0,0 +1,114 @@ +package com.xinelu.manage.domain.signpatientmanageroute; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 签约患者管理任务路径对象 sign_patient_manage_route + * + * @author haown + * @date 2024-03-18 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "签约患者管理任务路径对象", description = "sign_patient_manage_route") +public class SignPatientManageRoute extends BaseEntity { + private static final long serialVersionUID=1L; + + /** 主键id */ + private Long id; + + /** 签约记录表id */ + @ApiModelProperty(value = "签约记录表id") + @Excel(name = "签约记录表id") + private Long signPatientRecordId; + + /** 患者表id */ + @ApiModelProperty(value = "患者表id") + @Excel(name = "患者表id") + private Long patientId; + + /** 患者姓名 */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "患者姓名") + private String patientName; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + @Excel(name = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "所属科室名称") + private String departmentName; + + /** 所属服务包表id */ + @ApiModelProperty(value = "所属服务包表id") + @Excel(name = "所属服务包表id") + private Long servicePackageId; + + /** 服务包名称 */ + @ApiModelProperty(value = "服务包名称") + @Excel(name = "服务包名称") + private String packageName; + + /** 病种id */ + @ApiModelProperty(value = "病种id") + @Excel(name = "病种id") + private Long diseaseTypeId; + + /** 病种名称 */ + @ApiModelProperty(value = "病种名称") + @Excel(name = "病种名称") + private String diseaseTypeName; + + /** 路径主键 */ + @ApiModelProperty(value = "路径主键") + @Excel(name = "路径主键", readConverterExp = "路径主键") + private Long routeId; + + /** 路径名称(任务名称) */ + @ApiModelProperty(value = "路径名称") + @Excel(name = "路径名称", readConverterExp = "任=务名称") + private String routeName; + + /** 任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE */ + @ApiModelProperty(value = "任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE") + @Excel(name = "任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE") + private String taskCreateType; + + /** 版本号 */ + @ApiModelProperty(value = "版本号") + @Excel(name = "版本号") + private String version; + + /** 路径分类(任务分类),全部:ALL,科室管理路径:DEPARTMENT_MANAGE_PATH,专病管理路径:SPECIAL_DIEASE_MANAGE_PATH */ + @ApiModelProperty(value = "路径分类") + @Excel(name = "路径分类", readConverterExp = "任=务分类") + private String routeClassify; + + /** 适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE */ + @ApiModelProperty(value = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE") + @Excel(name = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE") + private String suitRange; + + /** 排序 */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Integer routeSort; + + /** 备注信息 */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String routeRemark; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java new file mode 100644 index 00000000..f3c28637 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java @@ -0,0 +1,313 @@ +package com.xinelu.manage.domain.signpatientmanageroutenode; + +import com.fasterxml.jackson.annotation.JsonFormat; +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.LocalDateTime; +import java.time.LocalTime; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 签约患者管理任务路径节点对象 sign_patient_manage_route_node + * + * @author haown + * @date 2024-03-18 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "签约患者管理任务路径节点对象", description = "sign_patient_manage_route_node") +public class SignPatientManageRouteNode extends BaseEntity { + private static final long serialVersionUID=1L; + + /** 主键id */ + private Long id; + + /** 签约患者管理任务表id */ + @ApiModelProperty(value = "签约患者管理任务表id") + @Excel(name = "签约患者管理任务表id") + private Long manageRouteId; + + /** 路径名称(任务名称) */ + @ApiModelProperty(value = "路径名称") + @Excel(name = "路径名称", readConverterExp = "任=务名称") + private String manageRouteName; + + /** 管理路径节点名称 */ + @ApiModelProperty(value = "管理路径节点名称") + @Excel(name = "管理路径节点名称") + private String routeNodeName; + + /** 管理路径节点时间,时间单位为:天 */ + @ApiModelProperty(value = "管理路径节点时间,时间单位为:天") + @Excel(name = "管理路径节点时间,时间单位为:天") + private Integer routeNodeDay; + + /** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */ + @ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + @Excel(name = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + private String taskType; + + /** 任务状态 */ + @ApiModelProperty(value = "任务状态") + @Excel(name = "任务状态") + private String taskStatus; + + /** 任务细分 */ + @ApiModelProperty(value = "任务细分") + @Excel(name = "任务细分") + private String taskSubdivision; + + /** 二级分类描述 */ + @ApiModelProperty(value = "二级分类描述") + @Excel(name = "二级分类描述") + private String secondClassifyDescribe; + + /** 执行时间,格式:HH:mm */ + @ApiModelProperty(value = "执行时间,格式:HH:mm") + @JsonFormat(pattern = "HH:mm") + @Excel(name = "执行时间,格式:HH:mm", width = 30, dateFormat = "yyyy-MM-dd") + private LocalTime executeTime; + + /** 电话推送标识,0:未开启,1:已开启 */ + @ApiModelProperty(value = "电话推送标识,0:未开启,1:已开启") + @Excel(name = "电话推送标识,0:未开启,1:已开启") + private Integer phonePushSign; + + /** 电话话术表id */ + @ApiModelProperty(value = "电话话术表id") + @Excel(name = "电话话术表id") + private Long phoneId; + + /** 电话模板ID */ + @ApiModelProperty(value = "电话模板ID") + @Excel(name = "电话模板ID") + private String phoneTemplateId; + + /** 电话模板名称 */ + @ApiModelProperty(value = "电话模板名称") + @Excel(name = "电话模板名称") + private String phoneTemplateName; + + /** 电话内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "电话内容") + @Excel(name = "电话内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String phoneNodeContent; + + /** 电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY */ + @ApiModelProperty(value = "电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY") + @Excel(name = "电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY") + private String phoneRedialTimes; + + /** 电话时间间隔,单位为:分钟 */ + @ApiModelProperty(value = "电话时间间隔,单位为:分钟") + @Excel(name = "电话时间间隔,单位为:分钟") + private Integer phoneTimeInterval; + + /** 电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE */ + @ApiModelProperty(value = "电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE") + @Excel(name = "电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE") + private String phoneMessageRemind; + + /** 电话短信模板表id */ + @ApiModelProperty(value = "电话短信模板表id") + @Excel(name = "电话短信模板表id") + private Long phoneMessageTemplateId; + + /** 电话短信模板名称 */ + @ApiModelProperty(value = "电话短信模板名称") + @Excel(name = "电话短信模板名称") + private String phoneMessageTemplateName; + + /** 问卷表id */ + @ApiModelProperty(value = "问卷表id") + @Excel(name = "问卷表id") + private Long questionInfoId; + + /** 问卷模板名称 */ + @ApiModelProperty(value = "问卷模板名称") + @Excel(name = "问卷模板名称") + private String questionnaireName; + + /** 问卷模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "问卷模板内容") + @Excel(name = "问卷模板内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String questionnaireContent; + + /** 问卷有效期,单位:天 */ + @ApiModelProperty(value = "问卷有效期,单位:天") + @Excel(name = "问卷有效期,单位:天") + private Integer questionExpirationDate; + + /** 宣教文章表id */ + @ApiModelProperty(value = "宣教文章表id") + @Excel(name = "宣教文章表id") + private Long propagandaInfoId; + + /** 宣教文章模板标题(宣教模板名称) */ + @ApiModelProperty(value = "宣教文章模板标题") + @Excel(name = "宣教文章模板标题", readConverterExp = "宣=教模板名称") + private String propagandaTitle; + + /** 宣教文章内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "宣教文章内容") + @Excel(name = "宣教文章内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String propagandaContent; + + /** 短信推送标识,0:未开启,1:已开启 */ + @ApiModelProperty(value = "短信推送标识,0:未开启,1:已开启") + @Excel(name = "短信推送标识,0:未开启,1:已开启") + private Integer messagePushSign; + + /** 短信模板表id */ + @ApiModelProperty(value = "短信模板表id") + @Excel(name = "短信模板表id") + private Long messageTemplateId; + + /** 短信模板名称 */ + @ApiModelProperty(value = "短信模板名称") + @Excel(name = "短信模板名称") + private String messageTemplateName; + + /** 短信预览 */ + @ApiModelProperty(value = "短信预览") + @Excel(name = "短信预览") + private String messagePreview; + + /** 短信节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "短信节点内容") + @Excel(name = "短信节点内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String messageNodeContent; + + /** 公众号推送标识,0:未开启,1:已开启 */ + @ApiModelProperty(value = "公众号推送标识,0:未开启,1:已开启") + @Excel(name = "公众号推送标识,0:未开启,1:已开启") + private Integer officialPushSign; + + /** 公众号模板表id */ + @ApiModelProperty(value = "公众号模板表id") + @Excel(name = "公众号模板表id") + private Long officialTemplateId; + + /** 公众号模板名称 */ + @ApiModelProperty(value = "公众号模板名称") + @Excel(name = "公众号模板名称") + private String officialTemplateName; + + /** 公众号提醒内容 */ + @ApiModelProperty(value = "公众号提醒内容") + @Excel(name = "公众号提醒内容") + private String officialRemindContent; + + /** 公众号节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "公众号节点内容") + @Excel(name = "公众号节点内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String officialNodeContent; + + /** 小程序推送标识,0:未开启,1:已开启 */ + @ApiModelProperty(value = "小程序推送标识,0:未开启,1:已开启") + @Excel(name = "小程序推送标识,0:未开启,1:已开启") + private Integer appletPushSign; + + /** 小程序模板表id */ + @ApiModelProperty(value = "小程序模板表id") + @Excel(name = "小程序模板表id") + private Long appletTemplateId; + + /** 小程序模板名称 */ + @ApiModelProperty(value = "小程序模板名称") + @Excel(name = "小程序模板名称") + private String appletTemplateName; + + /** 小程序提醒内容 */ + @ApiModelProperty(value = "小程序提醒内容") + @Excel(name = "小程序提醒内容") + private String appletRemindContent; + + /** 小程序提示说明 */ + @ApiModelProperty(value = "小程序提示说明") + @Excel(name = "小程序提示说明") + private String appletPromptDescription; + + /** 小程序节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "小程序节点内容") + @Excel(name = "小程序节点内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String appletNodeContent; + + /** 人工随访模板表id */ + @ApiModelProperty(value = "人工随访模板表id") + @Excel(name = "人工随访模板表id") + private Long followTemplateId; + + /** 人工随访模板名称 */ + @ApiModelProperty(value = "人工随访模板名称") + @Excel(name = "人工随访模板名称") + private String followTemplateName; + + /** 人工随访模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ + @ApiModelProperty(value = "人工随访模板内容") + @Excel(name = "人工随访模板内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记") + private String followContent; + + /** 节点审核状态,同意:AGREE,不同意:DISAGREE */ + @ApiModelProperty(value = "节点审核状态,同意:AGREE,不同意:DISAGREE") + @Excel(name = "节点审核状态,同意:AGREE,不同意:DISAGREE") + private String routeCheckStatus; + + /** 节点审核人姓名 */ + @ApiModelProperty(value = "节点审核人姓名") + @Excel(name = "节点审核人姓名") + private String routeCheckPerson; + + /** 节点审核时间 */ + @ApiModelProperty(value = "节点审核时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "节点审核时间", width = 30, dateFormat = "yyyy-MM-dd") + private LocalDateTime routeCheckDate; + + /** 节点审核备注信息,存储审核备注信息以及审核不通过原因等信息 */ + @ApiModelProperty(value = "节点审核备注信息,存储审核备注信息以及审核不通过原因等信息") + @Excel(name = "节点审核备注信息,存储审核备注信息以及审核不通过原因等信息") + private String routeCheckRemark; + + /** 备注信息 */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String routeNodeRemark; + + /** 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED */ + @ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED") + @Excel(name = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED") + private String nodeExecuteStatus; + + /** 任务处理信息 */ + @ApiModelProperty(value = "任务处理信息") + @Excel(name = "任务处理信息") + private String routeHandleRemark; + + /** 任务处理人id */ + @ApiModelProperty(value = "任务处理人id") + @Excel(name = "任务处理人id") + private Long routeHandleId; + + /** 任务处理人姓名 */ + @ApiModelProperty(value = "任务处理人姓名") + @Excel(name = "任务处理人姓名") + private String routeHandlePerson; + + /** 任务链接 */ + @ApiModelProperty(value = "任务链接") + @Excel(name = "任务链接") + private String routeLink; + + /** 文字提醒内容 */ + @ApiModelProperty(value = "文字提醒内容") + @Excel(name = "文字提醒内容") + private String textRemindContent; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java index 22441b64..6e511aff 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java @@ -6,7 +6,7 @@ import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import java.util.Date; +import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -64,17 +64,26 @@ public class SignPatientPackage extends BaseEntity { @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 Date serviceStartTime; + private LocalDateTime serviceStartTime; /** 服务结束时间,格式: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 Date serviceEndTime; + private LocalDateTime serviceEndTime; - /** 服务周期,单位是月 */ - @ApiModelProperty(value = "服务周期,单位是月") - @Excel(name = "服务周期,单位是月") - private Integer serviceCycle; + /** + * 服务包期限 + */ + @ApiModelProperty(value = "服务包期限") + @Excel(name = "服务包期限") + private Integer packageTerm; + + /** + * 服务包期限单位,年,月,日 + */ + @ApiModelProperty(value = "服务包期限单位,年,月,日") + @Excel(name = "服务包期限单位,年,月,日") + private String packageTermUnit; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java index 4f77fa36..cd030ed7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java @@ -4,15 +4,14 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.Date; - /** * 患者签约记录表 * @@ -67,7 +66,7 @@ public class SignPatientRecord extends BaseEntity { */ @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; + private LocalDate birthDate; /** * 签约时间,格式:yyyy-MM-dd HH:mm:ss @@ -173,7 +172,7 @@ public class SignPatientRecord extends BaseEntity { * 加入意向时间(意向签约) */ @ApiModelProperty(value = "加入意向时间(意向签约)") - private Date intentionalTime; + private LocalDateTime intentionalTime; /** * 开单医生id(意向签约) @@ -191,7 +190,7 @@ public class SignPatientRecord extends BaseEntity { * 提交时间(待续签) */ @ApiModelProperty(value = "提交时间(待续签)") - private Date submissionTime; + private LocalDateTime submissionTime; /** * 金额 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java new file mode 100644 index 00000000..fa449bde --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java @@ -0,0 +1,69 @@ +package com.xinelu.manage.domain.signroutetriggercondition; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 签约患者管理任务(路径)触发条件关系对象 sign_route_trigger_condition + * + * @author haown + * @date 2024-03-18 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "签约患者管理任务(路径)触发条件关系对象", description = "sign_route_trigger_condition") +public class SignRouteTriggerCondition extends BaseEntity { + + private static final long serialVersionUID=1L; + + /** 主键id */ + private Long id; + + /** 签约患者管理任务表id */ + @ApiModelProperty(value = "签约患者管理任务表id") + @Excel(name = "签约患者管理任务表id") + private Long patientManageRouteId; + + /** 路径名称(任务名称) */ + @ApiModelProperty(value = "路径名称") + @Excel(name = "路径名称", readConverterExp = "任=务名称") + private String routeName; + + /** 触发条件编码 */ + @ApiModelProperty(value = "触发条件编码") + @Excel(name = "触发条件编码") + private String triggerConditionCode; + + /** 触发条件名称,诊断:DIAGNOSIS,换药日期:DRESSING_CHANGE_DATE,治疗方式:TREATMENT_METHOD,手术名称:SURGICAL_NAME,药品名称:DRUG_NAME */ + @ApiModelProperty(value = "触发条件名称,诊断:DIAGNOSIS,换药日期:DRESSING_CHANGE_DATE,治疗方式:TREATMENT_METHOD,手术名称:SURGICAL_NAME,药品名称:DRUG_NAME") + @Excel(name = "触发条件名称,诊断:DIAGNOSIS,换药日期:DRESSING_CHANGE_DATE,治疗方式:TREATMENT_METHOD,手术名称:SURGICAL_NAME,药品名称:DRUG_NAME") + private String triggerConditionName; + + /** 触发条件运算符,包含:CONTAIN,不包含:NOT_CONTAIN,等于:EQUAL_TO,不等于:NOT_EQUAL_TO */ + @ApiModelProperty(value = "触发条件运算符,包含:CONTAIN,不包含:NOT_CONTAIN,等于:EQUAL_TO,不等于:NOT_EQUAL_TO") + @Excel(name = "触发条件运算符,包含:CONTAIN,不包含:NOT_CONTAIN,等于:EQUAL_TO,不等于:NOT_EQUAL_TO") + private String triggerConditionOperator; + + /** 触发条件值 */ + @ApiModelProperty(value = "触发条件值") + @Excel(name = "触发条件值") + private String triggerConditionValue; + + /** 排序 */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Integer triggerConditionSort; + + /** 备注信息 */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String triggerConditionRemark; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasenode/SpecialDiseaseNode.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasenode/SpecialDiseaseNode.java index d681e802..3c3b3e89 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasenode/SpecialDiseaseNode.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasenode/SpecialDiseaseNode.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.time.LocalTime; import java.util.Date; /** @@ -93,9 +94,9 @@ public class SpecialDiseaseNode extends BaseEntity { * 执行时间,格式:HH:mm */ @ApiModelProperty(value = "执行时间,格式:HH:mm") - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "执行时间,格式:HH:mm", width = 30, dateFormat = "yyyy-MM-dd") - private Date executionTime; + @JsonFormat(pattern = "HH:mm") + @Excel(name = "执行时间,格式:HH:mm", width = 30, dateFormat = "HH:mm") + private LocalTime executionTime; /** * 模板表id @@ -315,6 +316,13 @@ public class SpecialDiseaseNode extends BaseEntity { @Excel(name = "节点审核备注信息,存储审核备注信息以及审核不通过原因等信息") private String routeCheckRemark; + /** + * 节点内容 + */ + @ApiModelProperty(value = "节点内容") + @Excel(name = "节点内容") + private String nodeContent; + @Override public String toString() { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseaseroute/SpecialDiseaseRoute.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseaseroute/SpecialDiseaseRoute.java new file mode 100644 index 00000000..0933997d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseaseroute/SpecialDiseaseRoute.java @@ -0,0 +1,140 @@ +package com.xinelu.manage.domain.specialdiseaseroute; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 专病路径信息对象 special_disease_route + * + * @author xinelu + * @date 2024-03-13 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "专病路径信息对象", description = "special_disease_route") +public class SpecialDiseaseRoute extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 所属科室id + */ + @ApiModelProperty(value = "所属科室id") + @Excel(name = "所属科室id") + private Long departmentId; + + /** + * 所属科室名称 + */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "所属科室名称") + private String departmentName; + + /** + * 病种id + */ + @ApiModelProperty(value = "病种id") + @Excel(name = "病种id") + private Long diseaseTypeId; + + /** + * 病种名称 + */ + @ApiModelProperty(value = "病种名称") + @Excel(name = "病种名称") + private String diseaseTypeName; + + /** + * 路径名称 + */ + @ApiModelProperty(value = "路径名称") + @Excel(name = "路径名称") + private String routeName; + + /** + * 路径编码 + */ + @ApiModelProperty(value = "路径编码") + @Excel(name = "路径编码") + private String routeCode; + + /** + * 版本号 + */ + @ApiModelProperty(value = "版本号") + @Excel(name = "版本号") + private String version; + + /** + * 路径分类,全部:ALL,科室管理路径:DEPARTMENT_MANAGE_PATH,专病管理路径:SPECIAL_DIEASE_MANAGE_PATH + */ + @ApiModelProperty(value = "路径分类,全部:ALL,科室管理路径:DEPARTMENT_MANAGE_PATH,专病管理路径:SPECIAL_DIEASE_MANAGE_PATH") + @Excel(name = "路径分类,全部:ALL,科室管理路径:DEPARTMENT_MANAGE_PATH,专病管理路径:SPECIAL_DIEASE_MANAGE_PATH") + private String routeClassify; + + /** + * 发布状态,全部:ALL,已发布:PUBLISHED,未发布:UNPUBLISHED + */ + @ApiModelProperty(value = "发布状态,全部:ALL,已发布:PUBLISHED,未发布:UNPUBLISHED") + @Excel(name = "发布状态,全部:ALL,已发布:PUBLISHED,未发布:UNPUBLISHED") + private String releaseStatus; + + /** + * 适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE + */ + @ApiModelProperty(value = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE") + @Excel(name = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE") + private String suitRange; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Long routeSort; + + /** + * 备注信息 + */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String routeRemark; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("departmentId", getDepartmentId()) + .append("departmentName", getDepartmentName()) + .append("diseaseTypeId", getDiseaseTypeId()) + .append("diseaseTypeName", getDiseaseTypeName()) + .append("routeName", getRouteName()) + .append("routeCode", getRouteCode()) + .append("version", getVersion()) + .append("routeClassify", getRouteClassify()) + .append("releaseStatus", getReleaseStatus()) + .append("suitRange", getSuitRange()) + .append("routeSort", getRouteSort()) + .append("routeRemark", getRouteRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasetriggercondition/SpecialDiseaseTriggerCondition.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasetriggercondition/SpecialDiseaseTriggerCondition.java new file mode 100644 index 00000000..c275abd4 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/specialdiseasetriggercondition/SpecialDiseaseTriggerCondition.java @@ -0,0 +1,108 @@ +package com.xinelu.manage.domain.specialdiseasetriggercondition; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 触发条件关系对象 special_disease_trigger_condition + * + * @author xinelu + * @date 2024-03-18 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "触发条件关系对象", description = "special_disease_trigger_condition") +public class SpecialDiseaseTriggerCondition extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 专病路径表id + */ + @ApiModelProperty(value = "专病路径表id") + @Excel(name = "专病路径表id") + private Long routeId; + + /** + * 路径名称 + */ + @ApiModelProperty(value = "路径名称") + @Excel(name = "路径名称") + private String routeName; + + /** + * 触发条件编码 + */ + @ApiModelProperty(value = "触发条件编码") + @Excel(name = "触发条件编码") + private String triggerConditionCode; + + /** + * 触发条件名称,诊断:DIAGNOSIS,换药日期:DRESSING_CHANGE_DATE,治疗方式:TREATMENT_METHOD,手术名称:SURGICAL_NAME,药品名称:DRUG_NAME + */ + @ApiModelProperty(value = "触发条件名称,诊断:DIAGNOSIS,换药日期:DRESSING_CHANGE_DATE,治疗方式:TREATMENT_METHOD,手术名称:SURGICAL_NAME,药品名称:DRUG_NAME") + @Excel(name = "触发条件名称,诊断:DIAGNOSIS,换药日期:DRESSING_CHANGE_DATE,治疗方式:TREATMENT_METHOD,手术名称:SURGICAL_NAME,药品名称:DRUG_NAME") + private String triggerConditionName; + + /** + * 触发条件运算符,包含:CONTAIN,不包含:NOT_CONTAIN,等于:EQUAL_TO,不等于:NOT_EQUAL_TO + */ + @ApiModelProperty(value = "触发条件运算符,包含:CONTAIN,不包含:NOT_CONTAIN,等于:EQUAL_TO,不等于:NOT_EQUAL_TO") + @Excel(name = "触发条件运算符,包含:CONTAIN,不包含:NOT_CONTAIN,等于:EQUAL_TO,不等于:NOT_EQUAL_TO") + private String triggerConditionOperator; + + /** + * 触发条件值 + */ + @ApiModelProperty(value = "触发条件值") + @Excel(name = "触发条件值") + private String triggerConditionValue; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Integer triggerConditionSort; + + /** + * 备注信息 + */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String triggerConditionRemark; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("routeId", getRouteId()) + .append("routeName", getRouteName()) + .append("triggerConditionCode", getTriggerConditionCode()) + .append("triggerConditionName", getTriggerConditionName()) + .append("triggerConditionOperator", getTriggerConditionOperator()) + .append("triggerConditionValue", getTriggerConditionValue()) + .append("triggerConditionSort", getTriggerConditionSort()) + .append("triggerConditionRemark", getTriggerConditionRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/taskpartitiondict/TaskPartitionDict.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/taskpartitiondict/TaskPartitionDict.java index bc262300..b2f1009e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/taskpartitiondict/TaskPartitionDict.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/taskpartitiondict/TaskPartitionDict.java @@ -12,9 +12,7 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import java.sql.Time; import java.time.LocalTime; -import java.util.Date; /** * 任务细分字典对象 task_partition_dict @@ -92,6 +90,19 @@ public class TaskPartitionDict extends BaseEntity { @Excel(name = "任务细分备注") private String taskPartitionRemark; + /** + * 任务细分模板内容 + */ + @ApiModelProperty(value = "任务细分模板内容") + @Excel(name = "任务细分模板内容") + private String taskPartitionContent; + + /** + * 模板类型 + */ + @ApiModelProperty(value = "模板类型") + @Excel(name = "模板类型") + private String templateType; @Override public String toString() { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/agency/HospitalDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/agency/HospitalDTO.java new file mode 100644 index 00000000..0642f197 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/agency/HospitalDTO.java @@ -0,0 +1,27 @@ +package com.xinelu.manage.dto.agency; + +import lombok.Data; + +@Data +public class HospitalDTO { + + /** + * 类型 + */ + private String nodeType; + + /** + * 医院id + */ + private Long hospitalId; + + /** + * 园区id + */ + private Long campusId; + + /** + * 科室id + */ + private Long departmentId; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/labelfieldcontent/LabelFieldContentAddDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/labelfieldcontent/LabelFieldContentAddDTO.java index c1e315a9..3b1f91ed 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/labelfieldcontent/LabelFieldContentAddDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/labelfieldcontent/LabelFieldContentAddDTO.java @@ -3,6 +3,7 @@ package com.xinelu.manage.dto.labelfieldcontent; import com.xinelu.common.custominterface.Insert; import com.xinelu.common.custominterface.Update; import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -16,6 +17,7 @@ import java.util.List; * @date : 2024/3/11 17:09 */ @Data +@ApiModel(value ="标签字段内容AddDTO") public class LabelFieldContentAddDTO { /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/materialsinfo/MaterialsInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/materialsinfo/MaterialsInfoDto.java index aab54f8e..e3ca78a4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/materialsinfo/MaterialsInfoDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/materialsinfo/MaterialsInfoDto.java @@ -1,11 +1,11 @@ package com.xinelu.manage.dto.materialsinfo; -import com.fasterxml.jackson.annotation.JsonFormat; import com.xinelu.common.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; /** * @description: 素材库查询传输对象 @@ -17,12 +17,12 @@ import lombok.Data; public class MaterialsInfoDto { @ApiModelProperty(value = "创建时间开始,yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date createTimeStart; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate createTimeStart; @ApiModelProperty(value = "创建时间结束,yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date createTimeEnd; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate createTimeEnd; /** 素材状态,已上架:LISTED,未上架:NOT_LISTED */ @ApiModelProperty(value = "素材状态,已上架:LISTED,未上架:NOT_LISTED") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientinfo/PatientInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientinfo/PatientInfoDto.java index 6bb3b936..25303c15 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientinfo/PatientInfoDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientinfo/PatientInfoDto.java @@ -2,7 +2,7 @@ package com.xinelu.manage.dto.patientinfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; /** @@ -51,8 +51,8 @@ public class PatientInfoDto { private String patientType; /** 主治医生 */ - @ApiModelProperty(value = "主治医生") - private String attendingPhysician; + @ApiModelProperty(value = "主治医生id") + private Long attendingPhysicianId; /** 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END */ @ApiModelProperty(value = "患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END") @@ -64,27 +64,27 @@ public class PatientInfoDto { /** 就诊时间开始(门诊患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "就诊时间开始") - private Date visitTimeStart; + private LocalDate visitDateStart; /** 就诊时间结束(门诊患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "就诊时间结束") - private Date visitTimeEnd; + private LocalDate visitDateEnd; /** 入院时间开始,时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "入院时间开始") - private Date admissionDateStart; + private LocalDate admissionTimeStart; /** 入院时间结束,时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "入院时间结束") - private Date admissionDateEnd; + private LocalDate admissionTimeEnd; /** 预约时间开始(预住院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "预约时间开始(预住院患者),时间格式:yyyy-MM-dd") - private Date appointmentDateStart; + private LocalDate appointmentDateStart; /** 预约时间开始(预住院患者),时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "预约时间结束(预住院患者),时间格式:yyyy-MM-dd") - private Date appointmentDateEnd; + private LocalDate appointmentDateEnd; /** 预约治疗组(取值以及枚举未知?) */ @ApiModelProperty(value = "预约治疗组(取值以及枚举未知?)") @@ -92,7 +92,7 @@ public class PatientInfoDto { /** 开证医生(预住院患者) */ @ApiModelProperty(value = "开证医生") - private String certificateIssuingDoctor; + private String certificateIssuingDoctorId; /** 登记号(预住院患者) */ @ApiModelProperty(value = "登记号(预住院患者)") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java index 94761bff..6de4d3e2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java @@ -1,9 +1,10 @@ package com.xinelu.manage.dto.patientvisitrecord; -import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; /** * @description: 患者就诊记录查询传输对象 @@ -13,24 +14,33 @@ import lombok.Data; @Data public class PatientVisitRecordDto { + /** 居民信息表id */ + @ApiModelProperty(value = "居民信息表id") + private Long residentId; + /** 患者表id */ @ApiModelProperty(value = "患者表id") private Long patientId; + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + @Excel(name = "所属医院id") + private Long hospitalAgencyId; + /** - * 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED + * 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL */ - @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") - private String visitType; + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; @ApiModelProperty(value = "住院/门诊号") private String inHospitalNumber; @ApiModelProperty(value = "就诊时间开始") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date visitDateStart; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate visitDateStart; @ApiModelProperty(value = "就诊时间结束") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date visitDateEnd; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate visitDateEnd; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java index 70ecb3cf..37396012 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java @@ -4,7 +4,8 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.xinelu.common.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; +import java.time.LocalDateTime; import lombok.Data; /** @@ -35,7 +36,12 @@ public class PatientVisitRecordImportDto { /** 入院时间,时间格式:yyyy-MM-dd */ @ApiModelProperty(value = "入院时间") @Excel(name = "入院时间") - private Date admissionDate; + private LocalDateTime admissionTime; + + /** 出院时间 */ + @ApiModelProperty(value = "出院时间") + @Excel(name = "出院时间") + private LocalDateTime dischargeTime; /** 身份证号 */ @ApiModelProperty(value = "身份证号") @@ -46,7 +52,7 @@ public class PatientVisitRecordImportDto { @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "出生日期") - private Date birthDate; + private LocalDate birthDate; /** 性别,男:MALE,女:FEMALE */ @@ -77,7 +83,7 @@ public class PatientVisitRecordImportDto { /** 主治医生 */ @ApiModelProperty(value = "主治医生") @Excel(name = "主治医生") - private String attendingPhysician; + private String attendingPhysicianName; @ApiModelProperty(value = "住院/门诊号") @Excel(name = "住院号") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordInfoSaveDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordInfoSaveDto.java new file mode 100644 index 00000000..cf30fa08 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordInfoSaveDto.java @@ -0,0 +1,128 @@ +package com.xinelu.manage.dto.patientvisitrecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.LocalDateTime; +import javax.validation.constraints.NotNull; +import lombok.Data; + +/** + * @description: 患者配置——就诊信息保存传输对象 + * @author: haown + * @create: 2024-03-13 14:46 + **/ +@ApiModel("患者配置——就诊信息保存传输对象") +@Data +public class PatientVisitRecordInfoSaveDto { + + /** 就诊信息表id */ + @ApiModelProperty(value = "就诊信息表id") + private Long id; + + /** 患者表id */ + @ApiModelProperty(value = "患者表id") + @NotNull(message = "患者数据不能为空") + private Long patientId; + + /** + * 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + @NotNull(message = "就诊类型不能为空") + private String visitMethod; + + /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") + @NotNull(message = "主要诊断不能为空") + private String mainDiagnosis; + + /** 就诊流水号 */ + @ApiModelProperty(value = "就诊流水号") + @NotNull(message = "就诊流水号不能为空") + private String visitSerialNumber; + + /** 主治医生id */ + @ApiModelProperty(value = "主治医生id") + @NotNull(message = "主治医生不能为空") + private Long attendingPhysicianId; + + /** 主治医生姓名 */ + @ApiModelProperty(value = "主治医生姓名") + private String attendingPhysicianName; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + @Excel(name = "所属医院id") + private Long hospitalAgencyId; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "所属医院名称") + private String hospitalAgencyName; + + /** 所属院区id */ + @ApiModelProperty(value = "所属院区id") + @Excel(name = "所属院区id") + private Long campusAgencyId; + + /** 所属院区名称 */ + @ApiModelProperty(value = "所属院区名称") + @Excel(name = "所属院区名称") + private String campusAgencyName; + + /** 所属科室id */ + @NotNull(message = "科室不能为空") + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + private String departmentName; + + /** 所属病区id */ + @ApiModelProperty(value = "所属病区id") + @Excel(name = "所属病区id") + private Long wardId; + + /** 所属病区名称 */ + @ApiModelProperty(value = "所属病区名称") + @Excel(name = "所属病区名称") + private String wardName; + + /** 入院时间 */ + @ApiModelProperty(value = "入院时间") + @NotNull(message = "入院时间不能为空") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime admissionTime; + + /** 出院时间 */ + @ApiModelProperty(value = "出院时间") + @NotNull(message = "出院时间不能为空") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime dischargeTime; + + @ApiModelProperty(value = "住院/门诊号") + private String inHospitalNumber; + + /** 入院病历信息,存储患者入院的整个病历信息 */ + @ApiModelProperty(value = "入院病历信息,存储患者入院的整个病历信息") + @NotNull(message = "入院病历不能为空") + private String inHospitalInfo; + + /** 出院病历信息,存储患者出院的整个病历信息 */ + @ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息") + private String outHospitalInfo; + + /** 手术名称 */ + @ApiModelProperty(value = "手术名称") + @Excel(name = "手术名称") + private String surgicalName; + + /** 手术记录 */ + @ApiModelProperty(value = "手术记录") + @Excel(name = "手术记录") + private String surgicalRecord; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java index 5f8a47f2..d42102d7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java @@ -2,74 +2,86 @@ package com.xinelu.manage.dto.patientvisitrecord; import com.fasterxml.jackson.annotation.JsonFormat; import com.xinelu.common.annotation.Excel; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; -import javax.validation.constraints.NotBlank; +import java.time.LocalDate; +import java.time.LocalDateTime; +import javax.validation.constraints.NotNull; import lombok.Data; /** - * @description: 患者配置——就诊信息保存传输对象 + * @description: 就诊记录保存传输对象 * @author: haown - * @create: 2024-03-13 14:46 + * @create: 2024-03-25 09:43 **/ -@ApiModel("患者配置——就诊信息保存传输对象") @Data public class PatientVisitRecordSaveDto { + /** 主键Id */ + private Long id; + /** 患者表id */ @ApiModelProperty(value = "患者表id") - @NotBlank(message = "患者数据不能为空") private Long patientId; - /** - * 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED - */ - @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") - @NotBlank(message = "就诊类型不能为空") - private String visitType; + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + @NotNull(message = "身份证号不能为空") + private String cardNo; - /** 主要诊断 */ - @ApiModelProperty(value = "主要诊断") - @NotBlank(message = "主要诊断不能为空") - private String mainDiagnosis; + /** 姓名 */ + @ApiModelProperty(value = "姓名") + private String patientName; - /** 就诊流水号 */ - @ApiModelProperty(value = "就诊流水号") - @NotBlank(message = "就诊流水号不能为空") - private String visitSerialNumber; + /** 患者电话 */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; - /** 主治医生id */ - @ApiModelProperty(value = "主治医生id") - @NotBlank(message = "主治医生不能为空") - private Long attendingPhysicianId; + /** 家属电话 */ + @ApiModelProperty(value = "家属电话") + private String familyMemberPhone; - /** 主治医生姓名 */ - @ApiModelProperty(value = "主治医生姓名") - private String attendingPhysicianName; + /** 地址 */ + @ApiModelProperty(value = "地址") + private String address; + + /** 性别,男:MALE,女:FEMALE */ + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + private String sex; + + /** 出生日期,格式:yyyy-MM-dd */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate birthDate; + + /** 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL */ + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + @NotNull(message = "就诊类型不能为空") + private String visitMethod; + + /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime visitDate; /** 所属医院id */ @ApiModelProperty(value = "所属医院id") - @Excel(name = "所属医院id") + @NotNull(message = "所属医院不能为空") private Long hospitalAgencyId; /** 所属医院名称 */ @ApiModelProperty(value = "所属医院名称") - @Excel(name = "所属医院名称") + @NotNull(message = "所属医院不能为空") private String hospitalAgencyName; /** 所属院区id */ @ApiModelProperty(value = "所属院区id") - @Excel(name = "所属院区id") private Long campusAgencyId; /** 所属院区名称 */ @ApiModelProperty(value = "所属院区名称") - @Excel(name = "所属院区名称") private String campusAgencyName; /** 所属科室id */ - @NotBlank(message = "科室不能为空") @ApiModelProperty(value = "所属科室id") private Long departmentId; @@ -77,34 +89,78 @@ public class PatientVisitRecordSaveDto { @ApiModelProperty(value = "所属科室名称") private String departmentName; + /** 所属病区id */ + @ApiModelProperty(value = "所属病区id") + private Long wardId; + + /** 所属病区名称 */ + @ApiModelProperty(value = "所属病区名称") + private String wardName; + + /** 主治医生id */ + @ApiModelProperty(value = "主治医生id") + private Long attendingPhysicianId; + + /** 主治医生姓名 */ + @ApiModelProperty(value = "主治医生姓名") + private String attendingPhysicianName; + + /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") + private String mainDiagnosis; + /** 入院时间 */ @ApiModelProperty(value = "入院时间") - @NotBlank(message = "入院时间不能为空") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date admissionTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime admissionTime; /** 出院时间 */ @ApiModelProperty(value = "出院时间") - @NotBlank(message = "出院时间不能为空") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date dischargeTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime dischargeTime; - @ApiModelProperty(value = "住院/门诊号") - private String inHospitalNumber; + /** _记录时间(入院记录) */ + @ApiModelProperty(value = "_记录时间") + @Excel(name = "_记录时间", readConverterExp = "入=院记录") + private LocalDateTime recordTime; + + /** 住院天数(出院记录),单位为:天 */ + @ApiModelProperty(value = "住院天数") + @Excel(name = "住院天数", readConverterExp = "出=院记录") + private Integer hospitalizationDays; /** 入院病历信息,存储患者入院的整个病历信息 */ @ApiModelProperty(value = "入院病历信息,存储患者入院的整个病历信息") - @NotBlank(message = "入院病历不能为空") private String inHospitalInfo; /** 出院病历信息,存储患者出院的整个病历信息 */ @ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息") - @NotBlank(message = "出院病历不能为空") private String outHospitalInfo; - /** 门诊记录信息(就诊记录-门诊记录) */ - @ApiModelProperty(value = "门诊记录信息") - @NotBlank(message = "门诊记录信息不能为空") - private String outpatientVisitInfo; + /** 就诊流水号 */ + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + /** 门诊/住院号 */ + @ApiModelProperty(value = "门诊/住院号") + @NotNull(message = "门诊/住院号不能为空") + private String inHospitalNumber; + + /** 责任护士 */ + @ApiModelProperty(value = "责任护士") + private String responsibleNurse; + + /** 手术名称 */ + @ApiModelProperty(value = "手术名称") + private String surgicalName; + + /** 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT, + 签约患者:CONTRACTED_PATIENT */ + @ApiModelProperty(value = "患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,签约患者:CONTRACTED_PATIENT") + @NotNull(message = "患者类型不能为空") + private String patientType; + + /** 手术记录 */ + @ApiModelProperty(value = "手术记录") + private String surgicalRecord; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectrecord/ProjectRecordDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectrecord/ProjectRecordDto.java index 93a12824..40e5de67 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectrecord/ProjectRecordDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectrecord/ProjectRecordDto.java @@ -2,7 +2,7 @@ package com.xinelu.manage.dto.projectrecord; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; /** @@ -30,11 +30,11 @@ public class ProjectRecordDto { * 检测时间 */ @ApiModelProperty("检测时间开始") - private Date measureTimeStart; + private LocalDate measureTimeStart; /** * 检测时间 */ @ApiModelProperty("检测时间结束") - private Date measureTimeEnd; + private LocalDate measureTimeEnd; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java index 46d22553..975a34d3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java @@ -3,7 +3,7 @@ package com.xinelu.manage.dto.projectresult; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; /** @@ -46,13 +46,13 @@ public class ProjectResultStatisticDto { */ @ApiModelProperty("检测时间开始") @JsonFormat(pattern = "yyyy-MM-dd") - private Date measureTimeStart; + private LocalDate measureTimeStart; /** * 检测时间结束 */ @ApiModelProperty("检测时间结束") @JsonFormat(pattern = "yyyy-MM-dd") - private Date measureTimeEnd; + private LocalDate measureTimeEnd; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoDto.java index 187cd252..b370cfa3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoDto.java @@ -1,11 +1,11 @@ package com.xinelu.manage.dto.propagandainfo; -import com.fasterxml.jackson.annotation.JsonFormat; import com.xinelu.common.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; /** * @description: 宣教库查询传输对象 @@ -55,13 +55,13 @@ public class PropagandaInfoDto { * 创建时间 */ @ApiModelProperty(value = "创建时间开始") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date createTimeStart; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate createTimeStart; /** * 创建时间 */ @ApiModelProperty(value = "创建时间结束") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date createTimeEnd; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate createTimeEnd; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoSaveDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoSaveDto.java new file mode 100644 index 00000000..e6d3e0e9 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/propagandainfo/PropagandaInfoSaveDto.java @@ -0,0 +1,97 @@ +package com.xinelu.manage.dto.propagandainfo; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.domain.materialsinfo.MaterialsInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.List; +import lombok.Data; + +/** + * @description: 宣教库保存传输对象 + * @author: haown + * @create: 2024-03-28 09:08 + **/ +@ApiModel("宣教库保存传输对象") +@Data +public class PropagandaInfoSaveDto { + + /** 主键id */ + @ApiModelProperty("主键id") + private Long id; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "所属医院名称") + private String hospitalAgencyName; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "所属科室名称") + private String departmentName; + + /** 宣教标题(宣教名称) */ + @ApiModelProperty(value = "宣教标题") + @Excel(name = "宣教标题", readConverterExp = "宣教名称") + private String propagandaTitle; + + /** 宣教类型,用药知识:MEDICATION_KNOWLEDGE,疾病科普:DISEASE_POPULARIZATION,运动营养:SPORT_NUTRITION,其他知识:OTHER_KNOWLEDGE, + 定制内容:CUSTOMIZED_CONTENT */ + @ApiModelProperty(value = "宣教类型,用药知识:MEDICATION_KNOWLEDGE,疾病科普:DISEASE_POPULARIZATION,运动营养:SPORT_NUTRITION,其他知识:OTHER_KNOWLEDGE,定制内容:CUSTOMIZED_CONTENT") + @Excel(name = "宣教类型,用药知识:MEDICATION_KNOWLEDGE,疾病科普:DISEASE_POPULARIZATION,运动营养:SPORT_NUTRITION,其他知识:OTHER_KNOWLEDGE,定制内容:CUSTOMIZED_CONTENT") + private String propagandaType; + + /** 宣教ID */ + @ApiModelProperty(value = "宣教ID") + private String propagandaCode; + + /** 宣教状态,创作中:CREATE_PROCESS,创作完成:CREATE_COMPLETE,审核中:IN_REVIEW,审核通过:APPROVED,审核不通过:REVIEW_FAILED */ + @ApiModelProperty(value = "宣教状态,创作中:CREATE_PROCESS,创作完成:CREATE_COMPLETE,审核中:IN_REVIEW,审核通过:APPROVED,审核不通过:REVIEW_FAILED") + @Excel(name = "宣教状态,创作中:CREATE_PROCESS,创作完成:CREATE_COMPLETE,审核中:IN_REVIEW,审核通过:APPROVED,审核不通过:REVIEW_FAILED") + private String propagandaStatus; + + /** 宣教正文内容 */ + @ApiModelProperty(value = "宣教正文内容") + private String propagandaContent; + + /** 宣教封面文件存放地址 */ + @ApiModelProperty(value = "宣教封面文件存放地址") + private String propagandaCoverPath; + + /** 宣教文章摘要 */ + @ApiModelProperty(value = "宣教文章摘要") + private String articleSummary; + + /** 语音播报 */ + @ApiModelProperty(value = "语音播报") + private String voicebroadcast; + + /** 所属病种id */ + @ApiModelProperty(value = "所属病种id") + private Long diseaseTypeId; + + /** 所属病种名称 */ + @ApiModelProperty(value = "所属病种名称") + @Excel(name = "所属病种名称") + private String diseaseTypeName; + + /** 宣教链接 */ + @ApiModelProperty(value = "宣教链接") + private String propagandaLink; + + /** 宣教二维码图片存放地址 */ + @ApiModelProperty(value = "宣教二维码图片存放地址") + private String propagandaBarcodePath; + + /** 所选素材对象列表 */ + @ApiModelProperty(value = "所选素材对象列表") + List materialsInfoList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java new file mode 100644 index 00000000..601d84c8 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java @@ -0,0 +1,62 @@ +package com.xinelu.manage.dto.signpatientpackage; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import javax.validation.constraints.NotNull; +import lombok.Data; + +/** + * @description: 居民签约服务包保存传输对象 + * @author: haown + * @create: 2024-03-18 14:35 + **/ +@ApiModel("居民签约服务包保存传输对象") +@Data +public class SignPatientPackageSaveDto { + + /** 服务包表id */ + @ApiModelProperty(value = "服务包表id") + @NotNull(message = "请选择服务包!") + private Long servicePackageId; + + /** 服务包名称 */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** 服务包缴费状态,已缴费:PAID,未交费:UNPAID_FEES */ + @ApiModelProperty(value = "服务包缴费状态,已缴费:PAID,未交费:UNPAID_FEES") + private String packagePaymentStatus; + + /** 服务包价格,小数点后两位 */ + @ApiModelProperty(value = "服务包价格,小数点后两位") + @NotNull(message = "服务包价格不能为空!") + private BigDecimal packagePrice; + + /** 服务开始时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "服务开始时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "服务开始时间不能为空!") + private LocalDate serviceStartTime; + + /** 服务结束时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "服务结束时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "服务结束时间不能为空!") + private LocalDate serviceEndTime; + + /** + * 服务包周期 + */ + @ApiModelProperty(value = "服务包周期") + private Integer packageTerm; + + /** + * 服务包周期单位,年,月,日 + */ + @ApiModelProperty(value = "服务包周期单位,年,月,日") + private String packageTermUnit; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/IntentionalSignDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/IntentionalSignDto.java new file mode 100644 index 00000000..e92e9278 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/IntentionalSignDto.java @@ -0,0 +1,32 @@ +package com.xinelu.manage.dto.signpatientrecord; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.NotNull; +import lombok.Data; + +/** + * @description: 意向签约传输对象 + * @author: haown + * @create: 2024-03-28 16:51 + **/ +@ApiModel("意向签约传输对象") +@Data +public class IntentionalSignDto { + + @ApiModelProperty("患者信息表id") + @NotNull(message = "患者信息不能为空") + private Long patientId; + + @ApiModelProperty("开单医生id(意向签约)") + @NotNull(message = "开单医生不能为空") + private Long billingDoctorId; + + @ApiModelProperty("开单医生姓名(意向签约)") + @NotNull(message = "开单医生不能为空") + private String billingDoctorName; + + @ApiModelProperty("意向来源(意向签约,字典枚举),DOCTOR_BILLING:医生开单") + @NotNull(message = "意向来源不能为空") + private String intentionalSource; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java index 31971f04..4478d7d4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java @@ -1,11 +1,13 @@ package com.xinelu.manage.dto.signpatientrecord; import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed; -import com.xinelu.manage.domain.signpatientpackage.SignPatientPackage; import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware; import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord; +import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto; import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.util.List; +import javax.validation.constraints.NotNull; import lombok.Data; /** @@ -19,10 +21,27 @@ public class SignPatientAddDto { private SignPatientRecord record; - private SignPatientPackage signPackage; + /** + * 服务包 + */ + @ApiModelProperty("服务包对象") + private SignPatientPackageSaveDto signPackage; + + /** + * 管理路径 + */ + @ApiModelProperty("管理路径id") + @NotNull(message = "请选择管理路径") + private Long routeId; + + @ApiModelProperty("管理路径名称") + private String routeName; private List devices; private List informeds; + @ApiModelProperty("签约类型,签约:sign, 续约:reSign") + private String signCategory; + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientListDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientListDto.java index 9932bf1c..55f710af 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientListDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientListDto.java @@ -3,7 +3,7 @@ package com.xinelu.manage.dto.signpatientrecord; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDate; import lombok.Data; /** @@ -42,13 +42,13 @@ public class SignPatientListDto { * 加入意向时间(意向签约) */ @ApiModelProperty(value = "加入意向时间开始(意向签约)") - private Date intentionalTimeStart; + private LocalDate intentionalTimeStart; /** * 加入意向时间(意向签约) */ @ApiModelProperty(value = "加入意向时间结束(意向签约)") - private Date intentionalTimeEnd; + private LocalDate intentionalTimeEnd; /** * 意向来源(意向签约,字典枚举) @@ -60,10 +60,10 @@ public class SignPatientListDto { * 签约时间,格式:yyyy-MM-dd */ @ApiModelProperty(value = "签约时间开始,格式:yyyy-MM-dd") - private Date signTimeStart; + private LocalDate signTimeStart; @ApiModelProperty(value = "签约时间结束,格式:yyyy-MM-dd") - private Date signTimeEnd; + private LocalDate signTimeEnd; /** * 签约时所属医院id */ @@ -102,10 +102,10 @@ public class SignPatientListDto { @ApiModelProperty(value = "服务结束时间开始") @JsonFormat(pattern = "yyyy-MM-dd") - private Date serviceEndTimeStart; + private LocalDate serviceEndTimeStart; @ApiModelProperty(value = "服务结束时间结束") @JsonFormat(pattern = "yyyy-MM-dd") - private Date serviceEndTimeEnd; + private LocalDate serviceEndTimeEnd; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseasetriggercondition/TriggerConditionDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseasetriggercondition/TriggerConditionDTO.java new file mode 100644 index 00000000..8aa35ae8 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseasetriggercondition/TriggerConditionDTO.java @@ -0,0 +1,21 @@ +package com.xinelu.manage.dto.specialdiseasetriggercondition; + +import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; +import lombok.Data; + +import java.util.List; + +/** + * 触发条件关系DTO + * + * @author xinelu + * @date 2024-03-18 + */ +@Data +public class TriggerConditionDTO { + + /** + * 触发条件集和 + */ + List triggerConditionList; +} \ No newline at end of file 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 9fe5aadc..b32368b3 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 @@ -62,20 +62,11 @@ public interface LabelFieldContentMapper { /** * 检查数据库中同一个fieldId下内容名称的重复性 - * - * @param fieldId - * @param contentName - * @return */ int existCountByFieldIdAndContentName(@Param("fieldId") Long fieldId, @Param("contentName") String contentName); /** * 检查除去当前记录外有没有重复内容名称 - * - * @param id - * @param fieldId - * @param contentName - * @return */ int existCountByContentNameExcludingId(@Param("id") Long id, @Param("fieldId") Long fieldId, @Param("contentName") String contentName); } 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 bc5a6a2d..43a9103e 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 @@ -62,20 +62,11 @@ public interface LabelFieldInfoMapper { /** * 检查同类型下有没有重复字段名称 - * - * @param fieldType - * @param fieldNames - * @return */ int countDuplicateFieldNamesByType(@Param("fieldType") String fieldType, @Param("fieldNames") List fieldNames); /** * 检查除当前记录外有没有同名的字段信息名称 - * - * @param id - * @param fieldType - * @param fieldName - * @return */ int countByFieldNameExcludingId(@Param("id") Long id, @Param("fieldType") String fieldType, @Param("fieldName") String fieldName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java index 610832d3..acb1a27e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java @@ -62,20 +62,11 @@ public interface OperationInfoMapper { /** * 检查所属科室下手术名称是否重复 - * - * @param departmentId - * @param operationName - * @return */ int countByDepartmentIdAndOperationName(@Param("departmentId") Long departmentId, @Param("operationName") String operationName); /** * 检查除当前记录之外是否存在同名的手术名称 - * - * @param id - * @param departmentId - * @param operationName - * @return */ int countByOperationNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("operationName") String operationName); } 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 9b1a290a..632f27e0 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 @@ -2,6 +2,8 @@ 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; /** @@ -19,6 +21,14 @@ public interface PatientInfoMapper { */ public PatientInfo selectPatientInfoById(Long id); + /** + * 查询患者信息 + * + * @param id 主键id + * @return 患者信息 + */ + public PatientBaseInfoVo getPatientBaseInfo(Long id); + /** * 查询患者信息列表 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionoptionresult/PatientQuestionOptionResultMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionoptionresult/PatientQuestionOptionResultMapper.java new file mode 100644 index 00000000..ed712d3a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionoptionresult/PatientQuestionOptionResultMapper.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.mapper.patientquestionoptionresult; + +import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult; + +import java.util.List; + +/** + * 患者问卷题目选项提交结果信息Mapper接口 + * + * @author xinelu + * @date 2024-03-28 + */ +public interface PatientQuestionOptionResultMapper { + /** + * 查询患者问卷题目选项提交结果信息 + * + * @param id 患者问卷题目选项提交结果信息主键 + * @return 患者问卷题目选项提交结果信息 + */ + PatientQuestionOptionResult selectPatientQuestionOptionResultById(Long id); + + /** + * 查询患者问卷题目选项提交结果信息列表 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 患者问卷题目选项提交结果信息集合 + */ + List selectPatientQuestionOptionResultList(PatientQuestionOptionResult patientQuestionOptionResult); + + /** + * 新增患者问卷题目选项提交结果信息 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 结果 + */ + int insertPatientQuestionOptionResult(PatientQuestionOptionResult patientQuestionOptionResult); + + /** + * 修改患者问卷题目选项提交结果信息 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 结果 + */ + int updatePatientQuestionOptionResult(PatientQuestionOptionResult patientQuestionOptionResult); + + /** + * 删除患者问卷题目选项提交结果信息 + * + * @param id 患者问卷题目选项提交结果信息主键 + * @return 结果 + */ + int deletePatientQuestionOptionResultById(Long id); + + /** + * 批量删除患者问卷题目选项提交结果信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deletePatientQuestionOptionResultByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionsubjectresult/PatientQuestionSubjectResultMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionsubjectresult/PatientQuestionSubjectResultMapper.java new file mode 100644 index 00000000..ad7264a4 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionsubjectresult/PatientQuestionSubjectResultMapper.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.mapper.patientquestionsubjectresult; + +import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult; + +import java.util.List; + +/** + * 患者问卷题目提交结果信息Mapper接口 + * + * @author xinelu + * @date 2024-03-28 + */ +public interface PatientQuestionSubjectResultMapper { + /** + * 查询患者问卷题目提交结果信息 + * + * @param id 患者问卷题目提交结果信息主键 + * @return 患者问卷题目提交结果信息 + */ + PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id); + + /** + * 查询患者问卷题目提交结果信息列表 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 患者问卷题目提交结果信息集合 + */ + List selectPatientQuestionSubjectResultList(PatientQuestionSubjectResult patientQuestionSubjectResult); + + /** + * 新增患者问卷题目提交结果信息 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 结果 + */ + int insertPatientQuestionSubjectResult(PatientQuestionSubjectResult patientQuestionSubjectResult); + + /** + * 修改患者问卷题目提交结果信息 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 结果 + */ + int updatePatientQuestionSubjectResult(PatientQuestionSubjectResult patientQuestionSubjectResult); + + /** + * 删除患者问卷题目提交结果信息 + * + * @param id 患者问卷题目提交结果信息主键 + * @return 结果 + */ + int deletePatientQuestionSubjectResultById(Long id); + + /** + * 批量删除患者问卷题目提交结果信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deletePatientQuestionSubjectResultByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.java new file mode 100644 index 00000000..35b296f4 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.java @@ -0,0 +1,70 @@ +package com.xinelu.manage.mapper.patientquestionsubmitresult; + +import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult; +import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultDTO; + +import java.util.List; + +/** + * 患者问卷提交结果信息Mapper接口 + * + * @author xinelu + * @date 2024-03-28 + */ +public interface PatientQuestionSubmitResultMapper { + /** + * 查询患者问卷提交结果信息 + * + * @param id 患者问卷提交结果信息主键 + * @return 患者问卷提交结果信息 + */ + PatientQuestionSubmitResult selectPatientQuestionSubmitResultById(Long id); + + /** + * 查询患者问卷提交结果信息列表 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 患者问卷提交结果信息集合 + */ + List selectPatientQuestionSubmitResultList(PatientQuestionSubmitResult patientQuestionSubmitResult); + + /** + * 新增患者问卷提交结果信息 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 结果 + */ + int insertPatientQuestionSubmitResult(PatientQuestionSubmitResult patientQuestionSubmitResult); + + /** + * 修改患者问卷提交结果信息 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 结果 + */ + int updatePatientQuestionSubmitResult(PatientQuestionSubmitResult patientQuestionSubmitResult); + + /** + * 删除患者问卷提交结果信息 + * + * @param id 患者问卷提交结果信息主键 + * @return 结果 + */ + int deletePatientQuestionSubmitResultById(Long id); + + /** + * 批量删除患者问卷提交结果信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deletePatientQuestionSubmitResultByIds(Long[] ids); + + /** + * 根据任务执行记录查询患者问卷信息 + * + * @param taskExecuteRecordId 患者管理任务执行记录表id + * @return PatientQuestionSubmitResultDTO + */ + PatientQuestionSubmitResultDTO selectResultByTaskExecuteRecordId(Long taskExecuteRecordId); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.java new file mode 100644 index 00000000..e603d004 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.java @@ -0,0 +1,78 @@ +package com.xinelu.manage.mapper.patienttaskexecuterecord; + +import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; +import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO; + +import java.util.List; + +/** + * 患者管理任务执行记录Mapper接口 + * + * @author xinelu + * @date 2024-03-25 + */ +public interface PatientTaskExecuteRecordMapper { + /** + * 查询患者管理任务执行记录 + * + * @param id 患者管理任务执行记录主键 + * @return 患者管理任务执行记录 + */ + PatientTaskExecuteRecord selectPatientTaskExecuteRecordById(Long id); + + /** + * 查询患者管理任务执行记录列表 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 患者管理任务执行记录集合 + */ + List selectPatientTaskExecuteRecordList(PatientTaskExecuteRecord patientTaskExecuteRecord); + + /** + * 查询患者管理任务执行记录列表 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 患者管理任务执行记录集合 + */ + List selectPatientAndExecuteRecordList(PatientTaskExecuteRecordVO patientTaskExecuteRecord); + + /** + * 新增患者管理任务执行记录 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 结果 + */ + int insertPatientTaskExecuteRecord(PatientTaskExecuteRecord patientTaskExecuteRecord); + + /** + * 修改患者管理任务执行记录 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 结果 + */ + int updatePatientTaskExecuteRecord(PatientTaskExecuteRecord patientTaskExecuteRecord); + + /** + * 删除患者管理任务执行记录 + * + * @param id 患者管理任务执行记录主键 + * @return 结果 + */ + int deletePatientTaskExecuteRecordById(Long id); + + /** + * 批量删除患者管理任务执行记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deletePatientTaskExecuteRecordByIds(Long[] ids); + + /** + * 根据患者信息查询就诊记录 + * + * @param id id + * @return AjaxResult + */ + PatientTaskExecuteRecordVO selectVisitRecord(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patienttaskpushrecord/PatientTaskPushRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patienttaskpushrecord/PatientTaskPushRecordMapper.java new file mode 100644 index 00000000..b211a25d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patienttaskpushrecord/PatientTaskPushRecordMapper.java @@ -0,0 +1,62 @@ +package com.xinelu.manage.mapper.patienttaskpushrecord; + +import com.xinelu.manage.domain.patienttaskpushrecord.PatientTaskPushRecord; + +import java.util.List; + + +/** + * 患者管理任务推送方式记录Mapper接口 + * + * @author xinelu + * @date 2024-03-21 + */ +public interface PatientTaskPushRecordMapper { + /** + * 查询患者管理任务推送方式记录 + * + * @param id 患者管理任务推送方式记录主键 + * @return 患者管理任务推送方式记录 + */ + public PatientTaskPushRecord selectPatientTaskPushRecordById(Long id); + + /** + * 查询患者管理任务推送方式记录列表 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 患者管理任务推送方式记录集合 + */ + List selectPatientTaskPushRecordList(PatientTaskPushRecord patientTaskPushRecord); + + /** + * 新增患者管理任务推送方式记录 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 结果 + */ + int insertPatientTaskPushRecord(PatientTaskPushRecord patientTaskPushRecord); + + /** + * 修改患者管理任务推送方式记录 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 结果 + */ + int updatePatientTaskPushRecord(PatientTaskPushRecord patientTaskPushRecord); + + /** + * 删除患者管理任务推送方式记录 + * + * @param id 患者管理任务推送方式记录主键 + * @return 结果 + */ + int deletePatientTaskPushRecordById(Long id); + + /** + * 批量删除患者管理任务推送方式记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deletePatientTaskPushRecordByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java index 3a1ffea2..0f90a271 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java @@ -1,10 +1,10 @@ package com.xinelu.manage.mapper.patientvisitrecord; -import org.apache.ibatis.annotations.Param; -import java.util.Collection; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; +import java.util.Collection; import java.util.List; +import org.apache.ibatis.annotations.Param; /** * 患者就诊记录基本信息Mapper接口 @@ -61,4 +61,15 @@ public interface PatientVisitRecordMapper { * @return 结果 */ public int deletePatientVisitRecordByIds(Long[] ids); + + PatientVisitRecord judgeRepeat(@Param("hospitalAgencyId") Long hospitalAgencyId, @Param("cardNo") String cardNo, + @Param("inHospitalNumber") String inHospitalNumber); + + /** + * 获取居民在当前机构最新一条就诊记录 + * @param hospitalAgencyId 机构id + * @param patientId 患者id + * @return 结果 + */ + PatientVisitRecord getLastRecord(@Param("hospitalAgencyId") Long hospitalAgencyId, @Param("patientId") Long patientId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java index 5684ed53..243dd006 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandainfo/PropagandaInfoMapper.java @@ -4,6 +4,7 @@ import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import java.util.List; /** @@ -21,6 +22,14 @@ public interface PropagandaInfoMapper { */ public PropagandaInfo selectPropagandaInfoById(Long id); + /** + * 查询宣教素材信息 + * + * @param id 宣教库管理主键 + * @return 宣教库管理 + */ + PropagandaMaterialsVo selectPropagandaInfo(Long id); + /** * 查询宣教库管理列表 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandamaterials/PropagandaMaterialsMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandamaterials/PropagandaMaterialsMapper.java index 4527c6aa..9b6eaa91 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandamaterials/PropagandaMaterialsMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/propagandamaterials/PropagandaMaterialsMapper.java @@ -35,6 +35,7 @@ public interface PropagandaMaterialsMapper { */ public int insertPropagandaMaterials(PropagandaMaterials propagandaMaterials); + /** * 修改宣教素材关系 * @@ -46,10 +47,26 @@ public interface PropagandaMaterialsMapper { /** * 删除宣教素材关系 * - * @param id 宣教素材关系主键 + * @param propagandaId 宣教库id * @return 结果 */ - public int deletePropagandaMaterialsById(Long id); + public int deleteByPropagandaId(Long propagandaId); + + /** + * 批量删除宣教素材关系 + * + * @param propagandaIds 宣教库id + * @return 结果 + */ + public int deleteByPropagandaIds(Long[] propagandaIds); + + /** + * 删除宣教素材关系 + * + * @param id 宣教素材关系 + * @return 结果 + */ + public int deletePropagandaMaterialsById(Long id); /** * 批量删除宣教素材关系 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java index 15a5d759..ae56a5a2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java @@ -1,6 +1,7 @@ package com.xinelu.manage.mapper.questioninfo; import com.xinelu.manage.domain.questioninfo.QuestionInfo; +import com.xinelu.manage.vo.department.DepartmentVO; import java.util.List; @@ -59,4 +60,13 @@ public interface QuestionInfoMapper { * @return 结果 */ int deleteQuestionInfoByIds(Long[] ids); + + + /** + * 科室路径数量 + * + * @param departmentName 科室名称 + * @return DepartmentVO + */ + List departmentQuestionByDepartmentName(String departmentName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java new file mode 100644 index 00000000..771126ec --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/residentinfo/ResidentInfoMapper.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.mapper.residentinfo; + +import com.xinelu.manage.domain.residentinfo.ResidentInfo; +import java.util.List; + + +/** + * 居民信息Mapper接口 + * + * @author haown + * @date 2024-03-27 + */ +public interface ResidentInfoMapper { + /** + * 查询居民信息 + * + * @param id 居民信息主键 + * @return 居民信息 + */ + public ResidentInfo selectResidentInfoById(Long id); + + /** + * 查询居民信息列表 + * + * @param residentInfo 居民信息 + * @return 居民信息集合 + */ + List selectResidentInfoList(ResidentInfo residentInfo); + + /** + * 新增居民信息 + * + * @param residentInfo 居民信息 + * @return 结果 + */ + int insertResidentInfo(ResidentInfo residentInfo); + + /** + * 修改居民信息 + * + * @param residentInfo 居民信息 + * @return 结果 + */ + int updateResidentInfo(ResidentInfo residentInfo); + + /** + * 删除居民信息 + * + * @param id 居民信息主键 + * @return 结果 + */ + int deleteResidentInfoById(Long id); + + /** + * 批量删除居民信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteResidentInfoByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java index 7ffea3d8..198b8d3d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java @@ -62,18 +62,11 @@ public interface ScriptInfoMapper { /** * 判断通用话术名称是否存在 - * - * @param scriptInfo - * @return */ int countByScriptInfo(ScriptInfo scriptInfo); /** * 检查是否存在除当前记录之外的同名记录 - * @param scriptName - * @param departmentId - * @param id - * @return */ - int countByScriptNameExcludingId(@Param("scriptName") String scriptName, @Param("departmentId") Long departmentId, @Param("id") Long id); + int countByScriptNameExcludingId(@Param("scriptName") String scriptName, @Param("departmentId") Long departmentId, @Param("id") Long id, @Param("commonScriptName") String commonScriptName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java index 11ce06d3..fe9f3206 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java @@ -65,53 +65,31 @@ public interface ServicePackageMapper { /** * 根据服务包id查询服务包详情信息 - * - * @param id - * @return */ ServicePackageDetailVO selectServicePackagesById(Long id); /** * 查询服务包列表 - * - * @param servicePackage - * @return */ List selectServicePackageLists(ServicePackage servicePackage); /** * 根据服务包id查询服务包内容 - * - * @param id - * @return */ - List selectServicePackageVOListById(Long id); + List selectServicePackageVoListById(Long id); /** * 判断所属科室下服务包名称是否存在 - * - * @param departmentId - * @param packageName - * @return */ int existNameCount(@Param("departmentId") Long departmentId, @Param("packageName") String packageName); /** * 修改服务包发布状态 - * - * @param id - * @param whetherRelease - * @return */ int editReleaseStatus(@Param("id") Long id, @Param("whetherRelease") Integer whetherRelease); /** * 检查除当前记录之外是否存在同名的服务包名称 - * - * @param id - * @param departmentId - * @param packageName - * @return */ int countByPackageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("packageName") String packageName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackagecontent/ServicePackageContentMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackagecontent/ServicePackageContentMapper.java index fa911f58..5d29a2e4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackagecontent/ServicePackageContentMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackagecontent/ServicePackageContentMapper.java @@ -63,43 +63,26 @@ public interface ServicePackageContentMapper { /** * 根据服务包id删除服务包内容 - * - * @param ids - * @return */ int deleteServicePackageContentByPackageIds(Long[] ids); /** * 根据服务包id和服务方式名称查询服务方式是否存在 - * - * @param id - * @param serviceWayName - * @return */ Long countByPackageIdAndServiceWayName(@Param("id") Long id, @Param("serviceWayName") String serviceWayName); /** * 根据服务方式id和服务内容查询服务内容是否存在 - * - * @param serviceWayId - * @param serviceContent - * @return */ Long countByServiceWayIdAndServiceContent(@Param("serviceWayId") Long serviceWayId, @Param("serviceContent") String serviceContent); /** * 根据服务内容id和服务频次查询服务频次是否存在 - * - * @param serviceContentId - * @param vo - * @return */ int countByServiceContentIdAndServiceFrequency(@Param("serviceContentId") Long serviceContentId, @Param("vo") ServicePackageContentVO vo); /** * 根据服务包id删除服务包内容 - * @param id - * @return */ int deleteServicePackageContentByPackageId(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java index 495cdd3c..89892e70 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java @@ -69,130 +69,77 @@ public interface ServiceWayContentMapper { /** * 查询服务方式列表 - * - * @param serviceWayName - * @param id - * @return */ List selectListNum(@Param("serviceWayName") String serviceWayName, @Param("id") Long id); /** * 查询服务方式内容列表 - * - * @param serviceWayContentDTO - * @return */ List selectServiceWayContentListV1(ServiceWayContentDTO serviceWayContentDTO); /** * 根据服务频次id查询服务内容和服务频次 - * - * @param id - * @return */ ServiceWayContentAndFrequencyVO selectServiceWayContentDetailByFrequencyId(Long id); /** * 查询服务方式是否存在 - * - * @param serviceWayName - * @return */ int countByServiceName(String serviceWayName); /** * 根据id删除服务方式 - * - * @param id - * @return */ int deleteServiceWayById(Long id); /** * 通过id查询服务方式 - * - * @param id - * @return */ String selectServiceWayById(Long id); - /** - * @param serviceWayContentAddDTO - * @param id - * @return - */ - int countByDTOAndContentId(@Param("DTO") ServiceWayContentAddDTO serviceWayContentAddDTO, @Param("id") Long id); /** * 修改服务方式 - * - * @param serviceWayContent - * @return */ int updateServiceWay(ServiceWayContent serviceWayContent); /** * 判断同一服务内容下服务频次是否存在 - * - * @param serviceWayContentEditDTO - * @return */ int countByEditDTO(ServiceWayContentEditDTO serviceWayContentEditDTO); /** * 根据服务频次id删除服务内容 - * - * @param id - * @return */ int deleteByFrequencyId(Long id); /** * 判断服务内容在服务内容表中是否存在 - * - * @param serviceWayId - * @param serviceContent - * @return */ ServiceWayContentVO countByWayIdAndContent(@Param("serviceWayId") Long serviceWayId, @Param("serviceContent") String serviceContent); /** * 判断服务频次在服务频次表中是否存在 - * - * @param serviceFrequencyDTO - * @return */ int countByServiceFrequencyDTO(ServiceFrequencyDTO serviceFrequencyDTO); /** * 判断当前服务方式下服务内容是否重复 - * - * @param serviceContent - * @param serviceWayId - * @return */ int selectServiceContentByName(@Param("serviceContent") String serviceContent, @Param("serviceWayId") Long serviceWayId); /** * 检查TEXT类型的serviceFrequencyText是否重复 - * - * @param serviceWayContentEditDTO - * @return */ boolean isServiceFrequencyTextDuplicate(@Param("serviceWayContentEditDTO") ServiceWayContentEditDTO serviceWayContentEditDTO); /** * 检查DIGIT类型的serviceFrequencyStart和serviceFrequencyEnd是否重复 - * - * @param serviceWayContentEditDTO - * @return */ boolean isServiceFrequencyDigitDuplicate(@Param("serviceWayContentEditDTO") ServiceWayContentEditDTO serviceWayContentEditDTO); /** * 更新服务频次 - * @param currentFrequency - * @return */ int updateServiceFrequency(ServiceWayContent currentFrequency); } 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 new file mode 100644 index 00000000..66c696ed --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.mapper.signpatientmanageroute; + +import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import java.util.List; + + +/** + * 签约患者管理任务路径Mapper接口 + * + * @author haown + * @date 2024-03-18 + */ +public interface SignPatientManageRouteMapper { + /** + * 查询签约患者管理任务路径 + * + * @param id 签约患者管理任务路径主键 + * @return 签约患者管理任务路径 + */ + public SignPatientManageRoute selectSignPatientManageRouteById(Long id); + + /** + * 查询签约患者管理任务路径列表 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 签约患者管理任务路径集合 + */ + public List selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute); + + /** + * 新增签约患者管理任务路径 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 结果 + */ + public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute); + + /** + * 修改签约患者管理任务路径 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 结果 + */ + public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute); + + /** + * 删除签约患者管理任务路径 + * + * @param id 签约患者管理任务路径主键 + * @return 结果 + */ + public int deleteSignPatientManageRouteById(Long id); + + /** + * 批量删除签约患者管理任务路径 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSignPatientManageRouteByIds(Long[] ids); +} 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 new file mode 100644 index 00000000..0174be35 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -0,0 +1,63 @@ +package com.xinelu.manage.mapper.signpatientmanageroutenode; + +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +/** + * 签约患者管理任务路径节点Mapper接口 + * + * @author haown + * @date 2024-03-18 + */ +public interface SignPatientManageRouteNodeMapper { + /** + * 查询签约患者管理任务路径节点 + * + * @param id 签约患者管理任务路径节点主键 + * @return 签约患者管理任务路径节点 + */ + public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id); + + /** + * 查询签约患者管理任务路径节点列表 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 签约患者管理任务路径节点集合 + */ + public List selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * 新增签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode); + + int insertBatch(@Param("nodeList") List nodeList); + + /** + * 修改签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + public int updateSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * 删除签约患者管理任务路径节点 + * + * @param id 签约患者管理任务路径节点主键 + * @return 结果 + */ + public int deleteSignPatientManageRouteNodeById(Long id); + + /** + * 批量删除签约患者管理任务路径节点 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSignPatientManageRouteNodeByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java new file mode 100644 index 00000000..0ca618e4 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java @@ -0,0 +1,65 @@ +package com.xinelu.manage.mapper.signroutetriggercondition; +import org.apache.ibatis.annotations.Param; +import java.util.Collection; + +import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition; +import java.util.List; + + +/** + * 签约患者管理任务(路径)触发条件关系Mapper接口 + * + * @author haown + * @date 2024-03-18 + */ +public interface SignRouteTriggerConditionMapper { + /** + * 查询签约患者管理任务(路径)触发条件关系 + * + * @param id 签约患者管理任务(路径)触发条件关系主键 + * @return 签约患者管理任务(路径)触发条件关系 + */ + public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id); + + /** + * 查询签约患者管理任务(路径)触发条件关系列表 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 签约患者管理任务(路径)触发条件关系集合 + */ + public List selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition); + + /** + * 新增签约患者管理任务(路径)触发条件关系 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 结果 + */ + public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition); + + /** + * 修改签约患者管理任务(路径)触发条件关系 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 结果 + */ + public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition); + + /** + * 删除签约患者管理任务(路径)触发条件关系 + * + * @param id 签约患者管理任务(路径)触发条件关系主键 + * @return 结果 + */ + public int deleteSignRouteTriggerConditionById(Long id); + + /** + * 批量删除签约患者管理任务(路径)触发条件关系 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSignRouteTriggerConditionByIds(Long[] ids); + + int insertBatch(@Param("signRouteTriggerConditionCollection") Collection signRouteTriggerConditionCollection); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java index a06e1182..cf792f8f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasenode/SpecialDiseaseNodeMapper.java @@ -1,6 +1,8 @@ package com.xinelu.manage.mapper.specialdiseasenode; import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; +import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; import java.util.List; @@ -18,7 +20,7 @@ public interface SpecialDiseaseNodeMapper { * @param id 专病路径-管理节点信息主键 * @return 专病路径-管理节点信息 */ - public SpecialDiseaseNode selectSpecialDiseaseNodeById(Long id); + SpecialDiseaseNode selectSpecialDiseaseNodeById(Long id); /** * 查询专病路径-管理节点信息列表 @@ -26,7 +28,7 @@ public interface SpecialDiseaseNodeMapper { * @param specialDiseaseNode 专病路径-管理节点信息 * @return 专病路径-管理节点信息集合 */ - public List selectSpecialDiseaseNodeList(SpecialDiseaseNode specialDiseaseNode); + List selectSpecialDiseaseNodeList(SpecialDiseaseNode specialDiseaseNode); /** * 新增专病路径-管理节点信息 @@ -34,7 +36,7 @@ public interface SpecialDiseaseNodeMapper { * @param specialDiseaseNode 专病路径-管理节点信息 * @return 结果 */ - public int insertSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode); + int insertSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode); /** * 修改专病路径-管理节点信息 @@ -42,7 +44,7 @@ public interface SpecialDiseaseNodeMapper { * @param specialDiseaseNode 专病路径-管理节点信息 * @return 结果 */ - public int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode); + int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode); /** * 删除专病路径-管理节点信息 @@ -50,7 +52,7 @@ public interface SpecialDiseaseNodeMapper { * @param id 专病路径-管理节点信息主键 * @return 结果 */ - public int deleteSpecialDiseaseNodeById(Long id); + int deleteSpecialDiseaseNodeById(Long id); /** * 批量删除专病路径-管理节点信息 @@ -58,5 +60,24 @@ public interface SpecialDiseaseNodeMapper { * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteSpecialDiseaseNodeByIds(Long[] ids); + int deleteSpecialDiseaseNodeByIds(Long[] ids); + + int insertSpecialDiseaseNodeList(List specialDiseaseNodeList); + + /** + * 删除专病路径-管理节点信息 + * + * @param routeId 专病路径-管理节点信息主键 + * @return 结果 + */ + int deleteSpecialDiseaseNodeByRouteId(Long routeId); + + + /** + * 查询专病路径-管理节点信息 + * + * @param specialDiseaseRouteId 专病路径-管理节点信息主键 + * @return 专病路径-管理节点信息 + */ + SpecialDiseaseRouteVO selectSpecialDiseaseByRouteId(Long specialDiseaseRouteId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java new file mode 100644 index 00000000..4a822937 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java @@ -0,0 +1,79 @@ +package com.xinelu.manage.mapper.specialdiseaseroute; + +import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; +import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; + +import java.util.List; + +/** + * 专病路径信息Mapper接口 + * + * @author xinelu + * @date 2024-03-13 + */ +public interface SpecialDiseaseRouteMapper { + /** + * 查询专病路径信息 + * + * @param id 专病路径信息主键 + * @return 专病路径信息 + */ + SpecialDiseaseRoute selectSpecialDiseaseRouteById(Long id); + + /** + * 查询专病路径信息列表 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 专病路径信息集合 + */ + List selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute); + + /** + * 新增专病路径信息 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 结果 + */ + int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute); + + /** + * 修改专病路径信息 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 结果 + */ + int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute); + + /** + * 删除专病路径信息 + * + * @param id 专病路径信息主键 + * @return 结果 + */ + int deleteSpecialDiseaseRouteById(Long id); + + /** + * 批量删除专病路径信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteSpecialDiseaseRouteByIds(Long[] ids); + + /** + * 科室路径数量 + * + * @param departmentName 科室名称 + * @return DepartmentVO + */ + List departmentRouteByDepartmentName(String departmentName); + + /** + * 查询专病路径信息 + * + * @param id 专病路径信息主键 + * @return 专病路径信息 + */ + SpecialDiseaseRouteVO selectSpecialDiseaseRouteAndTriggerById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionMapper.java new file mode 100644 index 00000000..e563285d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionMapper.java @@ -0,0 +1,77 @@ +package com.xinelu.manage.mapper.specialdiseasetriggercondition; + +import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; + +import java.util.List; + +/** + * 触发条件关系Mapper接口 + * + * @author xinelu + * @date 2024-03-18 + */ +public interface SpecialDiseaseTriggerConditionMapper { + /** + * 查询触发条件关系 + * + * @param id 触发条件关系主键 + * @return 触发条件关系 + */ + SpecialDiseaseTriggerCondition selectSpecialDiseaseTriggerConditionById(Long id); + + /** + * 查询触发条件关系列表 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 触发条件关系集合 + */ + List selectSpecialDiseaseTriggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition); + + /** + * 新增触发条件关系 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 结果 + */ + int insertSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition); + + /** + * 批量新增触发条件关系 + * + * @param triggerConditionList 触发条件关系 + * @return 结果 + */ + int insertTriggerConditionList(List triggerConditionList); + + /** + * 修改触发条件关系 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 结果 + */ + int updateSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition); + + /** + * 删除触发条件关系 + * + * @param id 触发条件关系主键 + * @return 结果 + */ + int deleteSpecialDiseaseTriggerConditionById(Long id); + + /** + * 批量删除触发条件关系 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids); + + /** + * 删除触发条件关系 + * + * @param routeId 触发条件关系主键 + * @return 结果 + */ + int deleteSpecialDiseaseTriggerConditionByRouteId(Long routeId); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java index 16e4b65a..d881bb27 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java @@ -66,58 +66,36 @@ public interface TextMessageMapper { /** * 根据id查询短信模板信息 - * - * @param id - * @return */ TextMessageVO selectTextMessageInfoById(Long id); /** * 检查短信模板信息是否存在 - * - * @param textMessageTaskDTO - * @return */ int countByTextMessageTaskDTO(TextMessageTaskDTO textMessageTaskDTO); /** * 批量插入短信模板适用任务类型 - * - * @param tasks - * @return */ int insertTextMessageSuitTasks(List tasks); /** * 批量删除短信模板适用任务类型 - * - * @param ids - * @return */ int deleteTextMessageSuitTasks(Long[] ids); /** * 修改短信模板适用任务类型 - * - * @param task - * @return */ int updateTextMessageSuitTask(@Param("task") TextMessageSuitTask task); /** * 根据id删除之前的适用任务类型 - * - * @param id */ void deleteTextMessageSuitTask(Long id); /** * 检查除当前记录之外是否存在同名的短信模板名称 - * - * @param id - * @param departmentId - * @param textMessageName - * @return */ int countByTextMessageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("textMessageName") String textMessageName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java index a0467460..63649d57 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/wechattemplate/WechatTemplateMapper.java @@ -66,66 +66,41 @@ public interface WechatTemplateMapper { /** * 查询微信模板信息Dto列表 - * - * @param wechatTemplateDto - * @return */ List selectWechatTemplateDtoList(WechatTemplateDTO wechatTemplateDto); /** * 根据id查询微信模板Dto - * - * @param id - * @return */ WechatTemplateVO selectWechatTemplateDtoById(@Param("id") Long id); /** * 新增微信模板适用任务类型 - * - * @param tasks - * @return */ int insertWechatTemplateSuitTask(List tasks); /** * 修改微信模板适用任务类型 - * - * @param tasks - * @return */ int updateWechatTemplateSuitTask(List tasks); /** * 批量删除微信模板使用任务类型 - * - * @param ids - * @return */ int deleteWechatTemplateSuitTaskByIds(Long[] ids); /** * 检查微信模板名称是否存在 - * - * @param wechatTemplateTaskDTO - * @return */ int countByWechatTemplateTaskDTO(WechatTemplateTaskDTO wechatTemplateTaskDTO); /** * 根据id删除之前存储的适用模板任务类型 - * - * @param id */ void deleteWechatTemplateSuitTaskById(Long id); /** * 检查除当前记录之外是否存在同名的微信模板名称 - * - * @param id - * @param departmentId - * @param wechatTemplateName - * @return */ - int countByWechatTemplateNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("wechatTemplateName") String wechatTemplateName); + int countByWechatTemplateNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("wechatTemplateName") String wechatTemplateName, @Param("templateSource") String templateSource); } 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 de76ea33..f0e90cd4 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 @@ -2,6 +2,7 @@ package com.xinelu.manage.service.agency; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.agency.Agency; +import com.xinelu.manage.dto.agency.HospitalDTO; import com.xinelu.manage.vo.agency.AgencyTreeVO; import com.xinelu.manage.vo.agency.AgencyVO; @@ -39,14 +40,6 @@ public interface IAgencyService { */ AjaxResult selectAgencyByIdList(Agency agency); - /** - * 查询院区机构信息列表 - * - * @param agency 机构信息 - * @return 机构信息集合 - */ - AjaxResult subordinateAgencyList(Agency agency); - /** * 新增机构信息 * @@ -94,4 +87,6 @@ public interface IAgencyService { * @return int **/ AjaxResult insertAgencyImportList(List agencyList); + + 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 f5e69a78..6b58c9d5 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 @@ -1,16 +1,21 @@ package com.xinelu.manage.service.agency.impl; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.enums.NodeTypeEnum; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.manage.domain.agency.Agency; +import com.xinelu.manage.domain.department.Department; +import com.xinelu.manage.dto.agency.HospitalDTO; import com.xinelu.manage.mapper.agency.AgencyMapper; +import com.xinelu.manage.mapper.department.DepartmentMapper; import com.xinelu.manage.mapper.sysarea.SysAreaMapper; import com.xinelu.manage.service.agency.IAgencyService; import com.xinelu.manage.vo.agency.AgencyTreeVO; import com.xinelu.manage.vo.agency.AgencyVO; +import com.xinelu.manage.vo.agency.HospitalVO; import com.xinelu.manage.vo.sysarea.SysAreaVO; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.BooleanUtils; @@ -41,6 +46,9 @@ public class AgencyServiceImpl implements IAgencyService { private RegexUtil regexUtil; @Resource private SysAreaMapper sysAreaMapper; + @Resource + private DepartmentMapper departmentMapper; + /** * 查询机构信息 @@ -51,18 +59,20 @@ public class AgencyServiceImpl implements IAgencyService { @Override public AgencyVO selectAgencyById(Long id) { AgencyVO agency = agencyMapper.selectAgencyVOById(id); - if (StringUtils.isNotBlank(agency.getAreaCode())) { + if (Objects.nonNull(agency) && StringUtils.isNotBlank(agency.getAreaCode())) { SysAreaVO nurseStationAndAreaCode = sysAreaMapper.getSubordinateRegionsFindSuperiorRegions(agency.getAreaCode()); - agency.setProvinceCode(StringUtils.isBlank(nurseStationAndAreaCode.getProvinceCode()) ? "" : nurseStationAndAreaCode.getProvinceCode()); - agency.setProvinceName(StringUtils.isBlank(nurseStationAndAreaCode.getProvinceName()) ? "" : nurseStationAndAreaCode.getProvinceName()); - agency.setCityCode(StringUtils.isBlank(nurseStationAndAreaCode.getCityCode()) ? "" : nurseStationAndAreaCode.getCityCode()); - agency.setCityName(StringUtils.isBlank(nurseStationAndAreaCode.getCityName()) ? "" : nurseStationAndAreaCode.getCityName()); - agency.setRegionCode(StringUtils.isBlank(nurseStationAndAreaCode.getRegionCode()) ? "" : nurseStationAndAreaCode.getRegionCode()); - agency.setRegionName(StringUtils.isBlank(nurseStationAndAreaCode.getRegionName()) ? "" : nurseStationAndAreaCode.getRegionName()); - agency.setStreetCode(StringUtils.isBlank(nurseStationAndAreaCode.getStreetCode()) ? "" : nurseStationAndAreaCode.getStreetCode()); - agency.setStreetName(StringUtils.isBlank(nurseStationAndAreaCode.getStreetName()) ? "" : nurseStationAndAreaCode.getStreetName()); - agency.setCommunityCode(StringUtils.isBlank(nurseStationAndAreaCode.getCommunityCode()) ? "" : nurseStationAndAreaCode.getCommunityCode()); - agency.setCommunityName(StringUtils.isBlank(nurseStationAndAreaCode.getCommunityName()) ? "" : nurseStationAndAreaCode.getCommunityName()); + if (Objects.nonNull(nurseStationAndAreaCode)) { + agency.setProvinceCode(StringUtils.isBlank(nurseStationAndAreaCode.getProvinceCode()) ? "" : nurseStationAndAreaCode.getProvinceCode()); + agency.setProvinceName(StringUtils.isBlank(nurseStationAndAreaCode.getProvinceName()) ? "" : nurseStationAndAreaCode.getProvinceName()); + agency.setCityCode(StringUtils.isBlank(nurseStationAndAreaCode.getCityCode()) ? "" : nurseStationAndAreaCode.getCityCode()); + agency.setCityName(StringUtils.isBlank(nurseStationAndAreaCode.getCityName()) ? "" : nurseStationAndAreaCode.getCityName()); + agency.setRegionCode(StringUtils.isBlank(nurseStationAndAreaCode.getRegionCode()) ? "" : nurseStationAndAreaCode.getRegionCode()); + agency.setRegionName(StringUtils.isBlank(nurseStationAndAreaCode.getRegionName()) ? "" : nurseStationAndAreaCode.getRegionName()); + agency.setStreetCode(StringUtils.isBlank(nurseStationAndAreaCode.getStreetCode()) ? "" : nurseStationAndAreaCode.getStreetCode()); + agency.setStreetName(StringUtils.isBlank(nurseStationAndAreaCode.getStreetName()) ? "" : nurseStationAndAreaCode.getStreetName()); + agency.setCommunityCode(StringUtils.isBlank(nurseStationAndAreaCode.getCommunityCode()) ? "" : nurseStationAndAreaCode.getCommunityCode()); + agency.setCommunityName(StringUtils.isBlank(nurseStationAndAreaCode.getCommunityName()) ? "" : nurseStationAndAreaCode.getCommunityName()); + } } return agency; } @@ -90,18 +100,6 @@ public class AgencyServiceImpl implements IAgencyService { } - /** - * 查询院区机构信息列表 - * - * @param agency 机构信息 - * @return 机构信息 - */ - @Override - public AjaxResult subordinateAgencyList(Agency agency) { - return AjaxResult.success(agencyMapper.selectAgencyList(agency)); - } - - /** * 新增机构信息 * @@ -226,6 +224,44 @@ public class AgencyServiceImpl implements IAgencyService { return AjaxResult.success(); } + @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(); + agency.setNodeType(NodeTypeEnum.CAMPUS.getInfo()); + agency.setParentId(hospitalDTO.getHospitalId()); + List campusList = agencyMapper.selectAgencyList(agency); + hospitalVO.setCampusList(campusList); + Department department = new Department(); + department.setNodeType(NodeTypeEnum.DEPARTMENT.getInfo()); + department.setAgencyId(hospitalDTO.getHospitalId()); + List departmentList = departmentMapper.selectDepartmentList(department); + hospitalVO.setDepartmentList(departmentList); + department.setNodeType(NodeTypeEnum.WARD.getInfo()); + 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()); + department.setAgencyId(hospitalDTO.getCampusId()); + List departmentList = departmentMapper.selectDepartmentList(department); + hospitalVO.setDepartmentList(departmentList); + department.setNodeType(NodeTypeEnum.WARD.getInfo()); + 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()); + department.setParentDepartmentId(hospitalDTO.getDepartmentId()); + List wardList = departmentMapper.selectDepartmentList(department); + hospitalVO.setWardList(wardList); + } + return AjaxResult.success(hospitalVO); + } + public List buildDeptTree(List agencies) { List returnList = new ArrayList(); List tempList = new ArrayList(); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java index c56f26f2..bfbda552 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/ILabelFieldContentService.java @@ -18,7 +18,7 @@ public interface ILabelFieldContentService { * @param id 标签字段内容信息主键 * @return 标签字段内容信息 */ - public LabelFieldContent selectLabelFieldContentById(Long id); + LabelFieldContent selectLabelFieldContentById(Long id); /** * 查询标签字段内容信息列表 @@ -26,7 +26,7 @@ public interface ILabelFieldContentService { * @param labelFieldContent 标签字段内容信息 * @return 标签字段内容信息集合 */ - public List selectLabelFieldContentList(LabelFieldContent labelFieldContent); + List selectLabelFieldContentList(LabelFieldContent labelFieldContent); /** * 新增标签字段内容信息 @@ -34,7 +34,7 @@ public interface ILabelFieldContentService { * @param labelFieldContent 标签字段内容信息 * @return 结果 */ - public int insertLabelFieldContent(LabelFieldContent labelFieldContent); + int insertLabelFieldContent(LabelFieldContent labelFieldContent); /** * 修改标签字段内容信息 @@ -42,7 +42,7 @@ public interface ILabelFieldContentService { * @param labelFieldContent 标签字段内容信息 * @return 结果 */ - public int updateLabelFieldContent(LabelFieldContent labelFieldContent); + int updateLabelFieldContent(LabelFieldContent labelFieldContent); /** * 批量删除标签字段内容信息 @@ -50,7 +50,7 @@ public interface ILabelFieldContentService { * @param ids 需要删除的标签字段内容信息主键集合 * @return 结果 */ - public int deleteLabelFieldContentByIds(Long[] ids); + int deleteLabelFieldContentByIds(Long[] ids); /** * 删除标签字段内容信息 @@ -58,12 +58,10 @@ public interface ILabelFieldContentService { * @param id 标签字段内容信息主键 * @return 结果 */ - public int deleteLabelFieldContentById(Long id); + int deleteLabelFieldContentById(Long id); /** * 批量新增标签字段内容信息 - * @param labelFieldContentAddDTO - * @return */ int insertLabelFieldContents(LabelFieldContentAddDTO labelFieldContentAddDTO); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java index c7adfb8b..b5c665fe 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/labelfieldcontent/impl/LabelFieldContentServiceImpl.java @@ -1,6 +1,6 @@ package com.xinelu.manage.service.labelfieldcontent.impl; -import com.xinelu.common.constant.LabelFieldInfoFieldTypeConstants; +import com.xinelu.common.constant.Constants; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; @@ -110,9 +110,6 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { /** * 批量新增标签字段内容信息 - * - * @param labelFieldContentAddDTO - * @return */ @Override public int insertLabelFieldContents(LabelFieldContentAddDTO labelFieldContentAddDTO) { @@ -131,7 +128,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService { BeanUtils.copyProperties(contentDTO, labelFieldContent); labelFieldContent.setFieldId(labelFieldContentAddDTO.getFieldId()); labelFieldContent.setFieldName(labelFieldContentAddDTO.getFieldName()); - labelFieldContent.setContentCode(LabelFieldInfoFieldTypeConstants.CONTENT_ENCODING + systemCodeUtil.generateDepartCode(LabelFieldInfoFieldTypeConstants.CONTENT_ENCODING)); + labelFieldContent.setContentCode(Constants.CONTENT_ENCODING + systemCodeUtil.generateDepartCode(Constants.CONTENT_ENCODING)); labelFieldContent.setCreateBy(SecurityUtils.getUsername()); labelFieldContent.setCreateTime(LocalDateTime.now()); if (labelFieldContentMapper.insertLabelFieldContent(labelFieldContent) <= 0) { 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 5a6c31fc..b8f060c8 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 @@ -18,7 +18,7 @@ public interface ILabelFieldInfoService { * @param id 标签字段信息主键 * @return 标签字段信息 */ - public LabelFieldInfo selectLabelFieldInfoById(Long id); + LabelFieldInfo selectLabelFieldInfoById(Long id); /** * 查询标签字段信息列表 @@ -26,7 +26,7 @@ public interface ILabelFieldInfoService { * @param labelFieldInfo 标签字段信息 * @return 标签字段信息集合 */ - public List selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo); + List selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo); /** * 新增标签字段信息 @@ -34,7 +34,7 @@ public interface ILabelFieldInfoService { * @param labelFieldInfo 标签字段信息 * @return 结果 */ - public int insertLabelFieldInfo(LabelFieldInfo labelFieldInfo); + int insertLabelFieldInfo(LabelFieldInfo labelFieldInfo); /** * 修改标签字段信息 @@ -42,7 +42,7 @@ public interface ILabelFieldInfoService { * @param labelFieldInfo 标签字段信息 * @return 结果 */ - public int updateLabelFieldInfo(LabelFieldInfo labelFieldInfo); + int updateLabelFieldInfo(LabelFieldInfo labelFieldInfo); /** * 批量删除标签字段信息 @@ -50,7 +50,7 @@ public interface ILabelFieldInfoService { * @param ids 需要删除的标签字段信息主键集合 * @return 结果 */ - public int deleteLabelFieldInfoByIds(Long[] ids); + int deleteLabelFieldInfoByIds(Long[] ids); /** * 删除标签字段信息信息 @@ -58,13 +58,10 @@ public interface ILabelFieldInfoService { * @param id 标签字段信息主键 * @return 结果 */ - public int deleteLabelFieldInfoById(Long id); + int deleteLabelFieldInfoById(Long id); /** * 批量新增标签字段信息 - * @param labelFieldInfoAddDTO - * @return */ int insertLabelFieldInfoList(LabelFieldInfoAddDTO labelFieldInfoAddDTO); - } 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 6cc2cc85..89a7a503 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,6 +1,6 @@ package com.xinelu.manage.service.labelfieldinfo.impl; -import com.xinelu.common.constant.LabelFieldInfoFieldTypeConstants; +import com.xinelu.common.constant.Constants; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; @@ -115,9 +115,6 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService { /** * 批量新增标签字段信息 - * - * @param labelFieldInfoAddDTO - * @return */ @Transactional(rollbackFor = Exception.class) @Override @@ -145,7 +142,7 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService { } // 如果不存在,执行新增操作 for (LabelFieldInfo labelFieldInfo : fieldInfoList) { - labelFieldInfo.setFieldCode(LabelFieldInfoFieldTypeConstants.FIELD_ENCODING + systemCodeUtil.generateDepartCode(LabelFieldInfoFieldTypeConstants.FIELD_ENCODING)); + labelFieldInfo.setFieldCode(Constants.FIELD_ENCODING + systemCodeUtil.generateDepartCode(Constants.FIELD_ENCODING)); labelFieldInfo.setCreateBy(SecurityUtils.getUsername()); labelFieldInfo.setCreateTime(LocalDateTime.now()); if (labelFieldInfoMapper.insertLabelFieldInfo(labelFieldInfo) <= 0) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/materialsinfo/impl/MaterialsInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/materialsinfo/impl/MaterialsInfoServiceImpl.java index b1876df7..3216a2dd 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/materialsinfo/impl/MaterialsInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/materialsinfo/impl/MaterialsInfoServiceImpl.java @@ -1,14 +1,17 @@ package com.xinelu.manage.service.materialsinfo.impl; +import com.xinelu.common.exception.ServiceException; import com.xinelu.manage.domain.materialsinfo.MaterialsInfo; +import com.xinelu.manage.domain.propagandamaterials.PropagandaMaterials; import com.xinelu.manage.dto.materialsinfo.MaterialsInfoDto; import com.xinelu.manage.mapper.materialsinfo.MaterialsInfoMapper; +import com.xinelu.manage.mapper.propagandamaterials.PropagandaMaterialsMapper; import com.xinelu.manage.service.materialsinfo.IMaterialsInfoService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; /** * 素材信息Service业务层处理 @@ -20,6 +23,8 @@ import java.util.List; public class MaterialsInfoServiceImpl implements IMaterialsInfoService { @Resource private MaterialsInfoMapper materialsInfoMapper; + @Resource + private PropagandaMaterialsMapper propagandaMaterialsMapper; /** * 查询素材信息 @@ -75,6 +80,19 @@ public class MaterialsInfoServiceImpl implements IMaterialsInfoService { */ @Override public int deleteMaterialsInfoByIds(Long[] ids) { + // 查询素材是否被使用 + int used = 0; + for(Long id : ids) { + PropagandaMaterials queryObj = new PropagandaMaterials(); + queryObj.setMaterialsId(id); + List pmList = propagandaMaterialsMapper.selectPropagandaMaterialsList(queryObj); + if (CollectionUtils.isNotEmpty(pmList)) { + used++; + } + } + if (used > 0) { + throw new ServiceException("选中的素材已在宣教库中被占用不能删除"); + } return materialsInfoMapper.deleteMaterialsInfoByIds(ids); } @@ -86,6 +104,13 @@ public class MaterialsInfoServiceImpl implements IMaterialsInfoService { */ @Override public int deleteMaterialsInfoById(Long id) { - return materialsInfoMapper.deleteMaterialsInfoById(id); + PropagandaMaterials queryObj = new PropagandaMaterials(); + queryObj.setMaterialsId(id); + List pmList = propagandaMaterialsMapper.selectPropagandaMaterialsList(queryObj); + if (CollectionUtils.isNotEmpty(pmList)) { + throw new ServiceException("该素材已在宣教库中被使用不能删除"); + } else { + return materialsInfoMapper.deleteMaterialsInfoById(id); + } } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java index bf8db962..c8f70f83 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/IPatientInfoService.java @@ -33,7 +33,7 @@ public interface IPatientInfoService { * @param patientInfo 患者信息 * @return 结果 */ - public int insertPatientInfo(PatientInfo patientInfo); + PatientInfo insertPatientInfo(PatientInfo patientInfo); /** * 修改患者信息 @@ -41,7 +41,7 @@ public interface IPatientInfoService { * @param patientInfo 患者信息 * @return 结果 */ - public int updatePatientInfo(PatientInfo patientInfo); + public PatientInfo updatePatientInfo(PatientInfo patientInfo); /** * 批量删除患者信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java index 7323e88f..16070f4f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientinfo/impl/PatientInfoServiceImpl.java @@ -1,14 +1,23 @@ package com.xinelu.manage.service.patientinfo.impl; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.patientinfo.PatientInfo; +import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; +import com.xinelu.manage.domain.residentinfo.ResidentInfo; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; +import com.xinelu.manage.mapper.residentinfo.ResidentInfoMapper; import com.xinelu.manage.service.patientinfo.IPatientInfoService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; +import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; import java.time.LocalDateTime; import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 患者信息Service业务层处理 @@ -21,6 +30,10 @@ public class PatientInfoServiceImpl implements IPatientInfoService { @Resource private PatientInfoMapper patientInfoMapper; + @Resource + private ResidentInfoMapper residentInfoMapper; + @Resource + private IPatientVisitRecordService patientVisitRecordService; /** * 查询患者信息 @@ -51,10 +64,30 @@ public class PatientInfoServiceImpl implements IPatientInfoService { * @return 结果 */ @Override - public int insertPatientInfo(PatientInfo patientInfo) { - patientInfo.setCreateTime(LocalDateTime.now()); - patientInfo.setDelFlag(0); - return patientInfoMapper.insertPatientInfo(patientInfo); + @Transactional + public PatientInfo insertPatientInfo(PatientInfo patientInfo) { + patientInfo.setCreateTime(LocalDateTime.now()); + patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientInfo.setDelFlag(0); + // 根据身份证号查询是否有该居民 + ResidentInfo residentQuery = new ResidentInfo(); + residentQuery.setCardNo(patientInfo.getCardNo()); + List residentList = residentInfoMapper.selectResidentInfoList(residentQuery); + + ResidentInfo residentInfo = new ResidentInfo(); + BeanUtils.copyBeanProp(residentInfo, patientInfo); + if (CollectionUtils.isEmpty(residentList)) { + // 新增居民 + residentInfoMapper.insertResidentInfo(residentInfo); + patientInfo.setResidentId(residentInfo.getId()); + } else { + // 修改居民信息 + residentInfo.setId(residentList.get(0).getId()); + residentInfoMapper.updateResidentInfo(residentInfo); + patientInfo.setResidentId(residentList.get(0).getId()); + } + patientInfoMapper.insertPatientInfo(patientInfo); + return patientInfo; } /** @@ -64,9 +97,36 @@ public class PatientInfoServiceImpl implements IPatientInfoService { * @return 结果 */ @Override - public int updatePatientInfo(PatientInfo patientInfo) { - patientInfo.setUpdateTime(LocalDateTime.now()); - return patientInfoMapper.updatePatientInfo(patientInfo); + public PatientInfo updatePatientInfo(PatientInfo patientInfo) { + ResidentInfo residentInfo = new ResidentInfo(); + if (patientInfo.getResidentId() != null) { + residentInfo = residentInfoMapper.selectResidentInfoById(patientInfo.getResidentId()); + BeanUtils.copyBeanProp(residentInfo, patientInfo); + residentInfo.setId(patientInfo.getResidentId()); + residentInfoMapper.updateResidentInfo(residentInfo); + } else { + // 根据身份证号查询是否有该居民 + ResidentInfo residentQuery = new ResidentInfo(); + residentQuery.setCardNo(patientInfo.getCardNo()); + List residentList = residentInfoMapper.selectResidentInfoList(residentQuery); + if (CollectionUtils.isNotEmpty(residentList)) { + Long residentId = residentList.get(0).getId(); + residentInfo = residentList.get(0); + BeanUtils.copyBeanProp(residentInfo, patientInfo); + residentInfo.setId(residentId); + residentInfoMapper.updateResidentInfo(residentInfo); + } else { + BeanUtils.copyBeanProp(residentInfo, patientInfo); + residentInfo.setId(null); + residentInfoMapper.insertResidentInfo(residentInfo); + } + patientInfo.setResidentId(residentInfo.getId()); + } + patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientInfo.setUpdateTime(LocalDateTime.now()); + patientInfo.setDelFlag(0); + patientInfoMapper.updatePatientInfo(patientInfo); + return patientInfo; } /** @@ -76,12 +136,49 @@ public class PatientInfoServiceImpl implements IPatientInfoService { * @return 结果 */ @Override + @Transactional public int deletePatientInfoByIds(Long[] ids) { + for (Long id : ids) { + PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(id); + patientVisitRecordService.deletePatientVisitRecordById(patientInfo.getPatientVisitRecordId()); + // 根据患者最新一条就诊记录修改患者状态 + PatientVisitRecordDto patientVisitRecordDto = new PatientVisitRecordDto(); + patientVisitRecordDto.setPatientId(id); + PatientVisitRecord patientVisitRecord = patientVisitRecordService.getLastRecord(patientInfo.getHospitalAgencyId(), id); + if (ObjectUtils.isEmpty(patientVisitRecord)) { + setVisitInfoNull(patientInfo); + } else { + BeanUtils.copyBeanProp(patientInfo, patientVisitRecord); + patientInfo.setId(id); + patientInfo.setPatientVisitRecordId(patientVisitRecord.getId()); + // 设置patientType + patientVisitRecordService.setPatientType(patientInfo, patientVisitRecord); + } + patientInfoMapper.updatePatientInfo(patientInfo); + } return patientInfoMapper.deletePatientInfoByIds(ids); } + /** + * 设置患者就诊信息为空 + * @param patientInfo 患者信息 + */ + private void setVisitInfoNull(PatientInfo patientInfo){ + patientInfo.setVisitDate(null); + patientInfo.setPatientType(null); + patientInfo.setPatientVisitRecordId(null); + patientInfo.setVisitMethod(null); + patientInfo.setAdmissionTime(null); + patientInfo.setDischargeTime(null); + patientInfo.setAttendingPhysicianId(null); + patientInfo.setAttendingPhysicianName(null); + patientInfo.setResponsibleNurse(null); + patientInfo.setMainDiagnosis(null); + patientInfo.setVisitSerialNumber(null); + patientInfo.setInHospitalNumber(null); + } /** - * 删除患者信息信息 + * 删除患者信息 * * @param id 患者信息主键 * @return 结果 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java index 951d9b17..934ceb68 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java @@ -12,22 +12,24 @@ import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.patientprehospitalization.PatientPreHospitalization; +import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; import com.xinelu.manage.mapper.agency.AgencyMapper; import com.xinelu.manage.mapper.department.DepartmentMapper; -import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper; +import com.xinelu.manage.service.patientinfo.IPatientInfoService; import com.xinelu.manage.service.patientprehospitalization.IPatientPreHospitalizationService; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.BooleanUtils; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; +import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * @author haown @@ -41,7 +43,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital private PatientPreHospitalizationMapper preHospitalizationMapper; @Resource - private PatientInfoMapper patientInfoMapper; + private IPatientInfoService patientInfoService; @Resource private AgencyMapper agencyMapper; @@ -49,35 +51,35 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital @Resource private DepartmentMapper departmentMapper; + @Resource + private IPatientVisitRecordService patientVisitRecordService; + @Resource private RegexUtil regexUtil; @Override public int insert(PatientPreHospitalization preHospitalization) { - // 根据身份证号查询是否有患者信息 + // 根据身份证号+医院id查询是否有患者信息 PatientInfoDto patientInfoDto = new PatientInfoDto(); patientInfoDto.setCardNo(preHospitalization.getCardNo()); - List patientList = patientInfoMapper.selectPatientInfoList(patientInfoDto); + patientInfoDto.setHospitalAgencyId(preHospitalization.getHospitalAgencyId()); + List patientList = patientInfoService.selectPatientInfoList(patientInfoDto); if (CollectionUtils.isEmpty(patientList)) { // 保存患者信息 PatientInfo patientInfo = new PatientInfo(); BeanUtils.copyBeanProp(patientInfo, preHospitalization); - patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); - patientInfo.setCreateTime(LocalDateTime.now()); - patientInfo.setDelFlag(0); patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT); - patientInfoMapper.insertPatientInfo(patientInfo); - preHospitalization.setPatientId(patientInfo.getId()); + PatientInfo saveObj = patientInfoService.insertPatientInfo(patientInfo); + preHospitalization.setPatientId(saveObj.getId()); + preHospitalization.setResidentId(saveObj.getResidentId()); } else { // 修改患者信息 PatientInfo patientInfo = patientList.get(0); BeanUtils.copyBeanProp(patientInfo, preHospitalization); - patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); - patientInfo.setUpdateTime(LocalDateTime.now()); - patientInfo.setDelFlag(0); patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT); - patientInfoMapper.updatePatientInfo(patientInfo); - preHospitalization.setPatientId(patientList.get(0).getId()); + patientInfoService.updatePatientInfo(patientInfo); + preHospitalization.setPatientId(patientInfo.getId()); + preHospitalization.setResidentId(patientInfo.getResidentId()); } // 保存预住院信息 preHospitalization.setDelFlag(0); @@ -92,22 +94,37 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital } @Override + @Transactional public int update(PatientPreHospitalization preHospitalization) { // 修改患者信息 - PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(preHospitalization.getPatientId()); + PatientInfo patientInfo = patientInfoService.selectPatientInfoById(preHospitalization.getPatientId()); Long patientId = patientInfo.getId(); BeanUtils.copyBeanProp(patientInfo, preHospitalization); patientInfo.setId(patientId); - int flag = patientInfoMapper.updatePatientInfo(patientInfo); - if (flag >= 0) { - return preHospitalizationMapper.updateByPrimaryKeySelective(preHospitalization); - } - return -1; + patientInfoService.updatePatientInfo(patientInfo); + return preHospitalizationMapper.updateByPrimaryKeySelective(preHospitalization); } @Override + @Transactional public int deleteByIds(Long[] ids) { + for (Long id : ids) { + // 将患者状态还原为上一个状态 + PatientPreHospitalization patientPreHospitalization = preHospitalizationMapper.selectByPrimaryKey(id); + PatientInfo patientInfo = patientInfoService.selectPatientInfoById(patientPreHospitalization.getPatientId()); + PatientVisitRecord patientVisitRecord = patientVisitRecordService.getLastRecord(patientPreHospitalization.getHospitalAgencyId(), patientPreHospitalization.getPatientId()); + if (ObjectUtils.isEmpty(patientVisitRecord)) { + // 患者的预住院信息置空 + setPreHospitalizationInfoNull(patientInfo); + } else { + // 将患者信息更改为就诊信息 + BeanUtils.copyBeanProp(patientInfo, patientVisitRecord); + patientInfo.setPatientVisitRecordId(patientVisitRecord.getId()); + patientVisitRecordService.setPatientType(patientInfo, patientVisitRecord); + } + patientInfoService.updatePatientInfo(patientInfo); + } return preHospitalizationMapper.deleteByIds(ids); } @@ -117,11 +134,15 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital } @Override + @Transactional(rollbackFor = Exception.class) public AjaxResult importList(List patientList) { //判断添加的数据是否为空 if (CollectionUtils.isEmpty(patientList)) { return AjaxResult.error("请添加预住院患者导入信息!"); } + if (SecurityUtils.getLoginUser().getUser().getAgencyId() == null) { + return AjaxResult.error("您未设置机构信息,导入失败"); + } // 根据患者身份证号做去重处理 List importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList()); // 校验联系电话格式是否正确 @@ -133,48 +154,32 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital for (PatientPreHospitalization item : importDataList) { PatientPreHospitalization preHospitalization = new PatientPreHospitalization(); BeanUtils.copyProperties(item, preHospitalization); - // 根据医院名称查询医院id - Agency agency = new Agency(); - if (StringUtils.isNotBlank(item.getHospitalAgencyName())) { - agency.setAgencyName(item.getHospitalAgencyName()); - agency.setNodeType(NodeTypeConstants.HOSPITAL); - List agencyList = agencyMapper.selectAgencyList(agency); - if (CollectionUtils.isNotEmpty(agencyList)) { - preHospitalization.setHospitalAgencyId(agencyList.get(0).getId()); - } - } else { - preHospitalization.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId()); - Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId()); - if (ObjectUtils.isNotEmpty(agencyData)) { - preHospitalization.setHospitalAgencyName(agencyData.getAgencyName()); - } - } - // 查询院区id - if (StringUtils.isNotBlank(item.getCampusAgencyName())) { - agency.setAgencyName(item.getWardName()); - agency.setNodeType(NodeTypeConstants.CAMPUS); - List campusList = agencyMapper.selectAgencyList(agency); - if (CollectionUtils.isNotEmpty(campusList)) { - preHospitalization.setCampusAgencyId(campusList.get(0).getId()); - } + // 设置机构/院区为当前登录用户机构信息 + preHospitalization.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId()); + Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId()); + if (ObjectUtils.isNotEmpty(agencyData)) { + if (StringUtils.equals(NodeTypeConstants.HOSPITAL, agencyData.getNodeType())) { // 节点类型为机构 + preHospitalization.setHospitalAgencyName(agencyData.getAgencyName()); + } else if (StringUtils.equals(NodeTypeConstants.CAMPUS, agencyData.getNodeType())) { // 节点类型为院区 + preHospitalization.setCampusAgencyId(agencyData.getId()); + preHospitalization.setCampusAgencyName(agencyData.getAgencyName()); + // 机构设为院区所属机构 + preHospitalization.setHospitalAgencyId(agencyData.getParentId()); + Agency agency = agencyMapper.selectAgencyById(agencyData.getParentId()); + preHospitalization.setHospitalAgencyName(agency.getAgencyName()); + } } // 查询科室id Department department = new Department(); if (StringUtils.isNotBlank(item.getDepartmentName())) { - department.setAgencyName(item.getHospitalAgencyName()); + department.setAgencyName(preHospitalization.getHospitalAgencyName()); department.setDepartmentName(item.getDepartmentName()); department.setNodeType(NodeTypeConstants.DEPARTMENT); List deptList = departmentMapper.selectDepartmentList(department); if (CollectionUtils.isNotEmpty(deptList)) { preHospitalization.setDepartmentId(deptList.get(0).getId()); } - } else { - preHospitalization.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId()); - Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId()); - if (ObjectUtils.isNotEmpty(department1)) { - preHospitalization.setDepartmentName(department1.getDepartmentName()); - } } // 查询病区 if (StringUtils.isNotBlank(item.getWardName())) { @@ -187,28 +192,38 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital } } + preHospitalization.setDelFlag(0); preHospitalization.setCreateTime(LocalDateTime.now()); preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); - // 根据身份证号查询患者信息 + // 根据身份证号+机构id查询患者信息 PatientInfoDto patientQuery = new PatientInfoDto(); patientQuery.setCardNo(item.getCardNo()); - List patientInfoList = patientInfoMapper.selectPatientInfoList(patientQuery); + patientQuery.setHospitalAgencyId(preHospitalization.getHospitalAgencyId()); + List patientInfoList = patientInfoService.selectPatientInfoList(patientQuery); if (CollectionUtils.isNotEmpty(patientInfoList)) { // 修改居民信息 PatientInfo updInfo = patientInfoList.get(0); - BeanUtils.copyBeanProp(updInfo, item); - patientInfoMapper.updatePatientInfo(updInfo); - preHospitalization.setPatientId(patientInfoList.get(0).getId()); + String[] ignore = {"id"}; + BeanUtils.copyProperties(preHospitalization,updInfo, ignore); + updInfo.setVisitDate(preHospitalization.getRegistrationDate().atStartOfDay()); + updInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT); + patientInfoService.updatePatientInfo(updInfo); + preHospitalization.setPatientId(updInfo.getId()); + preHospitalization.setResidentId(updInfo.getResidentId()); } else { PatientInfo saveInfo = new PatientInfo(); // 添加居民 - BeanUtils.copyBeanProp(saveInfo, item); - patientInfoMapper.insertPatientInfo(saveInfo); - preHospitalization.setPatientId(saveInfo.getId()); + BeanUtils.copyProperties(preHospitalization, saveInfo); + saveInfo.setVisitDate(preHospitalization.getRegistrationDate().atStartOfDay()); + saveInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT); + PatientInfo patientInfo = patientInfoService.insertPatientInfo(saveInfo); + preHospitalization.setPatientId(patientInfo.getId()); + preHospitalization.setResidentId(patientInfo.getResidentId()); } // 根据患者身份证号和预约时间查询是否有记录 PatientPreHospitalization preHospitalizationQuery = new PatientPreHospitalization(); + preHospitalizationQuery.setHospitalAgencyId(preHospitalization.getHospitalAgencyId()); preHospitalizationQuery.setCardNo(item.getCardNo()); preHospitalizationQuery.setAppointmentDate(item.getAppointmentDate()); List list = preHospitalizationMapper.selectApplyList(preHospitalizationQuery); @@ -225,4 +240,10 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital } return AjaxResult.success(); } + + private void setPreHospitalizationInfoNull(PatientInfo patientInfo) { + patientInfo.setAppointmentDate(null); + patientInfo.setAppointmentTreatmentGroup(null); + patientInfo.setPatientType(null); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionoptionresult/IPatientQuestionOptionResultService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionoptionresult/IPatientQuestionOptionResultService.java new file mode 100644 index 00000000..1259b732 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionoptionresult/IPatientQuestionOptionResultService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.patientquestionoptionresult; + +import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult; + +import java.util.List; + +/** + * 患者问卷题目选项提交结果信息Service接口 + * + * @author xinelu + * @date 2024-03-28 + */ +public interface IPatientQuestionOptionResultService { + /** + * 查询患者问卷题目选项提交结果信息 + * + * @param id 患者问卷题目选项提交结果信息主键 + * @return 患者问卷题目选项提交结果信息 + */ + PatientQuestionOptionResult selectPatientQuestionOptionResultById(Long id); + + /** + * 查询患者问卷题目选项提交结果信息列表 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 患者问卷题目选项提交结果信息集合 + */ + List selectPatientQuestionOptionResultList(PatientQuestionOptionResult patientQuestionOptionResult); + + /** + * 新增患者问卷题目选项提交结果信息 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 结果 + */ + int insertPatientQuestionOptionResult(PatientQuestionOptionResult patientQuestionOptionResult); + + /** + * 修改患者问卷题目选项提交结果信息 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 结果 + */ + int updatePatientQuestionOptionResult(PatientQuestionOptionResult patientQuestionOptionResult); + + /** + * 批量删除患者问卷题目选项提交结果信息 + * + * @param ids 需要删除的患者问卷题目选项提交结果信息主键集合 + * @return 结果 + */ + int deletePatientQuestionOptionResultByIds(Long[] ids); + + /** + * 删除患者问卷题目选项提交结果信息信息 + * + * @param id 患者问卷题目选项提交结果信息主键 + * @return 结果 + */ + int deletePatientQuestionOptionResultById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionoptionresult/impl/PatientQuestionOptionResultServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionoptionresult/impl/PatientQuestionOptionResultServiceImpl.java new file mode 100644 index 00000000..5640e6a7 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionoptionresult/impl/PatientQuestionOptionResultServiceImpl.java @@ -0,0 +1,90 @@ +package com.xinelu.manage.service.patientquestionoptionresult.impl; + +import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult; +import com.xinelu.manage.mapper.patientquestionoptionresult.PatientQuestionOptionResultMapper; +import com.xinelu.manage.service.patientquestionoptionresult.IPatientQuestionOptionResultService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * 患者问卷题目选项提交结果信息Service业务层处理 + * + * @author xinelu + * @date 2024-03-28 + */ +@Service +public class PatientQuestionOptionResultServiceImpl implements IPatientQuestionOptionResultService { + @Resource + private PatientQuestionOptionResultMapper patientQuestionOptionResultMapper; + + /** + * 查询患者问卷题目选项提交结果信息 + * + * @param id 患者问卷题目选项提交结果信息主键 + * @return 患者问卷题目选项提交结果信息 + */ + @Override + public PatientQuestionOptionResult selectPatientQuestionOptionResultById(Long id) { + return patientQuestionOptionResultMapper.selectPatientQuestionOptionResultById(id); + } + + /** + * 查询患者问卷题目选项提交结果信息列表 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 患者问卷题目选项提交结果信息 + */ + @Override + public List selectPatientQuestionOptionResultList(PatientQuestionOptionResult patientQuestionOptionResult) { + return patientQuestionOptionResultMapper.selectPatientQuestionOptionResultList(patientQuestionOptionResult); + } + + /** + * 新增患者问卷题目选项提交结果信息 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 结果 + */ + @Override + public int insertPatientQuestionOptionResult(PatientQuestionOptionResult patientQuestionOptionResult) { + patientQuestionOptionResult.setCreateTime(LocalDateTime.now()); + return patientQuestionOptionResultMapper.insertPatientQuestionOptionResult(patientQuestionOptionResult); + } + + /** + * 修改患者问卷题目选项提交结果信息 + * + * @param patientQuestionOptionResult 患者问卷题目选项提交结果信息 + * @return 结果 + */ + @Override + public int updatePatientQuestionOptionResult(PatientQuestionOptionResult patientQuestionOptionResult) { + patientQuestionOptionResult.setUpdateTime(LocalDateTime.now()); + return patientQuestionOptionResultMapper.updatePatientQuestionOptionResult(patientQuestionOptionResult); + } + + /** + * 批量删除患者问卷题目选项提交结果信息 + * + * @param ids 需要删除的患者问卷题目选项提交结果信息主键 + * @return 结果 + */ + @Override + public int deletePatientQuestionOptionResultByIds(Long[] ids) { + return patientQuestionOptionResultMapper.deletePatientQuestionOptionResultByIds(ids); + } + + /** + * 删除患者问卷题目选项提交结果信息信息 + * + * @param id 患者问卷题目选项提交结果信息主键 + * @return 结果 + */ + @Override + public int deletePatientQuestionOptionResultById(Long id) { + return patientQuestionOptionResultMapper.deletePatientQuestionOptionResultById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubjectresult/IPatientQuestionSubjectResultService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubjectresult/IPatientQuestionSubjectResultService.java new file mode 100644 index 00000000..8153bd9f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubjectresult/IPatientQuestionSubjectResultService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.patientquestionsubjectresult; + +import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult; + +import java.util.List; + +/** + * 患者问卷题目提交结果信息Service接口 + * + * @author xinelu + * @date 2024-03-28 + */ +public interface IPatientQuestionSubjectResultService { + /** + * 查询患者问卷题目提交结果信息 + * + * @param id 患者问卷题目提交结果信息主键 + * @return 患者问卷题目提交结果信息 + */ + public PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id); + + /** + * 查询患者问卷题目提交结果信息列表 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 患者问卷题目提交结果信息集合 + */ + List selectPatientQuestionSubjectResultList(PatientQuestionSubjectResult patientQuestionSubjectResult); + + /** + * 新增患者问卷题目提交结果信息 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 结果 + */ + int insertPatientQuestionSubjectResult(PatientQuestionSubjectResult patientQuestionSubjectResult); + + /** + * 修改患者问卷题目提交结果信息 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 结果 + */ + int updatePatientQuestionSubjectResult(PatientQuestionSubjectResult patientQuestionSubjectResult); + + /** + * 批量删除患者问卷题目提交结果信息 + * + * @param ids 需要删除的患者问卷题目提交结果信息主键集合 + * @return 结果 + */ + int deletePatientQuestionSubjectResultByIds(Long[] ids); + + /** + * 删除患者问卷题目提交结果信息信息 + * + * @param id 患者问卷题目提交结果信息主键 + * @return 结果 + */ + int deletePatientQuestionSubjectResultById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubjectresult/impl/PatientQuestionSubjectResultServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubjectresult/impl/PatientQuestionSubjectResultServiceImpl.java new file mode 100644 index 00000000..821d7e97 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubjectresult/impl/PatientQuestionSubjectResultServiceImpl.java @@ -0,0 +1,90 @@ +package com.xinelu.manage.service.patientquestionsubjectresult.impl; + +import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult; +import com.xinelu.manage.mapper.patientquestionsubjectresult.PatientQuestionSubjectResultMapper; +import com.xinelu.manage.service.patientquestionsubjectresult.IPatientQuestionSubjectResultService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * 患者问卷题目提交结果信息Service业务层处理 + * + * @author xinelu + * @date 2024-03-28 + */ +@Service +public class PatientQuestionSubjectResultServiceImpl implements IPatientQuestionSubjectResultService { + @Resource + private PatientQuestionSubjectResultMapper patientQuestionSubjectResultMapper; + + /** + * 查询患者问卷题目提交结果信息 + * + * @param id 患者问卷题目提交结果信息主键 + * @return 患者问卷题目提交结果信息 + */ + @Override + public PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id) { + return patientQuestionSubjectResultMapper.selectPatientQuestionSubjectResultById(id); + } + + /** + * 查询患者问卷题目提交结果信息列表 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 患者问卷题目提交结果信息 + */ + @Override + public List selectPatientQuestionSubjectResultList(PatientQuestionSubjectResult patientQuestionSubjectResult) { + return patientQuestionSubjectResultMapper.selectPatientQuestionSubjectResultList(patientQuestionSubjectResult); + } + + /** + * 新增患者问卷题目提交结果信息 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 结果 + */ + @Override + public int insertPatientQuestionSubjectResult(PatientQuestionSubjectResult patientQuestionSubjectResult) { + patientQuestionSubjectResult.setCreateTime(LocalDateTime.now()); + return patientQuestionSubjectResultMapper.insertPatientQuestionSubjectResult(patientQuestionSubjectResult); + } + + /** + * 修改患者问卷题目提交结果信息 + * + * @param patientQuestionSubjectResult 患者问卷题目提交结果信息 + * @return 结果 + */ + @Override + public int updatePatientQuestionSubjectResult(PatientQuestionSubjectResult patientQuestionSubjectResult) { + patientQuestionSubjectResult.setUpdateTime(LocalDateTime.now()); + return patientQuestionSubjectResultMapper.updatePatientQuestionSubjectResult(patientQuestionSubjectResult); + } + + /** + * 批量删除患者问卷题目提交结果信息 + * + * @param ids 需要删除的患者问卷题目提交结果信息主键 + * @return 结果 + */ + @Override + public int deletePatientQuestionSubjectResultByIds(Long[] ids) { + return patientQuestionSubjectResultMapper.deletePatientQuestionSubjectResultByIds(ids); + } + + /** + * 删除患者问卷题目提交结果信息信息 + * + * @param id 患者问卷题目提交结果信息主键 + * @return 结果 + */ + @Override + public int deletePatientQuestionSubjectResultById(Long id) { + return patientQuestionSubjectResultMapper.deletePatientQuestionSubjectResultById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubmitresult/IPatientQuestionSubmitResultService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubmitresult/IPatientQuestionSubmitResultService.java new file mode 100644 index 00000000..c8535f0d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubmitresult/IPatientQuestionSubmitResultService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.patientquestionsubmitresult; + +import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult; + +import java.util.List; + +/** + * 患者问卷提交结果信息Service接口 + * + * @author xinelu + * @date 2024-03-28 + */ +public interface IPatientQuestionSubmitResultService { + /** + * 查询患者问卷提交结果信息 + * + * @param id 患者问卷提交结果信息主键 + * @return 患者问卷提交结果信息 + */ + PatientQuestionSubmitResult selectPatientQuestionSubmitResultById(Long id); + + /** + * 查询患者问卷提交结果信息列表 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 患者问卷提交结果信息集合 + */ + List selectPatientQuestionSubmitResultList(PatientQuestionSubmitResult patientQuestionSubmitResult); + + /** + * 新增患者问卷提交结果信息 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 结果 + */ + int insertPatientQuestionSubmitResult(PatientQuestionSubmitResult patientQuestionSubmitResult); + + /** + * 修改患者问卷提交结果信息 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 结果 + */ + int updatePatientQuestionSubmitResult(PatientQuestionSubmitResult patientQuestionSubmitResult); + + /** + * 批量删除患者问卷提交结果信息 + * + * @param ids 需要删除的患者问卷提交结果信息主键集合 + * @return 结果 + */ + int deletePatientQuestionSubmitResultByIds(Long[] ids); + + /** + * 删除患者问卷提交结果信息信息 + * + * @param id 患者问卷提交结果信息主键 + * @return 结果 + */ + int deletePatientQuestionSubmitResultById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubmitresult/impl/PatientQuestionSubmitResultServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubmitresult/impl/PatientQuestionSubmitResultServiceImpl.java new file mode 100644 index 00000000..2fab972b --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientquestionsubmitresult/impl/PatientQuestionSubmitResultServiceImpl.java @@ -0,0 +1,90 @@ +package com.xinelu.manage.service.patientquestionsubmitresult.impl; + +import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult; +import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper; +import com.xinelu.manage.service.patientquestionsubmitresult.IPatientQuestionSubmitResultService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * 患者问卷提交结果信息Service业务层处理 + * + * @author xinelu + * @date 2024-03-28 + */ +@Service +public class PatientQuestionSubmitResultServiceImpl implements IPatientQuestionSubmitResultService { + @Resource + private PatientQuestionSubmitResultMapper patientQuestionSubmitResultMapper; + + /** + * 查询患者问卷提交结果信息 + * + * @param id 患者问卷提交结果信息主键 + * @return 患者问卷提交结果信息 + */ + @Override + public PatientQuestionSubmitResult selectPatientQuestionSubmitResultById(Long id) { + return patientQuestionSubmitResultMapper.selectPatientQuestionSubmitResultById(id); + } + + /** + * 查询患者问卷提交结果信息列表 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 患者问卷提交结果信息 + */ + @Override + public List selectPatientQuestionSubmitResultList(PatientQuestionSubmitResult patientQuestionSubmitResult) { + return patientQuestionSubmitResultMapper.selectPatientQuestionSubmitResultList(patientQuestionSubmitResult); + } + + /** + * 新增患者问卷提交结果信息 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 结果 + */ + @Override + public int insertPatientQuestionSubmitResult(PatientQuestionSubmitResult patientQuestionSubmitResult) { + patientQuestionSubmitResult.setCreateTime(LocalDateTime.now()); + return patientQuestionSubmitResultMapper.insertPatientQuestionSubmitResult(patientQuestionSubmitResult); + } + + /** + * 修改患者问卷提交结果信息 + * + * @param patientQuestionSubmitResult 患者问卷提交结果信息 + * @return 结果 + */ + @Override + public int updatePatientQuestionSubmitResult(PatientQuestionSubmitResult patientQuestionSubmitResult) { + patientQuestionSubmitResult.setUpdateTime(LocalDateTime.now()); + return patientQuestionSubmitResultMapper.updatePatientQuestionSubmitResult(patientQuestionSubmitResult); + } + + /** + * 批量删除患者问卷提交结果信息 + * + * @param ids 需要删除的患者问卷提交结果信息主键 + * @return 结果 + */ + @Override + public int deletePatientQuestionSubmitResultByIds(Long[] ids) { + return patientQuestionSubmitResultMapper.deletePatientQuestionSubmitResultByIds(ids); + } + + /** + * 删除患者问卷提交结果信息信息 + * + * @param id 患者问卷提交结果信息主键 + * @return 结果 + */ + @Override + public int deletePatientQuestionSubmitResultById(Long id) { + return patientQuestionSubmitResultMapper.deletePatientQuestionSubmitResultById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskexecuterecord/IPatientTaskExecuteRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskexecuterecord/IPatientTaskExecuteRecordService.java new file mode 100644 index 00000000..833daf7c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskexecuterecord/IPatientTaskExecuteRecordService.java @@ -0,0 +1,79 @@ +package com.xinelu.manage.service.patienttaskexecuterecord; + +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; +import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO; + +import java.util.List; + +/** + * 患者管理任务执行记录Service接口 + * + * @author xinelu + * @date 2024-03-25 + */ +public interface IPatientTaskExecuteRecordService { + /** + * 查询患者管理任务执行记录 + * + * @param id 患者管理任务执行记录主键 + * @return 患者管理任务执行记录 + */ + PatientTaskExecuteRecord selectPatientTaskExecuteRecordById(Long id); + + /** + * 查询患者管理任务执行记录列表 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 患者管理任务执行记录集合 + */ + List selectPatientTaskExecuteRecordList(PatientTaskExecuteRecordVO patientTaskExecuteRecord); + + /** + * 新增患者管理任务执行记录 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 结果 + */ + int insertPatientTaskExecuteRecord(PatientTaskExecuteRecord patientTaskExecuteRecord); + + /** + * 修改患者管理任务执行记录 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 结果 + */ + int updatePatientTaskExecuteRecord(PatientTaskExecuteRecord patientTaskExecuteRecord); + + /** + * 批量删除患者管理任务执行记录 + * + * @param ids 需要删除的患者管理任务执行记录主键集合 + * @return 结果 + */ + int deletePatientTaskExecuteRecordByIds(Long[] ids); + + /** + * 删除患者管理任务执行记录信息 + * + * @param id 患者管理任务执行记录主键 + * @return 结果 + */ + int deletePatientTaskExecuteRecordById(Long id); + + /** + * 根据患者信息查询就诊记录 + * + * @param id 记录id + * @return AjaxResult + */ + AjaxResult selectVisitRecord(Long id); + + /** + * 根据任务执行记录查询患者问卷信息 + * + * @param taskExecuteRecordId 患者管理任务执行记录表id + * @return PatientQuestionSubmitResultDTO + */ + AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskexecuterecord/impl/PatientTaskExecuteRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskexecuterecord/impl/PatientTaskExecuteRecordServiceImpl.java new file mode 100644 index 00000000..0235fd8a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskexecuterecord/impl/PatientTaskExecuteRecordServiceImpl.java @@ -0,0 +1,120 @@ +package com.xinelu.manage.service.patienttaskexecuterecord.impl; + +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.utils.AgeUtil; +import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; +import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper; +import com.xinelu.manage.mapper.patienttaskexecuterecord.PatientTaskExecuteRecordMapper; +import com.xinelu.manage.service.patienttaskexecuterecord.IPatientTaskExecuteRecordService; +import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * 患者管理任务执行记录Service业务层处理 + * + * @author xinelu + * @date 2024-03-25 + */ +@Service +public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteRecordService { + @Resource + private PatientTaskExecuteRecordMapper patientTaskExecuteRecordMapper; + @Resource + private PatientQuestionSubmitResultMapper submitResultMapper; + + /** + * 查询患者管理任务执行记录 + * + * @param id 患者管理任务执行记录主键 + * @return 患者管理任务执行记录 + */ + @Override + public PatientTaskExecuteRecord selectPatientTaskExecuteRecordById(Long id) { + return patientTaskExecuteRecordMapper.selectPatientTaskExecuteRecordById(id); + } + + /** + * 查询患者管理任务执行记录列表 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 患者管理任务执行记录 + */ + @Override + public List selectPatientTaskExecuteRecordList(PatientTaskExecuteRecordVO patientTaskExecuteRecord) { + return patientTaskExecuteRecordMapper.selectPatientAndExecuteRecordList(patientTaskExecuteRecord); + } + + /** + * 新增患者管理任务执行记录 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 结果 + */ + @Override + public int insertPatientTaskExecuteRecord(PatientTaskExecuteRecord patientTaskExecuteRecord) { + patientTaskExecuteRecord.setCreateTime(LocalDateTime.now()); + return patientTaskExecuteRecordMapper.insertPatientTaskExecuteRecord(patientTaskExecuteRecord); + } + + /** + * 修改患者管理任务执行记录 + * + * @param patientTaskExecuteRecord 患者管理任务执行记录 + * @return 结果 + */ + @Override + public int updatePatientTaskExecuteRecord(PatientTaskExecuteRecord patientTaskExecuteRecord) { + patientTaskExecuteRecord.setUpdateTime(LocalDateTime.now()); + return patientTaskExecuteRecordMapper.updatePatientTaskExecuteRecord(patientTaskExecuteRecord); + } + + /** + * 批量删除患者管理任务执行记录 + * + * @param ids 需要删除的患者管理任务执行记录主键 + * @return 结果 + */ + @Override + public int deletePatientTaskExecuteRecordByIds(Long[] ids) { + return patientTaskExecuteRecordMapper.deletePatientTaskExecuteRecordByIds(ids); + } + + /** + * 删除患者管理任务执行记录信息 + * + * @param id 患者管理任务执行记录主键 + * @return 结果 + */ + @Override + public int deletePatientTaskExecuteRecordById(Long id) { + return patientTaskExecuteRecordMapper.deletePatientTaskExecuteRecordById(id); + } + + /** + * 根据患者信息查询就诊记录 + * + * @param id id + * @return AjaxResult + */ + @Override + public AjaxResult selectVisitRecord(Long id) { + PatientTaskExecuteRecordVO patientTaskExecuteRecordVO = patientTaskExecuteRecordMapper.selectVisitRecord(id); + patientTaskExecuteRecordVO.setAge(AgeUtil.getAgeMonth(patientTaskExecuteRecordVO.getBirthDate().toString())); + return AjaxResult.success(patientTaskExecuteRecordVO); + } + + /** + * 根据任务执行记录查询患者问卷信息 + * + * @param taskExecuteRecordId 患者管理任务执行记录表id + * @return PatientQuestionSubmitResultDTO + */ + @Override + public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) { + return AjaxResult.success(submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskpushrecord/IPatientTaskPushRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskpushrecord/IPatientTaskPushRecordService.java new file mode 100644 index 00000000..38490917 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskpushrecord/IPatientTaskPushRecordService.java @@ -0,0 +1,65 @@ +package com.xinelu.manage.service.patienttaskpushrecord; + +import com.xinelu.manage.domain.patienttaskpushrecord.PatientTaskPushRecord; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; + +import java.util.List; + + +/** + * 患者管理任务推送方式记录Service接口 + * + * @author xinelu + * @date 2024-03-21 + */ +public interface IPatientTaskPushRecordService { + /** + * 查询患者管理任务推送方式记录 + * + * @param id 患者管理任务推送方式记录主键 + * @return 患者管理任务推送方式记录 + */ + public PatientTaskPushRecord selectPatientTaskPushRecordById(Long id); + + /** + * 查询患者管理任务推送方式记录列表 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 患者管理任务推送方式记录集合 + */ + List selectPatientTaskPushRecordList(PatientTaskPushRecord patientTaskPushRecord); + + /** + * 新增患者管理任务推送方式记录 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 结果 + */ + int insertPatientTaskPushRecord(PatientTaskPushRecord patientTaskPushRecord); + + /** + * 修改患者管理任务推送方式记录 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 结果 + */ + int updatePatientTaskPushRecord(PatientTaskPushRecord patientTaskPushRecord); + + /** + * 批量删除患者管理任务推送方式记录 + * + * @param ids 需要删除的患者管理任务推送方式记录主键集合 + * @return 结果 + */ + int deletePatientTaskPushRecordByIds(Long[] ids); + + /** + * 删除患者管理任务推送方式记录信息 + * + * @param id 患者管理任务推送方式记录主键 + * @return 结果 + */ + int deletePatientTaskPushRecordById(Long id); + + SignPatientManageRouteNode getManageRouteNode(Long manageRouteNodeId); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskpushrecord/impl/PatientTaskPushRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskpushrecord/impl/PatientTaskPushRecordServiceImpl.java new file mode 100644 index 00000000..dcf74bad --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patienttaskpushrecord/impl/PatientTaskPushRecordServiceImpl.java @@ -0,0 +1,100 @@ +package com.xinelu.manage.service.patienttaskpushrecord.impl; + +import com.xinelu.manage.domain.patienttaskpushrecord.PatientTaskPushRecord; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import com.xinelu.manage.mapper.patienttaskpushrecord.PatientTaskPushRecordMapper; +import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; +import com.xinelu.manage.service.patienttaskpushrecord.IPatientTaskPushRecordService; +import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * 患者管理任务推送方式记录Service业务层处理 + * + * @author xinelu + * @date 2024-03-21 + */ +@Service +public class PatientTaskPushRecordServiceImpl implements IPatientTaskPushRecordService { + @Resource + private PatientTaskPushRecordMapper patientTaskPushRecordMapper; + @Resource + private ISignPatientManageRouteNodeService manageRouteNodeService; + + /** + * 查询患者管理任务推送方式记录 + * + * @param id 患者管理任务推送方式记录主键 + * @return 患者管理任务推送方式记录 + */ + @Override + public PatientTaskPushRecord selectPatientTaskPushRecordById(Long id) { + return patientTaskPushRecordMapper.selectPatientTaskPushRecordById(id); + } + + /** + * 查询患者管理任务推送方式记录列表 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 患者管理任务推送方式记录 + */ + @Override + public List selectPatientTaskPushRecordList(PatientTaskPushRecord patientTaskPushRecord) { + return patientTaskPushRecordMapper.selectPatientTaskPushRecordList(patientTaskPushRecord); + } + + /** + * 新增患者管理任务推送方式记录 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 结果 + */ + @Override + public int insertPatientTaskPushRecord(PatientTaskPushRecord patientTaskPushRecord) { + patientTaskPushRecord.setCreateTime(LocalDateTime.now()); + return patientTaskPushRecordMapper.insertPatientTaskPushRecord(patientTaskPushRecord); + } + + /** + * 修改患者管理任务推送方式记录 + * + * @param patientTaskPushRecord 患者管理任务推送方式记录 + * @return 结果 + */ + @Override + public int updatePatientTaskPushRecord(PatientTaskPushRecord patientTaskPushRecord) { + patientTaskPushRecord.setUpdateTime(LocalDateTime.now()); + return patientTaskPushRecordMapper.updatePatientTaskPushRecord(patientTaskPushRecord); + } + + /** + * 批量删除患者管理任务推送方式记录 + * + * @param ids 需要删除的患者管理任务推送方式记录主键 + * @return 结果 + */ + @Override + public int deletePatientTaskPushRecordByIds(Long[] ids) { + return patientTaskPushRecordMapper.deletePatientTaskPushRecordByIds(ids); + } + + /** + * 删除患者管理任务推送方式记录信息 + * + * @param id 患者管理任务推送方式记录主键 + * @return 结果 + */ + @Override + public int deletePatientTaskPushRecordById(Long id) { + return patientTaskPushRecordMapper.deletePatientTaskPushRecordById(id); + } + + @Override + public SignPatientManageRouteNode getManageRouteNode(Long manageRouteNodeId) { + return manageRouteNodeService.selectSignPatientManageRouteNodeById(manageRouteNodeId); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java index 65c5ad8a..79679242 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java @@ -1,9 +1,11 @@ package com.xinelu.manage.service.patientvisitrecord; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordImportDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordInfoSaveDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordSaveDto; import java.util.List; import org.springframework.web.bind.annotation.RequestBody; @@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestBody; * @date 2024-02-26 */ public interface IPatientVisitRecordService { + /** * 查询患者就诊记录基本信息 * @@ -37,14 +40,22 @@ public interface IPatientVisitRecordService { * @param patientVisitRecord 患者就诊记录基本信息 * @return 结果 */ - public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord); + public void insertPatientVisitRecord(PatientVisitRecordSaveDto patientVisitRecord); + + /** + * 修改患者就诊记录基本信息 + * + * @param patientVisitRecord 患者就诊记录基本信息 + * @return 结果 + */ + public int updatePatientVisitRecord(PatientVisitRecord patientVisitRecord); /** * 患者配置——就诊信息保存 * @param saveDto * @return */ - int saveRecord(@RequestBody PatientVisitRecordSaveDto saveDto); + int saveRecord(@RequestBody PatientVisitRecordInfoSaveDto saveDto); /** * 修改患者就诊记录基本信息 @@ -52,7 +63,7 @@ public interface IPatientVisitRecordService { * @param updDto 患者就诊记录基本信息 * @return 结果 */ - public int updatePatientVisitRecord(PatientVisitRecordSaveDto updDto); + public int updateRecord(PatientVisitRecordInfoSaveDto updDto); /** * 批量删除患者就诊记录基本信息 @@ -77,4 +88,8 @@ public interface IPatientVisitRecordService { * @return int **/ AjaxResult importPatientList(List patientList, String patientType); + + void setPatientType(PatientInfo patientInfo, PatientVisitRecord patientVisitRecord); + + PatientVisitRecord getLastRecord(Long hospitalAgencyId,Long patientId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java index c71cb61f..b63178ae 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java @@ -2,8 +2,10 @@ package com.xinelu.manage.service.patientvisitrecord.impl; import com.xinelu.common.constant.Constants; import com.xinelu.common.constant.NodeTypeConstants; -import com.xinelu.common.constant.VisitTypeConstants; +import com.xinelu.common.constant.PatientTypeConstants; +import com.xinelu.common.constant.VisitMethodConstants; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.enums.PatientSourceEnum; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.StringUtils; @@ -16,25 +18,26 @@ import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.dto.patientinfo.PatientInfoDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordImportDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordInfoSaveDto; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordSaveDto; import com.xinelu.manage.mapper.agency.AgencyMapper; import com.xinelu.manage.mapper.department.DepartmentMapper; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper; +import com.xinelu.manage.service.patientinfo.IPatientInfoService; import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.BooleanUtils; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.time.LocalDate; +import com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo; import java.time.LocalDateTime; -import java.time.ZoneId; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 患者就诊记录基本信息Service业务层处理 @@ -46,16 +49,18 @@ import java.util.stream.Collectors; public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService { @Resource private PatientVisitRecordMapper patientVisitRecordMapper; - @Resource - private RegexUtil regexUtil; - @Resource - private PatientInfoMapper patientMapper; - @Resource - private AgencyMapper agencyMapper; - @Resource - private DepartmentMapper departmentMapper; + @Resource + private RegexUtil regexUtil; + @Resource + private PatientInfoMapper patientMapper; + @Resource + private AgencyMapper agencyMapper; + @Resource + private DepartmentMapper departmentMapper; + @Resource + private IPatientInfoService patientInfoService; - /** + /** * 查询患者就诊记录基本信息 * * @param id 患者就诊记录基本信息主键 @@ -80,32 +85,125 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService /** * 新增患者就诊记录基本信息 * - * @param patientVisitRecord 患者就诊记录基本信息 + * @param saveDto 患者就诊记录基本信息 * @return 结果 */ @Override - public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord) { - patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); - patientVisitRecord.setCreateTime(LocalDateTime.now()); - return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); + @Transactional(rollbackFor = Exception.class) + public void insertPatientVisitRecord(PatientVisitRecordSaveDto saveDto) { + // 根据机构id、患者身份证号判断门诊/住院号是否重复 + PatientVisitRecord patientVisitRecord = patientVisitRecordMapper.judgeRepeat(saveDto.getHospitalAgencyId(), saveDto.getCardNo(), saveDto.getInHospitalNumber()); + if (ObjectUtils.isNotEmpty(patientVisitRecord)) { + throw new ServiceException("门诊/住院号重复,请确认后重新输入!"); + } + PatientVisitRecord saveBody = new PatientVisitRecord(); + BeanUtils.copyBeanProp(saveBody, saveDto); + setVisitDate(saveBody); + // 1、保存患者信息-查询是否有患者档案 + PatientInfoDto patientInfoDto = new PatientInfoDto(); + patientInfoDto.setHospitalAgencyId(saveBody.getHospitalAgencyId()); + patientInfoDto.setCardNo(saveBody.getCardNo()); + List patientInfoList = patientInfoService.selectPatientInfoList(patientInfoDto); + // 患者档案信息新增/修改 + PatientInfo patientInfo = new PatientInfo(); + if(CollectionUtils.isEmpty(patientInfoList)) { + // 新增档案 + BeanUtils.copyBeanProp(patientInfo, saveDto); + patientInfo.setPatientSource(PatientSourceEnum.MANAGE_END.name()); + patientInfo.setDelFlag(0); + patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientInfo.setCreateTime(LocalDateTime.now()); + PatientInfo patientSave = patientInfoService.insertPatientInfo(patientInfo); + saveBody.setPatientId(patientSave.getId()); + saveBody.setResidentId(patientSave.getResidentId()); + } else { + patientInfo = patientInfoList.get(0); + Long patientId = patientInfo.getId(); + // 修改档案 + BeanUtils.copyBeanProp(patientInfo, saveDto); + patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientInfo.setUpdateTime(LocalDateTime.now()); + patientInfo.setId(patientId); + patientInfoService.updatePatientInfo(patientInfo); + saveBody.setPatientId(patientId); + } + // 保存/修改就诊记录 + Long recordId = saveOrUpate(saveBody); + // 修改患者最近一次就诊记录id + patientInfo.setPatientVisitRecordId(recordId); + patientInfo.setVisitDate(saveBody.getVisitDate()); + patientInfoService.updatePatientInfo(patientInfo); } - @Override - public int saveRecord(PatientVisitRecordSaveDto saveDto) { + private Long saveOrUpate(PatientVisitRecord patientVisitRecord) { + PatientVisitRecordDto query = new PatientVisitRecordDto(); + query.setHospitalAgencyId(patientVisitRecord.getHospitalAgencyId()); + query.setInHospitalNumber(patientVisitRecord.getInHospitalNumber()); + List patientVisitRecordList = patientVisitRecordMapper.selectPatientVisitRecordList(query); + if (CollectionUtils.isEmpty(patientVisitRecordList)) { + patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientVisitRecord.setCreateTime(LocalDateTime.now()); + patientVisitRecord.setDelFlag(0); + patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); + } else { + patientVisitRecord.setId(patientVisitRecordList.get(0).getId()); + patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientVisitRecord.setUpdateTime(LocalDateTime.now()); + patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); + } + return patientVisitRecord.getId(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int updatePatientVisitRecord(PatientVisitRecord patientVisitRecord) { + // 根据机构id、患者身份证号判断门诊/住院号是否重复 + PatientVisitRecord object = patientVisitRecordMapper.judgeRepeat(patientVisitRecord.getHospitalAgencyId(), patientVisitRecord.getCardNo(), patientVisitRecord.getInHospitalNumber()); + if (ObjectUtils.isNotEmpty(object)) { + throw new ServiceException("门诊/住院号重复,请确认后重新输入!"); + } + // 修改患者基本信息 + PatientInfo patientInfo = patientMapper.selectPatientInfoById(patientVisitRecord.getPatientId()); + Long residentId = patientInfo.getResidentId(); + setVisitDate(patientVisitRecord); + BeanUtils.copyBeanProp(patientInfo, patientVisitRecord); + patientInfo.setId(patientVisitRecord.getPatientId()); + patientInfo.setResidentId(residentId); + PatientInfo afterUpd = patientInfoService.updatePatientInfo(patientInfo); + // 修改就诊记录信息 + patientVisitRecord.setResidentId(afterUpd.getResidentId()); + return patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int saveRecord(PatientVisitRecordInfoSaveDto saveDto) { PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); - // 查询患者信息 - PatientInfo patientInfo = patientMapper.selectPatientInfoById(saveDto.getPatientId()); - BeanUtils.copyBeanProp(patientVisitRecord, patientInfo); + // 查询患者基本信息 + PatientBaseInfoVo patientBaseInfo = patientMapper.getPatientBaseInfo(saveDto.getPatientId()); + BeanUtils.copyBeanProp(patientVisitRecord, patientBaseInfo); + // 根据机构id、患者身份证号判断门诊/住院号是否重复 + PatientVisitRecord object = patientVisitRecordMapper.judgeRepeat(patientVisitRecord.getHospitalAgencyId(), patientVisitRecord.getCardNo(), patientVisitRecord.getInHospitalNumber()); + if (ObjectUtils.isNotEmpty(object)) { + throw new ServiceException("门诊/住院号重复,请确认后重新输入!"); + } BeanUtils.copyBeanProp(patientVisitRecord, saveDto); + patientVisitRecord.setDelFlag(0); patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); patientVisitRecord.setCreateTime(LocalDateTime.now()); - // 住院时间,出院时间-入院时间 - LocalDate admissionTime = saveDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - LocalDate dischargeTime = saveDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime); - patientVisitRecord.setHospitalizationDays((int) daysBetween + 1); - patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); - return 0; + setVisitDate(patientVisitRecord); + int flag = patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); + if (flag > 0) { + // 修改患者信息 + PatientInfo patientInfo = patientMapper.selectPatientInfoById(saveDto.getPatientId()); + BeanUtils.copyBeanProp(patientInfo, patientVisitRecord); + patientInfo.setId(saveDto.getPatientId()); + // 设置患者类型 + setPatientType(patientInfo, patientVisitRecord); + patientInfo.setPatientVisitRecordId(patientVisitRecord.getId()); + patientInfoService.updatePatientInfo(patientInfo); + } + return flag; } /** @@ -115,20 +213,32 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService * @return 结果 */ @Override - public int updatePatientVisitRecord(PatientVisitRecordSaveDto updDto) { + @Transactional + public int updateRecord(PatientVisitRecordInfoSaveDto updDto) { + if (updDto.getId() == null) { + throw new ServiceException("数据传输错误"); + } PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); BeanUtils.copyBeanProp(patientVisitRecord, updDto); patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); patientVisitRecord.setUpdateTime(LocalDateTime.now()); // 住院时间,出院时间-入院时间 - LocalDate admissionTime = updDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - LocalDate dischargeTime = updDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime); - patientVisitRecord.setHospitalizationDays((int) daysBetween + 1); - patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); - return patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); + setVisitDate(patientVisitRecord); + int flag = patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); + if (flag > 0) { + // 查询患者信息 + PatientInfo patientInfo = patientMapper.selectPatientInfoById(updDto.getPatientId()); + // 修改患者信息 + patientInfo.setVisitMethod(updDto.getVisitMethod()); + patientInfo.setDepartmentId(updDto.getDepartmentId()); + patientInfo.setDepartmentName(updDto.getDepartmentName()); + setPatientType(patientInfo, patientVisitRecord); + patientInfoService.updatePatientInfo(patientInfo); + } + return flag; } + /** * 批量删除患者就诊记录基本信息 * @@ -151,137 +261,162 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService return patientVisitRecordMapper.deletePatientVisitRecordById(id); } - @Override - public AjaxResult importPatientList(List patientList, String patientType) { - //判断添加的数据是否为空 - if (CollectionUtils.isEmpty(patientList)) { - return AjaxResult.error("请添加就诊信息导入信息!"); - } - // 根据患者身份证号做去除处理 - List importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList()); - // 校验联系电话格式是否正确 - PatientVisitRecordImportDto patient = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPatientPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPatientPhone()))).findFirst().orElse(new PatientVisitRecordImportDto()); - if (StringUtils.isNotBlank(patient.getPatientPhone())) { - return AjaxResult.error("当前患者联系电话:" + patient.getPatientPhone() + " 格式不正确,请重新录入!"); - } + @Override + public AjaxResult importPatientList(List patientList, String patientType) { + //判断添加的数据是否为空 + if (CollectionUtils.isEmpty(patientList)) { + return AjaxResult.error("请添加就诊信息导入信息!"); + } + // 根据患者身份证号做去除处理 + List importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList()); + // 校验联系电话格式是否正确 + PatientVisitRecordImportDto patient = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPatientPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPatientPhone()))).findFirst().orElse(new PatientVisitRecordImportDto()); + if (StringUtils.isNotBlank(patient.getPatientPhone())) { + return AjaxResult.error("当前患者联系电话:" + patient.getPatientPhone() + " 格式不正确,请重新录入!"); + } - List saveList = new ArrayList<>(); - for (PatientVisitRecordImportDto item : importDataList) { - PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); - BeanUtils.copyProperties(item, patientVisitRecord); - patientVisitRecord.setCreateTime(LocalDateTime.now()); - patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); - switch (patientType) { - // 在院患者 - case Constants.IN_HOSPITAL: - case Constants.DISCHARGED: - patientVisitRecord.setVisitType(VisitTypeConstants.BE_HOSPITALIZED); - break; - // 门诊患者 - case Constants.OUTPATIENT: - patientVisitRecord.setVisitType(VisitTypeConstants.OUTPATIENT_SERVICE); - patientVisitRecord.setInHospitalNumber(item.getOutpatientNumber());// 门诊、住院号共用一个字段 - break; - } - // 根据身份证号查询患者信息 - PatientInfoDto patientQuery = new PatientInfoDto(); - patientQuery.setCardNo(item.getCardNo()); - List patientInfoList = patientMapper.selectPatientInfoList(patientQuery); - if (CollectionUtils.isNotEmpty(patientInfoList)) { - // 修改居民信息 - PatientInfo updInfo = patientInfoList.get(0); - BeanUtils.copyBeanProp(updInfo, item); - patientMapper.updatePatientInfo(updInfo); - patientVisitRecord.setPatientId(patientInfoList.get(0).getId()); - } else { - PatientInfo saveInfo = new PatientInfo(); - // 添加居民 - BeanUtils.copyBeanProp(saveInfo, item); - patientMapper.insertPatientInfo(saveInfo); - patientVisitRecord.setPatientId(saveInfo.getId()); - } - // 根据医院名称查询医院id - Agency agency = new Agency(); - if (StringUtils.isNotBlank(item.getHospitalAgencyName())) { - agency.setAgencyName(item.getHospitalAgencyName()); - agency.setNodeType(NodeTypeConstants.HOSPITAL); - List agencyList = agencyMapper.selectAgencyList(agency); - if (CollectionUtils.isNotEmpty(agencyList)) { - patientVisitRecord.setHospitalAgencyId(agencyList.get(0).getId()); - } - } else { - patientVisitRecord.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId()); - Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId()); - if (ObjectUtils.isNotEmpty(agencyData)) { - patientVisitRecord.setHospitalAgencyName(agencyData.getAgencyName()); - } - } - // 查询院区id - if (StringUtils.isNotBlank(item.getCampusAgencyName())) { - agency.setAgencyName(item.getWardName()); - agency.setNodeType(NodeTypeConstants.CAMPUS); - List campusList = agencyMapper.selectAgencyList(agency); - if (CollectionUtils.isNotEmpty(campusList)) { - patientVisitRecord.setCampusAgencyId(campusList.get(0).getId()); - } - } + List saveList = new ArrayList<>(); + for (PatientVisitRecordImportDto item : importDataList) { + PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); + BeanUtils.copyProperties(item, patientVisitRecord); + patientVisitRecord.setCreateTime(LocalDateTime.now()); + patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + switch (patientType) { + // 在院患者 + case Constants.IN_HOSPITAL: + case Constants.DISCHARGED: + patientVisitRecord.setVisitMethod(VisitMethodConstants.BE_IN_HOSPITAL); + break; + // 门诊患者 + case Constants.OUTPATIENT: + patientVisitRecord.setVisitMethod(VisitMethodConstants.OUTPATIENT_SERVICE); + patientVisitRecord.setInHospitalNumber(item.getOutpatientNumber());// 门诊、住院号共用一个字段 + break; + } + // 根据医院名称查询医院id + Agency agency = new Agency(); + if (StringUtils.isNotBlank(item.getHospitalAgencyName())) { + agency.setAgencyName(item.getHospitalAgencyName()); + agency.setNodeType(NodeTypeConstants.HOSPITAL); + List agencyList = agencyMapper.selectAgencyList(agency); + if (CollectionUtils.isNotEmpty(agencyList)) { + patientVisitRecord.setHospitalAgencyId(agencyList.get(0).getId()); + } + } else { + patientVisitRecord.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId()); + Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId()); + if (ObjectUtils.isNotEmpty(agencyData)) { + patientVisitRecord.setHospitalAgencyName(agencyData.getAgencyName()); + } + } + // 查询院区id + if (StringUtils.isNotBlank(item.getCampusAgencyName())) { + agency.setAgencyName(item.getWardName()); + agency.setNodeType(NodeTypeConstants.CAMPUS); + List campusList = agencyMapper.selectAgencyList(agency); + if (CollectionUtils.isNotEmpty(campusList)) { + patientVisitRecord.setCampusAgencyId(campusList.get(0).getId()); + } + } - // 查询科室id - Department department = new Department(); - if (StringUtils.isNotBlank(item.getDepartmentName())) { - department.setAgencyName(item.getHospitalAgencyName()); - department.setDepartmentName(item.getDepartmentName()); - department.setNodeType(NodeTypeConstants.DEPARTMENT); - List deptList = departmentMapper.selectDepartmentList(department); - if (CollectionUtils.isNotEmpty(deptList)) { - patientVisitRecord.setDepartmentId(deptList.get(0).getId()); - } - } else { - patientVisitRecord.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId()); - Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId()); - if (ObjectUtils.isNotEmpty(department1)) { - patientVisitRecord.setDepartmentName(department1.getDepartmentName()); - } - } - // 查询病区 - if (StringUtils.isNotBlank(item.getWardName())) { - department.setAgencyName(item.getHospitalAgencyName()); - department.setDepartmentName(item.getWardName()); - department.setNodeType(NodeTypeConstants.WARD); - List deptList = departmentMapper.selectDepartmentList(department); - if (CollectionUtils.isNotEmpty(deptList)) { - patientVisitRecord.setWardId(deptList.get(0).getId()); - } - } - // 根据门诊/住院编号查询是否有记录 - PatientVisitRecordDto recordQuery = new PatientVisitRecordDto(); - recordQuery.setVisitType(patientType); - recordQuery.setInHospitalNumber(patientVisitRecord.getInHospitalInfo()); - List patientVisitRecordList = patientVisitRecordMapper.selectPatientVisitRecordList(recordQuery); - if (CollectionUtils.isEmpty(patientVisitRecordList)) { - // 新增 - saveList.add(patientVisitRecord); - } else { - // 修改 - patientVisitRecord.setId(patientVisitRecordList.get(0).getId()); - int flag = patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); - if (flag < 0) { - throw new ServiceException("导入患者就诊信息失败,请联系管理员!"); - } - } - } - int insertCount = patientVisitRecordMapper.insertBatch(saveList); - if (insertCount <= 0) { - throw new ServiceException("导入患者就诊信息失败,请联系管理员!"); - } - return AjaxResult.success(); - } + // 查询科室id + Department department = new Department(); + if (StringUtils.isNotBlank(item.getDepartmentName())) { + department.setAgencyName(item.getHospitalAgencyName()); + department.setDepartmentName(item.getDepartmentName()); + department.setNodeType(NodeTypeConstants.DEPARTMENT); + List deptList = departmentMapper.selectDepartmentList(department); + if (CollectionUtils.isNotEmpty(deptList)) { + patientVisitRecord.setDepartmentId(deptList.get(0).getId()); + } + } else { + patientVisitRecord.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId()); + Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId()); + if (ObjectUtils.isNotEmpty(department1)) { + patientVisitRecord.setDepartmentName(department1.getDepartmentName()); + } + } + // 查询病区 + if (StringUtils.isNotBlank(item.getWardName())) { + department.setAgencyName(item.getHospitalAgencyName()); + department.setDepartmentName(item.getWardName()); + department.setNodeType(NodeTypeConstants.WARD); + List deptList = departmentMapper.selectDepartmentList(department); + if (CollectionUtils.isNotEmpty(deptList)) { + patientVisitRecord.setWardId(deptList.get(0).getId()); + } + } + // 根据身份证号查询患者信息 + PatientInfoDto patientQuery = new PatientInfoDto(); + patientQuery.setCardNo(item.getCardNo()); + patientQuery.setHospitalAgencyId(patientVisitRecord.getHospitalAgencyId()); + List patientInfoList = patientMapper.selectPatientInfoList(patientQuery); + if (CollectionUtils.isNotEmpty(patientInfoList)) { + // 修改居民信息 + PatientInfo updInfo = patientInfoList.get(0); + BeanUtils.copyBeanProp(updInfo, item); + patientMapper.updatePatientInfo(updInfo); + patientVisitRecord.setPatientId(patientInfoList.get(0).getId()); + } else { + PatientInfo saveInfo = new PatientInfo(); + // 添加居民 + BeanUtils.copyBeanProp(saveInfo, item); + patientMapper.insertPatientInfo(saveInfo); + patientVisitRecord.setPatientId(saveInfo.getId()); + } + patientVisitRecord.setDelFlag(0); + // 根据门诊/住院编号查询是否有记录 + PatientVisitRecordDto recordQuery = new PatientVisitRecordDto(); + recordQuery.setVisitMethod(patientType); + recordQuery.setInHospitalNumber(patientVisitRecord.getInHospitalInfo()); + List patientVisitRecordList = patientVisitRecordMapper.selectPatientVisitRecordList(recordQuery); + if (CollectionUtils.isEmpty(patientVisitRecordList)) { + // 新增 + saveList.add(patientVisitRecord); + } else { + // 修改 + patientVisitRecord.setId(patientVisitRecordList.get(0).getId()); + int flag = patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); + if (flag < 0) { + throw new ServiceException("导入患者就诊信息失败,请联系管理员!"); + } + } + } + int insertCount = patientVisitRecordMapper.insertBatch(saveList); + if (insertCount <= 0) { + throw new ServiceException("导入患者就诊信息失败,请联系管理员!"); + } + return AjaxResult.success(); + } - public static void main(String[] args) { - LocalDate date1 = LocalDate.of(2020, 1, 1); - LocalDate date2 = LocalDate.of(2020, 1, 2); + @Override + public void setPatientType(PatientInfo patientInfo, PatientVisitRecord patientVisitRecord) { + if (StringUtils.equals(VisitMethodConstants.BE_IN_HOSPITAL, patientVisitRecord.getVisitMethod())) { + // 住院患者:有出院时间,设置患者类型为出院,没有出院时间,设置患者类型为在院 + if (patientVisitRecord.getDischargeTime() == null) { + patientInfo.setPatientType(PatientTypeConstants.IN_HOSPITAL_PATIENT); + } else { + patientInfo.setPatientType(PatientTypeConstants.DISCHARGED_PATIENT); + } + } else if (StringUtils.equals(VisitMethodConstants.OUTPATIENT_SERVICE, patientVisitRecord.getVisitMethod())) { + patientInfo.setPatientType(PatientTypeConstants.OUTPATIENT); + } + } - long daysBetween = ChronoUnit.DAYS.between(date1, date2); - System.out.println("Days between: " + daysBetween); - } + @Override public PatientVisitRecord getLastRecord(Long hospitalAgencyId, Long patientId) { + return patientVisitRecordMapper.getLastRecord(hospitalAgencyId, patientId); + } + + private void setVisitDate(PatientVisitRecord patientVisitRecord) { + if (StringUtils.equals(VisitMethodConstants.OUTPATIENT_SERVICE, patientVisitRecord.getVisitMethod())) { + patientVisitRecord.setVisitDate(patientVisitRecord.getDischargeTime()); + } else if (StringUtils.equals(VisitMethodConstants.BE_IN_HOSPITAL, patientVisitRecord.getVisitMethod())) { + // 住院时间,出院时间-入院时间 + if (patientVisitRecord.getDischargeTime() != null) { + long daysBetween = ChronoUnit.DAYS.between(patientVisitRecord.getAdmissionTime(), patientVisitRecord.getDischargeTime()); + patientVisitRecord.setHospitalizationDays((int) daysBetween + 1); + } + patientVisitRecord.setVisitDate(patientVisitRecord.getAdmissionTime()); + } + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java index 2d1294ec..d6d8d0b6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java @@ -3,8 +3,10 @@ package com.xinelu.manage.service.propagandainfo; import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; +import com.xinelu.manage.dto.propagandainfo.PropagandaInfoSaveDto; import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto; import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import java.util.List; /** @@ -20,7 +22,7 @@ public interface IPropagandaInfoService { * @param id 宣教库管理主键 * @return 宣教库管理 */ - public PropagandaInfo selectPropagandaInfoById(Long id); + public PropagandaMaterialsVo selectPropagandaInfoById(Long id); /** * 查询宣教库管理列表 @@ -33,18 +35,18 @@ public interface IPropagandaInfoService { /** * 新增宣教库管理 * - * @param propagandaInfo 宣教库管理 + * @param propagandaInfoSaveDto 宣教库保存传输对象 * @return 结果 */ - public int insertPropagandaInfo(PropagandaInfo propagandaInfo); + public int insertPropagandaInfo(PropagandaInfoSaveDto propagandaInfoSaveDto); /** * 修改宣教库管理 * - * @param propagandaInfo 宣教库管理 + * @param propagandaInfoSaveDto 宣教库管理 * @return 结果 */ - public int updatePropagandaInfo(PropagandaInfo propagandaInfo); + public int updatePropagandaInfo(PropagandaInfoSaveDto propagandaInfoSaveDto); /** * 复制宣教库管理 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java index c909d409..d57c0f7f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java @@ -1,18 +1,26 @@ package com.xinelu.manage.service.propagandainfo.impl; import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.manage.domain.materialsinfo.MaterialsInfo; import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; +import com.xinelu.manage.domain.propagandamaterials.PropagandaMaterials; import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; +import com.xinelu.manage.dto.propagandainfo.PropagandaInfoSaveDto; import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto; +import com.xinelu.manage.mapper.materialsinfo.MaterialsInfoMapper; import com.xinelu.manage.mapper.propagandainfo.PropagandaInfoMapper; +import com.xinelu.manage.mapper.propagandamaterials.PropagandaMaterialsMapper; import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService; import com.xinelu.manage.vo.department.DepartmentVO; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; +import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import java.time.LocalDateTime; import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 宣教库管理Service业务层处理 @@ -24,6 +32,10 @@ import java.util.List; public class PropagandaInfoServiceImpl implements IPropagandaInfoService { @Resource private PropagandaInfoMapper propagandaInfoMapper; + @Resource + private PropagandaMaterialsMapper propagandaMaterialsMapper; + @Resource + private MaterialsInfoMapper materialsInfoMapper; /** * 查询宣教库管理 @@ -32,8 +44,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { * @return 宣教库管理 */ @Override - public PropagandaInfo selectPropagandaInfoById(Long id) { - return propagandaInfoMapper.selectPropagandaInfoById(id); + public PropagandaMaterialsVo selectPropagandaInfoById(Long id) { + return propagandaInfoMapper.selectPropagandaInfo(id); } /** @@ -50,38 +62,100 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { /** * 新增宣教库管理 * - * @param propagandaInfo 宣教库管理 + * @param propagandaInfoSaveDto 宣教库保存传输对象 * @return 结果 */ @Override - public int insertPropagandaInfo(PropagandaInfo propagandaInfo) { + @Transactional + public int insertPropagandaInfo(PropagandaInfoSaveDto propagandaInfoSaveDto) { + PropagandaInfo propagandaInfo = new PropagandaInfo(); + BeanUtils.copyBeanProp(propagandaInfo, propagandaInfoSaveDto); + propagandaInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); propagandaInfo.setCreateTime(LocalDateTime.now()); - return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo); + propagandaInfo.setDelFlag(0); + int flag = propagandaInfoMapper.insertPropagandaInfo(propagandaInfo); + if (flag > 0) { + // 保存宣教素材关联关系 + if (CollectionUtils.isNotEmpty(propagandaInfoSaveDto.getMaterialsInfoList())) { + for (MaterialsInfo materialsInfo : propagandaInfoSaveDto.getMaterialsInfoList()) { + PropagandaMaterials propagandaMaterials = new PropagandaMaterials(); + propagandaMaterials.setPropagandaId(propagandaInfo.getId()); + propagandaMaterials.setPropagandaTitle(propagandaInfo.getPropagandaTitle()); + propagandaMaterials.setMaterialsId(materialsInfo.getId()); + propagandaMaterials.setMaterialsName(materialsInfo.getMaterialsName()); + propagandaMaterials.setCreateTime(LocalDateTime.now()); + propagandaMaterials.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + propagandaMaterials.setDelFlag(0); + propagandaMaterialsMapper.insertPropagandaMaterials(propagandaMaterials); + } + } + } + return flag; } /** * 修改宣教库管理 * - * @param propagandaInfo 宣教库管理 + * @param propagandaInfoSaveDto 宣教库管理 * @return 结果 */ @Override - public int updatePropagandaInfo(PropagandaInfo propagandaInfo) { + public int updatePropagandaInfo(PropagandaInfoSaveDto propagandaInfoSaveDto) { + PropagandaInfo propagandaInfo = new PropagandaInfo(); + BeanUtils.copyBeanProp(propagandaInfo, propagandaInfoSaveDto); + propagandaInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); propagandaInfo.setUpdateTime(LocalDateTime.now()); - return propagandaInfoMapper.updatePropagandaInfo(propagandaInfo); + int flag = propagandaInfoMapper.updatePropagandaInfo(propagandaInfo); + if (flag > 0) { + // 删除之前的关联关系 + propagandaMaterialsMapper.deleteByPropagandaId(propagandaInfo.getId()); + // 修改宣教素材关联关系 + if (CollectionUtils.isNotEmpty(propagandaInfoSaveDto.getMaterialsInfoList())) { + for (MaterialsInfo materialsInfo : propagandaInfoSaveDto.getMaterialsInfoList()) { + PropagandaMaterials propagandaMaterials = new PropagandaMaterials(); + propagandaMaterials.setPropagandaId(propagandaInfo.getId()); + propagandaMaterials.setPropagandaTitle(propagandaInfo.getPropagandaTitle()); + propagandaMaterials.setMaterialsId(materialsInfo.getId()); + propagandaMaterials.setMaterialsName(materialsInfo.getMaterialsName()); + propagandaMaterials.setCreateTime(LocalDateTime.now()); + propagandaMaterials.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + propagandaMaterials.setDelFlag(0); + propagandaMaterialsMapper.insertPropagandaMaterials(propagandaMaterials); + } + } + } + return flag; } @Override public int copyPropagandaInfo(Long id) { PropagandaInfo propagandaInfo = propagandaInfoMapper.selectPropagandaInfoById(id); propagandaInfo.setId(null); + propagandaInfo.setDelFlag(0); propagandaInfo.setCreateTime(LocalDateTime.now()); propagandaInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); propagandaInfo.setUpdateTime(null); propagandaInfo.setUpdateBy(null); - propagandaInfo.setPropagandaCode(propagandaInfo.getPropagandaCode() + "-COPY"); + propagandaInfo.setPropagandaCode(propagandaInfo.getPropagandaCode().replaceAll("-COPY", "") + "-COPY"); propagandaInfo.setPropagandaStatus("CREATE_COMPLETE"); - return propagandaInfoMapper.insertPropagandaInfo(propagandaInfo); + int flag = propagandaInfoMapper.insertPropagandaInfo(propagandaInfo); + if (flag > 0) { + // 查询宣教素材关联关系 + PropagandaMaterials query = new PropagandaMaterials(); + query.setPropagandaId(id); + List propagandaMaterialsList = propagandaMaterialsMapper.selectPropagandaMaterialsList(query); + if (CollectionUtils.isNotEmpty(propagandaMaterialsList)) { + for (PropagandaMaterials propagandaMaterials : propagandaMaterialsList) { + propagandaMaterials.setPropagandaId(id); + propagandaMaterials.setPropagandaTitle(propagandaInfo.getPropagandaTitle()); + propagandaMaterials.setDelFlag(0); + propagandaMaterials.setCreateBy(SecurityUtils.getLoginUser().getUser().getCreateBy()); + propagandaMaterials.setCreateTime(LocalDateTime.now()); + propagandaMaterialsMapper.insertPropagandaMaterials(propagandaMaterials); + } + } + } + return flag; } @Override @@ -100,6 +174,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { */ @Override public int deletePropagandaInfoByIds(Long[] ids) { + // 删除宣教素材关系 + propagandaMaterialsMapper.deleteByPropagandaIds(ids); return propagandaInfoMapper.deletePropagandaInfoByIds(ids); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java index 5b263f12..fa8fe4c0 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java @@ -6,7 +6,6 @@ import com.xinelu.manage.vo.questionInfo.QuestionVO; import java.util.List; - /** * 问卷基本信息Service接口 * @@ -69,4 +68,12 @@ public interface IQuestionInfoService { * @return 结果 */ AjaxResult updateQuestionByDepartment(QuestionInfo questionInfo); + + /** + * 科室问卷数量 + * + * @param departmentName 科室名称 + * @return AjaxResult + */ + AjaxResult departmentQuestionCount(String departmentName); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java index 6463ba2a..b28cbd1b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java @@ -10,6 +10,7 @@ import com.xinelu.manage.mapper.questioninfo.QuestionInfoMapper; import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper; import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper; import com.xinelu.manage.service.questioninfo.IQuestionInfoService; +import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.questionInfo.QuestionVO; import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO; import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO; @@ -279,4 +280,26 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { } return AjaxResult.success(questionCount); } + + /** + * 科室问卷数量 + * + * @param departmentName 科室名称 + * @return AjaxResult + */ + @Override + public AjaxResult departmentQuestionCount(String departmentName) { + DepartmentVO departmentVO = new DepartmentVO(); + List department = new ArrayList<>(); + departmentVO.setDepartmentName("全部"); + departmentVO.setCountNum(0); + List departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentName); + if (CollectionUtils.isNotEmpty(departmentVOS)) { + Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum(); + departmentVO.setCountNum(result); + department.add(departmentVO); + department.addAll(departmentVOS); + } + return AjaxResult.success(department); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/residentinfo/IResidentInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/residentinfo/IResidentInfoService.java new file mode 100644 index 00000000..6e9d4bfb --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/residentinfo/IResidentInfoService.java @@ -0,0 +1,60 @@ +package com.xinelu.manage.service.residentinfo; + +import com.xinelu.manage.domain.residentinfo.ResidentInfo; +import java.util.List; + +/** + * 居民信息Service接口 + * + * @author haown + * @date 2024-03-27 + */ +public interface IResidentInfoService { + /** + * 查询居民信息 + * + * @param id 居民信息主键 + * @return 居民信息 + */ + public ResidentInfo selectResidentInfoById(Long id); + + /** + * 查询居民信息列表 + * + * @param residentInfo 居民信息 + * @return 居民信息集合 + */ + List selectResidentInfoList(ResidentInfo residentInfo); + + /** + * 新增居民信息 + * + * @param residentInfo 居民信息 + * @return 结果 + */ + int insertResidentInfo(ResidentInfo residentInfo); + + /** + * 修改居民信息 + * + * @param residentInfo 居民信息 + * @return 结果 + */ + int updateResidentInfo(ResidentInfo residentInfo); + + /** + * 批量删除居民信息 + * + * @param ids 需要删除的居民信息主键集合 + * @return 结果 + */ + int deleteResidentInfoByIds(Long[] ids); + + /** + * 删除居民信息信息 + * + * @param id 居民信息主键 + * @return 结果 + */ + int deleteResidentInfoById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/residentinfo/impl/ResidentInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/residentinfo/impl/ResidentInfoServiceImpl.java new file mode 100644 index 00000000..a7697cf2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/residentinfo/impl/ResidentInfoServiceImpl.java @@ -0,0 +1,81 @@ +package com.xinelu.manage.service.residentinfo.impl; + +import com.xinelu.manage.domain.residentinfo.ResidentInfo; +import com.xinelu.manage.mapper.residentinfo.ResidentInfoMapper; +import com.xinelu.manage.service.residentinfo.IResidentInfoService; +import java.time.LocalDateTime; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +/** + * 居民信息Service业务层处理 + * + * @author haown + * @date 2024-03-27 + */ +@Service public class ResidentInfoServiceImpl implements IResidentInfoService { + @Resource private ResidentInfoMapper residentInfoMapper; + + /** + * 查询居民信息 + * + * @param id 居民信息主键 + * @return 居民信息 + */ + @Override public ResidentInfo selectResidentInfoById(Long id) { + return residentInfoMapper.selectResidentInfoById(id); + } + + /** + * 查询居民信息列表 + * + * @param residentInfo 居民信息 + * @return 居民信息 + */ + @Override public List selectResidentInfoList(ResidentInfo residentInfo) { + return residentInfoMapper.selectResidentInfoList(residentInfo); + } + + /** + * 新增居民信息 + * + * @param residentInfo 居民信息 + * @return 结果 + */ + @Override public int insertResidentInfo(ResidentInfo residentInfo) { + residentInfo.setCreateTime(LocalDateTime.now()); + return residentInfoMapper.insertResidentInfo(residentInfo); + } + + /** + * 修改居民信息 + * + * @param residentInfo 居民信息 + * @return 结果 + */ + @Override public int updateResidentInfo(ResidentInfo residentInfo) { + residentInfo.setUpdateTime(LocalDateTime.now()); + return residentInfoMapper.updateResidentInfo(residentInfo); + } + + /** + * 批量删除居民信息 + * + * @param ids 需要删除的居民信息主键 + * @return 结果 + */ + @Override public int deleteResidentInfoByIds(Long[] ids) { + return residentInfoMapper.deleteResidentInfoByIds(ids); + } + + /** + * 删除居民信息信息 + * + * @param id 居民信息主键 + * @return 结果 + */ + @Override public int deleteResidentInfoById(Long id) { + return residentInfoMapper.deleteResidentInfoById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java index f3a2f7eb..45261a54 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java @@ -63,10 +63,6 @@ public interface IScriptInfoService { /** * 话术图片上传 - * - * @param multipartFile - * @return - * @throws Exception */ AjaxResult uploadScriptInfo(MultipartFile multipartFile) throws Exception; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java index 3118ca60..b515ff03 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java @@ -84,7 +84,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService { @Transactional(rollbackFor = Exception.class) public int updateScriptInfo(ScriptInfo scriptInfo) { // 检查除当前记录之外是否存在同名的话术名称 - if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getCommonScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId()) > 0) { + if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(),scriptInfo.getCommonScriptName()) > 0) { // 存在同名的通用话术名称,不能进行更新 throw new ServiceException("通用话术名称已存在,请使用其他名称。"); } @@ -120,9 +120,6 @@ public class ScriptInfoServiceImpl implements IScriptInfoService { /** * 话术图片上传 - * - * @param multipartFile - * @return */ @Override public AjaxResult uploadScriptInfo(MultipartFile multipartFile) throws Exception { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java index 2d42d9dc..678d8b55 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java @@ -4,6 +4,8 @@ import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.manage.domain.servicepackage.ServicePackage; import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO; import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; +import com.xinelu.manage.vo.servicepackage.ServicePackageVO; +import java.util.List; /** * 服务包基础信息Service接口 @@ -20,6 +22,8 @@ public interface IServicePackageService { */ public ServicePackageDetailVO selectServicePackageById(Long id); + ServicePackageVO getById(Long id); + /** * 查询服务包基础信息列表 * @@ -28,6 +32,14 @@ public interface IServicePackageService { */ public TableDataInfo selectServicePackageList(ServicePackage servicePackage); + /** + * 查询服务包基础信息列表 + * + * @param servicePackage 服务包基础信息 + * @return 服务包基础信息集合 + */ + List selectList(ServicePackage servicePackage); + /** * 新增服务包基础信息 * @@ -62,10 +74,6 @@ public interface IServicePackageService { /** * 修改服务包发布状态 - * - * @param id - * @param whetherRelease - * @return */ int editReleaseStatus(Long id, Integer whetherRelease); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java index dd858463..060d893f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java @@ -16,13 +16,13 @@ import com.xinelu.manage.service.servicepackage.IServicePackageService; import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; import com.xinelu.manage.vo.servicepackage.ServicePackageVO; import com.xinelu.manage.vo.servicepackagecontent.ServicePackageContentVO; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; -import java.util.stream.Collectors; /** * 服务包基础信息Service业务层处理 @@ -56,12 +56,28 @@ public class ServicePackageServiceImpl implements IServicePackageService { ServicePackageDetailVO servicePackageDetailVO = servicePackageMapper.selectServicePackagesById(id); servicePackageDetailVO.setPackageTermAndUnit(servicePackageDetailVO.getPackageTerm() + servicePackageDetailVO.getPackageTermUnit()); // 根据服务包id查询服务包内容 - List voList = servicePackageMapper.selectServicePackageVOListById(id); + List voList = servicePackageMapper.selectServicePackageVoListById(id); servicePackageDetailVO.setVoList(voList); return servicePackageDetailVO; } - /** + /** + * 查询服务包基础信息 + * + * @param id 服务包基础信息主键 + * @return 服务包基础信息 + */ + @Override public ServicePackageVO getById(Long id) { + ServicePackageDetailVO servicePackageDetailVo = servicePackageMapper.selectServicePackagesById(id); + if (ObjectUtils.isEmpty(servicePackageDetailVo)) { + throw new ServiceException("数据传输错误"); + } + ServicePackageVO servicePackageVO = new ServicePackageVO(); + BeanUtils.copyBeanProp(servicePackageVO, servicePackageDetailVo); + return servicePackageVO; + } + + /** * 查询服务包基础信息列表 * * @param servicePackage 服务包基础信息 @@ -71,15 +87,19 @@ public class ServicePackageServiceImpl implements IServicePackageService { public TableDataInfo selectServicePackageList(ServicePackage servicePackage) { pageServiceUtil.startPage(); List voList = servicePackageMapper.selectServicePackageLists(servicePackage); - voList.stream().peek(vo -> { + voList.forEach(vo -> { // 拼接服务包期限+服务包单位 String packageTermAndUnit = vo.getPackageTerm() + vo.getPackageTermUnit(); vo.setPackageTermAndUnit(packageTermAndUnit); - }).collect(Collectors.toList()); + }); return pageServiceUtil.getDataTable(voList); } - /** + @Override public List selectList(ServicePackage servicePackage) { + return servicePackageMapper.selectServicePackageLists(servicePackage); + } + + /** * 新增服务包基础信息 * * @param servicePackageAddDTO 服务包基础信息 @@ -241,10 +261,6 @@ public class ServicePackageServiceImpl implements IServicePackageService { /** * 修改服务包发布状态 - * - * @param id - * @param whetherRelease - * @return */ @Override public int editReleaseStatus(Long id, Integer whetherRelease) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java index d37f9443..b28fe244 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java @@ -67,50 +67,31 @@ public interface IServiceWayContentService { /** * 查询服务方式列表 - * - * @param serviceWayName - * @param id - * @return */ List selectListNum(String serviceWayName, Long id); /** * 新增服务方式 - * - * @param serviceWayContent - * @return */ int insertServiceWay(ServiceWayContent serviceWayContent); /** * 修改服务方式 - * - * @param serviceWayContent - * @return */ int editServiceWay(ServiceWayContent serviceWayContent); /** * 根据id删除服务方式 - * - * @param id - * @return */ int deleteServiceWayById(Long id); /** * 根据id查询服务方式 - * - * @param id - * @return */ String selectServiceWayById(Long id); /** * 根据服务频次id删除服务内容 - * - * @param id - * @return */ int deleteByFrequencyId(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java index 15808cfd..740b0fc9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java @@ -1,9 +1,9 @@ package com.xinelu.manage.service.servicewaycontent.impl; import com.xinelu.common.constant.Constants; -import com.xinelu.common.enums.ServiceWayContentServiceType; +import com.xinelu.common.enums.ServiceFrequencyTypeEnum; +import com.xinelu.common.enums.ServiceTypeEnum; import com.xinelu.common.exception.ServiceException; -import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; @@ -23,7 +23,6 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.time.LocalDateTime; -import java.util.Date; import java.util.List; import java.util.Objects; @@ -56,7 +55,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { * 查询服务方式内容列表 * * @param serviceWayContentDTO 服务方式内容 - * @return + * @return 服务方式内容集合 */ @Override public List selectServiceWayContentList(ServiceWayContentDTO serviceWayContentDTO) { @@ -87,7 +86,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { throw new ServiceException("当前服务内容下服务频次已存在"); } // 如果当前服务内容下服务频次不存在,新增服务频次 - serviceFrequency.setServiceType(ServiceWayContentServiceType.SERVICE_FREQUENCY.toString()); + serviceFrequency.setServiceType(ServiceTypeEnum.SERVICE_FREQUENCY.toString()); serviceFrequency.setServiceContentId(serviceWayContentVO.getId()); serviceFrequency.setServiceFrequencyType(serviceWayContentAddDTO.getServiceFrequencyType()); serviceFrequency.setServiceFrequencyText(serviceWayContentAddDTO.getServiceFrequencyText()); @@ -102,7 +101,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { // 如果服务内容在服务内容表不存在,新增服务内容,新增服务频次 // 新增服务内容 ServiceWayContent serviceContent = new ServiceWayContent(); - serviceContent.setServiceType(ServiceWayContentServiceType.SERVICE_CONTENT.toString()); + serviceContent.setServiceType(ServiceTypeEnum.SERVICE_CONTENT.toString()); serviceContent.setServiceWayId(serviceWayContentAddDTO.getServiceWayId()); serviceContent.setServiceContent(serviceWayContentAddDTO.getServiceContent()); serviceContent.setCreateBy(username); @@ -111,7 +110,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { throw new ServiceException("新增服务内容失败"); } // 新增服务频次 - serviceFrequency.setServiceType(ServiceWayContentServiceType.SERVICE_FREQUENCY.toString()); + serviceFrequency.setServiceType(ServiceTypeEnum.SERVICE_FREQUENCY.toString()); serviceFrequency.setServiceContentId(serviceContent.getId()); serviceFrequency.setServiceFrequencyType(serviceWayContentAddDTO.getServiceFrequencyType()); serviceFrequency.setServiceFrequencyText(serviceWayContentAddDTO.getServiceFrequencyText()); @@ -161,7 +160,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { ServiceWayContent newServiceContent = new ServiceWayContent(); newServiceContent.setServiceWayId(serviceWayContentEditDTO.getServiceWayId()); newServiceContent.setServiceContent(serviceWayContentEditDTO.getServiceContent()); - newServiceContent.setServiceType(ServiceWayContentServiceType.SERVICE_CONTENT.toString()); + newServiceContent.setServiceType(ServiceTypeEnum.SERVICE_CONTENT.toString()); newServiceContent.setCreateBy(username); newServiceContent.setCreateTime(LocalDateTime.now()); serviceWayContentMapper.insertServiceWayContent(newServiceContent); @@ -178,9 +177,9 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { // 如果服务频次改变了,检查新服务频次的重复性 if (serviceFrequencyChanged) { boolean isFrequencyDuplicate = false; - if (ServiceWayContentServiceType.TEXT.toString().equals(serviceWayContentEditDTO.getServiceFrequencyType())) { + if (ServiceFrequencyTypeEnum.TEXT.toString().equals(serviceWayContentEditDTO.getServiceFrequencyType())) { isFrequencyDuplicate = serviceWayContentMapper.isServiceFrequencyTextDuplicate(serviceWayContentEditDTO); - } else if (ServiceWayContentServiceType.DIGIT.toString().equals(serviceWayContentEditDTO.getServiceFrequencyType())) { + } else if (ServiceFrequencyTypeEnum.DIGIT.toString().equals(serviceWayContentEditDTO.getServiceFrequencyType())) { isFrequencyDuplicate = serviceWayContentMapper.isServiceFrequencyDigitDuplicate(serviceWayContentEditDTO); } if (isFrequencyDuplicate) { @@ -228,10 +227,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { /** * 查询服务方式列表 - * - * @param serviceWayName - * @param id - * @return */ @Override public List selectListNum(String serviceWayName, Long id) { @@ -240,9 +235,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { /** * 新增服务方式 - * - * @param serviceWayContent - * @return */ @Override @Transactional(rollbackFor = Exception.class) @@ -255,7 +247,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { } // 如果不存在,执行新增功能 serviceWayContent.setServiceWayCode(Constants.SERVICE_MODE_ENCODING + systemCodeUtil.generateDepartCode(Constants.SERVICE_MODE_ENCODING)); - serviceWayContent.setServiceType(ServiceWayContentServiceType.SERVICE_WRY.toString()); + serviceWayContent.setServiceType(ServiceTypeEnum.SERVICE_WRY.toString()); serviceWayContent.setCreateBy(SecurityUtils.getUsername()); serviceWayContent.setCreateTime(LocalDateTime.now()); return serviceWayContentMapper.insertServiceWayContent(serviceWayContent); @@ -263,9 +255,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { /** * 修改服务方式 - * - * @param serviceWayContent - * @return */ @Override @Transactional(rollbackFor = Exception.class) @@ -284,9 +273,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { /** * 根据id删除服务方式 - * - * @param id - * @return */ @Override public int deleteServiceWayById(Long id) { @@ -303,6 +289,9 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { return serviceWayContentMapper.deleteServiceWayById(id); } + /** + * 根据服务方式id获取服务方式 + */ @Override public String selectServiceWayById(Long id) { return serviceWayContentMapper.selectServiceWayById(id); @@ -310,9 +299,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { /** * 根据服务频次id删除服务内容 - * - * @param id - * @return */ @Override public int deleteByFrequencyId(Long id) { 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 new file mode 100644 index 00000000..3cdf8c1c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.signpatientmanageroute; + +import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import java.util.List; + + +/** + * 签约患者管理任务路径Service接口 + * + * @author haown + * @date 2024-03-18 + */ +public interface ISignPatientManageRouteService { + /** + * 查询签约患者管理任务路径 + * + * @param id 签约患者管理任务路径主键 + * @return 签约患者管理任务路径 + */ + public SignPatientManageRoute selectSignPatientManageRouteById(Long id); + + /** + * 查询签约患者管理任务路径列表 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 签约患者管理任务路径集合 + */ + public List selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute); + + /** + * 新增签约患者管理任务路径 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 结果 + */ + public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute); + + /** + * 修改签约患者管理任务路径 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 结果 + */ + public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute); + + /** + * 批量删除签约患者管理任务路径 + * + * @param ids 需要删除的签约患者管理任务路径主键集合 + * @return 结果 + */ + public int deleteSignPatientManageRouteByIds(Long[] ids); + + /** + * 删除签约患者管理任务路径信息 + * + * @param id 签约患者管理任务路径主键 + * @return 结果 + */ + public 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 new file mode 100644 index 00000000..b0f6cf75 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -0,0 +1,89 @@ +package com.xinelu.manage.service.signpatientmanageroute.impl; + +import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +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 org.springframework.stereotype.Service; + +/** + * 签约患者管理任务路径Service业务层处理 + * + * @author haown + * @date 2024-03-18 + */ +@Service +public class SignPatientManageRouteServiceImpl implements ISignPatientManageRouteService { + @Resource + private SignPatientManageRouteMapper signPatientManageRouteMapper; + + /** + * 查询签约患者管理任务路径 + * + * @param id 签约患者管理任务路径主键 + * @return 签约患者管理任务路径 + */ + @Override + public SignPatientManageRoute selectSignPatientManageRouteById(Long id) { + return signPatientManageRouteMapper.selectSignPatientManageRouteById(id); + } + + /** + * 查询签约患者管理任务路径列表 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 签约患者管理任务路径 + */ + @Override + public List selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute) { + return signPatientManageRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute); + } + + /** + * 新增签约患者管理任务路径 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 结果 + */ + @Override + public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) { + signPatientManageRoute.setCreateTime(LocalDateTime.now()); + return signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); + } + + /** + * 修改签约患者管理任务路径 + * + * @param signPatientManageRoute 签约患者管理任务路径 + * @return 结果 + */ + @Override + public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) { + signPatientManageRoute.setUpdateTime(LocalDateTime.now()); + return signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute); + } + + /** + * 批量删除签约患者管理任务路径 + * + * @param ids 需要删除的签约患者管理任务路径主键 + * @return 结果 + */ + @Override + public int deleteSignPatientManageRouteByIds(Long[] ids) { + return signPatientManageRouteMapper.deleteSignPatientManageRouteByIds(ids); + } + + /** + * 删除签约患者管理任务路径信息 + * + * @param id 签约患者管理任务路径主键 + * @return 结果 + */ + @Override + public int deleteSignPatientManageRouteById(Long id) { + return signPatientManageRouteMapper.deleteSignPatientManageRouteById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java new file mode 100644 index 00000000..2db9a65f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.signpatientmanageroutenode; + +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import java.util.List; + + +/** + * 签约患者管理任务路径节点Service接口 + * + * @author haown + * @date 2024-03-18 + */ +public interface ISignPatientManageRouteNodeService { + /** + * 查询签约患者管理任务路径节点 + * + * @param id 签约患者管理任务路径节点主键 + * @return 签约患者管理任务路径节点 + */ + public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id); + + /** + * 查询签约患者管理任务路径节点列表 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 签约患者管理任务路径节点集合 + */ + public List selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * 新增签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * 修改签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + public int updateSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * 批量删除签约患者管理任务路径节点 + * + * @param ids 需要删除的签约患者管理任务路径节点主键集合 + * @return 结果 + */ + public int deleteSignPatientManageRouteNodeByIds(Long[] ids); + + /** + * 删除签约患者管理任务路径节点信息 + * + * @param id 签约患者管理任务路径节点主键 + * @return 结果 + */ + public int deleteSignPatientManageRouteNodeById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java new file mode 100644 index 00000000..b3afe663 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java @@ -0,0 +1,89 @@ +package com.xinelu.manage.service.signpatientmanageroutenode.impl; + +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; +import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService; +import java.time.LocalDateTime; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +/** + * 签约患者管理任务路径节点Service业务层处理 + * + * @author haown + * @date 2024-03-18 + */ +@Service +public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManageRouteNodeService { + @Resource + private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper; + + /** + * 查询签约患者管理任务路径节点 + * + * @param id 签约患者管理任务路径节点主键 + * @return 签约患者管理任务路径节点 + */ + @Override + public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id) { + return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id); + } + + /** + * 查询签约患者管理任务路径节点列表 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 签约患者管理任务路径节点 + */ + @Override + public List selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode) { + return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode); + } + + /** + * 新增签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + @Override + public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode) { + signPatientManageRouteNode.setCreateTime(LocalDateTime.now()); + return signPatientManageRouteNodeMapper.insertSignPatientManageRouteNode(signPatientManageRouteNode); + } + + /** + * 修改签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + @Override + public int updateSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode) { + signPatientManageRouteNode.setUpdateTime(LocalDateTime.now()); + return signPatientManageRouteNodeMapper.updateSignPatientManageRouteNode(signPatientManageRouteNode); + } + + /** + * 批量删除签约患者管理任务路径节点 + * + * @param ids 需要删除的签约患者管理任务路径节点主键 + * @return 结果 + */ + @Override + public int deleteSignPatientManageRouteNodeByIds(Long[] ids) { + return signPatientManageRouteNodeMapper.deleteSignPatientManageRouteNodeByIds(ids); + } + + /** + * 删除签约患者管理任务路径节点信息 + * + * @param id 签约患者管理任务路径节点主键 + * @return 结果 + */ + @Override + public int deleteSignPatientManageRouteNodeById(Long id) { + return signPatientManageRouteNodeMapper.deleteSignPatientManageRouteNodeById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java index e8332221..48ae71d7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java @@ -1,11 +1,12 @@ package com.xinelu.manage.service.signpatientrecord; -import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto; +import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto; +import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto; import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo; -import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo; import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo; +import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo; import java.util.List; /** @@ -19,19 +20,30 @@ public interface ISignPatientRecordService { /** * 根据签约编号查询居民签约信息 - * @param id - * @return + * @param id 签约主键 + * @return SignPatientInfoVo:签约信息视图类 */ SignPatientInfoVo getByRecordId(Long id); /** * 根据患者主键查询患者签约记录列表 - * @param patientId - * @return + * @param patientId 患者主键 + * @return 签约信息列表 */ List getByPatient(Long patientId); + /** + * 签约/续约 + * @param body:签约传输对象 + */ int add(SignPatientAddDto body); int updateSignStatus(SignPatientStatusDto patientCancelSignDto); + + /** + * 意向签约 + * @param intentionalSignDto 意向签约传输对象 + * @return + */ + int intentionalSign(IntentionalSignDto intentionalSignDto); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java index 5b2bbb69..d8f208cb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java @@ -1,172 +1,230 @@ package com.xinelu.manage.service.signpatientrecord.impl; -import com.xinelu.common.constant.PaymentStatusConstants; import com.xinelu.common.constant.SignRecordServiceStatusConstants; +import com.xinelu.common.constant.TaskCreateTypeConstant; import com.xinelu.common.exception.ServiceException; -import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.StringUtils; +import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed; +import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; import com.xinelu.manage.domain.signpatientpackage.SignPatientPackage; import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware; import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord; +import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition; +import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; +import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; +import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; +import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto; +import com.xinelu.manage.dto.signpatientrecord.IntentionalSignDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto; import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.signpatientinformed.SignPatientInformedMapper; +import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; +import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; import com.xinelu.manage.mapper.signpatientpackage.SignPatientPackageMapper; import com.xinelu.manage.mapper.signpatientpackagehardware.SignPatientPackageHardwareMapper; import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper; +import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper; +import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper; +import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper; +import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper; import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService; import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo; import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo; import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo; +import java.time.LocalDateTime; +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Resource; import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; -import java.time.LocalDateTime; -import java.util.Calendar; -import java.util.List; - /** - * @author haown - * @description 针对表【sign_patient_record(签约记录表)】的数据库操作Service实现 - * @createDate 2024-02-28 15:05:02 - */ +* @author haown +* @description 针对表【sign_patient_record(签约记录表)】的数据库操作Service实现 +* @createDate 2024-02-28 15:05:02 +*/ @Service public class SignPatientRecordServiceImpl implements ISignPatientRecordService { - @Resource - private SignPatientRecordMapper signPatientRecordMapper; + @Resource + private SignPatientRecordMapper signPatientRecordMapper; - @Resource - private SignPatientPackageMapper signPatientPackageMapper; - @Resource - private SignPatientPackageHardwareMapper hardwareMapper; - @Resource - private SignPatientInformedMapper informedMapper; - @Resource - private PatientInfoMapper patientInfoMapper; - @Resource - private SignPatientPackageHardwareMapper signPatientPackageHardwareMapper; - @Resource - private SignPatientInformedMapper signPatientInformedMapper; + @Resource + private SignPatientPackageMapper signPatientPackageMapper; + @Resource + private SignPatientPackageHardwareMapper hardwareMapper; + @Resource + private SignPatientInformedMapper informedMapper; + @Resource + private PatientInfoMapper patientInfoMapper; + @Resource + private SignPatientPackageHardwareMapper signPatientPackageHardwareMapper; + @Resource + private SignPatientInformedMapper signPatientInformedMapper; + @Resource + private SpecialDiseaseRouteMapper specialDiseaseRouteMapper; + @Resource + private SignPatientManageRouteMapper signPatientManageRouteMapper; + @Resource + private SpecialDiseaseNodeMapper specialDiseaseNodeMapper; + @Resource + private SignPatientManageRouteNodeMapper manageRouteNodeMapper; + @Resource + private SpecialDiseaseTriggerConditionMapper triggerConditionMapper; + @Resource + private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper; - @Override - public List selectList(SignPatientListDto signPatientRecord) { - return signPatientRecordMapper.selectList(signPatientRecord); - } + @Override public List selectList(SignPatientListDto signPatientRecord) { + return signPatientRecordMapper.selectList(signPatientRecord); + } - @Override - public SignPatientInfoVo getByRecordId(Long id) { - SignPatientInfoVo signPatientInfoVo = signPatientRecordMapper.getByRecordId(id); - // 根据签约记录主键查询设备列表 - SignPatientPackageHardware queryDevice = new SignPatientPackageHardware(); - queryDevice.setSignPatientRecordId(id); - List devices = signPatientPackageHardwareMapper.selectSignPatientPackageHardwareList(queryDevice); - signPatientInfoVo.setSignDevices(devices); + @Override public SignPatientInfoVo getByRecordId(Long id) { + SignPatientInfoVo signPatientInfoVo = signPatientRecordMapper.getByRecordId(id); + // 根据签约记录主键查询设备列表 + SignPatientPackageHardware queryDevice = new SignPatientPackageHardware(); + queryDevice.setSignPatientRecordId(id); + List devices = signPatientPackageHardwareMapper.selectSignPatientPackageHardwareList(queryDevice); + signPatientInfoVo.setSignDevices(devices); - SignPatientInformed signPatientInformed = new SignPatientInformed(); - signPatientInformed.setSignPatientRecordId(id); - List informeds = signPatientInformedMapper.selectSignPatientInformedList(signPatientInformed); - signPatientInfoVo.setSignPatientInformeds(informeds); - return signPatientInfoVo; - } + SignPatientInformed signPatientInformed = new SignPatientInformed(); + signPatientInformed.setSignPatientRecordId(id); + List informeds = signPatientInformedMapper.selectSignPatientInformedList(signPatientInformed); + signPatientInfoVo.setSignPatientInformeds(informeds); + return signPatientInfoVo; + } - @Override - public List getByPatient(Long patientId) { - return signPatientRecordMapper.getByPatient(patientId); - } + @Override public List getByPatient(Long patientId) { + return signPatientRecordMapper.getByPatient(patientId); + } - @Override - @Transactional(rollbackFor = Exception.class) - public int add(SignPatientAddDto body) { - SignPatientPackage signPatientPackage = body.getSignPackage(); - if (ObjectUtils.isNotEmpty(body.getRecord())) { - SignPatientRecord signPatientRecord = body.getRecord(); - signPatientRecord.setId(null); - if (signPatientRecord.getPatientId() == null) { - throw new ServiceException("数据错误"); - } - PatientInfo patient = patientInfoMapper.selectPatientInfoById(signPatientRecord.getPatientId()); - if (ObjectUtils.isEmpty(patient)) { - throw new ServiceException("请选择签约居民"); - } - signPatientRecord.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); - signPatientRecord.setDelFlag(0); - signPatientRecord.setPaymentStatus(PaymentStatusConstants.UNPAID_FEES); - signPatientRecord.setSignTime(LocalDateTime.now()); - signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); - if (signPatientPackage != null) { - signPatientRecord.setPrice(signPatientPackage.getPackagePrice()); - } else { - throw new ServiceException("请选择服务包"); - } - // 签约信息保存到患者表 - patient.setSignPatientRecordId(signPatientRecord.getId()); - patient.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); - patient.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); - patient.setSignTime(LocalDateTime.now()); - patientInfoMapper.updatePatientInfo(patient); - // 保存签约记录 - int flag = signPatientRecordMapper.insert(signPatientRecord); - if (flag > 0) { - // 保存签约服务包信息 - signPatientPackage.setSignPatientRecordId(signPatientRecord.getId()); - signPatientPackage.setPatientId(signPatientRecord.getPatientId()); - signPatientPackage.setPackagePaymentStatus(PaymentStatusConstants.UNPAID_FEES); - if (signPatientPackage.getServiceStartTime() == null) { - signPatientPackage.setServiceStartTime(DateUtils.parseDate(DateFormatUtils.format(DateUtils.getNowDate(), "yyyy-MM-dd") + " 00:00:00")); - Calendar calendar = Calendar.getInstance(); - // 将日期设置为1号(每次计算都从第一天开始) - calendar.setTime(DateUtils.getNowDate()); - // 添加一个月 - calendar.add(Calendar.MONTH, signPatientPackage.getServiceCycle()); - // 再减去一天 - calendar.add(Calendar.DATE, -1); - signPatientPackage.setServiceEndTime(DateUtils.parseDate(DateFormatUtils.format(calendar.getTime(), "yyyy-MM-dd") + " 23:59:59")); - } else { - signPatientPackage.setServiceStartTime(DateUtils.parseDate(DateFormatUtils.format(signPatientPackage.getServiceStartTime(), "yyyy-MM-dd") + " 00:00:00")); - if (signPatientPackage.getServiceStartTime() == null) { - Calendar calendar = Calendar.getInstance(); - // 将日期设置为1号(每次计算都从第一天开始) - calendar.setTime(signPatientPackage.getServiceStartTime()); - // 添加一个月 - calendar.add(Calendar.MONTH, signPatientPackage.getServiceCycle()); - // 再减去一天 - calendar.add(Calendar.DATE, -1); - signPatientPackage.setServiceEndTime(DateUtils.parseDate(DateFormatUtils.format(calendar.getTime(), "yyyy-MM-dd") + " 23:59:59")); - } else { - signPatientPackage.setServiceEndTime(DateUtils.parseDate(DateFormatUtils.format(signPatientPackage.getServiceEndTime(), "yyyy-MM-dd") + " 23:59:59")); - } - } - signPatientPackageMapper.insertSignPatientPackage(signPatientPackage); - // 保存硬件 - if (!CollectionUtils.isEmpty(body.getDevices())) { - for (SignPatientPackageHardware hardware : body.getDevices()) { - hardware.setSignPatientRecordId(signPatientRecord.getId()); - hardwareMapper.insertSignPatientPackageHardware(hardware); - } - } - // 保存告知书 - if (!CollectionUtils.isEmpty(body.getInformeds())) { - for (SignPatientInformed informed : body.getInformeds()) { - informed.setSignPatientRecordId(signPatientRecord.getId()); - informed.setPatientId(signPatientRecord.getPatientId()); - informedMapper.insertSignPatientInformed(informed); - } - } - } - return flag; - } - return 0; - } + @Override + @Transactional(rollbackFor = Exception.class) + public int add(SignPatientAddDto body) { + SignPatientPackageSaveDto signPatientPackageDto = body.getSignPackage(); + if (ObjectUtils.isEmpty(signPatientPackageDto)) { + throw new ServiceException("请选择服务包"); + } + if (signPatientPackageDto.getServicePackageId() == null) { + throw new ServiceException("请选择服务包"); + } + if (ObjectUtils.isNotEmpty(body.getRecord())) { + SignPatientRecord signPatientRecord = body.getRecord(); + if (signPatientRecord.getPatientId() == null) { + throw new ServiceException("请选择签约居民"); + } + PatientInfo patient = patientInfoMapper.selectPatientInfoById(signPatientRecord.getPatientId()); + if (ObjectUtils.isEmpty(patient)) { + throw new ServiceException("请选择签约居民"); + } + signPatientRecord.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); + signPatientRecord.setDelFlag(0); + signPatientRecord.setPaymentStatus(signPatientPackageDto.getPackagePaymentStatus()); + signPatientRecord.setSignTime(LocalDateTime.now()); + signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); + signPatientRecord.setPrice(signPatientPackageDto.getPackagePrice()); + signPatientRecord.setCreateTime(LocalDateTime.now()); + signPatientRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + // 保存签约记录 + int flag = 0; + if (body.getSignCategory() == "sign") { + flag = signPatientRecordMapper.updateByPrimaryKey(signPatientRecord); + } else { + signPatientRecord.setId(null); + flag = signPatientRecordMapper.insert(signPatientRecord); + } + // 签约信息保存到患者表 + patient.setSignPatientRecordId(signPatientRecord.getId()); + patient.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); + patient.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); + patient.setSignTime(LocalDateTime.now()); + patientInfoMapper.updatePatientInfo(patient); + if (flag > 0) { + // 保存签约服务包信息 + SignPatientPackage signPatientPackage = new SignPatientPackage(); + + // 服务开始时间、服务结束时间 + BeanUtils.copyBeanProp(signPatientPackage, signPatientPackageDto); + signPatientPackage.setSignPatientRecordId(signPatientRecord.getId()); + signPatientPackage.setPatientId(signPatientRecord.getPatientId()); + signPatientPackage.setServiceStartTime(signPatientPackageDto.getServiceStartTime().atStartOfDay()); + signPatientPackage.setServiceEndTime(signPatientPackageDto.getServiceEndTime().atTime(23,59,59)); + signPatientPackage.setCreateTime(LocalDateTime.now()); + signPatientPackage.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + signPatientPackageMapper.insertSignPatientPackage(signPatientPackage); + + // 保存管理路径 + if (body.getRouteId() != null) { + SpecialDiseaseRoute specialDiseaseRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(body.getRouteId()); + SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute(); + BeanUtils.copyBeanProp(signPatientManageRoute, specialDiseaseRoute); + signPatientManageRoute.setSignPatientRecordId(signPatientRecord.getId()); + signPatientManageRoute.setId(null); + signPatientManageRoute.setRouteId(specialDiseaseRoute.getId()); + signPatientManageRoute.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE); + signPatientManageRoute.setCreateTime(LocalDateTime.now()); + signPatientManageRoute.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); + // 保存管理节点 + SpecialDiseaseNode specialDiseaseNode = new SpecialDiseaseNode(); + specialDiseaseNode.setRouteId(body.getRouteId()); + List nodeList = specialDiseaseNodeMapper.selectSpecialDiseaseNodeList(specialDiseaseNode); + if (CollectionUtils.isEmpty(nodeList)) { + throw new ServiceException("该管理任务没有任务节点"); + } + List manageNodeList = nodeList.stream().map(node -> { + SignPatientManageRouteNode manageRouteNode = new SignPatientManageRouteNode(); + BeanUtils.copyBeanProp(manageRouteNode, node); + manageRouteNode.setManageRouteId(body.getRouteId()); + manageRouteNode.setId(null); + manageRouteNode.setCreateTime(LocalDateTime.now()); + manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + return manageRouteNode; + }).collect(Collectors.toList()); + // 批量保存 + manageRouteNodeMapper.insertBatch(manageNodeList); + // 保存触发条件 + SpecialDiseaseTriggerCondition triggerConditionQuery = new SpecialDiseaseTriggerCondition(); + triggerConditionQuery.setRouteId(body.getRouteId()); + List triggerConditions = triggerConditionMapper.selectSpecialDiseaseTriggerConditionList(triggerConditionQuery); + List routeTriggerConditionList = triggerConditions.stream().map(item->{ + SignRouteTriggerCondition signRouteTriggerCondition = new SignRouteTriggerCondition(); + BeanUtils.copyBeanProp(signRouteTriggerCondition, item); + signRouteTriggerCondition.setPatientManageRouteId(signPatientManageRoute.getRouteId()); + signRouteTriggerCondition.setId(null); + return signRouteTriggerCondition; + }).collect(Collectors.toList()); + signRouteTriggerConditionMapper.insertBatch(routeTriggerConditionList); + } + + // 保存硬件 + if (!CollectionUtils.isEmpty(body.getDevices())) { + for(SignPatientPackageHardware hardware : body.getDevices()) { + hardware.setSignPatientRecordId(signPatientRecord.getId()); + hardwareMapper.insertSignPatientPackageHardware(hardware); + } + } + + // 保存告知书 + if (!CollectionUtils.isEmpty(body.getInformeds())) { + for (SignPatientInformed informed : body.getInformeds()) { + informed.setSignPatientRecordId(signPatientRecord.getId()); + informed.setPatientId(signPatientRecord.getPatientId()); + informedMapper.insertSignPatientInformed(informed); + } + } + } + return flag; + } + return 0; + } @Override @Transactional(rollbackFor = Exception.class) @@ -184,13 +242,45 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService { signRecord.setSeparateReason(patientCancelSignDto.getSeparateReason()); if (StringUtils.equals(SignRecordServiceStatusConstants.SEPARATE_SIGN, patientCancelSignDto.getSignStatus())) { - PatientInfo patient = patientInfoMapper.selectPatientInfoById(patientCancelSignDto.getPatientId()); - // 签约信息保存到患者表 - patient.setSignStatus(patientCancelSignDto.getSignStatus()); - patient.setServiceStatus(patientCancelSignDto.getServiceStatus()); - patientInfoMapper.updatePatientInfo(patient); - } - return signPatientRecordMapper.updateByPrimaryKeySelective(signRecord); - } + PatientInfo patient = patientInfoMapper.selectPatientInfoById(patientCancelSignDto.getPatientId()); + // 签约信息保存到患者表 + patient.setSignStatus(patientCancelSignDto.getSignStatus()); + patient.setServiceStatus(patientCancelSignDto.getServiceStatus()); + patientInfoMapper.updatePatientInfo(patient); + } + return signPatientRecordMapper.updateByPrimaryKeySelective(signRecord); + } + @Override + @Transactional(rollbackFor = Exception.class) + public int intentionalSign(IntentionalSignDto intentionalSignDto) { + PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(intentionalSignDto.getPatientId()); + if (ObjectUtils.isEmpty(patientInfo)) { + throw new ServiceException("未找到该居民"); + } + // 查询当前居民签约状态是否已签约 + if (StringUtils.equals(SignRecordServiceStatusConstants.IN_SIGN, patientInfo.getSignStatus())) { + throw new ServiceException("该居民已签约!"); + } + + patientInfo.setServiceStatus(SignRecordServiceStatusConstants.INTENTIONAL_SIGNING); + SignPatientRecord signRecord = new SignPatientRecord(); + // 患者信息保存到签约表 + BeanUtils.copyBeanProp(signRecord, patientInfo); + signRecord.setSignDiagnosis(patientInfo.getMainDiagnosis()); + signRecord.setBillingDoctorId(intentionalSignDto.getBillingDoctorId()); + signRecord.setBillingDoctorName(intentionalSignDto.getBillingDoctorName()); + signRecord.setIntentionalSource(intentionalSignDto.getIntentionalSource()); + signRecord.setIntentionalTime(LocalDateTime.now()); + signRecord.setPatientId(patientInfo.getId()); + signRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + signRecord.setCreateTime(LocalDateTime.now()); + signRecord.setId(null); + int flag = signPatientRecordMapper.insertSelective(signRecord); + if (flag > 0) { + patientInfo.setSignPatientRecordId(signRecord.getId()); + patientInfoMapper.updatePatientInfo(patientInfo); + } + return flag; + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java new file mode 100644 index 00000000..01e8af06 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.signroutetriggercondition; + +import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition; +import java.util.List; + + +/** + * 签约患者管理任务(路径)触发条件关系Service接口 + * + * @author haown + * @date 2024-03-18 + */ +public interface ISignRouteTriggerConditionService { + /** + * 查询签约患者管理任务(路径)触发条件关系 + * + * @param id 签约患者管理任务(路径)触发条件关系主键 + * @return 签约患者管理任务(路径)触发条件关系 + */ + public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id); + + /** + * 查询签约患者管理任务(路径)触发条件关系列表 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 签约患者管理任务(路径)触发条件关系集合 + */ + public List selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition); + + /** + * 新增签约患者管理任务(路径)触发条件关系 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 结果 + */ + public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition); + + /** + * 修改签约患者管理任务(路径)触发条件关系 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 结果 + */ + public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition); + + /** + * 批量删除签约患者管理任务(路径)触发条件关系 + * + * @param ids 需要删除的签约患者管理任务(路径)触发条件关系主键集合 + * @return 结果 + */ + public int deleteSignRouteTriggerConditionByIds(Long[] ids); + + /** + * 删除签约患者管理任务(路径)触发条件关系信息 + * + * @param id 签约患者管理任务(路径)触发条件关系主键 + * @return 结果 + */ + public int deleteSignRouteTriggerConditionById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java new file mode 100644 index 00000000..237ce5a0 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java @@ -0,0 +1,89 @@ +package com.xinelu.manage.service.signroutetriggercondition.impl; + +import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition; +import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper; +import com.xinelu.manage.service.signroutetriggercondition.ISignRouteTriggerConditionService; +import java.time.LocalDateTime; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +/** + * 签约患者管理任务(路径)触发条件关系Service业务层处理 + * + * @author haown + * @date 2024-03-18 + */ +@Service +public class SignRouteTriggerConditionServiceImpl implements ISignRouteTriggerConditionService { + @Resource + private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper; + + /** + * 查询签约患者管理任务(路径)触发条件关系 + * + * @param id 签约患者管理任务(路径)触发条件关系主键 + * @return 签约患者管理任务(路径)触发条件关系 + */ + @Override + public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id) { + return signRouteTriggerConditionMapper.selectSignRouteTriggerConditionById(id); + } + + /** + * 查询签约患者管理任务(路径)触发条件关系列表 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 签约患者管理任务(路径)触发条件关系 + */ + @Override + public List selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition) { + return signRouteTriggerConditionMapper.selectSignRouteTriggerConditionList(signRouteTriggerCondition); + } + + /** + * 新增签约患者管理任务(路径)触发条件关系 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 结果 + */ + @Override + public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition) { + signRouteTriggerCondition.setCreateTime(LocalDateTime.now()); + return signRouteTriggerConditionMapper.insertSignRouteTriggerCondition(signRouteTriggerCondition); + } + + /** + * 修改签约患者管理任务(路径)触发条件关系 + * + * @param signRouteTriggerCondition 签约患者管理任务(路径)触发条件关系 + * @return 结果 + */ + @Override + public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition) { + signRouteTriggerCondition.setUpdateTime(LocalDateTime.now()); + return signRouteTriggerConditionMapper.updateSignRouteTriggerCondition(signRouteTriggerCondition); + } + + /** + * 批量删除签约患者管理任务(路径)触发条件关系 + * + * @param ids 需要删除的签约患者管理任务(路径)触发条件关系主键 + * @return 结果 + */ + @Override + public int deleteSignRouteTriggerConditionByIds(Long[] ids) { + return signRouteTriggerConditionMapper.deleteSignRouteTriggerConditionByIds(ids); + } + + /** + * 删除签约患者管理任务(路径)触发条件关系信息 + * + * @param id 签约患者管理任务(路径)触发条件关系主键 + * @return 结果 + */ + @Override + public int deleteSignRouteTriggerConditionById(Long id) { + return signRouteTriggerConditionMapper.deleteSignRouteTriggerConditionById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/ISpecialDiseaseNodeService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/ISpecialDiseaseNodeService.java index 3bb2d84d..da781192 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/ISpecialDiseaseNodeService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/ISpecialDiseaseNodeService.java @@ -1,6 +1,8 @@ package com.xinelu.manage.service.specialdiseasenode; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; import java.util.List; @@ -17,7 +19,7 @@ public interface ISpecialDiseaseNodeService { * @param id 专病路径-管理节点信息主键 * @return 专病路径-管理节点信息 */ - public SpecialDiseaseNode selectSpecialDiseaseNodeById(Long id); + SpecialDiseaseNode selectSpecialDiseaseNodeById(Long id); /** * 查询专病路径-管理节点信息列表 @@ -25,7 +27,7 @@ public interface ISpecialDiseaseNodeService { * @param specialDiseaseNode 专病路径-管理节点信息 * @return 专病路径-管理节点信息集合 */ - public List selectSpecialDiseaseNodeList(SpecialDiseaseNode specialDiseaseNode); + List selectSpecialDiseaseNodeList(SpecialDiseaseNode specialDiseaseNode); /** * 新增专病路径-管理节点信息 @@ -33,7 +35,7 @@ public interface ISpecialDiseaseNodeService { * @param specialDiseaseNode 专病路径-管理节点信息 * @return 结果 */ - public int insertSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode); + AjaxResult insertSpecialDiseaseNode(SpecialDiseaseRouteVO specialDiseaseNode); /** * 修改专病路径-管理节点信息 @@ -41,7 +43,7 @@ public interface ISpecialDiseaseNodeService { * @param specialDiseaseNode 专病路径-管理节点信息 * @return 结果 */ - public int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode); + AjaxResult updateSpecialDiseaseNode(SpecialDiseaseRouteVO specialDiseaseNode); /** * 批量删除专病路径-管理节点信息 @@ -49,7 +51,7 @@ public interface ISpecialDiseaseNodeService { * @param ids 需要删除的专病路径-管理节点信息主键集合 * @return 结果 */ - public int deleteSpecialDiseaseNodeByIds(Long[] ids); + int deleteSpecialDiseaseNodeByIds(Long[] ids); /** * 删除专病路径-管理节点信息信息 @@ -57,5 +59,13 @@ public interface ISpecialDiseaseNodeService { * @param id 专病路径-管理节点信息主键 * @return 结果 */ - public int deleteSpecialDiseaseNodeById(Long id); + int deleteSpecialDiseaseNodeById(Long id); + + /** + * 查询专病路径-管理节点信息列表 + * + * @param specialDiseaseRouteId 路径id + * @return AjaxResult + */ + AjaxResult selectSpecialDisease(Long specialDiseaseRouteId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java index 57be9bcd..616eceb6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java @@ -1,25 +1,37 @@ package com.xinelu.manage.service.specialdiseasenode.impl; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; +import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper; +import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper; import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; - /** * 专病路径-管理节点信息Service业务层处理 * * @author xinelu * @date 2024-03-13 */ +@Slf4j @Service public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService { @Resource private SpecialDiseaseNodeMapper specialDiseaseNodeMapper; + @Resource + private SpecialDiseaseRouteMapper specialDiseaseRouteMapper; + /** * 查询专病路径-管理节点信息 @@ -49,10 +61,27 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService * @param specialDiseaseNode 专病路径-管理节点信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override - public int insertSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode) { - specialDiseaseNode.setCreateTime(LocalDateTime.now()); - return specialDiseaseNodeMapper.insertSpecialDiseaseNode(specialDiseaseNode); + public AjaxResult insertSpecialDiseaseNode(SpecialDiseaseRouteVO specialDiseaseNode) { + SpecialDiseaseRoute specialDiseaseRoute = new SpecialDiseaseRoute(); + BeanUtils.copyBeanProp(specialDiseaseRoute, specialDiseaseNode); + specialDiseaseRoute.setCreateTime(LocalDateTime.now()); + specialDiseaseRoute.setCreateBy(SecurityUtils.getUsername()); + int insertRouteCount = specialDiseaseRouteMapper.insertSpecialDiseaseRoute(specialDiseaseRoute); + if (insertRouteCount < 0) { + throw new ServiceException("新增专病路径管理节点信息失败"); + } + for (SpecialDiseaseNode diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) { + diseaseNode.setRouteId(specialDiseaseRoute.getId()); + diseaseNode.setCreateTime(LocalDateTime.now()); + diseaseNode.setCreateBy(SecurityUtils.getUsername()); + } + int insertNodeCount = specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNode.getSpecialDiseaseNodeList()); + if (insertNodeCount < 0) { + throw new ServiceException("新增专病路径管理节点信息失败"); + } + return AjaxResult.success(); } /** @@ -61,10 +90,34 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService * @param specialDiseaseNode 专病路径-管理节点信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override - public int updateSpecialDiseaseNode(SpecialDiseaseNode specialDiseaseNode) { - specialDiseaseNode.setUpdateTime(LocalDateTime.now()); - return specialDiseaseNodeMapper.updateSpecialDiseaseNode(specialDiseaseNode); + public AjaxResult updateSpecialDiseaseNode(SpecialDiseaseRouteVO specialDiseaseNode) { + SpecialDiseaseRoute specialDiseaseRoute = new SpecialDiseaseRoute(); + BeanUtils.copyBeanProp(specialDiseaseRoute, specialDiseaseNode); + specialDiseaseRoute.setUpdateTime(LocalDateTime.now()); + specialDiseaseRoute.setUpdateBy(SecurityUtils.getUsername()); + int updateRouteCount = specialDiseaseRouteMapper.updateSpecialDiseaseRoute(specialDiseaseRoute); + if (updateRouteCount < 0) { + log.info("修改专病路径失败"); + throw new ServiceException("修改专病路径管理节点信息失败"); + } + int deleteCount = specialDiseaseNodeMapper.deleteSpecialDiseaseNodeByRouteId(specialDiseaseNode.getId()); + if (deleteCount < 0) { + log.info("删除管理节点信息失败"); + throw new ServiceException("修改专病路径管理节点信息失败"); + } + for (SpecialDiseaseNode diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) { + diseaseNode.setRouteId(specialDiseaseRoute.getId()); + diseaseNode.setUpdateTime(LocalDateTime.now()); + diseaseNode.setUpdateBy(SecurityUtils.getUsername()); + } + int insertNodeCount = specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNode.getSpecialDiseaseNodeList()); + if (insertNodeCount < 0) { + log.info("新增管理节点信息失败"); + throw new ServiceException("修改专病路径管理节点信息失败"); + } + return AjaxResult.success(); } /** @@ -88,4 +141,15 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService public int deleteSpecialDiseaseNodeById(Long id) { return specialDiseaseNodeMapper.deleteSpecialDiseaseNodeById(id); } + + /** + * 查询专病路径-管理节点信息列表 + * + * @param specialDiseaseRouteId 路径id + * @return AjaxResult + */ + @Override + public AjaxResult selectSpecialDisease(Long specialDiseaseRouteId) { + return AjaxResult.success(specialDiseaseNodeMapper.selectSpecialDiseaseByRouteId(specialDiseaseRouteId)); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java new file mode 100644 index 00000000..ec6433a0 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java @@ -0,0 +1,71 @@ +package com.xinelu.manage.service.specialdiseaseroute; + +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; + +import java.util.List; + +/** + * 专病路径信息Service接口 + * + * @author xinelu + * @date 2024-03-13 + */ +public interface ISpecialDiseaseRouteService { + /** + * 查询专病路径信息 + * + * @param id 专病路径信息主键 + * @return 专病路径信息 + */ + SpecialDiseaseRouteVO selectSpecialDiseaseRouteById(Long id); + + /** + * 查询专病路径信息列表 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 专病路径信息集合 + */ + List selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute); + + /** + * 新增专病路径信息 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 结果 + */ + int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute); + + /** + * 修改专病路径信息 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 结果 + */ + int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute); + + /** + * 批量删除专病路径信息 + * + * @param ids 需要删除的专病路径信息主键集合 + * @return 结果 + */ + int deleteSpecialDiseaseRouteByIds(Long[] ids); + + /** + * 删除专病路径信息信息 + * + * @param id 专病路径信息主键 + * @return 结果 + */ + int deleteSpecialDiseaseRouteById(Long id); + + /** + * 科室路径数量 + * + * @param departmentName 科室名称 + * @return AjaxResult + */ + AjaxResult departmentRouteCount(String departmentName); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java new file mode 100644 index 00000000..a6b94cc8 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java @@ -0,0 +1,117 @@ +package com.xinelu.manage.service.specialdiseaseroute.impl; + +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; +import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper; +import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService; +import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * 专病路径信息Service业务层处理 + * + * @author xinelu + * @date 2024-03-13 + */ +@Service +public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteService { + @Resource + private SpecialDiseaseRouteMapper specialDiseaseRouteMapper; + + /** + * 查询专病路径信息 + * + * @param id 专病路径信息主键 + * @return 专病路径信息 + */ + @Override + public SpecialDiseaseRouteVO selectSpecialDiseaseRouteById(Long id) { + return specialDiseaseRouteMapper.selectSpecialDiseaseRouteAndTriggerById(id); + } + + /** + * 查询专病路径信息列表 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 专病路径信息 + */ + @Override + public List selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute) { + return specialDiseaseRouteMapper.selectSpecialDiseaseRouteList(specialDiseaseRoute); + } + + /** + * 新增专病路径信息 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 结果 + */ + @Override + public int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute) { + specialDiseaseRoute.setCreateTime(LocalDateTime.now()); + return specialDiseaseRouteMapper.insertSpecialDiseaseRoute(specialDiseaseRoute); + } + + /** + * 修改专病路径信息 + * + * @param specialDiseaseRoute 专病路径信息 + * @return 结果 + */ + @Override + public int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute) { + specialDiseaseRoute.setUpdateTime(LocalDateTime.now()); + return specialDiseaseRouteMapper.updateSpecialDiseaseRoute(specialDiseaseRoute); + } + + /** + * 批量删除专病路径信息 + * + * @param ids 需要删除的专病路径信息主键 + * @return 结果 + */ + @Override + public int deleteSpecialDiseaseRouteByIds(Long[] ids) { + return specialDiseaseRouteMapper.deleteSpecialDiseaseRouteByIds(ids); + } + + /** + * 删除专病路径信息信息 + * + * @param id 专病路径信息主键 + * @return 结果 + */ + @Override + public int deleteSpecialDiseaseRouteById(Long id) { + return specialDiseaseRouteMapper.deleteSpecialDiseaseRouteById(id); + } + + /** + * 科室路径数量 + * + * @param departmentName 科室名称 + * @return AjaxResult + */ + @Override + public AjaxResult departmentRouteCount(String departmentName) { + DepartmentVO departmentVO = new DepartmentVO(); + List department = new ArrayList<>(); + departmentVO.setDepartmentName("全部"); + departmentVO.setCountNum(0); + List departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName); + if (CollectionUtils.isNotEmpty(departmentVOS)) { + Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum(); + departmentVO.setCountNum(result); + department.add(departmentVO); + department.addAll(departmentVOS); + } + return AjaxResult.success(department); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/ISpecialDiseaseTriggerConditionService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/ISpecialDiseaseTriggerConditionService.java new file mode 100644 index 00000000..5c027868 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/ISpecialDiseaseTriggerConditionService.java @@ -0,0 +1,62 @@ +package com.xinelu.manage.service.specialdiseasetriggercondition; + +import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; +import com.xinelu.manage.dto.specialdiseasetriggercondition.TriggerConditionDTO; + +import java.util.List; + +/** + * 触发条件关系Service接口 + * + * @author xinelu + * @date 2024-03-18 + */ +public interface ISpecialDiseaseTriggerConditionService { + /** + * 查询触发条件关系 + * + * @param id 触发条件关系主键 + * @return 触发条件关系 + */ + SpecialDiseaseTriggerCondition selectSpecialDiseaseTriggerConditionById(Long id); + + /** + * 查询触发条件关系列表 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 触发条件关系集合 + */ + List selectSpecialDiseaseTriggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition); + + /** + * 新增触发条件关系 + * + * @param triggerConditionList 触发条件关系 + * @return 结果 + */ + int insertSpecialDiseaseTriggerCondition(TriggerConditionDTO triggerConditionList); + + /** + * 修改触发条件关系 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 结果 + */ + int updateSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition); + + /** + * 批量删除触发条件关系 + * + * @param ids 需要删除的触发条件关系主键集合 + * @return 结果 + */ + int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids); + + /** + * 删除触发条件关系信息 + * + * @param id 触发条件关系主键 + * @return 结果 + */ + int deleteSpecialDiseaseTriggerConditionById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java new file mode 100644 index 00000000..b6f5f42c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java @@ -0,0 +1,94 @@ +package com.xinelu.manage.service.specialdiseasetriggercondition.impl; + +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; +import com.xinelu.manage.dto.specialdiseasetriggercondition.TriggerConditionDTO; +import com.xinelu.manage.mapper.specialdiseasetriggercondition.SpecialDiseaseTriggerConditionMapper; +import com.xinelu.manage.service.specialdiseasetriggercondition.ISpecialDiseaseTriggerConditionService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + + +/** + * 触发条件关系Service业务层处理 + * + * @author xinelu + * @date 2024-03-18 + */ +@Service +public class SpecialDiseaseTriggerConditionServiceImpl implements ISpecialDiseaseTriggerConditionService { + @Resource + private SpecialDiseaseTriggerConditionMapper specialDiseaseTriggerConditionMapper; + + /** + * 查询触发条件关系 + * + * @param id 触发条件关系主键 + * @return 触发条件关系 + */ + @Override + public SpecialDiseaseTriggerCondition selectSpecialDiseaseTriggerConditionById(Long id) { + return specialDiseaseTriggerConditionMapper.selectSpecialDiseaseTriggerConditionById(id); + } + + /** + * 查询触发条件关系列表 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 触发条件关系 + */ + @Override + public List selectSpecialDiseaseTriggerConditionList(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) { + return specialDiseaseTriggerConditionMapper.selectSpecialDiseaseTriggerConditionList(specialDiseaseTriggerCondition); + } + + /** + * 新增触发条件关系 + * + * @param triggerConditionList 触发条件关系 + * @return 结果 + */ + @Override + public int insertSpecialDiseaseTriggerCondition(TriggerConditionDTO triggerConditionList) { + triggerConditionList.getTriggerConditionList().forEach(item -> item.setCreateTime(LocalDateTime.now())); + triggerConditionList.getTriggerConditionList().forEach(item -> item.setCreateBy(SecurityUtils.getUsername())); + return specialDiseaseTriggerConditionMapper.insertTriggerConditionList(triggerConditionList.getTriggerConditionList()); + } + + /** + * 修改触发条件关系 + * + * @param specialDiseaseTriggerCondition 触发条件关系 + * @return 结果 + */ + @Override + public int updateSpecialDiseaseTriggerCondition(SpecialDiseaseTriggerCondition specialDiseaseTriggerCondition) { + specialDiseaseTriggerCondition.setUpdateTime(LocalDateTime.now()); + return specialDiseaseTriggerConditionMapper.updateSpecialDiseaseTriggerCondition(specialDiseaseTriggerCondition); + } + + /** + * 批量删除触发条件关系 + * + * @param ids 需要删除的触发条件关系主键 + * @return 结果 + */ + @Override + public int deleteSpecialDiseaseTriggerConditionByIds(Long[] ids) { + return specialDiseaseTriggerConditionMapper.deleteSpecialDiseaseTriggerConditionByIds(ids); + } + + /** + * 删除触发条件关系信息 + * + * @param id 触发条件关系主键 + * @return 结果 + */ + @Override + public int deleteSpecialDiseaseTriggerConditionById(Long id) { + return specialDiseaseTriggerConditionMapper.deleteSpecialDiseaseTriggerConditionById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/ITaskStatusDictService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/ITaskStatusDictService.java index 0cd712c9..3248d8fa 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/ITaskStatusDictService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/ITaskStatusDictService.java @@ -18,7 +18,7 @@ public interface ITaskStatusDictService { * @param id 任务状态字典主键 * @return 任务状态字典 */ - public TaskStatusDict selectTaskStatusDictById(Long id); + TaskStatusDict selectTaskStatusDictById(Long id); /** * 查询任务状态字典列表 @@ -26,7 +26,7 @@ public interface ITaskStatusDictService { * @param taskStatusDict 任务状态字典 * @return 任务状态字典集合 */ - public List selectTaskStatusDictList(TaskStatusDict taskStatusDict); + List selectTaskStatusDictList(TaskStatusDict taskStatusDict); /** * 新增任务状态字典 @@ -34,7 +34,7 @@ public interface ITaskStatusDictService { * @param taskStatusDict 任务状态字典 * @return 结果 */ - public int insertTaskStatusDict(TaskStatusDict taskStatusDict); + int insertTaskStatusDict(TaskStatusDict taskStatusDict); /** * 修改任务状态字典 @@ -42,7 +42,7 @@ public interface ITaskStatusDictService { * @param taskStatusDict 任务状态字典 * @return 结果 */ - public int updateTaskStatusDict(TaskStatusDict taskStatusDict); + int updateTaskStatusDict(TaskStatusDict taskStatusDict); /** * 批量删除任务状态字典 @@ -50,7 +50,7 @@ public interface ITaskStatusDictService { * @param ids 需要删除的任务状态字典主键集合 * @return 结果 */ - public int deleteTaskStatusDictByIds(Long[] ids); + int deleteTaskStatusDictByIds(Long[] ids); /** * 删除任务状态字典信息 @@ -58,5 +58,5 @@ public interface ITaskStatusDictService { * @param id 任务状态字典主键 * @return 结果 */ - public int deleteTaskStatusDictById(Long id); + int deleteTaskStatusDictById(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/impl/TaskStatusDictServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/impl/TaskStatusDictServiceImpl.java index 90acbc96..a5345f79 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/impl/TaskStatusDictServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/taskstatusdict/impl/TaskStatusDictServiceImpl.java @@ -1,5 +1,8 @@ package com.xinelu.manage.service.taskstatusdict.impl; +import com.xinelu.common.constant.Constants; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.manage.domain.taskstatusdict.TaskStatusDict; import com.xinelu.manage.mapper.taskstatusdict.TaskStatusDictMapper; import com.xinelu.manage.service.taskstatusdict.ITaskStatusDictService; @@ -20,6 +23,8 @@ import java.util.List; public class TaskStatusDictServiceImpl implements ITaskStatusDictService { @Resource private TaskStatusDictMapper taskStatusDictMapper; + @Resource + private GenerateSystemCodeUtil generateSystemCodeUtil; /** * 查询任务状态字典 @@ -51,7 +56,9 @@ public class TaskStatusDictServiceImpl implements ITaskStatusDictService { */ @Override public int insertTaskStatusDict(TaskStatusDict taskStatusDict) { + taskStatusDict.setTaskStatusCode(Constants.TASK_STATUS_CODE + generateSystemCodeUtil.generateSystemCode(Constants.TASK_STATUS_CODE)); taskStatusDict.setCreateTime(LocalDateTime.now()); + taskStatusDict.setCreateBy(SecurityUtils.getUsername()); return taskStatusDictMapper.insertTaskStatusDict(taskStatusDict); } @@ -64,6 +71,7 @@ public class TaskStatusDictServiceImpl implements ITaskStatusDictService { @Override public int updateTaskStatusDict(TaskStatusDict taskStatusDict) { taskStatusDict.setUpdateTime(LocalDateTime.now()); + taskStatusDict.setUpdateBy(SecurityUtils.getUsername()); return taskStatusDictMapper.updateTaskStatusDict(taskStatusDict); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java index 801c6871..824bb5cd 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/IWechatTemplateService.java @@ -1,11 +1,9 @@ package com.xinelu.manage.service.wechattemplate; -import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.manage.domain.wechattemplate.WechatTemplate; import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO; import com.xinelu.manage.dto.wechattemplate.WechatTemplateTaskDTO; import com.xinelu.manage.vo.wechattemplate.WechatTemplateTaskVO; -import com.xinelu.manage.vo.wechattemplate.WechatTemplateVO; import java.util.List; @@ -65,10 +63,7 @@ public interface IWechatTemplateService { public int deleteWechatTemplateById(Long id); /** - * 根据id查询微信模板Dto - * - * @param id - * @return + * 根据id查询微信模板 */ WechatTemplateTaskVO selectWechatTemplateDtoById(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java index 72289ef6..f7b2d3c3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/wechattemplate/impl/WechatTemplateServiceImpl.java @@ -2,7 +2,6 @@ package com.xinelu.manage.service.wechattemplate.impl; import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.exception.ServiceException; -import com.xinelu.common.utils.PageServiceUtil; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.wechattemplate.WechatTemplate; @@ -37,9 +36,6 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService { @Resource private SysDictDataMapper sysDictDataMapper; - @Resource - private PageServiceUtil pageServiceUtil; - /** * 查询微信模板信息 * @@ -151,7 +147,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService { @Transactional(rollbackFor = Exception.class) public int updateWechatTemplate(WechatTemplateTaskDTO wechatTemplateTaskDTO) { // 检查除当前记录之外是否存在同名的微信模板名称 - if (wechatTemplateMapper.countByWechatTemplateNameExcludingId(wechatTemplateTaskDTO.getId(), wechatTemplateTaskDTO.getDepartmentId(), wechatTemplateTaskDTO.getWechatTemplateName()) > 0) { + if (wechatTemplateMapper.countByWechatTemplateNameExcludingId(wechatTemplateTaskDTO.getId(), wechatTemplateTaskDTO.getDepartmentId(), wechatTemplateTaskDTO.getWechatTemplateName(), wechatTemplateTaskDTO.getTemplateSource()) > 0) { throw new ServiceException("微信模板名称已存在"); } // 设置修改者和修改时间 @@ -222,9 +218,6 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService { /** * 根据id查询微信模板Dto - * - * @param id - * @return */ @Override public WechatTemplateTaskVO selectWechatTemplateDtoById(Long id) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/agency/HospitalVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/agency/HospitalVO.java new file mode 100644 index 00000000..9cec0bf0 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/agency/HospitalVO.java @@ -0,0 +1,26 @@ +package com.xinelu.manage.vo.agency; + +import com.xinelu.manage.domain.agency.Agency; +import com.xinelu.manage.domain.department.Department; +import lombok.Data; + +import java.util.List; + +@Data +public class HospitalVO { + + /** + * 园区集合 + */ + List campusList; + + /** + * 科室集合 + */ + List departmentList; + + /** + * 病区集合 + */ + List wardList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientblacklist/PatientBlacklistVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientblacklist/PatientBlacklistVo.java index 758c1d31..9fb04d51 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientblacklist/PatientBlacklistVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientblacklist/PatientBlacklistVo.java @@ -3,7 +3,7 @@ package com.xinelu.manage.vo.patientblacklist; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDateTime; import lombok.Data; /** @@ -86,5 +86,5 @@ public class PatientBlacklistVo { * 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; + private LocalDateTime createTime; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientinfo/PatientBaseInfoVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientinfo/PatientBaseInfoVo.java new file mode 100644 index 00000000..d32f008a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientinfo/PatientBaseInfoVo.java @@ -0,0 +1,55 @@ +package com.xinelu.manage.vo.patientinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import java.time.LocalDate; +import lombok.Data; + +/** + * @description: 患者基本信息 + * @author: haown + * @create: 2024-03-21 17:16 + **/ +@Data +public class PatientBaseInfoVo { + /** 主键id */ + private Long id; + + /** 居民信息表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 */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate birthDate; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** 性别,男:MALE,女:FEMALE */ + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + @Excel(name = "性别,男:MALE,女:FEMALE") + private String sex; + + /** 住址 */ + @ApiModelProperty(value = "住址") + @Excel(name = "住址") + private String address; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubjectresult/PatientQuestionSubjectResultDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubjectresult/PatientQuestionSubjectResultDTO.java new file mode 100644 index 00000000..d703a015 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubjectresult/PatientQuestionSubjectResultDTO.java @@ -0,0 +1,29 @@ +package com.xinelu.manage.vo.patientquestionsubjectresult; + +import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult; +import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * 患者问卷题目提交结果信息对象 patient_question_subject_result + * + * @author xinelu + * @date 2024-03-28 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class PatientQuestionSubjectResultDTO extends PatientQuestionSubjectResult { + + /* + * 患者问卷题目提交结果信息对象id + */ + private Long subjectResultId; + + /** + * 选项表信息 + */ + List optionResults; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java new file mode 100644 index 00000000..921e4826 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java @@ -0,0 +1,33 @@ +package com.xinelu.manage.vo.patientquestionsubmitresult; + + +import com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectResultDTO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 患者问卷提交结果信息对象 patient_question_submit_result + * + * @author xinelu + * @date 2024-03-28 + */ +@Data +public class PatientQuestionSubmitResultDTO { + + private Long submitResulId; + /** + * 问卷标题 + */ + @ApiModelProperty(value = "问卷标题") + private String questionnaireName; + + /** + * 问卷说明 + */ + @ApiModelProperty(value = "问卷说明") + private String questionnaireDescription; + + List subjectResultList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patienttaskexecuterecord/PatientTaskExecuteRecordVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patienttaskexecuterecord/PatientTaskExecuteRecordVO.java new file mode 100644 index 00000000..87fc4990 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patienttaskexecuterecord/PatientTaskExecuteRecordVO.java @@ -0,0 +1,102 @@ +package com.xinelu.manage.vo.patienttaskexecuterecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord; +import io.swagger.annotations.ApiModelProperty; +import java.time.LocalDate; +import java.time.LocalDateTime; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +/** + * 患者管理任务执行记录对象 patient_task_execute_record + * + * @author xinelu + * @date 2024-03-25 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class PatientTaskExecuteRecordVO extends PatientTaskExecuteRecord { + + @ApiModelProperty(value = "患者年龄") + private Long age; + + @ApiModelProperty(value = "患者姓名") + private String patientName; + + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + @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 surgicalName; + + @ApiModelProperty(value = "入院时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime admissionTime; + + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "出院时间(出院患者)") + private LocalDateTime dischargeTime; + + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate startDate; + + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate endDate; + + @ApiModelProperty(value = "家属电话") + private String familyMemberPhone; + + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate birthDate; + + @ApiModelProperty(value = "身份证号") + private String cardNo; + + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + private String sex; + + @ApiModelProperty(value = "住址") + private String address; + + @ApiModelProperty(value = "入院病历信息,存储患者入院的整个病历信息") + private String inHospitalInfo; + + @ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息") + private String outHospitalInfo; + + @ApiModelProperty(value = "手术记录") + private String surgicalRecord; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/propagandainfo/PropagandaMaterialsVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/propagandainfo/PropagandaMaterialsVo.java new file mode 100644 index 00000000..d7f8f402 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/propagandainfo/PropagandaMaterialsVo.java @@ -0,0 +1,94 @@ +package com.xinelu.manage.vo.propagandainfo; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.domain.materialsinfo.MaterialsInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.List; +import lombok.Data; + +/** + * @description: 宣教对象查询返回视图类 + * @author: haown + * @create: 2024-03-28 10:50 + **/ +@ApiModel("宣教对象查询返回视图类") +@Data +public class PropagandaMaterialsVo { + /** 主键id */ + private Long id; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "所属医院名称") + private String hospitalAgencyName; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "所属科室名称") + private String departmentName; + + /** 宣教标题(宣教名称) */ + @ApiModelProperty(value = "宣教标题") + @Excel(name = "宣教标题", readConverterExp = "宣=教名称") + private String propagandaTitle; + + /** 宣教类型,用药知识:MEDICATION_KNOWLEDGE,疾病科普:DISEASE_POPULARIZATION,运动营养:SPORT_NUTRITION,其他知识:OTHER_KNOWLEDGE, + 定制内容:CUSTOMIZED_CONTENT */ + @ApiModelProperty(value = "宣教类型,用药知识:MEDICATION_KNOWLEDGE,疾病科普:DISEASE_POPULARIZATION,运动营养:SPORT_NUTRITION,其他知识:OTHER_KNOWLEDGE,定制内容:CUSTOMIZED_CONTENT") + @Excel(name = "宣教类型,用药知识:MEDICATION_KNOWLEDGE,疾病科普:DISEASE_POPULARIZATION,运动营养:SPORT_NUTRITION,其他知识:OTHER_KNOWLEDGE,定制内容:CUSTOMIZED_CONTENT") + private String propagandaType; + + /** 宣教ID */ + @ApiModelProperty(value = "宣教ID") + private String propagandaCode; + + /** 宣教状态,创作中:CREATE_PROCESS,创作完成:CREATE_COMPLETE,审核中:IN_REVIEW,审核通过:APPROVED,审核不通过:REVIEW_FAILED */ + @ApiModelProperty(value = "宣教状态,创作中:CREATE_PROCESS,创作完成:CREATE_COMPLETE,审核中:IN_REVIEW,审核通过:APPROVED,审核不通过:REVIEW_FAILED") + @Excel(name = "宣教状态,创作中:CREATE_PROCESS,创作完成:CREATE_COMPLETE,审核中:IN_REVIEW,审核通过:APPROVED,审核不通过:REVIEW_FAILED") + private String propagandaStatus; + + /** 宣教正文内容 */ + @ApiModelProperty(value = "宣教正文内容") + private String propagandaContent; + + /** 宣教封面文件存放地址 */ + @ApiModelProperty(value = "宣教封面文件存放地址") + private String propagandaCoverPath; + + /** 宣教文章摘要 */ + @ApiModelProperty(value = "宣教文章摘要") + private String articleSummary; + + /** 语音播报 */ + @ApiModelProperty(value = "语音播报") + private String voicebroadcast; + + /** 所属病种id */ + @ApiModelProperty(value = "所属病种id") + private Long diseaseTypeId; + + /** 所属病种名称 */ + @ApiModelProperty(value = "所属病种名称") + @Excel(name = "所属病种名称") + private String diseaseTypeName; + + /** 宣教链接 */ + @ApiModelProperty(value = "宣教链接") + private String propagandaLink; + + /** 宣教二维码图片存放地址 */ + @ApiModelProperty(value = "宣教二维码图片存放地址") + private String propagandaBarcodePath; + + @ApiModelProperty("关联的素材列表") + List materialsInfoList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java index 63356a13..8c65fca7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java @@ -7,7 +7,8 @@ import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHar import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import java.util.Date; +import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.List; import lombok.Data; @@ -54,14 +55,20 @@ public class SignPatientInfoVo { /** 出生日期,格式:yyyy-MM-dd */ @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; + private LocalDate birthDate; /** * 签约时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date signTime; + private LocalDateTime signTime; + + /** + * 签约时所属医院id + */ + @ApiModelProperty (value = "签约时所属医院id") + private Long hospitalAgencyId; /** * 签约时所属医院名称 @@ -69,18 +76,36 @@ public class SignPatientInfoVo { @ApiModelProperty(value = "签约时所属医院名称") private String hospitalAgencyName; + /** + * 签约时所属院区id + */ + @ApiModelProperty(value = "签约时所属院区id") + private Long campusAgencyId; + /** * 签约时所属院区名称 */ @ApiModelProperty(value = "签约时所属院区名称") private String campusAgencyName; + /** + * 签约时所属科室id + */ + @ApiModelProperty(value = "签约时所属科室id") + private Long departmentId; + /** * 签约时所属科室名称 */ @ApiModelProperty(value = "签约时所属科室名称") private String departmentName; + /** + * 签约时所属病区id + */ + @ApiModelProperty(value = "签约时所属病区id") + private Long wardId; + /** * 签约时所属病区名称 */ @@ -126,10 +151,23 @@ public class SignPatientInfoVo { @ApiModelProperty(value = "签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN,过期:EXPIRE_SIGN") private String signStatus; + /** + * 健康管理师id + */ + @ApiModelProperty(value = "健康管理师id") + private Long healthManageId; + + /** + * 健康管理师姓名 + */ + @ApiModelProperty(value = "健康管理师姓名") + private String healthManageName; + @ApiModelProperty(value = "患者签约记录表id") @Excel(name = "患者签约记录表id") private Long signPatientRecordId; + // ------服务包相关begin /** 服务包表id */ @ApiModelProperty(value = "服务包表id") private Long servicePackageId; @@ -149,16 +187,24 @@ public class SignPatientInfoVo { /** 服务开始时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiModelProperty(value = "服务开始时间,格式:yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd") - private Date serviceStartTime; + private LocalDateTime serviceStartTime; /** 服务结束时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiModelProperty(value = "服务结束时间,格式:yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd") - private Date serviceEndTime; + private LocalDateTime serviceEndTime; - /** 服务周期,单位是月 */ - @ApiModelProperty(value = "服务周期,单位是月") - private Integer serviceCycle; + /** + * 服务包期限 + */ + @ApiModelProperty(value = "服务包期限") + private Integer packageTerm; + + /** + * 服务包期限单位,年,月,日 + */ + @ApiModelProperty(value = "服务包期限单位,年,月,日") + private String packageTermUnit; @ApiModelProperty(value = "签约硬件设备列表") private List signDevices; diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientListVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientListVo.java index 97e153df..4af2c2cd 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientListVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientListVo.java @@ -1,10 +1,12 @@ package com.xinelu.manage.vo.signpatientrecord; import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; -import java.util.Date; +import java.time.LocalDate; +import java.time.LocalDateTime; import lombok.Data; /** @@ -51,14 +53,20 @@ public class SignPatientListVo { /** 出生日期,格式:yyyy-MM-dd */ @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - private Date birthDate; + private LocalDate birthDate; /** * 签约时间,格式:yyyy-MM-dd HH:mm:ss */ @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date signTime; + private LocalDateTime signTime; + + /** + * 签约时所属医院id + */ + @ApiModelProperty(value = "签约时所属医院id") + private Long hospitalAgencyId; /** * 签约时所属医院名称 @@ -66,18 +74,36 @@ public class SignPatientListVo { @ApiModelProperty(value = "签约时所属医院名称") private String hospitalAgencyName; + /** + * 签约时所属院区id + */ + @ApiModelProperty(value = "签约时所属院区id") + private Long campusAgencyId; + /** * 签约时所属院区名称 */ @ApiModelProperty(value = "签约时所属院区名称") private String campusAgencyName; + /** + * 签约时所属科室id + */ + @ApiModelProperty(value = "签约时所属科室id") + private Long departmentId; + /** * 签约时所属科室名称 */ @ApiModelProperty(value = "签约时所属科室名称") private String departmentName; + /** + * 签约时所属病区id + */ + @ApiModelProperty(value = "签约时所属病区id") + private Long wardId; + /** * 签约时所属病区名称 */ @@ -134,7 +160,7 @@ public class SignPatientListVo { */ @ApiModelProperty(value = "加入意向时间(意向签约)") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date intentionalTime; + private LocalDateTime intentionalTime; /** * 开单医生姓名(意向签约) @@ -154,11 +180,19 @@ public class SignPatientListVo { @ApiModelProperty(value = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES") private String paymentStatus; + /** 服务包表id */ + @ApiModelProperty(value = "服务包表id") + @Excel(name = "服务包表id") + private Long servicePackageId; + /** 服务包名称 */ @ApiModelProperty(value = "服务包名称") private String packageName; - /** 服务周期,单位是月 */ - @ApiModelProperty(value = "服务周期,单位是月") - private Integer serviceCycle; + /** 服务周期 */ + @ApiModelProperty(value = "服务周期") + private Integer packageTerm; + + @ApiModelProperty(value = "服务周期单位") + private String packageTermUnit; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientRecordVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientRecordVo.java index a2369e95..e0b2b19e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientRecordVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientRecordVo.java @@ -3,7 +3,7 @@ package com.xinelu.manage.vo.signpatientrecord; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.util.Date; +import java.time.LocalDateTime; import lombok.Data; /** @@ -35,7 +35,7 @@ public class SignPatientRecordVo { @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date signTime; + private LocalDateTime signTime; /** * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseasenode/SpecialDiseaseNodeVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseasenode/SpecialDiseaseNodeVO.java new file mode 100644 index 00000000..932c2956 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseasenode/SpecialDiseaseNodeVO.java @@ -0,0 +1,20 @@ +package com.xinelu.manage.vo.specialdiseasenode; + +import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 专病路径-管理节点信息对象 special_disease_node + * + * @author xinelu + * @date 2024-03-13 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class SpecialDiseaseNodeVO extends SpecialDiseaseNode { + + @ApiModelProperty(value = "专病路径表id") + private Long SpecialDiseaseNodeId; +} 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 new file mode 100644 index 00000000..64972be2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseaseroute/SpecialDiseaseRouteVO.java @@ -0,0 +1,36 @@ +package com.xinelu.manage.vo.specialdiseaseroute; + +import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; +import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO; +import com.xinelu.manage.vo.specialdiseasetriggercondition.TriggerConditionVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * 专病路径信息对象 special_disease_route + * + * @author xinelu + * @date 2024-03-13 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class SpecialDiseaseRouteVO extends SpecialDiseaseRoute { + + /** + * 专病路径信息 + */ + private Long specialDiseaseRouteId; + + + /** + * 节点信息 + */ + List specialDiseaseNodeList; + + /** + * 节点信息 + */ + List triggerConditionList; +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseasetriggercondition/TriggerConditionVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseasetriggercondition/TriggerConditionVO.java new file mode 100644 index 00000000..5ad22c33 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/specialdiseasetriggercondition/TriggerConditionVO.java @@ -0,0 +1,21 @@ +package com.xinelu.manage.vo.specialdiseasetriggercondition; + +import com.xinelu.manage.domain.specialdiseasetriggercondition.SpecialDiseaseTriggerCondition; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 触发条件关系DTO + * + * @author xinelu + * @date 2024-03-18 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class TriggerConditionVO extends SpecialDiseaseTriggerCondition { + + /** + * 触发条件id + */ + private Long triggerConditionId; +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/materialsinfo/MaterialsInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/materialsinfo/MaterialsInfoMapper.xml index 59e6dbaf..217eb8e0 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/materialsinfo/MaterialsInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/materialsinfo/MaterialsInfoMapper.xml @@ -24,6 +24,7 @@ + @@ -31,12 +32,13 @@ - select id, materials_name, materials_type, materials_option, materials_file_path, video_cover_type, video_cover_file_path, materials_abstract, indications, applicable_diseases, drug_name, surgical_name, check_items, inspection_items, crowd_id, crow_name, materials_status, materials_remark, materials_sort, create_by, create_time, update_by, update_time from materials_info + select id, materials_name, materials_type, materials_option, materials_file_path, video_cover_type, video_cover_file_path, materials_abstract, indications, applicable_diseases, drug_name, surgical_name, check_items, inspection_items, crowd_id, crow_name, materials_status, materials_remark, materials_sort, del_flag, create_by, create_time, update_by, update_time from materials_info + + + del_flag = 0 + + and patient_name = #{patientName} + + + and patient_phone like concat('%', #{patientPhone}, '%') + + + and card_no = #{cardNo} + + + + + and (patient_type = 'OUTPATIENT' or patient_type = 'DISCHARGED_PATIENT') + + + and patient_type = #{patientType} + + + + + and attending_physician_id = #{attendingPhysicianId} + + + and main_diagnosis like concat('%', #{mainDiagnosis}, '%') + + + and hospital_agency_id = #{hospitalAgencyId} + + + and campus_agency_id = #{campusAgencyId} + + + and department_id = #{departmentId} + + + and ward_id = #{wardId} + + + and visit_method = #{visitMethod} + + + and visit_date >= #{visitDateStart} + + + and visit_date <= #{visitDateEnd} + + + and admission_time >= #{admissionTimeStart} + + + and admission_time <= #{admissionTimeEnd} + + + and appointment_date >= #{appointmentDateStart} + + + and appointment_date <= #{appointmentDateEnd} + + + and appointment_treatment_group = #{appointmentTreatmentGroup} + + + and registration_no = #{registrationNo} + + + and visit_serial_number = #{visitSerialNumber} + + + and responsible_nurse = #{responsibleNurse} + + + and patient_source = #{patientSource} + + + + + + insert into patient_info @@ -371,6 +515,193 @@ + + 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 @@ -517,6 +848,139 @@ 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 @@ -529,6 +993,12 @@ #{id} + + update patient_info set del_flag = 1 where id in + + #{id} + + select from patient_pre_hospitalization - where id = #{id,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} - - delete from patient_pre_hospitalization - where id = #{id,jdbcType=BIGINT} - - - insert into patient_pre_hospitalization - ( id,patient_id,patient_name - ,patient_phone,card_no,sex - ,birth_date,family_member_phone,address - ,main_diagnosis,hospital_agency_id,hospital_agency_name - ,campus_agency_id,campus_agency_name,department_id - ,department_name,ward_id,ward_name - ,appointment_treatment_group,registration_no,registration_date - ,appointment_date,certificate_issuing_doctor_id,certificate_issuing_doctor_name - ,responsible_nurse,del_flag,create_by - ,create_time,update_by,update_time - ) - values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} - ,#{patientPhone,jdbcType=VARCHAR},#{cardNo,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR} - ,#{birthDate,jdbcType=DATE},#{familyMemberPhone,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR} - ,#{mainDiagnosis,jdbcType=VARCHAR},#{hospitalAgencyId,jdbcType=BIGINT},#{hospitalAgencyName,jdbcType=VARCHAR} - ,#{campusAgencyId,jdbcType=BIGINT},#{campusAgencyName,jdbcType=VARCHAR},#{departmentId,jdbcType=BIGINT} - ,#{departmentName,jdbcType=VARCHAR},#{wardId,jdbcType=BIGINT},#{wardName,jdbcType=VARCHAR} - ,#{appointmentTreatmentGroup,jdbcType=VARCHAR},#{registrationNo,jdbcType=VARCHAR},#{registrationDate,jdbcType=DATE} - ,#{appointmentDate,jdbcType=DATE},#{certificateIssuingDoctorId,jdbcType=BIGINT},#{certificateIssuingDoctorName,jdbcType=VARCHAR} - ,#{responsibleNurse,jdbcType=VARCHAR},#{delFlag,jdbcType=TINYINT},#{createBy,jdbcType=VARCHAR} - ,#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP} - ) - - - insert into patient_pre_hospitalization - - id, - patient_id, - patient_name, - patient_phone, - card_no, - sex, - birth_date, - family_member_phone, - address, - main_diagnosis, - hospital_agency_id, - hospital_agency_name, - campus_agency_id, - campus_agency_name, - department_id, - department_name, - ward_id, - ward_name, - appointment_treatment_group, - registration_no, - registration_date, - appointment_date, - certificate_issuing_doctor_id, - certificate_issuing_doctor_name, - responsible_nurse, - del_flag, - create_by, - create_time, - update_by, - update_time, - - - #{id,jdbcType=BIGINT}, - #{patientId,jdbcType=BIGINT}, - #{patientName,jdbcType=VARCHAR}, - #{patientPhone,jdbcType=VARCHAR}, - #{cardNo,jdbcType=VARCHAR}, - #{sex,jdbcType=VARCHAR}, - #{birthDate,jdbcType=DATE}, - #{familyMemberPhone,jdbcType=VARCHAR}, - #{address,jdbcType=VARCHAR}, - #{mainDiagnosis,jdbcType=VARCHAR}, - #{hospitalAgencyId,jdbcType=BIGINT}, - #{hospitalAgencyName,jdbcType=VARCHAR}, - #{campusAgencyId,jdbcType=BIGINT}, - #{campusAgencyName,jdbcType=VARCHAR}, - #{departmentId,jdbcType=BIGINT}, - #{departmentName,jdbcType=VARCHAR}, - #{wardId,jdbcType=BIGINT}, - #{wardName,jdbcType=VARCHAR}, - #{appointmentTreatmentGroup,jdbcType=VARCHAR}, - #{registrationNo,jdbcType=VARCHAR}, - #{registrationDate,jdbcType=DATE}, - #{appointmentDate,jdbcType=DATE}, - #{certificateIssuingDoctorId,jdbcType=BIGINT}, - #{certificateIssuingDoctorName,jdbcType=VARCHAR}, - #{responsibleNurse,jdbcType=VARCHAR}, - #{delFlag,jdbcType=TINYINT}, - #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, - #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, - - - - update patient_pre_hospitalization - - - patient_id = #{patientId,jdbcType=BIGINT}, - - - patient_name = #{patientName,jdbcType=VARCHAR}, - - - patient_phone = #{patientPhone,jdbcType=VARCHAR}, - - - card_no = #{cardNo,jdbcType=VARCHAR}, - - - sex = #{sex,jdbcType=VARCHAR}, - - - birth_date = #{birthDate,jdbcType=DATE}, - - - family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, - - - address = #{address,jdbcType=VARCHAR}, - - - main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, - - - hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, - - - hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, - - - campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, - - - campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, - - - department_id = #{departmentId,jdbcType=BIGINT}, - - - department_name = #{departmentName,jdbcType=VARCHAR}, - - - ward_id = #{wardId,jdbcType=BIGINT}, - - - ward_name = #{wardName,jdbcType=VARCHAR}, - - - appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, - - - registration_no = #{registrationNo,jdbcType=VARCHAR}, - - - registration_date = #{registrationDate,jdbcType=DATE}, - - - appointment_date = #{appointmentDate,jdbcType=DATE}, - - - certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, - - - certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, - - - responsible_nurse = #{responsibleNurse,jdbcType=VARCHAR}, - - - del_flag = #{delFlag,jdbcType=TINYINT}, - - - create_by = #{createBy,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - update_by = #{updateBy,jdbcType=VARCHAR}, - - - update_time = #{updateTime,jdbcType=TIMESTAMP}, - - - where id = #{id,jdbcType=BIGINT} - - - update patient_pre_hospitalization - set - patient_id = #{patientId,jdbcType=BIGINT}, - patient_name = #{patientName,jdbcType=VARCHAR}, - patient_phone = #{patientPhone,jdbcType=VARCHAR}, - card_no = #{cardNo,jdbcType=VARCHAR}, - sex = #{sex,jdbcType=VARCHAR}, - birth_date = #{birthDate,jdbcType=DATE}, - family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, - address = #{address,jdbcType=VARCHAR}, - main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, - hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, - hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, - campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, - campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, - department_id = #{departmentId,jdbcType=BIGINT}, - department_name = #{departmentName,jdbcType=VARCHAR}, - ward_id = #{wardId,jdbcType=BIGINT}, - ward_name = #{wardName,jdbcType=VARCHAR}, - appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, - registration_no = #{registrationNo,jdbcType=VARCHAR}, - registration_date = #{registrationDate,jdbcType=DATE}, - appointment_date = #{appointmentDate,jdbcType=DATE}, - certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, - certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, - responsible_nurse = #{responsibleNurse,jdbcType=VARCHAR}, - del_flag = #{delFlag,jdbcType=TINYINT}, - create_by = #{createBy,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_by = #{updateBy,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=BIGINT} - + + delete + from patient_pre_hospitalization + where id = #{id,jdbcType=BIGINT} + + + insert into patient_pre_hospitalization + ( id, resident_id, patient_id, patient_name + , patient_phone, card_no, sex + , birth_date, family_member_phone, address + , main_diagnosis, hospital_agency_id, hospital_agency_name + , campus_agency_id, campus_agency_name, department_id + , department_name, ward_id, ward_name + , appointment_treatment_group, registration_no, registration_date + , appointment_date, certificate_issuing_doctor_id, certificate_issuing_doctor_name + , responsible_nurse, del_flag, create_by + , create_time, update_by, update_time) + values ( #{id,jdbcType=BIGINT}, #{residentId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{patientName,jdbcType=VARCHAR} + , #{patientPhone,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR} + , #{birthDate,jdbcType=DATE}, #{familyMemberPhone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR} + , #{mainDiagnosis,jdbcType=VARCHAR}, #{hospitalAgencyId,jdbcType=BIGINT}, #{hospitalAgencyName,jdbcType=VARCHAR} + , #{campusAgencyId,jdbcType=BIGINT}, #{campusAgencyName,jdbcType=VARCHAR}, #{departmentId,jdbcType=BIGINT} + , #{departmentName,jdbcType=VARCHAR}, #{wardId,jdbcType=BIGINT}, #{wardName,jdbcType=VARCHAR} + , #{appointmentTreatmentGroup,jdbcType=VARCHAR}, #{registrationNo,jdbcType=VARCHAR}, #{registrationDate,jdbcType=DATE} + , #{appointmentDate,jdbcType=DATE}, #{certificateIssuingDoctorId,jdbcType=BIGINT}, #{certificateIssuingDoctorName,jdbcType=VARCHAR} + , #{responsibleNurse,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR} + , #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into patient_pre_hospitalization + + id, + resident_id, + patient_id, + patient_name, + patient_phone, + card_no, + sex, + birth_date, + family_member_phone, + address, + main_diagnosis, + hospital_agency_id, + hospital_agency_name, + campus_agency_id, + campus_agency_name, + department_id, + department_name, + ward_id, + ward_name, + appointment_treatment_group, + registration_no, + registration_date, + appointment_date, + certificate_issuing_doctor_id, + certificate_issuing_doctor_name, + responsible_nurse, + del_flag, + create_by, + create_time, + update_by, + update_time, + + + #{id,jdbcType=BIGINT}, + #{residentId,jdbcType=BIGINT}, + #{patientId,jdbcType=BIGINT}, + #{patientName,jdbcType=VARCHAR}, + #{patientPhone,jdbcType=VARCHAR}, + #{cardNo,jdbcType=VARCHAR}, + #{sex,jdbcType=VARCHAR}, + #{birthDate,jdbcType=DATE}, + #{familyMemberPhone,jdbcType=VARCHAR}, + #{address,jdbcType=VARCHAR}, + #{mainDiagnosis,jdbcType=VARCHAR}, + #{hospitalAgencyId,jdbcType=BIGINT}, + #{hospitalAgencyName,jdbcType=VARCHAR}, + #{campusAgencyId,jdbcType=BIGINT}, + #{campusAgencyName,jdbcType=VARCHAR}, + #{departmentId,jdbcType=BIGINT}, + #{departmentName,jdbcType=VARCHAR}, + #{wardId,jdbcType=BIGINT}, + #{wardName,jdbcType=VARCHAR}, + #{appointmentTreatmentGroup,jdbcType=VARCHAR}, + #{registrationNo,jdbcType=VARCHAR}, + #{registrationDate,jdbcType=DATE}, + #{appointmentDate,jdbcType=DATE}, + #{certificateIssuingDoctorId,jdbcType=BIGINT}, + #{certificateIssuingDoctorName,jdbcType=VARCHAR}, + #{responsibleNurse,jdbcType=VARCHAR}, + #{delFlag,jdbcType=TINYINT}, + #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + + + + update patient_pre_hospitalization + + + resident_id = #{residentId,jdbcType=BIGINT}, + + + patient_id = #{patientId,jdbcType=BIGINT}, + + + patient_name = #{patientName,jdbcType=VARCHAR}, + + + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + + + card_no = #{cardNo,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + birth_date = #{birthDate,jdbcType=DATE}, + + + family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, + + + address = #{address,jdbcType=VARCHAR}, + + + main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, + + + hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, + + + hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, + + + campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, + + + campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, + + + department_id = #{departmentId,jdbcType=BIGINT}, + + + department_name = #{departmentName,jdbcType=VARCHAR}, + + + ward_id = #{wardId,jdbcType=BIGINT}, + + + ward_name = #{wardName,jdbcType=VARCHAR}, + + + appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, + + + registration_no = #{registrationNo,jdbcType=VARCHAR}, + + + registration_date = #{registrationDate,jdbcType=DATE}, + + + appointment_date = #{appointmentDate,jdbcType=DATE}, + + + certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, + + + certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, + + + responsible_nurse = #{responsibleNurse,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=TINYINT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + update patient_pre_hospitalization + set + resident_id = #{residentId,jdbcType=BIGINT}, + patient_id = #{patientId,jdbcType=BIGINT}, + patient_name = #{patientName,jdbcType=VARCHAR}, + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + card_no = #{cardNo,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + birth_date = #{birthDate,jdbcType=DATE}, + family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, + hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, + hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, + campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, + campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, + department_id = #{departmentId,jdbcType=BIGINT}, + department_name = #{departmentName,jdbcType=VARCHAR}, + ward_id = #{wardId,jdbcType=BIGINT}, + ward_name = #{wardName,jdbcType=VARCHAR}, + appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, + registration_no = #{registrationNo,jdbcType=VARCHAR}, + registration_date = #{registrationDate,jdbcType=DATE}, + appointment_date = #{appointmentDate,jdbcType=DATE}, + certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, + certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, + responsible_nurse = #{responsibleNurse,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=TINYINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + + and question_subject_result_id = #{questionSubjectResultId} + + + and questionnaire_subject_id = #{questionnaireSubjectId} + + + and question_name like concat('%', #{questionName}, '%') + + + and option_name like concat('%', #{optionName}, '%') + + + and option_answer = #{optionAnswer} + + + and option_score = #{optionScore} + + + and option_choose_sign = #{optionChooseSign} + + + and option_submit_answer = #{optionSubmitAnswer} + + + and option_sort = #{optionSort} + + + and option_remark = #{optionRemark} + + + + + + + + insert into patient_question_option_result + + question_subject_result_id, + + questionnaire_subject_id, + + question_name, + + option_name, + + option_answer, + + option_score, + + option_choose_sign, + + option_submit_answer, + + option_sort, + + option_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{questionSubjectResultId}, + + #{questionnaireSubjectId}, + + #{questionName}, + + #{optionName}, + + #{optionAnswer}, + + #{optionScore}, + + #{optionChooseSign}, + + #{optionSubmitAnswer}, + + #{optionSort}, + + #{optionRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update patient_question_option_result + + question_subject_result_id = + #{questionSubjectResultId}, + + questionnaire_subject_id = + #{questionnaireSubjectId}, + + question_name = + #{questionName}, + + option_name = + #{optionName}, + + option_answer = + #{optionAnswer}, + + option_score = + #{optionScore}, + + option_choose_sign = + #{optionChooseSign}, + + option_submit_answer = + #{optionSubmitAnswer}, + + option_sort = + #{optionSort}, + + option_remark = + #{optionRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from patient_question_option_result + where id = #{id} + + + + delete from patient_question_option_result where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubjectresult/PatientQuestionSubjectResultMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubjectresult/PatientQuestionSubjectResultMapper.xml new file mode 100644 index 00000000..afd43561 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubjectresult/PatientQuestionSubjectResultMapper.xml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + question_submit_result_id, + question_info_id, + question_number, + question_type, + question_name, + question_description, + write_description, + fill_blanks_answer, + option_count, + whether_score, + scoring_method, + scoring_description, + question_score, + question_sort, + question_remark, + create_by, + create_time, + update_by, + update_time + from patient_question_subject_result + + + + + + + + insert into patient_question_subject_result + + question_submit_result_id, + + question_info_id, + + question_number, + + question_type, + + question_name, + + question_description, + + write_description, + + fill_blanks_answer, + + option_count, + + whether_score, + + scoring_method, + + scoring_description, + + question_score, + + question_sort, + + question_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{questionSubmitResultId}, + + #{questionInfoId}, + + #{questionNumber}, + + #{questionType}, + + #{questionName}, + + #{questionDescription}, + + #{writeDescription}, + + #{fillBlanksAnswer}, + + #{optionCount}, + + #{whetherScore}, + + #{scoringMethod}, + + #{scoringDescription}, + + #{questionScore}, + + #{questionSort}, + + #{questionRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update patient_question_subject_result + + question_submit_result_id = + #{questionSubmitResultId}, + + question_info_id = + #{questionInfoId}, + + question_number = + #{questionNumber}, + + question_type = + #{questionType}, + + question_name = + #{questionName}, + + question_description = + #{questionDescription}, + + write_description = + #{writeDescription}, + + fill_blanks_answer = + #{fillBlanksAnswer}, + + option_count = + #{optionCount}, + + whether_score = + #{whetherScore}, + + scoring_method = + #{scoringMethod}, + + scoring_description = + #{scoringDescription}, + + question_score = + #{questionScore}, + + question_sort = + #{questionSort}, + + question_remark = + #{questionRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from patient_question_subject_result + where id = #{id} + + + + delete from patient_question_subject_result where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml new file mode 100644 index 00000000..e35f3962 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + task_execute_record_id, + patient_id, + manage_route_id, + manage_route_node_id, + patient_name, + manage_route_name, + manage_route_node_name, + question_info_id, + department_id, + department_name, + disease_type_id, + disease_type_name, + questionnaire_name, + questionnaire_description, + answering_method, + questionnaire_id, + question_count, + questionnaire_total_score, + total_score, + remark, + create_by, + create_time, + update_by, + update_time + from patient_question_submit_result + + + + + + + + insert into patient_question_submit_result + + task_execute_record_id, + + patient_id, + + manage_route_id, + + manage_route_node_id, + + patient_name, + + manage_route_name, + + manage_route_node_name, + + question_info_id, + + department_id, + + department_name, + + disease_type_id, + + disease_type_name, + + questionnaire_name, + + questionnaire_description, + + answering_method, + + questionnaire_id, + + question_count, + + questionnaire_total_score, + + total_score, + + remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{taskExecuteRecordId}, + + #{patientId}, + + #{manageRouteId}, + + #{manageRouteNodeId}, + + #{patientName}, + + #{manageRouteName}, + + #{manageRouteNodeName}, + + #{questionInfoId}, + + #{departmentId}, + + #{departmentName}, + + #{diseaseTypeId}, + + #{diseaseTypeName}, + + #{questionnaireName}, + + #{questionnaireDescription}, + + #{answeringMethod}, + + #{questionnaireId}, + + #{questionCount}, + + #{questionnaireTotalScore}, + + #{totalScore}, + + #{remark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update patient_question_submit_result + + task_execute_record_id = + #{taskExecuteRecordId}, + + patient_id = + #{patientId}, + + manage_route_id = + #{manageRouteId}, + + manage_route_node_id = + #{manageRouteNodeId}, + + patient_name = + #{patientName}, + + manage_route_name = + #{manageRouteName}, + + manage_route_node_name = + #{manageRouteNodeName}, + + question_info_id = + #{questionInfoId}, + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + disease_type_id = + #{diseaseTypeId}, + + disease_type_name = + #{diseaseTypeName}, + + questionnaire_name = + #{questionnaireName}, + + questionnaire_description = + #{questionnaireDescription}, + + answering_method = + #{answeringMethod}, + + questionnaire_id = + #{questionnaireId}, + + question_count = + #{questionCount}, + + questionnaire_total_score = + #{questionnaireTotalScore}, + + total_score = + #{totalScore}, + + remark = + #{remark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from patient_question_submit_result + where id = #{id} + + + + delete from patient_question_submit_result where id in + + #{id} + + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.xml new file mode 100644 index 00000000..0afc8613 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.xml @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + patient_id, + manage_route_id, + manage_route_node_id, + patient_name, + manage_route_name, + manage_route_node_name, + task_content, + execute_time, + execute_person, + execute_type, + execute_remark, + visit_record_id, + create_by, + create_time, + update_by, + update_time + from patient_task_execute_record + + + + + + + + + + insert into patient_task_execute_record + + patient_id, + + manage_route_id, + + manage_route_node_id, + + patient_name, + + manage_route_name, + + manage_route_node_name, + + task_content, + + execute_time, + + execute_person, + + execute_type, + + execute_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + visit_record_id, + + + + #{patientId}, + + #{manageRouteId}, + + #{manageRouteNodeId}, + + #{patientName}, + + #{manageRouteName}, + + #{manageRouteNodeName}, + + #{taskContent}, + + #{executeTime}, + + #{executePerson}, + + #{executeType}, + + #{executeRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + #{visitRecordId}, + + + + + + update patient_task_execute_record + + patient_id = + #{patientId}, + + manage_route_id = + #{manageRouteId}, + + manage_route_node_id = + #{manageRouteNodeId}, + + + and visit_record_id = #{visitRecordId} + + patient_name = + #{patientName}, + + manage_route_name = + #{manageRouteName}, + + manage_route_node_name = + #{manageRouteNodeName}, + + task_content = + #{taskContent}, + + execute_time = + #{executeTime}, + + execute_person = + #{executePerson}, + + execute_type = + #{executeType}, + + execute_remark = + #{executeRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from patient_task_execute_record + where id = #{id} + + + + delete from patient_task_execute_record where id in + + #{id} + + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patienttaskpushrecord/PatientTaskPushRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patienttaskpushrecord/PatientTaskPushRecordMapper.xml new file mode 100644 index 00000000..913c5ce2 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/patienttaskpushrecord/PatientTaskPushRecordMapper.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + select id, + patient_id, + manage_route_node_id, + patient_name, + route_node_name, + task_push_type, + task_push_date, + task_push_remark, + create_by, + create_time, + update_by, + update_time + from patient_task_push_record + + + + + + + + insert into patient_task_push_record + + patient_id, + + manage_route_node_id, + + patient_name, + + route_node_name, + + task_push_type, + + task_push_date, + + task_push_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{patientId}, + + #{manageRouteNodeId}, + + #{patientName}, + + #{routeNodeName}, + + #{taskPushType}, + + #{taskPushDate}, + + #{taskPushRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update patient_task_push_record + + patient_id = + #{patientId}, + + manage_route_node_id = + #{manageRouteNodeId}, + + patient_name = + #{patientName}, + + route_node_name = + #{routeNodeName}, + + task_push_type = + #{taskPushType}, + + task_push_date = + #{taskPushDate}, + + task_push_remark = + #{taskPushRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from patient_task_push_record + where id = #{id} + + + + delete from patient_task_push_record where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml index 5bfedaf6..30bc02e3 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml @@ -4,8 +4,9 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + + @@ -16,7 +17,7 @@ - + @@ -43,6 +44,8 @@ + + @@ -50,28 +53,41 @@ - select id, patient_id, card_no, patient_name, patient_phone, family_member_phone, address, sex, birth_date, age, nation, visit_type, visit_date, visit_name, hospital_agency_id, hospital_agency_name, campus_agency_id, campus_agency_name, department_id, department_name, ward_id, ward_name, attending_physician_id, attending_physician_name, main_diagnosis, marriage, medical_history_narrator, admission_time, discharge_time, record_time, outpatient_visit_info, hospitalization_days, in_hospital_info, out_hospital_info, visit_serial_number, in_hospital_number, responsible_nurse, surgical_name, create_by, create_time, update_by, update_time from patient_visit_record + select id, resident_id, patient_id, card_no, patient_name, patient_phone, family_member_phone, address, sex, birth_date, age, nation, + visit_method, visit_date, visit_name, hospital_agency_id, hospital_agency_name, campus_agency_id, campus_agency_name, + department_id, department_name, ward_id, ward_name, attending_physician_id, attending_physician_name, main_diagnosis, + marriage, medical_history_narrator, admission_time, discharge_time, record_time, outpatient_visit_info, hospitalization_days, + in_hospital_info, out_hospital_info, visit_serial_number, in_hospital_number, responsible_nurse, surgical_name, surgical_record,del_flag, + create_by, create_time, update_by, update_time from patient_visit_record + + where del_flag = 0 + and hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT} + and in_hospital_number = #{inHospitalNumber,jdbcType=VARCHAR} + + and card_no != #{cardNo,jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml index a84f2fc0..42d30bf0 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml @@ -4,37 +4,69 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - select id, hospital_agency_id, hospital_agency_name, department_id, department_name, propaganda_title, propaganda_type, propaganda_code, propaganda_status, propaganda_content, propaganda_cover_path, article_summary, voicebroadcast, disease_type_id, disease_type_name, propaganda_link, propaganda_barcode_path, create_by, create_time, update_by, update_time from propaganda_info + select id, hospital_agency_id, hospital_agency_name, department_id, department_name, propaganda_title, propaganda_type, propaganda_code, propaganda_status, propaganda_content, propaganda_cover_path, article_summary, voicebroadcast, disease_type_id, disease_type_name, propaganda_link, propaganda_barcode_path,del_flag, create_by, create_time, update_by, update_time from propaganda_info - + select p.id, p.hospital_agency_id, p.hospital_agency_name, p.department_id, p.department_name, p.propaganda_title, + p.propaganda_type, p.propaganda_code, p.propaganda_status, p.propaganda_content, p.propaganda_cover_path, + p.article_summary, voicebroadcast, disease_type_id, disease_type_name, propaganda_link, + p.propaganda_barcode_path, pm.materials_id, + m.id, m.materials_name, m.materials_type, m.materials_option, m.materials_file_path, m.video_cover_type, + m.video_cover_file_path from propaganda_materials pm + left join propaganda_info p on pm.propaganda_id = p.id + left join materials_info m on m.id = pm.materials_id + where p.id = #{id} + + + insert into propaganda_info - hospital_agency_id, - - hospital_agency_name, - - department_id, - - department_name, - - propaganda_title, - - propaganda_type, - - propaganda_code, - - propaganda_status, - - propaganda_content, - - propaganda_cover_path, - - article_summary, - - voicebroadcast, - - disease_type_id, - - disease_type_name, - - propaganda_link, - - propaganda_barcode_path, - - create_by, - - create_time, - - update_by, - - update_time, - + hospital_agency_id, + + hospital_agency_name, + + department_id, + + department_name, + + propaganda_title, + + propaganda_type, + + propaganda_code, + + propaganda_status, + + propaganda_content, + + propaganda_cover_path, + + article_summary, + + voicebroadcast, + + disease_type_id, + + disease_type_name, + + propaganda_link, + + propaganda_barcode_path, + + del_flag, + + create_by, + + create_time, + + update_by, + + update_time, + - #{hospitalAgencyId}, - - #{hospitalAgencyName}, - - #{departmentId}, - - #{departmentName}, - - #{propagandaTitle}, - - #{propagandaType}, - - #{propagandaCode}, - - #{propagandaStatus}, - - #{propagandaContent}, - - #{propagandaCoverPath}, - - #{articleSummary}, - - #{voicebroadcast}, - - #{diseaseTypeId}, - - #{diseaseTypeName}, - - #{propagandaLink}, - - #{propagandaBarcodePath}, - - #{createBy}, - - #{createTime}, - - #{updateBy}, - - #{updateTime}, - + #{hospitalAgencyId}, + + #{hospitalAgencyName}, + + #{departmentId}, + + #{departmentName}, + + #{propagandaTitle}, + + #{propagandaType}, + + #{propagandaCode}, + + #{propagandaStatus}, + + #{propagandaContent}, + + #{propagandaCoverPath}, + + #{articleSummary}, + + #{voicebroadcast}, + + #{diseaseTypeId}, + + #{diseaseTypeName}, + + #{propagandaLink}, + + #{propagandaBarcodePath}, + + #{delFlag}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + - + update propaganda_info hospital_agency_id = @@ -211,6 +259,9 @@ propaganda_barcode_path = #{propagandaBarcodePath}, + del_flag = + #{delFlag}, + create_by = #{createBy}, @@ -227,22 +278,23 @@ where id = #{id} - - delete from propaganda_info where id = #{id} - + + update propaganda_info set del_flag = 1 where id = #{id} + - - delete from propaganda_info where id in + + update propaganda_info set del_flag = 1 where id in #{id} - + + @@ -44,86 +46,103 @@ where id = #{id} - insert into propaganda_materials - propaganda_id, - - propaganda_title, - - materials_id, - - materials_name, - - create_by, - - create_time, - - update_by, - - update_time, - + propaganda_id, + + propaganda_title, + + materials_id, + + materials_name, + + del_flag, + + create_by, + + create_time, + + update_by, + + update_time, + - #{propagandaId}, - - #{propagandaTitle}, - - #{materialsId}, - - #{materialsName}, - - #{createBy}, - - #{createTime}, - - #{updateBy}, - - #{updateTime}, - + #{propagandaId}, + + #{propagandaTitle}, + + #{materialsId}, + + #{materialsName}, + + #{delFlag}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + - + update propaganda_materials - propaganda_id = - #{propagandaId}, - - propaganda_title = - #{propagandaTitle}, - - materials_id = - #{materialsId}, - - materials_name = - #{materialsName}, - - create_by = - #{createBy}, - - create_time = - #{createTime}, - - update_by = - #{updateBy}, - - update_time = - #{updateTime}, - + propaganda_id = + #{propagandaId}, + + propaganda_title = + #{propagandaTitle}, + + materials_id = + #{materialsId}, + + materials_name = + #{materialsName}, + + del_flag = + #{delFlag}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + where id = #{id} - - delete from propaganda_materials where id = #{id} - + + update propaganda_materials set del_flag = 1 where propaganda_id = #{propagandaId} + - - delete from propaganda_materials where id in + + update propaganda_materials set del_flag = 1 where propaganda_id in + + #{propagandaId} + + + + + update propaganda_materials set del_flag = 1 where id = #{id} + + + update propaganda_materials set del_flag = 1 where id in #{id} - + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml index 43c798ea..51bd81a1 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml @@ -245,4 +245,18 @@ #{id} + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml new file mode 100644 index 00000000..1c5ae83d --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, patient_name, patient_phone, family_member_phone, birth_date, card_no, sex, address, open_id, union_id, official_account_openid, create_by, create_time, update_by, update_time from resident_info + + + + + + + + insert into resident_info + + patient_name, + + patient_phone, + + family_member_phone, + + birth_date, + + card_no, + + sex, + + address, + + open_id, + + union_id, + + official_account_openid, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{patientName}, + + #{patientPhone}, + + #{familyMemberPhone}, + + #{birthDate}, + + #{cardNo}, + + #{sex}, + + #{address}, + + #{openId}, + + #{unionId}, + + #{officialAccountOpenid}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update resident_info + + patient_name = + #{patientName}, + + patient_phone = + #{patientPhone}, + + family_member_phone = + #{familyMemberPhone}, + + birth_date = + #{birthDate}, + + card_no = + #{cardNo}, + + sex = + #{sex}, + + address = + #{address}, + + open_id = + #{openId}, + + union_id = + #{unionId}, + + official_account_openid = + #{officialAccountOpenid}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from resident_info where id = #{id} + + + + delete from resident_info where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml index 5e82e0bc..23edb95d 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml @@ -126,13 +126,15 @@ from script_info where department_id = #{departmentId} and common_script_name = #{commonScriptName} + and script_name = #{scriptName} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml index 77dfd899..ecf5fe67 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml @@ -211,7 +211,7 @@ order by create_time DESC - - + + + + and sign_patient_record_id = #{signPatientRecordId} + + + and patient_id = #{patientId} + + + and patient_name like concat('%', #{patientName}, '%') + + + and department_id = #{departmentId} + + + and department_name like concat('%', #{departmentName}, '%') + + + and service_package_id = #{servicePackageId} + + + and package_name like concat('%', #{packageName}, '%') + + + and disease_type_id = #{diseaseTypeId} + + + and disease_type_name like concat('%', #{diseaseTypeName}, '%') + + + and route_name like concat('%', #{routeName}, '%') + + + and task_create_type = #{taskCreateType} + + + and version = #{version} + + + and route_classify = #{routeClassify} + + + and suit_range = #{suitRange} + + + and route_sort = #{routeSort} + + + and route_remark = #{routeRemark} + + + + + + + + insert into sign_patient_manage_route + + sign_patient_record_id, + + patient_id, + + patient_name, + + department_id, + + department_name, + + service_package_id, + + package_name, + + disease_type_id, + + disease_type_name, + + route_id, + + route_name, + + task_create_type, + + version, + + route_classify, + + suit_range, + + route_sort, + + route_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{signPatientRecordId}, + + #{patientId}, + + #{patientName}, + + #{departmentId}, + + #{departmentName}, + + #{servicePackageId}, + + #{packageName}, + + #{diseaseTypeId}, + + #{diseaseTypeName}, + + #{routeId}, + + #{routeName}, + + #{taskCreateType}, + + #{version}, + + #{routeClassify}, + + #{suitRange}, + + #{routeSort}, + + #{routeRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update sign_patient_manage_route + + sign_patient_record_id = + #{signPatientRecordId}, + + patient_id = + #{patientId}, + + patient_name = + #{patientName}, + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + service_package_id = + #{servicePackageId}, + + package_name = + #{packageName}, + + disease_type_id = + #{diseaseTypeId}, + + disease_type_name = + #{diseaseTypeName}, + + route_id = + #{routeId}, + + route_name = + #{routeName}, + + task_create_type = + #{taskCreateType}, + + version = + #{version}, + + route_classify = + #{routeClassify}, + + suit_range = + #{suitRange}, + + route_sort = + #{routeSort}, + + route_remark = + #{routeRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from sign_patient_manage_route where id = #{id} + + + + delete from sign_patient_manage_route where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml new file mode 100644 index 00000000..ad5eae43 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template__id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id, follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link,text_remind_content, create_by, create_time, update_by, update_time from sign_patient_manage_route_node + + + + + + + + insert into sign_patient_manage_route_node + + manage_route_id, + + manage_route_name, + + route_node_name, + + route_node_day, + + task_type, + + task_status, + + task_subdivision, + + second_classify_describe, + + execute_time, + + phone_push_sign, + + phone_id, + + phone_template_id, + + phone_template_name, + + phone_node_content, + + phone_redial_times, + + phone_time_interval, + + phone_message_remind, + + phone_message_template_id, + + phone_message_template_name, + + question_info_id, + + questionnaire_name, + + questionnaire_content, + + question_expiration_date, + + propaganda_info_id, + + propaganda_title, + + propaganda_content, + + message_push_sign, + + message_template__id, + + message_template_name, + + message_preview, + + message_node_content, + + official_push_sign, + + official_template_id, + + official_template_name, + + official_remind_content, + + official_node_content, + + applet_push_sign, + + applet_template_id, + + applet_template_name, + + applet_remind_content, + + applet_prompt_description, + + applet_node_content, + + follow_template_id, + + follow_template_name, + + follow_content, + + route_check_status, + + route_check_person, + + route_check_date, + + route_check_remark, + + route_node_remark, + + node_execute_status, + + route_handle_remark, + + route_handle_id, + + route_handle_person, + + route_link, + + text_remind_content, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{manageRouteId}, + + #{manageRouteName}, + + #{routeNodeName}, + + #{routeNodeDay}, + + #{taskType}, + + #{taskStatus}, + + #{taskSubdivision}, + + #{secondClassifyDescribe}, + + #{executeTime}, + + #{phonePushSign}, + + #{phoneId}, + + #{phoneTemplateId}, + + #{phoneTemplateName}, + + #{phoneNodeContent}, + + #{phoneRedialTimes}, + + #{phoneTimeInterval}, + + #{phoneMessageRemind}, + + #{phoneMessageTemplateId}, + + #{phoneMessageTemplateName}, + + #{questionInfoId}, + + #{questionnaireName}, + + #{questionnaireContent}, + + #{questionExpirationDate}, + + #{propagandaInfoId}, + + #{propagandaTitle}, + + #{propagandaContent}, + + #{messagePushSign}, + + #{messageTemplateId}, + + #{messageTemplateName}, + + #{messagePreview}, + + #{messageNodeContent}, + + #{officialPushSign}, + + #{officialTemplateId}, + + #{officialTemplateName}, + + #{officialRemindContent}, + + #{officialNodeContent}, + + #{appletPushSign}, + + #{appletTemplateId}, + + #{appletTemplateName}, + + #{appletRemindContent}, + + #{appletPromptDescription}, + + #{appletNodeContent}, + + #{followTemplateId}, + + #{followTemplateName}, + + #{followContent}, + + #{routeCheckStatus}, + + #{routeCheckPerson}, + + #{routeCheckDate}, + + #{routeCheckRemark}, + + #{routeNodeRemark}, + + #{nodeExecuteStatus}, + + #{routeHandleRemark}, + + #{routeHandleId}, + + #{routeHandlePerson}, + + #{routeLink}, + + #{textRemindContent}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, + execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, + phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, + message_template__id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, + official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id, + follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, + route_handle_id, route_handle_person, route_link, text_remind_content,create_by, create_time, update_by, update_time) + values + + (#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeName},#{item.routeNodeDay},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.secondClassifyDescribe}, + #{item.executeTime},#{item.phonePushSign},#{item.phoneId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId},#{item.phoneMessageTemplateName}, + #{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},#{item.messageTemplateId}, + #{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent}, + #{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},#{item.followTemplateId}, + #{item.followTemplateName},#{item.followContent},#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark}, + #{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime}) + + + + update sign_patient_manage_route_node + + manage_route_id = + #{manageRouteId}, + + manage_route_name = + #{manageRouteName}, + + route_node_name = + #{routeNodeName}, + + route_node_day = + #{routeNodeDay}, + + task_type = + #{taskType}, + + task_status = + #{taskStatus}, + + task_subdivision = + #{taskSubdivision}, + + second_classify_describe = + #{secondClassifyDescribe}, + + execute_time = + #{executeTime}, + + phone_push_sign = + #{phonePushSign}, + + phone_id = + #{phoneId}, + + phone_template_id = + #{phoneTemplateId}, + + phone_template_name = + #{phoneTemplateName}, + + phone_node_content = + #{phoneNodeContent}, + + phone_redial_times = + #{phoneRedialTimes}, + + phone_time_interval = + #{phoneTimeInterval}, + + phone_message_remind = + #{phoneMessageRemind}, + + phone_message_template_id = + #{phoneMessageTemplateId}, + + phone_message_template_name = + #{phoneMessageTemplateName}, + + question_info_id = + #{questionInfoId}, + + questionnaire_name = + #{questionnaireName}, + + questionnaire_content = + #{questionnaireContent}, + + question_expiration_date = + #{questionExpirationDate}, + + propaganda_info_id = + #{propagandaInfoId}, + + propaganda_title = + #{propagandaTitle}, + + propaganda_content = + #{propagandaContent}, + + message_push_sign = + #{messagePushSign}, + + message_template__id = + #{messageTemplateId}, + + message_template_name = + #{messageTemplateName}, + + message_preview = + #{messagePreview}, + + message_node_content = + #{messageNodeContent}, + + official_push_sign = + #{officialPushSign}, + + official_template_id = + #{officialTemplateId}, + + official_template_name = + #{officialTemplateName}, + + official_remind_content = + #{officialRemindContent}, + + official_node_content = + #{officialNodeContent}, + + applet_push_sign = + #{appletPushSign}, + + applet_template_id = + #{appletTemplateId}, + + applet_template_name = + #{appletTemplateName}, + + applet_remind_content = + #{appletRemindContent}, + + applet_prompt_description = + #{appletPromptDescription}, + + applet_node_content = + #{appletNodeContent}, + + follow_template_id = + #{followTemplateId}, + + follow_template_name = + #{followTemplateName}, + + follow_content = + #{followContent}, + + route_check_status = + #{routeCheckStatus}, + + route_check_person = + #{routeCheckPerson}, + + route_check_date = + #{routeCheckDate}, + + route_check_remark = + #{routeCheckRemark}, + + route_node_remark = + #{routeNodeRemark}, + + node_execute_status = + #{nodeExecuteStatus}, + + route_handle_remark = + #{routeHandleRemark}, + + route_handle_id = + #{routeHandleId}, + + route_handle_person = + #{routeHandlePerson}, + + route_link = + #{routeLink}, + + text_remind_content = + #{textRemindContent}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from sign_patient_manage_route_node where id = #{id} + + + + delete from sign_patient_manage_route_node where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientpackage/SignPatientPackageMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientpackage/SignPatientPackageMapper.xml index 8e8b56f8..983fbb63 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientpackage/SignPatientPackageMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientpackage/SignPatientPackageMapper.xml @@ -14,7 +14,8 @@ - + + @@ -22,7 +23,8 @@ - select id, patient_id, sign_patient_record_id, service_package_id, package_name, package_payment_status, package_price, service_start_time, service_end_time, service_cycle, create_by, create_time, update_by, update_time from sign_patient_package + select id, patient_id, sign_patient_record_id, service_package_id, package_name, package_payment_status, package_price, + service_start_time, service_end_time, package_term, package_term_unit, create_by, create_time, update_by, update_time from sign_patient_package @@ -84,8 +89,10 @@ service_end_time, - service_cycle, + package_term, + package_term_unit, + create_by, create_time, @@ -113,8 +120,10 @@ #{serviceEndTime}, - #{serviceCycle}, + #{packageTerm}, + #{packageTermUnit}, + #{createBy}, #{createTime}, @@ -153,9 +162,12 @@ service_end_time = #{serviceEndTime}, - service_cycle = - #{serviceCycle}, + package_term = + #{packageTerm}, + package_term_unit = + #{packageTermUnit}, + create_by = #{createBy}, diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml index 12760267..80c2b941 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml @@ -329,12 +329,13 @@ sign.id,sign.patient_id,sign.patient_name, sign.patient_phone,sign.card_no,sign.sex,sign.birth_date, sign.sign_time, sign.hospital_agency_id,sign.hospital_agency_name, - sign.campus_agency_name,sign.department_name, - sign.ward_name,sign.visit_serial_number, - sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis, + sign.campus_agency_id, sign.campus_agency_name, + sign.department_id, sign.department_name, + sign.ward_id,sign.ward_name, + sign.visit_serial_number,sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis, sign.service_status,sign.sign_status,sign.intentional_source, sign.intentional_time,sign.billing_doctor_name,sign.payment_status,sign.price, - p.package_name, p.service_end_time, p.service_cycle + p.service_package_id, p.package_name, p.service_end_time, p.package_term, p.package_term_unit from patient_info patient left join sign_patient_record sign on patient.sign_patient_record_id = sign.id left join sign_patient_package p on sign.id = p.sign_patient_record_id @@ -397,14 +398,17 @@ select sign.id,sign.patient_id,sign.patient_name, sign.patient_phone,sign.card_no,sign.sex, sign.birth_date,sign.sign_time, - sign.hospital_agency_id,sign.hospital_agency_name, - sign.campus_agency_name,sign.department_name, - sign.ward_name,sign.visit_serial_number, - sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis, - sign.service_status,sign.sign_status,sign.payment_status,sign.price, - p.service_package_id, p.package_name, p.package_payment_status, p.package_price, p.service_start_time, p.service_end_time, p.service_cycle + sign.hospital_agency_id, sign.hospital_agency_name, + sign.campus_agency_id, sign.campus_agency_name, + sign.department_id, sign.department_name, + sign.ward_id, sign.ward_name, + sign.visit_serial_number, sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis, + sign.service_status,sign.sign_status,sign.payment_status,sign.price,sign.health_manage_id,sign.health_manage_name, + p.service_package_id, p.package_name, p.package_payment_status, p.package_price, p.service_start_time, p.service_end_time, + p.package_term, p.package_term_unit, route.route_id, route.route_name from sign_patient_record sign left join sign_patient_package p on p.sign_patient_record_id = sign.id + left join sign_patient_manage_route route on route.sign_patient_record_id = sign.id sign.del_flag = 0 and sign.id = #{id} @@ -419,5 +423,6 @@ sign.del_flag = 0 and sign.patient_id = #{patientId} + order by sign.sign_time desc diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml new file mode 100644 index 00000000..58f73019 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + select id, patient_manage_route_id, route_name, trigger_condition_code, trigger_condition_name, trigger_condition_operator, trigger_condition_value, trigger_condition_sort, trigger_condition_remark, create_by, create_time, update_by, update_time from sign_route_trigger_condition + + + + + + + + insert into sign_route_trigger_condition + + patient_manage_route_id, + + route_name, + + trigger_condition_code, + + trigger_condition_name, + + trigger_condition_operator, + + trigger_condition_value, + + trigger_condition_sort, + + trigger_condition_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{patientManageRouteId}, + + #{routeName}, + + #{triggerConditionCode}, + + #{triggerConditionName}, + + #{triggerConditionOperator}, + + #{triggerConditionValue}, + + #{triggerConditionSort}, + + #{triggerConditionRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update sign_route_trigger_condition + + patient_manage_route_id = + #{patientManageRouteId}, + + route_name = + #{routeName}, + + trigger_condition_code = + #{triggerConditionCode}, + + trigger_condition_name = + #{triggerConditionName}, + + trigger_condition_operator = + #{triggerConditionOperator}, + + trigger_condition_value = + #{triggerConditionValue}, + + trigger_condition_sort = + #{triggerConditionSort}, + + trigger_condition_remark = + #{triggerConditionRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from sign_route_trigger_condition where id = #{id} + + + + delete from sign_route_trigger_condition where id in + + #{id} + + + + insert into sign_route_trigger_condition(id,patient_manage_route_id,route_name, + trigger_condition_code,trigger_condition_name,trigger_condition_operator, + trigger_condition_value,trigger_condition_sort,trigger_condition_remark, + search_value,create_by,create_time, + update_by,update_time) + values + + (#{item.id,jdbcType=NUMERIC},#{item.patientManageRouteId,jdbcType=NUMERIC},#{item.routeName,jdbcType=VARCHAR}, + #{item.triggerConditionCode,jdbcType=VARCHAR},#{item.triggerConditionName,jdbcType=VARCHAR},#{item.triggerConditionOperator,jdbcType=VARCHAR}, + #{item.triggerConditionValue,jdbcType=VARCHAR},#{item.triggerConditionSort,jdbcType=NUMERIC},#{item.triggerConditionRemark,jdbcType=VARCHAR}, + #{item.searchValue,jdbcType=VARCHAR},#{item.createBy,jdbcType=VARCHAR},#{item.createTime}, + #{item.updateBy,jdbcType=VARCHAR},#{item.updateTime}) + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml index 9c24053c..a0184146 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasenode/SpecialDiseaseNodeMapper.xml @@ -4,6 +4,24 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + + + + + + + + + + + + + @@ -46,6 +64,7 @@ + @@ -94,6 +113,7 @@ route_check_person, route_check_date, route_check_remark, + node_content, create_by, create_time, update_by, @@ -224,6 +244,9 @@ and route_check_remark = #{routeCheckRemark} + + and node_content = #{nodeContent} + @@ -325,6 +348,8 @@ update_time, + node_content, + #{routeId}, @@ -415,6 +440,8 @@ #{updateTime}, + #{nodeContent}, + @@ -553,6 +580,9 @@ update_time = #{updateTime}, + node_content = + #{nodeContent}, + where id = #{id} @@ -569,4 +599,166 @@ #{id} + + + insert into special_disease_node( + route_id, + route_name, + route_node_name, + route_node_day, + task_type, + task_subdivision, + task_status, + second_classify_describe, + execution_time, + template_id, + template_name, + template_type, + message_push_sign, + message_template__id, + message_template_name, + message_preview, + message_node_content, + official_push_sign, + official_template_id, + official_template_name, + official_remind_content, + official_node_content, + applet_push_sign, + applet_template_id, + applet_template_name, + applet_remind_content, + applet_prompt_description, + applet_node_content, + phone_push_sign, + phone_template_id, + phone_template_name, + phone_message_remind, + phone_message_template_id, + phone_message_template_name, + phone_agency_name, + phone_node_content, + route_check_status, + route_check_person, + route_check_date, + route_check_remark, + node_content, + create_by, + create_time + ) values + + ( + #{specialDiseaseNodeList.routeId}, + #{specialDiseaseNodeList.routeName}, + #{specialDiseaseNodeList.routeNodeName}, + #{specialDiseaseNodeList.routeNodeDay}, + #{specialDiseaseNodeList.taskType}, + #{specialDiseaseNodeList.taskSubdivision}, + #{specialDiseaseNodeList.taskStatus}, + #{specialDiseaseNodeList.secondClassifyDescribe}, + #{specialDiseaseNodeList.executionTime}, + #{specialDiseaseNodeList.templateId}, + #{specialDiseaseNodeList.templateName}, + #{specialDiseaseNodeList.templateType}, + #{specialDiseaseNodeList.messagePushSign}, + #{specialDiseaseNodeList.messageTemplateId}, + #{specialDiseaseNodeList.messageTemplateName}, + #{specialDiseaseNodeList.messagePreview}, + #{specialDiseaseNodeList.messageNodeContent}, + #{specialDiseaseNodeList.officialPushSign}, + #{specialDiseaseNodeList.officialTemplateId}, + #{specialDiseaseNodeList.officialTemplateName}, + #{specialDiseaseNodeList.officialRemindContent}, + #{specialDiseaseNodeList.officialNodeContent}, + #{specialDiseaseNodeList.appletPushSign}, + #{specialDiseaseNodeList.appletTemplateId}, + #{specialDiseaseNodeList.appletTemplateName}, + #{specialDiseaseNodeList.appletRemindContent}, + #{specialDiseaseNodeList.appletPromptDescription}, + #{specialDiseaseNodeList.appletNodeContent}, + #{specialDiseaseNodeList.phonePushSign}, + #{specialDiseaseNodeList.phoneTemplateId}, + #{specialDiseaseNodeList.phoneTemplateName}, + #{specialDiseaseNodeList.phoneMessageRemind}, + #{specialDiseaseNodeList.phoneMessageTemplateId}, + #{specialDiseaseNodeList.phoneMessageTemplateName}, + #{specialDiseaseNodeList.phoneAgencyName}, + #{specialDiseaseNodeList.phoneNodeContent}, + #{specialDiseaseNodeList.routeCheckStatus}, + #{specialDiseaseNodeList.routeCheckPerson}, + #{specialDiseaseNodeList.routeCheckDate}, + #{specialDiseaseNodeList.routeCheckRemark}, + #{specialDiseaseNodeList.nodeContent}, + #{specialDiseaseNodeList.createBy}, + #{specialDiseaseNodeList.createTime} + ) + + + + + delete + from special_disease_node + where route_id = #{routeId} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml new file mode 100644 index 00000000..0b1d1af7 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + department_id, + department_name, + disease_type_id, + disease_type_name, + route_name, + route_code, + version, + route_classify, + release_status, + suit_range, + route_sort, + route_remark, + create_by, + create_time, + update_by, + update_time + from special_disease_route + + + + + + + + insert into special_disease_route + + department_id, + + department_name, + + disease_type_id, + + disease_type_name, + + route_name, + + route_code, + + version, + + route_classify, + + release_status, + + suit_range, + + route_sort, + + route_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{departmentId}, + + #{departmentName}, + + #{diseaseTypeId}, + + #{diseaseTypeName}, + + #{routeName}, + + #{routeCode}, + + #{version}, + + #{routeClassify}, + + #{releaseStatus}, + + #{suitRange}, + + #{routeSort}, + + #{routeRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update special_disease_route + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + disease_type_id = + #{diseaseTypeId}, + + disease_type_name = + #{diseaseTypeName}, + + route_name = + #{routeName}, + + route_code = + #{routeCode}, + + version = + #{version}, + + route_classify = + #{routeClassify}, + + release_status = + #{releaseStatus}, + + suit_range = + #{suitRange}, + + route_sort = + #{routeSort}, + + route_remark = + #{routeRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from special_disease_route + where id = #{id} + + + + delete from special_disease_route where id in + + #{id} + + + + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionMapper.xml new file mode 100644 index 00000000..91f2be29 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseasetriggercondition/SpecialDiseaseTriggerConditionMapper.xml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + select id, + route_id, + route_name, + trigger_condition_code, + trigger_condition_name, + trigger_condition_operator, + trigger_condition_value, + trigger_condition_sort, + trigger_condition_remark, + create_by, + create_time, + update_by, + update_time + from special_disease_trigger_condition + + + + + + + + insert into special_disease_trigger_condition + + route_id, + + route_name, + + trigger_condition_code, + + trigger_condition_name, + + trigger_condition_operator, + + trigger_condition_value, + + trigger_condition_sort, + + trigger_condition_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{routeId}, + + #{routeName}, + + #{triggerConditionCode}, + + #{triggerConditionName}, + + #{triggerConditionOperator}, + + #{triggerConditionValue}, + + #{triggerConditionSort}, + + #{triggerConditionRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + insert into special_disease_trigger_condition( + route_id, + route_name, + trigger_condition_code, + trigger_condition_name, + trigger_condition_operator, + trigger_condition_value, + trigger_condition_sort, + trigger_condition_remark, + create_by, + create_time + )values + + ( + #{triggerConditionList.routeId}, + #{triggerConditionList.routeName}, + #{triggerConditionList.triggerConditionCode}, + #{triggerConditionList.triggerConditionName}, + #{triggerConditionList.triggerConditionOperator}, + #{triggerConditionList.triggerConditionValue}, + #{triggerConditionList.triggerConditionSort}, + #{triggerConditionList.triggerConditionRemark}, + #{triggerConditionList.createBy}, + #{triggerConditionList.createTime} + ) + + + + + update special_disease_trigger_condition + + route_id = + #{routeId}, + + route_name = + #{routeName}, + + trigger_condition_code = + #{triggerConditionCode}, + + trigger_condition_name = + #{triggerConditionName}, + + trigger_condition_operator = + #{triggerConditionOperator}, + + trigger_condition_value = + #{triggerConditionValue}, + + trigger_condition_sort = + #{triggerConditionSort}, + + trigger_condition_remark = + #{triggerConditionRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from special_disease_trigger_condition + where id = #{id} + + + + delete from special_disease_trigger_condition where id in + + #{id} + + + + + delete + from special_disease_trigger_condition + where route_id = #{routeId} + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml index 08ad85e8..4f585002 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml @@ -80,5 +80,24 @@ AND street.parent_code = region.area_code AND community.parent_code = street.area_code AND community.area_code = #{areaCode} + UNION ALL + SELECT province.area_name province_name, + province.area_code province_code, + city.area_name city_name, + city.area_code city_code, + region.area_name region_name, + region.area_code region_code, + street.area_name street_name, + street.area_code street_code, + '' community_name, + '' community_code + FROM sys_area province, + sys_area city, + sys_area region, + sys_area street + WHERE city.parent_code = province.area_code + AND region.parent_code = city.area_code + AND street.parent_code = region.area_code + and street.area_code = #{areaCode} limit 1; diff --git a/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml index 22e0b96d..3b2c76a9 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/taskpartitiondict/TaskPartitionDictMapper.xml @@ -14,6 +14,8 @@ + + @@ -30,6 +32,8 @@ execution_time, task_partition_sort, task_partition_remark, + task_partition_content, + template_type, create_by, create_time, update_by, @@ -64,6 +68,9 @@ and task_partition_remark = #{taskPartitionRemark} + + and template_type = #{templateType} + @@ -93,6 +100,8 @@ task_partition_remark, + task_partition_content, + create_by, create_time, @@ -101,6 +110,8 @@ update_time, + template_type, + #{taskTypeId}, @@ -119,6 +130,8 @@ #{taskPartitionRemark}, + #{taskPartitionContent}, + #{createBy}, #{createTime}, @@ -127,6 +140,8 @@ #{updateTime}, + #{templateType}, + @@ -157,6 +172,9 @@ task_partition_remark = #{taskPartitionRemark}, + task_partition_content = + #{taskPartitionContent}, + create_by = #{createBy}, @@ -169,6 +187,9 @@ update_time = #{updateTime}, + template_type = + #{templateType}, + where id = #{id} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml index ca72b4b7..b8d371cd 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/wechattemplate/WechatTemplateMapper.xml @@ -181,6 +181,7 @@ from wechat_template wt where department_id = #{departmentId} and wechat_template_name = #{wechatTemplateName} + and template_source = #{templateSource} diff --git a/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml b/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml index f17af4d5..c464c162 100644 --- a/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -119,6 +119,9 @@ AND u.phonenumber like concat('%', #{phonenumber}, '%') + + and u.post_name = #{postName} + AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')