人工随访处理
This commit is contained in:
parent
763dbb5eb7
commit
c2dc74922a
@ -8,6 +8,7 @@ import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
@ -102,4 +103,21 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人工随访患者基本信息
|
||||
*/
|
||||
@GetMapping("/selectFollowPatientInfo/{id}")
|
||||
public AjaxResult selectFollowPatientInfo(@PathVariable Long id) {
|
||||
return signPatientManageRouteService.selectFollowPatientInfo(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工随访代办处理
|
||||
*/
|
||||
@PostMapping("/addPatientQuestionResult")
|
||||
public AjaxResult addPatientQuestionResult(@RequestBody PatientQuestionSubmitResultDTO dto) {
|
||||
return signPatientManageRouteService.addPatientQuestionResult(dto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -45,8 +45,8 @@ public class ManualFollowUpDTO {
|
||||
@ApiModelProperty(value = "所属病区id")
|
||||
private Long wardId;
|
||||
|
||||
@ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL")
|
||||
private String visitMethod;
|
||||
@ApiModelProperty(value = "患者类型,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT")
|
||||
private String patientType;
|
||||
|
||||
@ApiModelProperty(value = "就诊流水号")
|
||||
private String visitSerialNumber;
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package com.xinelu.manage.dto.patientquestionsubjectresult;
|
||||
|
||||
import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult;
|
||||
import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 患者问卷题目提交结果信息DTO
|
||||
*
|
||||
* @author : youxilong
|
||||
* @date : 2024/4/7 13:54
|
||||
*/
|
||||
@Data
|
||||
public class PatientQuestionSubjectResultDTO extends PatientQuestionSubjectResult {
|
||||
|
||||
/**
|
||||
* 患者问卷题目选项提交结果信息
|
||||
*/
|
||||
private List<PatientQuestionOptionResult> optionResultList;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.xinelu.manage.dto.patientquestionsubmitresult;
|
||||
|
||||
import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult;
|
||||
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 患者问卷提交结果信息表DTO
|
||||
*
|
||||
* @author : youxilong
|
||||
* @date : 2024/4/7 13:48
|
||||
*/
|
||||
@Data
|
||||
public class PatientQuestionSubmitResultDTO extends PatientQuestionSubmitResult {
|
||||
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 患者问卷题目提交结果信息
|
||||
*/
|
||||
private List<PatientQuestionSubjectResultDTO> subjectResultDTOList;
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.manage.mapper.patientquestionsubmitresult;
|
||||
|
||||
import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -64,7 +64,7 @@ public interface PatientQuestionSubmitResultMapper {
|
||||
* 根据任务执行记录查询患者问卷信息
|
||||
*
|
||||
* @param taskExecuteRecordId 患者管理任务执行记录表id
|
||||
* @return PatientQuestionSubmitResultDTO
|
||||
* @return PatientQuestionSubmitResultVO
|
||||
*/
|
||||
PatientQuestionSubmitResultDTO selectResultByTaskExecuteRecordId(Long taskExecuteRecordId);
|
||||
PatientQuestionSubmitResultVO selectResultByTaskExecuteRecordId(Long taskExecuteRecordId);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.mapper.signpatientmanageroute;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
|
||||
import java.util.List;
|
||||
@ -69,4 +70,10 @@ public interface SignPatientManageRouteMapper {
|
||||
*/
|
||||
List<ManualFollowUpVO> selectManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO);
|
||||
|
||||
/**
|
||||
* 查询人工随访患者基本信息
|
||||
* @param id 签约患者管理任务表id
|
||||
* @return ManualFollowPatientVO 人工随访基本信息VO
|
||||
*/
|
||||
ManualFollowPatientVO selectFollowPatientInfo(Long id);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteR
|
||||
* 根据任务执行记录查询患者问卷信息
|
||||
*
|
||||
* @param taskExecuteRecordId 患者管理任务执行记录表id
|
||||
* @return PatientQuestionSubmitResultDTO
|
||||
* @return PatientQuestionSubmitResultVO
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) {
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.signpatientmanageroute;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
|
||||
@ -71,4 +72,17 @@ public interface ISignPatientManageRouteService {
|
||||
*/
|
||||
List<ManualFollowUpVO> selectManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO);
|
||||
|
||||
/**
|
||||
* 查询人工随访患者基本信息
|
||||
* @param id 签约患者管理任务表id
|
||||
* @return 人工随访患者基本信息
|
||||
*/
|
||||
AjaxResult selectFollowPatientInfo(Long id);
|
||||
|
||||
/**
|
||||
* 人工随访代办处理
|
||||
* @param dto 患者问卷提交结果信息表DTO
|
||||
* @return 结果
|
||||
*/
|
||||
AjaxResult addPatientQuestionResult(PatientQuestionSubmitResultDTO dto);
|
||||
}
|
||||
|
||||
@ -1,19 +1,24 @@
|
||||
package com.xinelu.manage.service.signpatientmanageroute.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.AgeUtil;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.dto.manualfollowup.ManualFollowUpDTO;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO;
|
||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
@ -141,4 +146,31 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
public List<ManualFollowUpVO> selectManualFollowUpList(ManualFollowUpDTO manualFollowUpDTO) {
|
||||
return signPatientManageRouteMapper.selectManualFollowUpList(manualFollowUpDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人工随访患者基本信息
|
||||
* @param id 签约患者管理任务表id
|
||||
* @return 人工随访患者基本信息VO
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectFollowPatientInfo(Long id) {
|
||||
ManualFollowPatientVO patientVO = signPatientManageRouteMapper.selectFollowPatientInfo(id);
|
||||
// 设置年龄
|
||||
patientVO.setAge(AgeUtil.getAgeMonth(patientVO.getBirthDate().toString()));
|
||||
if (ObjectUtils.isEmpty(patientVO)){
|
||||
return AjaxResult.error("患者信息不存在!");
|
||||
}
|
||||
return AjaxResult.success(patientVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工随访代办处理
|
||||
* @param dto 患者问卷提交结果信息表DTO
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult addPatientQuestionResult(PatientQuestionSubmitResultDTO dto) {
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.vo.manualfollowup;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 人工随访患者基本信息VO
|
||||
* @author : youxilong
|
||||
* @date : 2024/4/7 8:52
|
||||
*/
|
||||
@Data
|
||||
public class ManualFollowPatientVO {
|
||||
|
||||
/**
|
||||
* 居民信息表id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者信息表id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String patientName;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "患者年龄")
|
||||
private Long age;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty(value = "患者电话")
|
||||
private String patientPhone;
|
||||
|
||||
@ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate birthDate;
|
||||
|
||||
@ApiModelProperty(value = "家属电话")
|
||||
private String familyMemberPhone;
|
||||
|
||||
@ApiModelProperty(value = "住址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "患者个人头像图片路径")
|
||||
private String avatarPictureUrl;
|
||||
|
||||
@ApiModelProperty(value = "所属服务包表id")
|
||||
private String servicePackageId;
|
||||
|
||||
@ApiModelProperty(value = "服务包名称")
|
||||
private String packageName;
|
||||
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
package com.xinelu.manage.vo.manualfollowup;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -16,6 +15,22 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class ManualFollowUpVO {
|
||||
|
||||
/**
|
||||
* 签约患者管理任务id
|
||||
*/
|
||||
private Long manageRouteId;
|
||||
|
||||
@ApiModelProperty(value = "路径名称(任务名称)")
|
||||
private String manageRouteName;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务节点id
|
||||
*/
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
@ApiModelProperty(value = "管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION,就诊/出院后:AFTER_VISIT_DISCHARGE,术前:PREOPERATIVE,术后:POSTOPERATIVE")
|
||||
private String routeNodeName;
|
||||
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
private String patientName;
|
||||
|
||||
@ -67,8 +82,8 @@ public class ManualFollowUpVO {
|
||||
@ApiModelProperty(value = "主治医生姓名")
|
||||
private String attendingPhysicianName;
|
||||
|
||||
@ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL")
|
||||
private String visitMethod;
|
||||
@ApiModelProperty(value = "患者类型,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT")
|
||||
private String patientType;
|
||||
|
||||
@ApiModelProperty(value = "入院时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@ -15,7 +15,7 @@ import java.util.List;
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PatientQuestionSubjectResultDTO extends PatientQuestionSubjectResult {
|
||||
public class PatientQuestionSubjectResultVO extends PatientQuestionSubjectResult {
|
||||
|
||||
/*
|
||||
* 患者问卷题目提交结果信息对象id
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.manage.vo.patientquestionsubmitresult;
|
||||
|
||||
|
||||
import com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
||||
import com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectResultVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -14,7 +14,7 @@ import java.util.List;
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
@Data
|
||||
public class PatientQuestionSubmitResultDTO {
|
||||
public class PatientQuestionSubmitResultVO {
|
||||
|
||||
private Long submitResulId;
|
||||
/**
|
||||
@ -29,5 +29,5 @@ public class PatientQuestionSubmitResultDTO {
|
||||
@ApiModelProperty(value = "问卷说明")
|
||||
private String questionnaireDescription;
|
||||
|
||||
List<PatientQuestionSubjectResultDTO> subjectResultList;
|
||||
List<PatientQuestionSubjectResultVO> subjectResultList;
|
||||
}
|
||||
@ -32,7 +32,7 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultDTO"
|
||||
<resultMap type="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO"
|
||||
id="PatientQuestionSubmitResultDTO">
|
||||
<result property="submitResulId" column="submitResulId"/>
|
||||
<result property="questionnaireName" column="questionnaire_name"/>
|
||||
@ -40,7 +40,7 @@
|
||||
<collection property="subjectResultList" javaType="java.util.List"
|
||||
resultMap="PatientQuestionSubjectResultResult"/>
|
||||
</resultMap>
|
||||
<resultMap type="com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectResultDTO"
|
||||
<resultMap type="com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectResultVO"
|
||||
id="PatientQuestionSubjectResultResult">
|
||||
<result property="subjectResultId" column="subjectResultId"/>
|
||||
<result property="questionSubmitResultId" column="question_submit_result_id"/>
|
||||
@ -373,7 +373,7 @@
|
||||
</delete>
|
||||
|
||||
<select id="selectResultByTaskExecuteRecordId"
|
||||
resultType="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultDTO"
|
||||
resultType="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO"
|
||||
resultMap="PatientQuestionSubmitResultDTO">
|
||||
select pqsm.id submitResulId,
|
||||
pqsm.questionnaire_name,
|
||||
|
||||
@ -113,10 +113,14 @@
|
||||
pvr.surgical_name,
|
||||
pi.attending_physician_id,
|
||||
pi.attending_physician_name,
|
||||
pi.visit_method,
|
||||
pi.patient_type,
|
||||
IF(pi.visit_method = 'OUTPATIENT_SERVICE',NULL,pi.admission_time) AS 'admissionTime',
|
||||
IF(pi.visit_method = 'OUTPATIENT_SERVICE',pi.visit_date,pi.discharge_time) AS 'visitOrDischargeTime',
|
||||
pter.execute_time AS 'executeTime',
|
||||
spmr.id AS 'manageRouteId',
|
||||
spmrn.id AS 'manageRouteNodeId',
|
||||
spmrn.manage_route_name AS 'manageRouteName',
|
||||
spmrn.route_node_name AS 'routeNodeName',
|
||||
spmrn.task_type,
|
||||
CASE
|
||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_name
|
||||
@ -135,7 +139,8 @@
|
||||
LEFT JOIN patient_info pi ON spmr.patient_id = pi.id
|
||||
LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id
|
||||
<where>
|
||||
pi.del_flag = '0' AND spmrn.node_execute_status = 'UNEXECUTED'
|
||||
pi.del_flag = '0' AND spmr.task_create_type = 'MANUAL_CREATE'
|
||||
AND spmrn.node_execute_status = 'UNEXECUTED'
|
||||
AND spmrn.task_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP')
|
||||
<if test="patientName != null and patientName != ''">
|
||||
AND pi.patient_name LIKE concat('%', #{patientName}, '%')
|
||||
@ -155,8 +160,8 @@
|
||||
<if test="wardId != null">
|
||||
AND pi.ward_id = #{wardId}
|
||||
</if>
|
||||
<if test="visitMethod != null and visitMethod != ''">
|
||||
AND pi.visit_method = #{visitMethod}
|
||||
<if test="patientType != null and patientType != ''">
|
||||
AND pi.patient_type = #{patientType}
|
||||
</if>
|
||||
<if test="visitSerialNumber != null and visitSerialNumber != ''">
|
||||
AND pi.visit_serial_number LIKE concat('%', #{visitSerialNumber}, '%')
|
||||
@ -191,6 +196,30 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectFollowPatientInfo"
|
||||
resultType="com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO">
|
||||
SELECT
|
||||
ri.id,
|
||||
ri.patient_name,
|
||||
ri.patient_phone,
|
||||
ri.family_member_phone,
|
||||
ri.birth_date,
|
||||
ri.card_no,
|
||||
ri.sex,
|
||||
ri.address,
|
||||
ri.avatar_picture_url,
|
||||
p.id AS 'patientId',
|
||||
spmr.service_package_id,
|
||||
spmr.package_name
|
||||
FROM
|
||||
sign_patient_manage_route spmr
|
||||
LEFT JOIN patient_info p ON spmr.patient_id = p.id
|
||||
LEFT JOIN resident_info ri ON p.resident_id = ri.id
|
||||
WHERE
|
||||
p.del_flag = 0
|
||||
AND ri.del_flag = 0 AND spmr.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSignPatientManageRoute" parameterType="com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into sign_patient_manage_route
|
||||
|
||||
Loading…
Reference in New Issue
Block a user