diff --git a/postdischarge-admin/src/main/resources/application.yml b/postdischarge-admin/src/main/resources/application.yml index e7173d4d..c6131886 100644 --- a/postdischarge-admin/src/main/resources/application.yml +++ b/postdischarge-admin/src/main/resources/application.yml @@ -26,8 +26,6 @@ xinelu: script-file-url: /scriptFileUrl # 获取管理端富文本的上传路径 rich-text-picture-url: /richTextPictureUrl - # 资讯富文本的上传路径 - info-rich-text-picture-url: /infoRichTextPictureUrl # 开发环境配置 server: @@ -82,7 +80,7 @@ spring: # 数据库索引 database: 6 # 密码 - password: 123456 + password: xinelu@6990 # 连接超时时间 timeout: 10s lettuce: @@ -105,7 +103,8 @@ token: # 令牌有效期(默认30分钟) expireTime: 30 # 请求拦截白名单 - ant-matchers: /postDischarge/**,/testMobile/**,/mobile/** + ant-matchers: /postDischarge/**,/testMobile/** + ## MyBatis-Plus配置 mybatis-plus: # 实体扫描,多个package用逗号或者分号分隔 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 5f9a2e81..9ae03f9a 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 @@ -283,19 +283,4 @@ public class Constants { * 成功 */ public static final int SUCCESS_ERROR_CODE = 0; - - /** - * 资讯分类编码前缀 - */ - public static final String INFO_CATEGORY_CODE = "ICC"; - - /** - * 资讯编码前缀 - */ - public static final String INFO_CODE = "IC"; - - /** - * 科室编码前缀 - */ - public static final String DEPARTMENT_CODE = "HDC"; } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeExecuteStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeExecuteStatusEnum.java index ff851f30..40682678 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeExecuteStatusEnum.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/NodeExecuteStatusEnum.java @@ -1,18 +1,27 @@ package com.xinelu.common.enums; +import lombok.Getter; + /** * 节点执行状态枚举类 * * @author haown * @date 2024-04-01 */ +@Getter public enum NodeExecuteStatusEnum { - /** - * 已执行 - */ - EXECUTED, - /** - * 未执行 - */ - UNEXECUTED + /** + * 已执行 + */ + EXECUTED("EXECUTED"), + /** + * 未执行 + */ + UNEXECUTED("UNEXECUTED"), + ; + final private String info; + + NodeExecuteStatusEnum(String info) { + this.info = info; + } } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/QuestionTypeEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/QuestionTypeEnum.java new file mode 100644 index 00000000..c9dda5bf --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/QuestionTypeEnum.java @@ -0,0 +1,29 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +/** + * @Description 问卷类型 + * @Author zh + * @Date 2024-04-15 + */ +@Getter +public enum QuestionTypeEnum { + + /** + * 普通问卷 + */ + REGULAR_QUESTIONNAIRE("REGULAR_QUESTIONNAIRE"), + + /** + * 满意度问卷 + */ + SATISFACTION_QUESTIONNAIRE("SATISFACTION_QUESTIONNAIRE"), + ; + + final private String info; + + QuestionTypeEnum(String info) { + this.info = info; + } +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/TaskCreateTypeEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/TaskCreateTypeEnum.java new file mode 100644 index 00000000..38f6f76c --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/TaskCreateTypeEnum.java @@ -0,0 +1,29 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +/** + * @Description 任务创建类型 + * @Author zh + * @Date 2024-04-07 + */ +@Getter +public enum TaskCreateTypeEnum { + + /** + * 手动创建 + */ + MANUAL_CREATE("MANUAL_CREATE"), + + /** + * 自动匹配 + */ + MANUAL_MATCHE("MANUAL_MATCHE"), + ; + + final private String info; + + TaskCreateTypeEnum(String info) { + this.info = info; + } +} \ No newline at end of file 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 4e17302b..6f3fa58d 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 @@ -85,6 +85,7 @@ public class PatientInfoController extends BaseController { /** * 修改患者信息 */ + @ApiOperation("修改患者信息") @PreAuthorize("@ss.hasPermi('manage:patientInfo:edit')") @Log(title = "患者信息", businessType = BusinessType.UPDATE) @PutMapping 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 index 568e9899..4a0031c5 100644 --- 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 @@ -8,6 +8,7 @@ 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 com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -88,4 +89,23 @@ public class PatientQuestionSubmitResultController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(patientQuestionSubmitResultService.deletePatientQuestionSubmitResultByIds(ids)); } + + /** + * 满意度调查问卷列表 + */ + @GetMapping("/satisfactionSurvey") + public TableDataInfo satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey) { + startPage(); + List list = patientQuestionSubmitResultService.satisfactionSurvey(satisfactionSurvey); + return getDataTable(list); + } + + /** + * 满意度调查问卷 + */ + @GetMapping("/selectQuestionnaireResult") + public AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId) { + return patientQuestionSubmitResultService.selectQuestionnaireResult(patientQuestionSubmitResultId); + + } } 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 bc5f659c..a08701a3 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 @@ -72,7 +72,7 @@ public class QuestionInfoController extends BaseController { @Log(title = "问卷基本信息", businessType = BusinessType.INSERT) @PostMapping("/add") public AjaxResult add(@RequestBody QuestionVO questionInfo) { - if (Objects.isNull(questionInfo) || StringUtils.isBlank(questionInfo.getQuestionnaireName())) { + if (Objects.isNull(questionInfo) || StringUtils.isBlank(questionInfo.getQuestionnaireName()) || StringUtils.isBlank(questionInfo.getQuestionType())) { return AjaxResult.error("请添加问卷信息!"); } return questionInfoService.insertQuestionInfo(questionInfo); @@ -85,6 +85,9 @@ public class QuestionInfoController extends BaseController { @Log(title = "问卷基本信息", businessType = BusinessType.UPDATE) @PostMapping("/edit") public AjaxResult edit(@RequestBody QuestionVO question) { + if (Objects.isNull(question) || StringUtils.isBlank(question.getQuestionnaireName()) || StringUtils.isBlank(question.getQuestionType())) { + return AjaxResult.error("请添加问卷信息!"); + } return questionInfoService.updateQuestionInfo(question); } @@ -94,8 +97,8 @@ public class QuestionInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('system:question:remove')") @Log(title = "问卷基本信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long id) { - return toAjax(questionInfoService.deleteQuestionInfoById(id)); + public AjaxResult remove(@PathVariable Long ids) { + return toAjax(questionInfoService.deleteQuestionInfoById(ids)); } /** @@ -110,7 +113,7 @@ public class QuestionInfoController extends BaseController { * 科室问卷数量 */ @GetMapping("/departmentQuestionCount") - public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus) { - return questionInfoService.departmentQuestionCount(departmentName, questionnaireStatus); + public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus, String questionType) { + return questionInfoService.departmentQuestionCount(departmentName, questionnaireStatus, questionType); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java index bda7141e..3e59512f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java @@ -118,6 +118,4 @@ public class SignPatientManageRouteController extends BaseController { public AjaxResult addPatientQuestionResult(@RequestBody PatientQuestionSubmitResultDTO dto) { return signPatientManageRouteService.addPatientQuestionResult(dto); } - - } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java index d43c9791..803ca5d7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroutenode/SignPatientManageRouteNodeController.java @@ -8,12 +8,12 @@ import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; +import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; import javax.annotation.Resource; 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.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -44,12 +44,22 @@ public class SignPatientManageRouteNodeController extends BaseController { } /** - * 根据患者主键查询签约路径及节点 + * 查询患者任务节点列表 */ - @ApiOperation("根据患者主键查询患者管理路径节点") - @GetMapping("/getNodesByPatient/{patientId}") - public R> getNodesByPatient(@PathVariable("patientId") Long patientId) { - List list = signNodeService.getNodesByPatient(patientId); + @ApiOperation("查询患者任务节点列表") + @GetMapping("/getNodeList") + public R> getNodeList(PatientTaskDto patientTaskDto) { + List list = signNodeService.getNodeList(patientTaskDto); + return R.ok(list); + } + + /** + * 查询管理任务路径及节点 + */ + @ApiOperation("查询管理任务路径及节点") + @GetMapping("/getRouteNodeList") + public R> getRouteNodeList(PatientTaskDto patientTaskDto) { + List list = signNodeService.getRouteNodeList(patientTaskDto); return R.ok(list); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/questioninfo/QuestionInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/questioninfo/QuestionInfo.java index 28bd2f82..89a66ff9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/questioninfo/QuestionInfo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/questioninfo/QuestionInfo.java @@ -123,6 +123,12 @@ public class QuestionInfo extends BaseEntity { @Excel(name = "问卷备注信息") private String questionnaireRemark; + /** + * 问卷类型,普通问卷:REGULAR_QUESTIONNAIRE,满意度问卷:SATISFACTION_QUESTIONNAIRE + */ + @ApiModelProperty(value = "问卷类型") + @Excel(name = "问卷类型") + private String questionType; @Override public String toString() { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java index d000e5cb..6c13a524 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/manualfollowup/ManualFollowUpDTO.java @@ -89,5 +89,8 @@ public class ManualFollowUpDTO { @ApiModelProperty(value = "主治医生姓名") private String attendingPhysicianName; + @ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED") + private String nodeExecuteStatus; + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java index de1a9c66..da91fbfe 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java @@ -28,6 +28,9 @@ public class PatientQuestionSubmitResultDTO extends PatientQuestionSubmitResult @ApiModelProperty(value = "任务处理信息") private String routeHandleRemark; + @ApiModelProperty(value = "患者就诊记录基本信息表id") + private Long visitRecordId; + /** * 患者问卷题目提交结果信息 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentEditDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentEditDTO.java index ef8b930e..2f94b56f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentEditDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentEditDTO.java @@ -69,4 +69,11 @@ public class ServiceWayContentEditDTO { @ApiModelProperty(value = "服务频次数字结束值") @Excel(name = "服务频次数字结束值") private Integer serviceFrequencyEnd; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Integer serviceSort; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/PatientTaskDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/PatientTaskDto.java index 39293898..9ed18b8e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/PatientTaskDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientmanageroutenode/PatientTaskDto.java @@ -1,10 +1,10 @@ package com.xinelu.manage.dto.signpatientmanageroutenode; -import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.LocalDateTime; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; /** * @description: 患者任务查询传输对象 @@ -15,15 +15,29 @@ import lombok.Data; @Data public class PatientTaskDto { - /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ - @ApiModelProperty(value = "就诊时间开始,格式:yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd") - private LocalDateTime visitDateStart; + /** + * 患者主键 + */ + @ApiModelProperty("患者主键") + private Long patientId; - /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ - @ApiModelProperty(value = "就诊时间结束,格式:yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd") - private LocalDateTime visitDateEnd; + /** 签约记录表id */ + @ApiModelProperty(value = "签约记录表id") + private Long signPatientRecordId; + + /** 任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE */ + @ApiModelProperty(value = "任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE") + private String taskCreateType; + + /** 出院时间开始,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "出院时间开始,格式:yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDateTime dischargeTimeStart; + + /** 出院时间结束,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "出院时间结束,格式:yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDateTime dischargeTimeEnd; /** 所属医院id */ @ApiModelProperty(value = "所属医院id") @@ -53,4 +67,8 @@ public class PatientTaskDto { @ApiModelProperty(value = "患者姓名") private String patientName; + /** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */ + @ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + private String taskType; + } 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 index 14632f3f..827e5034 100644 --- 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 @@ -2,6 +2,8 @@ package com.xinelu.manage.mapper.patientquestionsubmitresult; import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult; import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO; +import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -63,8 +65,17 @@ public interface PatientQuestionSubmitResultMapper { /** * 根据任务执行记录查询患者问卷信息 * - * @param taskExecuteRecordId 患者管理任务执行记录表id + * @param taskExecuteRecordId 患者管理任务执行记录表id + * @param patientQuestionSubmitResultId 患者问卷提交结果信息表 * @return PatientQuestionSubmitResultVO */ - PatientQuestionSubmitResultVO selectResultByTaskExecuteRecordId(Long taskExecuteRecordId); + PatientQuestionSubmitResultVO selectResultByTaskExecuteRecordId(@Param("taskExecuteRecordId") Long taskExecuteRecordId, @Param("patientQuestionSubmitResultId") Long patientQuestionSubmitResultId); + + /** + * 满意度调查问卷列表 + * + * @param satisfactionSurvey 居民信息 + * @return AjaxResult + */ + List selectSatisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey); } 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 f1482991..64d2e8ac 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 @@ -69,5 +69,5 @@ public interface QuestionInfoMapper { * @param questionnaireStatus 问卷状态 * @return DepartmentVO */ - List departmentQuestionByDepartmentName(@Param("departmentName") String departmentName, @Param("questionnaireStatus") String questionnaireStatus); + List departmentQuestionByDepartmentName(@Param("departmentName") String departmentName, @Param("questionnaireStatus") String questionnaireStatus, @Param("questionType") String questionType); } 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 index 771126ec..daeb251c 100644 --- 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 @@ -1,6 +1,8 @@ package com.xinelu.manage.mapper.residentinfo; import com.xinelu.manage.domain.residentinfo.ResidentInfo; +import org.apache.ibatis.annotations.Param; + import java.util.List; @@ -17,7 +19,7 @@ public interface ResidentInfoMapper { * @param id 居民信息主键 * @return 居民信息 */ - public ResidentInfo selectResidentInfoById(Long id); + ResidentInfo selectResidentInfoById(Long id); /** * 查询居民信息列表 @@ -58,4 +60,13 @@ public interface ResidentInfoMapper { * @return 结果 */ int deleteResidentInfoByIds(Long[] ids); + + /** + * 根据电话号码和微信小程序openid查询居民基本信息 + * + * @param phone 手机号 + * @param openId 微信小程序openId + * @return 被护理人基本信息 + */ + ResidentInfo getResidentInfoByPhoneAndOpenId(@Param("phone") String phone, @Param("openId") String openId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index 39fd6ff6..9480629a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -6,8 +6,6 @@ import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; import java.util.List; import org.apache.ibatis.annotations.Param; -import java.util.List; - /** * 签约患者管理任务路径节点Mapper接口 * @@ -23,6 +21,13 @@ public interface SignPatientManageRouteNodeMapper { */ public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id); + /** + * 查询患者管理路径节点 + * @param patientTaskDto 任务查询传输对象 + * @return 患者管理任务路径节点 + */ + List getNodeList(PatientTaskDto patientTaskDto); + /** * 查询签约患者管理任务路径节点列表 * 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 index 8153bd9f..65084c16 100644 --- 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 @@ -17,7 +17,7 @@ public interface IPatientQuestionSubjectResultService { * @param id 患者问卷题目提交结果信息主键 * @return 患者问卷题目提交结果信息 */ - public PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id); + PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long 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 index c8535f0d..464dbf4b 100644 --- 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 @@ -1,6 +1,8 @@ package com.xinelu.manage.service.patientquestionsubmitresult; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult; +import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO; import java.util.List; @@ -58,4 +60,20 @@ public interface IPatientQuestionSubmitResultService { * @return 结果 */ int deletePatientQuestionSubmitResultById(Long id); + + /** + * 满意度调查问卷列表 + * + * @param satisfactionSurvey 居民信息 + * @return AjaxResult + */ + List satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey); + + /** + * 满意度调查问卷 + * + * @param patientQuestionSubmitResultId 问卷信息 + * @return AjaxResult + */ + AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId); } 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 index 2fab972b..97208eb9 100644 --- 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 @@ -1,8 +1,11 @@ package com.xinelu.manage.service.patientquestionsubmitresult.impl; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.enums.QuestionTypeEnum; import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult; import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper; import com.xinelu.manage.service.patientquestionsubmitresult.IPatientQuestionSubmitResultService; +import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -87,4 +90,28 @@ public class PatientQuestionSubmitResultServiceImpl implements IPatientQuestionS public int deletePatientQuestionSubmitResultById(Long id) { return patientQuestionSubmitResultMapper.deletePatientQuestionSubmitResultById(id); } + + /** + * 满意度调查问卷列表 + * + * @param satisfactionSurvey 居民信息 + * @return AjaxResult + */ + @Override + public List satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey) { + satisfactionSurvey.setQuestionType(QuestionTypeEnum.SATISFACTION_QUESTIONNAIRE.getInfo()); + return patientQuestionSubmitResultMapper.selectSatisfactionSurvey(satisfactionSurvey); + } + + + /** + * 满意度调查问卷 + * + * @param patientQuestionSubmitResultId 问卷信息 + * @return AjaxResult + */ + @Override + public AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId) { + return AjaxResult.success(patientQuestionSubmitResultMapper.selectResultByTaskExecuteRecordId(null, patientQuestionSubmitResultId)); + } } 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 index 1f7aeca4..fe343753 100644 --- 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 @@ -1,22 +1,18 @@ package com.xinelu.manage.service.patienttaskexecuterecord.impl; import com.xinelu.common.core.domain.AjaxResult; -import com.xinelu.common.enums.TaskContentEnum; 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.service.propagandainfo.IPropagandaInfoService; -import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO; import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; -import java.util.Objects; /** * 患者管理任务执行记录Service业务层处理 @@ -122,29 +118,6 @@ public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteR */ @Override public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) { - //判断任务类型 - PatientTaskExecuteRecord patientTaskExecuteRecord = patientTaskExecuteRecordMapper.selectPatientTaskExecuteRecordById(taskExecuteRecordId); - if (Objects.isNull(patientTaskExecuteRecord) || StringUtils.isBlank(patientTaskExecuteRecord.getTaskContent())) { - return AjaxResult.success(); - } - //如果是人工随访或问卷表 - if (TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(patientTaskExecuteRecord.getTaskContent()) || TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) { - PatientQuestionSubmitResultVO patientQuestionSubmitResult = submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId); - patientQuestionSubmitResult.setTaskContent(patientTaskExecuteRecord.getTaskContent()); - return AjaxResult.success(patientQuestionSubmitResult); - } - //如果是电话外呼 - if (TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) { - return AjaxResult.success(); - } - //如果是宣教文章 - if (TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) { - return AjaxResult.success(); - } - - if (TaskContentEnum.TEXT_REMIND.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) { - return AjaxResult.success(); - } - return AjaxResult.success(); + return AjaxResult.success(submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId, null)); } } 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 e36fc62a..486d98d8 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 @@ -75,5 +75,5 @@ public interface IQuestionInfoService { * @param departmentName 科室名称 * @return AjaxResult */ - AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus); + AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus,String questionType); } 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 89f57d13..b70fb70c 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 @@ -3,6 +3,7 @@ package com.xinelu.manage.service.questioninfo.impl; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.domain.questionsubject.QuestionSubject; import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption; @@ -94,6 +95,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { BeanUtils.copyBeanProp(questionInfo, question); questionInfo.setCreateTime(LocalDateTime.now()); questionInfo.setCreateBy(SecurityUtils.getUsername()); + questionInfo.setQuestionnaireId(IdUtils.fastUUID()); int questionCount = questionInfoMapper.insertQuestionInfo(questionInfo); if (questionCount <= 0) { log.info("新增问卷表失败," + questionInfo); @@ -110,7 +112,9 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { saveQuestionSubject.setCreateTime(LocalDateTime.now()); saveQuestionSubject.setCreateBy(SecurityUtils.getUsername()); questionSubjects.add(saveQuestionSubject); - questionSubjectOptions.addAll(questionSubject.getQuestionSubjectOptionList()); + if (CollectionUtils.isNotEmpty(questionSubject.getQuestionSubjectOptionList())) { + questionSubjectOptions.addAll(questionSubject.getQuestionSubjectOptionList()); + } } int questionSubjectCount = questionSubjectMapper.insertQuestionSubjectList(questionSubjects); if (questionSubjectCount <= 0) { @@ -190,6 +194,9 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { log.info("修改问卷题目表失败," + questionSubjects); throw new SecurityException("修改问卷失败!请联系管理员!"); } + if (CollectionUtils.isEmpty(questionSubjectOptions)) { + return AjaxResult.success(); + } List saveQuestionSubjectOptions = new ArrayList<>(); for (QuestionSubjectOptionVO questionSubjectOption : questionSubjectOptions) { QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption(); @@ -251,6 +258,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { * @param questionInfo 问卷基本信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult updateQuestionByDepartment(QuestionInfo questionInfo) { if (Objects.isNull(questionInfo) || Objects.isNull(questionInfo.getId())) { @@ -290,12 +298,12 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { * @return AjaxResult */ @Override - public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus) { + public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus, String questionType) { DepartmentVO departmentVO = new DepartmentVO(); List department = new ArrayList<>(); departmentVO.setDepartmentName("全部"); departmentVO.setCountNum(0); - List departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentName, questionnaireStatus); + List departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentName, questionnaireStatus, questionType); if (CollectionUtils.isNotEmpty(departmentVOS)) { Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum(); departmentVO.setCountNum(result); 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 b515ff03..1dfed335 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 @@ -6,6 +6,7 @@ import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.MimeTypeUtils; +import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.scriptInfo.ScriptInfo; import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper; import com.xinelu.manage.service.scriptInfo.IScriptInfoService; @@ -71,6 +72,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService { // 设置创建人与创建时间 scriptInfo.setCreateBy(SecurityUtils.getUsername()); scriptInfo.setCreateTime(LocalDateTime.now()); + scriptInfo.setScriptId(IdUtils.fastUUID()); return scriptInfoMapper.insertScriptInfo(scriptInfo); } @@ -84,7 +86,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService { @Transactional(rollbackFor = Exception.class) public int updateScriptInfo(ScriptInfo scriptInfo) { // 检查除当前记录之外是否存在同名的话术名称 - if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(),scriptInfo.getCommonScriptName()) > 0) { + if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(), scriptInfo.getCommonScriptName()) > 0) { // 存在同名的通用话术名称,不能进行更新 throw new ServiceException("通用话术名称已存在,请使用其他名称。"); } 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 740b0fc9..5df68904 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 @@ -94,6 +94,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd()); serviceFrequency.setCreateBy(username); serviceFrequency.setCreateTime(LocalDateTime.now()); + serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort()); if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) { throw new ServiceException("新增服务频次失败"); } @@ -119,6 +120,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { serviceFrequency.setCreateBy(username); serviceFrequency.setCreateTime(LocalDateTime.now()); serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort()); + serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort()); if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) { throw new ServiceException("新增服务频次失败"); } @@ -192,6 +194,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { currentFrequency.setServiceFrequencyText(serviceWayContentEditDTO.getServiceFrequencyText()); currentFrequency.setServiceFrequencyStart(serviceWayContentEditDTO.getServiceFrequencyStart()); currentFrequency.setServiceFrequencyEnd(serviceWayContentEditDTO.getServiceFrequencyEnd()); + currentFrequency.setServiceSort(serviceWayContentEditDTO.getServiceSort()); currentFrequency.setUpdateBy(username); currentFrequency.setUpdateTime(LocalDateTime.now()); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java index c55aebf3..b825b915 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java @@ -23,7 +23,7 @@ public interface ISignPatientManageRouteService { * @param id 签约患者管理任务路径主键 * @return 签约患者管理任务路径 */ - SignPatientManageRoute selectSignPatientManageRouteById(Long id); + SignPatientManageRouteVO selectSignPatientManageRouteById(Long id); /** * 查询签约患者管理任务路径列表 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index c329b692..190b8613 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -4,6 +4,7 @@ import com.xinelu.common.constant.TaskCreateTypeConstant; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.enums.NodeExecuteStatusEnum; import com.xinelu.common.enums.TaskContentEnum; +import com.xinelu.common.enums.TaskCreateTypeEnum; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.AgeUtil; import com.xinelu.common.utils.SecurityUtils; @@ -32,6 +33,7 @@ import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO; import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO; import com.xinelu.manage.vo.signroutetriggercondition.SignRouteTriggerConditionVO; import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -72,8 +74,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout * @return 签约患者管理任务路径 */ @Override - public SignPatientManageRoute selectSignPatientManageRouteById(Long id) { - return signPatientManageRouteMapper.selectSignPatientManageRouteById(id); + public SignPatientManageRouteVO selectSignPatientManageRouteById(Long id) { + return signPatientManageRouteMapper.selectSignPatientManageRoute(id); } /** @@ -93,20 +95,24 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout * @param signPatientManageRoute 签约患者管理任务路径 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) { + //新增主表 + signPatientManageRoute.setTaskCreateType(TaskCreateTypeEnum.MANUAL_CREATE.getInfo()); signPatientManageRoute.setCreateBy(SecurityUtils.getUsername()); signPatientManageRoute.setCreateTime(LocalDateTime.now()); int insertRoute = signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); if (insertRoute < 0) { return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!"); } - for (SignPatientManageRouteNode signPatientManageRouteNode : signPatientManageRoute.getRouteNodeList()) { - signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId()); - signPatientManageRouteNode.setCreateTime(LocalDateTime.now()); - signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername()); + //新增节点表 + List signPatientManageRouteNodes = new ArrayList<>(); + SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode(); + for (SignPatientManageRouteNode routeNode : signPatientManageRoute.getRouteNodeList()) { + extracted(signPatientManageRoute, signPatientManageRouteNodes, signPatientManageRouteNode, routeNode); } - int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRoute.getRouteNodeList()); + int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes); if (insertBatchCount < 0) { return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!"); } @@ -126,12 +132,14 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout return AjaxResult.success(); } + /** * 修改签约患者管理任务路径 * * @param signPatientManageRoute 签约患者管理任务路径 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult updateSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) { int deleteRouteNodeCount = signPatientManageRouteNodeMapper.deleteRouteNodeByManageRouteId(signPatientManageRoute.getSignPatientManageRouteId()); @@ -180,6 +188,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout * @param ids 需要删除的签约患者管理任务路径主键 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public int deleteSignPatientManageRouteByIds(Long[] ids) { return signPatientManageRouteMapper.deleteSignPatientManageRouteByIds(ids); @@ -281,10 +290,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout PatientQuestionOptionResult saveQuestionOption = new PatientQuestionOptionResult(); BeanUtils.copyBeanProp(saveQuestionOption, patientQuestionOptionResult); // 从已保存的患者问卷题目结果列表中查找当前选项所对应的题目结果 - PatientQuestionSubjectResult patientQuestionSubjectResult = patientQuestionSubjectResults.stream(). - filter(Objects::nonNull). - filter(item -> Objects.nonNull(item.getQuestionNumber()) && patientQuestionOptionResult.getQuestionNumber(). - compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new PatientQuestionSubjectResult()); + PatientQuestionSubjectResult patientQuestionSubjectResult = patientQuestionSubjectResults.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && patientQuestionOptionResult.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new PatientQuestionSubjectResult()); saveQuestionOption.setQuestionSubjectResultId(patientQuestionSubjectResult.getId()); saveQuestionOption.setCreateTime(time); saveQuestionOption.setCreateBy(routeHandlePerson); @@ -334,4 +340,46 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout } } + /** + * 塞值 + */ + private static void extracted(SignPatientManageRouteVO signPatientManageRoute, List signPatientManageRouteNodes, SignPatientManageRouteNode signPatientManageRouteNode, SignPatientManageRouteNode routeNode) { + if (Objects.nonNull(routeNode) && TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(routeNode.getTaskType())) { + signPatientManageRouteNode.setPhonePushSign(Objects.isNull(routeNode.getPhonePushSign()) ? null : routeNode.getPhonePushSign()); + signPatientManageRouteNode.setPhoneId(Objects.isNull(routeNode.getPhoneId()) ? null : routeNode.getPhoneId()); + signPatientManageRouteNode.setPhoneTemplateId(Objects.isNull(routeNode.getPhoneTemplateId()) ? null : routeNode.getPhoneTemplateId()); + signPatientManageRouteNode.setPhoneTemplateName(StringUtils.isBlank(routeNode.getPhoneTemplateName()) ? null : routeNode.getPhoneTemplateName()); + signPatientManageRouteNode.setPhoneNodeContent(StringUtils.isBlank(routeNode.getPhoneNodeContent()) ? null : routeNode.getPhoneNodeContent()); + signPatientManageRouteNode.setPhoneRedialTimes(StringUtils.isBlank(routeNode.getPhoneRedialTimes()) ? null : routeNode.getPhoneRedialTimes()); + signPatientManageRouteNode.setPhoneTimeInterval(Objects.isNull(routeNode.getPhoneTimeInterval()) ? null : routeNode.getPhoneTimeInterval()); + } + if (Objects.nonNull(routeNode) && TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(routeNode.getTaskType())) { + signPatientManageRouteNode.setQuestionInfoId(Objects.isNull(routeNode.getQuestionInfoId()) ? null : routeNode.getQuestionInfoId()); + signPatientManageRouteNode.setQuestionnaireName(StringUtils.isBlank(routeNode.getQuestionnaireName()) ? null : routeNode.getQuestionnaireName()); + signPatientManageRouteNode.setQuestionnaireContent(StringUtils.isBlank(routeNode.getQuestionnaireContent()) ? null : routeNode.getQuestionnaireContent()); + signPatientManageRouteNode.setQuestionExpirationDate(Objects.isNull(routeNode.getQuestionExpirationDate()) ? null : routeNode.getQuestionExpirationDate()); + } + if (Objects.nonNull(routeNode) && TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(routeNode.getTaskType())) { + signPatientManageRouteNode.setPropagandaInfoId(Objects.isNull(routeNode.getPropagandaInfoId()) ? null : routeNode.getPropagandaInfoId()); + signPatientManageRouteNode.setPropagandaTitle(StringUtils.isBlank(routeNode.getPropagandaTitle()) ? null : routeNode.getPropagandaTitle()); + signPatientManageRouteNode.setPropagandaContent(StringUtils.isBlank(routeNode.getPropagandaContent()) ? null : routeNode.getPropagandaContent()); + } + if (Objects.nonNull(routeNode) && TaskContentEnum.TEXT_REMIND.getInfo().equals(routeNode.getTaskType())) { + signPatientManageRouteNode.setTextRemindContent(StringUtils.isBlank(routeNode.getTextRemindContent()) ? null : routeNode.getTextRemindContent()); + } + if (Objects.nonNull(routeNode) && TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(routeNode.getTaskType())) { + signPatientManageRouteNode.setFollowTemplateId(Objects.isNull(routeNode.getFollowTemplateId()) ? null : routeNode.getFollowTemplateId()); + signPatientManageRouteNode.setFollowContent(StringUtils.isBlank(routeNode.getFollowContent()) ? null : routeNode.getFollowContent()); + signPatientManageRouteNode.setFollowTemplateName(StringUtils.isBlank(routeNode.getFollowTemplateName()) ? null : routeNode.getFollowTemplateName()); + } + signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId()); + signPatientManageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName()); + signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo()); + signPatientManageRouteNode.setTaskType(routeNode.getTaskType()); + signPatientManageRouteNode.setRouteNodeName(routeNode.getRouteNodeName()); + signPatientManageRouteNode.setRouteNodeDay(routeNode.getRouteNodeDay()); + signPatientManageRouteNode.setCreateTime(LocalDateTime.now()); + signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername()); + signPatientManageRouteNodes.add(signPatientManageRouteNode); + } } 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 index 35c2d275..c05252e9 100644 --- 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 @@ -4,6 +4,7 @@ import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRout import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto; import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; +import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo; import java.util.List; @@ -23,12 +24,19 @@ public interface ISignPatientManageRouteNodeService { public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id); /** - * 根据患者主键查询患者管理路径节点 - * - * @param patientId 患者主键 - * @return 签约患者管理任务路径节点 + * 查询患者管理路径节点 + * @param patientTaskDto 任务查询传输对象 + * @return 患者管理任务路径节点 */ - List getNodesByPatient(Long patientId); + List getNodeList(PatientTaskDto patientTaskDto); + + /** + * 查询患者管理路径节点 + * + * @param patientTaskDto 任务查询传输对象 + * @return 患者管理任务路径节点 + */ + List getRouteNodeList(PatientTaskDto patientTaskDto); /** * 查询签约患者管理任务路径节点列表 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 index b9f1c5c0..f41ee0b6 100644 --- 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 @@ -1,5 +1,6 @@ package com.xinelu.manage.service.signpatientmanageroutenode.impl; +import com.xinelu.common.exception.ServiceException; import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; @@ -10,11 +11,12 @@ import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMap import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService; import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo; +import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo; import java.time.LocalDateTime; import java.util.ArrayList; 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; @@ -44,23 +46,37 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id); } - @Override public List getNodesByPatient(Long patientId) { - List nodeList = new ArrayList<>(); - PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId); - if (patientInfo.getSignPatientRecordId() != null) { - // 查询签约路径 - SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute(); - signPatientManageRoute.setSignPatientRecordId(patientInfo.getSignPatientRecordId()); - signPatientManageRoute.setPatientId(patientId); - List signRoutes = signRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute); - if (CollectionUtils.isNotEmpty(signRoutes)) { - SignPatientManageRoute signRoute = signRoutes.get(0); - SignPatientManageRouteNode nddeQuery = new SignPatientManageRouteNode(); - nddeQuery.setManageRouteId(signRoute.getId()); - nodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(nddeQuery); - } + @Override public List getNodeList(PatientTaskDto patientTaskDto) { + if (patientTaskDto.getPatientId() == null) { + throw new ServiceException("患者信息有误"); } - return nodeList; + return signPatientManageRouteNodeMapper.getNodeList(patientTaskDto); + } + + @Override public List getRouteNodeList(PatientTaskDto patientTaskDto) { + List retList = new ArrayList<>(); + PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId()); + if (patientTaskDto.getPatientId() == null || ObjectUtils.isEmpty(patientInfo)) { + throw new ServiceException("请选择患者!"); + } + // 查询任务列表 + SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute(); + signPatientManageRoute.setSignPatientRecordId(patientTaskDto.getSignPatientRecordId()); + signPatientManageRoute.setPatientId(patientTaskDto.getPatientId()); + signPatientManageRoute.setTaskCreateType(patientTaskDto.getTaskCreateType()); + List signRoutes = signRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute); + for (SignPatientManageRoute route : signRoutes) { + SignPatientManageRouteNode nodeQuery = new SignPatientManageRouteNode(); + nodeQuery.setManageRouteId(route.getId()); + List nodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(nodeQuery); + retList.add(SignPatientManageRouteNodeVo.builder().manageRouteId(route.getId()) + .routeName(route.getRouteName()) + .taskCreateType(route.getTaskCreateType()) + .suitRange(route.getSuitRange()) + .nodeList(nodeList).build()); + } + + return retList; } /** 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 c5525fde..8abc07c2 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 @@ -163,6 +163,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService * @param specialDiseaseNode 节点信息 * @return AjaxResult */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult updateRouteCheckStatus(SpecialDiseaseNode specialDiseaseNode) { if (Objects.isNull(specialDiseaseNode) || Objects.isNull(specialDiseaseNode.getId())) { 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 index 44c2a65a..bb6a904c 100644 --- 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 @@ -77,6 +77,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi * @param specialDiseaseRoute 专病路径信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult insertSpecialDiseaseRoute(SpecialDiseaseRouteVO specialDiseaseRoute) { specialDiseaseRoute.setCreateTime(LocalDateTime.now()); @@ -111,6 +112,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi * @param specialDiseaseRoute 专病路径信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult updateSpecialDiseaseRoute(SpecialDiseaseRouteVO specialDiseaseRoute) { int deleteRoutePackageCount = specialDiseaseRoutePackageMapper.deleteSpecialDiseaseRoutePackageByRouteId(specialDiseaseRoute.getId()); @@ -209,6 +211,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi * @param specialDiseaseRoute 路径信息 * @return AjaxResult */ + @Transactional(rollbackFor = Exception.class) @Override public AjaxResult editReleaseStatus(SpecialDiseaseRoute specialDiseaseRoute) { if (Objects.isNull(specialDiseaseRoute) || StringUtils.isBlank(specialDiseaseRoute.getReleaseStatus())) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java index c7ac6581..46f18fe3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java @@ -4,6 +4,7 @@ import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.textmessage.TextMessage; import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask; import com.xinelu.manage.dto.textmessage.TextMessageDTO; @@ -112,6 +113,7 @@ public class TextMessageServiceImpl implements ITextMessageService { LocalDateTime currentTime = LocalDateTime.now(); textMessageTaskDTO.setCreateBy(currentUsername); textMessageTaskDTO.setCreateTime(currentTime); + textMessageTaskDTO.setTextMessageId(IdUtils.fastUUID()); // 将textMessageTaskDTO对象的属性复制到textMessage对象 TextMessage textMessage = new TextMessage(); 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 f7b2d3c3..b871a5a4 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 @@ -4,6 +4,7 @@ import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.wechattemplate.WechatTemplate; import com.xinelu.manage.domain.wechattemplatesuittask.WechatTemplateSuitTask; import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO; @@ -104,7 +105,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService { // 将wechatTemplateTaskDTO对象的属性复制到wechatTemplate对象 WechatTemplate wechatTemplate = new WechatTemplate(); BeanUtils.copyProperties(wechatTemplateTaskDTO, wechatTemplate); - + wechatTemplate.setTemplateId(IdUtils.fastUUID()); // 插入wechatTemplate记录并检查结果 if (wechatTemplateMapper.insertWechatTemplate(wechatTemplate) <= 0) { throw new ServiceException("新增微信模板失败"); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java index 7852b9a4..f15e1ad1 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/manualfollowup/ManualFollowUpVO.java @@ -114,5 +114,14 @@ public class ManualFollowUpVO { @ApiModelProperty(value = "模板id") private String templateId; + @ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED") + private String nodeExecuteStatus; + + @ApiModelProperty(value = "任务执行记录id") + private Long taskExecuteRecordId; + + @ApiModelProperty(value = "任务处理信息") + private String routeHandleRemark; + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultVO.java index 8d2d52dc..915b170c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/PatientQuestionSubmitResultVO.java @@ -4,6 +4,7 @@ import com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectR import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.util.List; /** @@ -34,5 +35,18 @@ public class PatientQuestionSubmitResultVO { @ApiModelProperty(value = "问卷说明") private String questionnaireDescription; + /** + * 问卷总分值,小数点后两位 + */ + @ApiModelProperty(value = "问卷总分值,小数点后两位") + private BigDecimal questionnaireTotalScore; + + /** + * 问卷总得分,根据患者提交问卷得出的分值 + */ + @ApiModelProperty(value = "问卷总得分,根据患者提交问卷得出的分值") + private BigDecimal totalScore; + + List subjectResultList; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/SatisfactionSurveyVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/SatisfactionSurveyVO.java new file mode 100644 index 00000000..d1385acb --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/patientquestionsubmitresult/SatisfactionSurveyVO.java @@ -0,0 +1,93 @@ +package com.xinelu.manage.vo.patientquestionsubmitresult; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDate; + +/** + * 满意度调查 + * + * @author xinelu + * @date 2024-04-15 + */ +@Data +public class SatisfactionSurveyVO { + + private Long patientQuestionSubmitResultId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** + * 出生日期,格式:yyyy-MM-dd + */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate birthDate; + + /** + * 性别,男:MALE,女:FEMALE + */ + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + private String sex; + + /** + * 问卷类型,普通问卷:REGULAR_QUESTIONNAIRE,满意度问卷:SATISFACTION_QUESTIONNAIRE + */ + @ApiModelProperty(value = "问卷类型") + private String questionType; + + /** + * 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT, + * 签约患者:CONTRACTED_PATIENT + */ + @ApiModelProperty(value = "患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,签约患者:CONTRACTED_PATIENT") + private String patientType; + + /** + * 签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 服务到期:EXPIRE_SIGN + */ + @ApiModelProperty(value = "签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 过期:EXPIRE_SIGN") + private String signStatus; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; + + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + /** + * 所属医院名称 + */ + @ApiModelProperty(value = "所属医院名称") + private String hospitalAgencyName; + + /** + * 所属科室名称 + */ + @ApiModelProperty(value = "所属科室名称") + private String departmentName; +} 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 index cab744d2..32937ae2 100644 --- 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 @@ -3,8 +3,10 @@ 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; import org.springframework.format.annotation.DateTimeFormat; @@ -102,4 +104,19 @@ public class PatientTaskExecuteRecordVO extends PatientTaskExecuteRecord { @ApiModelProperty(value = "手术记录") private String surgicalRecord; + + + @ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP") + private String taskType; + + @ApiModelProperty(value = "模板id") + private String templateId; + + @ApiModelProperty(value = "文字提醒内容(任务类型为文字提醒使用)") + private String textRemindContent; + + @ApiModelProperty(value = "任务处理信息") + private String routeHandleRemark; + + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java index 2a33f507..c3388634 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java @@ -48,4 +48,9 @@ public class ServiceFrequencyVO { @ApiModelProperty(value = "服务频次数字结束值") @Excel(name = "服务频次数字结束值") private Integer serviceFrequencyEnd; + + @ApiModelProperty(value = "服务频次排序") + private Integer serviceFrequencySort; + + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java index 33c53622..e739575d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java @@ -67,4 +67,7 @@ public class ServiceWayContentAndFrequencyVO { @ApiModelProperty(value = "服务频次数字结束值") @Excel(name = "服务频次数字结束值") private Integer serviceFrequencyEnd; + + @ApiModelProperty(value = "服务频次排序") + private Integer serviceFrequencySort; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteNodeVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteNodeVo.java deleted file mode 100644 index 5066bf48..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroute/SignPatientManageRouteNodeVo.java +++ /dev/null @@ -1,211 +0,0 @@ -package com.xinelu.manage.vo.signpatientmanageroute; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.LocalTime; -import lombok.Data; - -/** - * @description: 居民管理路径查询返回视图类 - * @author: haown - * @create: 2024-04-02 08:58 - **/ -@ApiModel("居民管理路径查询返回视图类") -@Data -public class SignPatientManageRouteNodeVo { - - /** 签约记录表id */ - @ApiModelProperty(value = "签约记录表id") - private Long signPatientRecordId; - - /** 路径主键 */ - @ApiModelProperty(value = "路径主键") - private Long routeId; - - /** 路径名称(任务名称) */ - @ApiModelProperty(value = "路径名称") - private String routeName; - - /** 管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION,就诊/出院后:AFTER_VISIT_DISCHARGE,术前:PREOPERATIVE,术后:POSTOPERATIVE*/ - @ApiModelProperty(value = "管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION," - + "就诊/出院后:AFTER_VISIT_DISCHARGE,术前:PREOPERATIVE,术后:POSTOPERATIVE") - private String routeNodeName; - - /** 管理路径节点时间,时间单位为:天 */ - @ApiModelProperty(value = "管理路径节点时间,时间单位为:天") - 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") - private String taskType; - - /** 任务状态 */ - @ApiModelProperty(value = "任务状态") - private String taskStatus; - - /** 任务细分 */ - @ApiModelProperty(value = "任务细分") - private String taskSubdivision; - - /** 二级分类描述 */ - @ApiModelProperty(value = "二级分类描述") - private String secondClassifyDescribe; - - /** 执行时间,格式:HH:mm */ - @ApiModelProperty(value = "执行时间,格式:HH:mm") - @JsonFormat(pattern = "HH:mm") - private LocalTime executeTime; - - /** 电话推送标识,0:未开启,1:已开启 */ - @ApiModelProperty(value = "电话推送标识,0:未开启,1:已开启") - private Integer phonePushSign; - - /** 电话话术表id */ - @ApiModelProperty(value = "电话话术表id") - private Long phoneId; - - /** 电话模板ID */ - @ApiModelProperty(value = "电话模板ID") - private String phoneTemplateId; - - /** 电话模板名称 */ - @ApiModelProperty(value = "电话模板名称") - private String phoneTemplateName; - - /** 电话内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "电话内容") - private String phoneNodeContent; - - /** 电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY */ - @ApiModelProperty(value = "电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY") - private String phoneRedialTimes; - - /** 电话时间间隔,单位为:分钟 */ - @ApiModelProperty(value = "电话时间间隔,单位为:分钟") - 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") - private String phoneMessageRemind; - - /** 电话短信模板表id */ - @ApiModelProperty(value = "电话短信模板表id") - private Long phoneMessageTemplateId; - - /** 电话短信模板名称 */ - @ApiModelProperty(value = "电话短信模板名称") - private String phoneMessageTemplateName; - - /** 问卷表id */ - @ApiModelProperty(value = "问卷表id") - private Long questionInfoId; - - /** 问卷模板名称 */ - @ApiModelProperty(value = "问卷模板名称") - private String questionnaireName; - - /** 问卷模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "问卷模板内容") - private String questionnaireContent; - - /** 问卷有效期,单位:天 */ - @ApiModelProperty(value = "问卷有效期,单位:天") - private Integer questionExpirationDate; - - /** 宣教文章表id */ - @ApiModelProperty(value = "宣教文章表id") - private Long propagandaInfoId; - - /** 宣教文章模板标题(宣教模板名称) */ - @ApiModelProperty(value = "宣教文章模板标题") - private String propagandaTitle; - - /** 宣教文章内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "宣教文章内容") - private String propagandaContent; - - /** 短信推送标识,0:未开启,1:已开启 */ - @ApiModelProperty(value = "短信推送标识,0:未开启,1:已开启") - private Integer messagePushSign; - - /** 短信模板表id */ - @ApiModelProperty(value = "短信模板表id") - private Long messageTemplateId; - - /** 短信模板名称 */ - @ApiModelProperty(value = "短信模板名称") - private String messageTemplateName; - - /** 短信预览 */ - @ApiModelProperty(value = "短信预览") - private String messagePreview; - - /** 短信节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "短信节点内容") - private String messageNodeContent; - - /** 公众号推送标识,0:未开启,1:已开启 */ - @ApiModelProperty(value = "公众号推送标识,0:未开启,1:已开启") - private Integer officialPushSign; - - /** 公众号模板表id */ - @ApiModelProperty(value = "公众号模板表id") - private Long officialTemplateId; - - /** 公众号模板名称 */ - @ApiModelProperty(value = "公众号模板名称") - private String officialTemplateName; - - /** 公众号提醒内容 */ - @ApiModelProperty(value = "公众号提醒内容") - private String officialRemindContent; - - /** 公众号节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "公众号节点内容") - private String officialNodeContent; - - /** 小程序推送标识,0:未开启,1:已开启 */ - @ApiModelProperty(value = "小程序推送标识,0:未开启,1:已开启") - private Integer appletPushSign; - - /** 小程序模板表id */ - @ApiModelProperty(value = "小程序模板表id") - private Long appletTemplateId; - - /** 小程序模板名称 */ - @ApiModelProperty(value = "小程序模板名称") - private String appletTemplateName; - - /** 小程序提醒内容 */ - @ApiModelProperty(value = "小程序提醒内容") - private String appletRemindContent; - - /** 小程序提示说明 */ - @ApiModelProperty(value = "小程序提示说明") - private String appletPromptDescription; - - /** 小程序节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "小程序节点内容") - private String appletNodeContent; - - /** 人工随访模板表id */ - @ApiModelProperty(value = "人工随访模板表id") - private Long followTemplateId; - - /** 人工随访模板名称 */ - @ApiModelProperty(value = "人工随访模板名称") - private String followTemplateName; - - /** 人工随访模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */ - @ApiModelProperty(value = "人工随访模板内容") - private String followContent; - - /** 节点审核状态,同意:AGREE,不同意:DISAGREE */ - @ApiModelProperty(value = "节点审核状态,同意:AGREE,不同意:DISAGREE") - private String routeCheckStatus; - - /** 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED */ - @ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED") - private String nodeExecuteStatus; -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/PatientTaskVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/PatientTaskVo.java index a00ee251..77d82c27 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/PatientTaskVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/PatientTaskVo.java @@ -121,10 +121,21 @@ public class PatientTaskVo { @JsonFormat(pattern = "yyyy-MM-dd") private LocalDateTime visitDate; + /** + * 出院时间(出院患者),时间格式:yyyy-MM-dd + */ + @ApiModelProperty(value = "出院时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime dischargeTime; + /** 手术名称 */ @ApiModelProperty(value = "手术名称") private String surgicalName; + /** 签约记录表id */ + @ApiModelProperty(value = "签约记录表id") + private Long signPatientRecordId; + /** 签约患者管理任务路径节点id */ @ApiModelProperty(value = "签约患者管理任务路径节点id") private Long manageRouteNodeId; diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageRouteNodeVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageRouteNodeVo.java new file mode 100644 index 00000000..d3c35ca5 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageRouteNodeVo.java @@ -0,0 +1,45 @@ +package com.xinelu.manage.vo.signpatientmanageroutenode; + +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: 查询管理路任务路径节点返回视图类 + * @author: haown + * @create: 2024-04-10 15:40 + **/ +@ApiModel("查询管理路任务路径节点返回视图类") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SignPatientManageRouteNodeVo { + + /** 签约患者管理任务表id */ + @ApiModelProperty(value = "签约患者管理任务表id") + private Long manageRouteId; + + /** 路径名称(任务名称) */ + @ApiModelProperty(value = "路径名称") + private String routeName; + + /** 任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE */ + @ApiModelProperty(value = "任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE") + private String taskCreateType; + + /** 适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE */ + @ApiModelProperty(value = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE") + private String suitRange; + + /** + * 节点列表 + */ + @ApiModelProperty(value = "节点列表") + List nodeList; +} 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 4af2c2cd..1d21f0ab 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 @@ -189,6 +189,11 @@ public class SignPatientListVo { @ApiModelProperty(value = "服务包名称") private String packageName; + /** 服务结束时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "服务结束时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate serviceEndTime; + /** 服务周期 */ @ApiModelProperty(value = "服务周期") private Integer packageTerm; diff --git a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml index 22d2dff0..d70a18b7 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml @@ -77,6 +77,7 @@ #{fieldMark} + order by create_time DESC diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml index a5628a87..3608fb45 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientquestionsubmitresult/PatientQuestionSubmitResultMapper.xml @@ -37,6 +37,8 @@ + + @@ -375,39 +377,85 @@ + + \ 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 index 0afc8613..e49d2be9 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patienttaskexecuterecord/PatientTaskExecuteRecordMapper.xml @@ -111,9 +111,19 @@ pi.admission_time, pi.discharge_time, pi.in_hospital_number, - pi.patient_phone + pi.patient_phone, + spmrn.task_type, + spmrn.route_handle_remark, + CASE + WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id + WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id + WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id + WHEN spmrn.task_type = 'PROPAGANDA_ARTICLE' THEN spmrn.propaganda_info_id + END AS 'templateId', + IF(spmrn.task_type ='TEXT_REMIND',spmrn.text_remind_content,NULL) AS textRemindContent from patient_task_execute_record pter LEFT JOIN patient_info pi ON pi.id = pter.patient_id + LEFT JOIN sign_patient_manage_route_node spmrn ON pter.manage_route_node_id = spmrn.id where pi.del_flag = 0 and pi.patient_name = #{patientName} @@ -130,11 +140,11 @@ and pi.visit_method = #{visitMethod} - - and pter.execute_time <= #{startDate} + + and pter.execute_time >=#{startDate} - - and pter.execute_time >= #{endDate} + + and pter.execute_time <= #{endDate} and pter.manage_route_name like concat('%', #{manageRouteName}, '%') 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 4b533bc9..8287803d 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml @@ -19,6 +19,7 @@ + @@ -40,6 +41,7 @@ questionnaire_status, questionnaire_sort, questionnaire_remark, + question_type, create_by, create_time, update_by, @@ -89,6 +91,9 @@ and questionnaire_remark = #{questionnaireRemark} + + and question_type = #{questionType} + @@ -128,6 +133,8 @@ questionnaire_remark, + question_type, + create_by, create_time, @@ -164,6 +171,8 @@ #{questionnaireRemark}, + #{questionType}, + #{createBy}, #{createTime}, @@ -217,6 +226,9 @@ questionnaire_remark = #{questionnaireRemark}, + question_type = + #{questionType}, + create_by = #{createBy}, @@ -254,10 +266,13 @@ from department dt left join question_info qi on dt.id = qi.department_id - dt.department_name like concat('%',#{departmentName},'%') + and dt.department_name like concat('%',#{departmentName},'%') - qi.questionnaire_status =#{questionnaireStatus} + and qi.questionnaire_status =#{questionnaireStatus} + + + and qi.question_type = #{questionType} GROUP BY dt.id diff --git a/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml index 1c5ae83d..366b49e2 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/residentinfo/ResidentInfoMapper.xml @@ -183,4 +183,18 @@ #{id} + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml index 0a673901..2ac19b57 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml @@ -35,6 +35,7 @@ + @@ -155,7 +156,8 @@ swc2.service_frequency_type, swc2.service_frequency_text, swc2.service_frequency_start, - swc2.service_frequency_end + swc2.service_frequency_end, + swc2.service_sort AS 'serviceFrequencySort' FROM service_way_content swc1 JOIN service_way_content swc2 on swc1.id = swc2.service_content_id @@ -185,7 +187,8 @@ swc1.service_frequency_type, swc1.service_frequency_text, swc1.service_frequency_start, - swc1.service_frequency_end + swc1.service_frequency_end, + swc1.service_sort AS 'serviceFrequencySort' FROM service_way_content swc1 LEFT JOIN service_way_content swc2 ON swc1.service_content_id = swc2.id WHERE swc1.service_type = 'SERVICE_FREQUENCY' diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml index abc1ccb4..8a6943d5 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml @@ -307,7 +307,7 @@ pvr.surgical_name, pi.attending_physician_id, pi.attending_physician_name, - IF(spmr.suit_range = 'IN_THE_HOSPITAL', pi.admission_time, NULL) AS 'admissionTime', + IF(spmr.suit_range = 'IN_THE_HOSPITAL' OR spmr.suit_range = 'DISCHARGE', pi.admission_time, NULL) AS 'admissionTime', CASE WHEN spmr.suit_range = 'OUTPATIENT_SERVICE' THEN pi.visit_date WHEN spmr.suit_range = 'DISCHARGE' THEN pi.discharge_time @@ -318,6 +318,7 @@ WHEN spmr.suit_range = 'OUTPATIENT_SERVICE_DISCHARGE' AND pi.visit_date IS NOT NULL THEN 'OUTPATIENT_SERVICE' WHEN spmr.suit_range = 'OUTPATIENT_SERVICE_DISCHARGE' AND pi.discharge_time IS NOT NULL THEN 'DISCHARGE' END AS 'suitRange', + pter.id AS 'taskExecuteRecordId', pter.execute_time AS 'executeTime', spmr.id AS 'manageRouteId', spmrn.id AS 'manageRouteNodeId', @@ -330,10 +331,12 @@ WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name END AS 'templateName', CASE - WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_id + WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id - END AS 'templateId' + END AS 'templateId', + spmrn.node_execute_status, + spmrn.route_handle_remark FROM sign_patient_manage_route spmr LEFT JOIN sign_patient_manage_route_node spmrn ON spmr.id = spmrn.manage_route_id @@ -342,7 +345,7 @@ LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id pi.del_flag = '0' AND spmr.task_create_type = 'MANUAL_CREATE' - AND spmrn.node_execute_status = 'UNEXECUTED' + AND spmrn.route_check_status = 'AGREE' AND spmrn.task_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP') AND pi.patient_name LIKE concat('%', #{patientName}, '%') @@ -404,7 +407,17 @@ AND pi.attending_physician_name LIKE concat('%',#{attendingPhysicianName}, '%') + + AND spmrn.node_execute_status = #{nodeExecuteStatus} + + + AND pter.execute_time >= #{followStartTime} + + + AND pter.execute_time <= #{followEndTime} + + order by spmr.create_time DESC - + + where id = #{id} + + insert into sign_patient_manage_route_node @@ -583,8 +609,8 @@ patient.address, patient.patient_type, patient.visit_method, patient.attending_physician_id, patient.attending_physician_name, patient.main_diagnosis, patient.hospital_agency_id, patient.hospital_agency_name, patient.campus_agency_id, patient.campus_agency_name, - patient.department_id, patient.department_name,patient.ward_id, patient.ward_name, patient.in_hospital_number, patient.visit_date, - patient.surgical_name, node.id as manageRouteNodeId, node.manage_route_id, node.manage_route_name,node.route_check_status + patient.department_id, patient.department_name,patient.ward_id, patient.ward_name, patient.in_hospital_number, patient.visit_date, patient.discharge_time, + patient.surgical_name,patient.sign_patient_record_id, node.id as manageRouteNodeId, node.manage_route_id, node.manage_route_name,node.route_check_status from sign_patient_manage_route_node node left join sign_patient_manage_route route on node.manage_route_id = route.id left join patient_info patient on route.patient_id = patient.id @@ -595,9 +621,14 @@ and patient.main_diagnosis like concat('%', #{mainDiagnosis}, '%') - - and node.route_check_status = #{routeCheckStatus} - + + + and node.route_check_status = #{routeCheckStatus} + + + and node.route_check_status is null + + and patient.hospital_agency_id = #{hospitalAgencyId} @@ -610,11 +641,11 @@ and patient.ward_id = #{wardId} - - and date_format(patient.visit_date,'%y%m%d') >= date_format(#{visitDateStart},'%y%m%d') + + and date_format(patient.discharge_time,'%y%m%d') >= date_format(#{dischargeTimeStart},'%y%m%d') - - and date_format(patient.visit_date,'%y%m%d') <= date_format(#{visitDateEnd},'%y%m%d') + + and date_format(patient.discharge_time,'%y%m%d') <= date_format(#{dischargeTimeEnd},'%y%m%d') group by patient_id 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 67a94107..6e203f56 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml @@ -411,7 +411,9 @@ left join sign_patient_manage_route route on route.sign_patient_record_id = sign.id sign.del_flag = 0 and sign.id = #{id} + and route.task_create_type = 'MANUAL_MATCHE' + LIMIT 1