满意度信息
This commit is contained in:
parent
bef0d29707
commit
f098cd7d26
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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<SatisfactionSurveyVO> list = patientQuestionSubmitResultService.satisfactionSurvey(satisfactionSurvey);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 满意度调查问卷
|
||||
*/
|
||||
@GetMapping("/selectQuestionnaireResult")
|
||||
public AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId) {
|
||||
return patientQuestionSubmitResultService.selectQuestionnaireResult(patientQuestionSubmitResultId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<SatisfactionSurveyVO> selectSatisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey);
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ public interface IPatientQuestionSubjectResultService {
|
||||
* @param id 患者问卷题目提交结果信息主键
|
||||
* @return 患者问卷题目提交结果信息
|
||||
*/
|
||||
public PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id);
|
||||
PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id);
|
||||
|
||||
/**
|
||||
* 查询患者问卷题目提交结果信息列表
|
||||
|
||||
@ -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<SatisfactionSurveyVO> satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey);
|
||||
|
||||
/**
|
||||
* 满意度调查问卷
|
||||
*
|
||||
* @param patientQuestionSubmitResultId 问卷信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId);
|
||||
}
|
||||
|
||||
@ -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<SatisfactionSurveyVO> 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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,6 +118,6 @@ public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteR
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) {
|
||||
return AjaxResult.success(submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId));
|
||||
return AjaxResult.success(submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId, null));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<PatientQuestionSubjectResultVO> subjectResultList;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -37,6 +37,8 @@
|
||||
<result property="submitResulId" column="submitResulId"/>
|
||||
<result property="questionnaireName" column="questionnaire_name"/>
|
||||
<result property="questionnaireDescription" column="questionnaire_description"/>
|
||||
<result property="questionnaireTotalScore" column="questionnaire_total_score"/>
|
||||
<result property="totalScore" column="total_score"/>
|
||||
<collection property="subjectResultList" javaType="java.util.List"
|
||||
resultMap="PatientQuestionSubjectResultResult"/>
|
||||
</resultMap>
|
||||
@ -375,39 +377,85 @@
|
||||
<select id="selectResultByTaskExecuteRecordId"
|
||||
resultType="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO"
|
||||
resultMap="PatientQuestionSubmitResultDTO">
|
||||
select pqsm.id submitResulId,
|
||||
pqsm.questionnaire_name,
|
||||
pqsm.questionnaire_description,
|
||||
pqsj.id subjectResult,
|
||||
pqsj.question_submit_result_id,
|
||||
pqsj.question_info_id,
|
||||
pqsj.question_number,
|
||||
pqsj.question_type,
|
||||
pqsj.question_name,
|
||||
pqsj.question_description,
|
||||
pqsj.write_description,
|
||||
pqsj.fill_blanks_answer,
|
||||
pqsj.option_count,
|
||||
pqsj.whether_score,
|
||||
pqsj.scoring_method,
|
||||
pqsj.scoring_description,
|
||||
pqsj.question_score,
|
||||
pqsj.question_sort,
|
||||
pqsj.question_remark,
|
||||
pqor.id,
|
||||
pqor.question_subject_result_id,
|
||||
pqor.questionnaire_subject_id,
|
||||
pqor.question_name,
|
||||
pqor.option_name,
|
||||
pqor.option_answer,
|
||||
pqor.option_score,
|
||||
pqor.option_choose_sign,
|
||||
pqor.option_submit_answer,
|
||||
pqor.option_sort,
|
||||
pqor.option_remark
|
||||
select
|
||||
pqsm.id submitResulId,
|
||||
pqsm.questionnaire_name,
|
||||
pqsm.questionnaire_description,
|
||||
pqsm.questionnaire_total_score,
|
||||
pqsm.total_score,
|
||||
pqsj.id subjectResult,
|
||||
pqsj.question_submit_result_id,
|
||||
pqsj.question_info_id,
|
||||
pqsj.question_number,
|
||||
pqsj.question_type,
|
||||
pqsj.question_name,
|
||||
pqsj.question_description,
|
||||
pqsj.write_description,
|
||||
pqsj.fill_blanks_answer,
|
||||
pqsj.option_count,
|
||||
pqsj.whether_score,
|
||||
pqsj.scoring_method,
|
||||
pqsj.scoring_description,
|
||||
pqsj.question_score,
|
||||
pqsj.question_sort,
|
||||
pqsj.question_remark,
|
||||
pqor.id,
|
||||
pqor.question_subject_result_id,
|
||||
pqor.questionnaire_subject_id,
|
||||
pqor.question_name,
|
||||
pqor.option_name,
|
||||
pqor.option_answer,
|
||||
pqor.option_score,
|
||||
pqor.option_choose_sign,
|
||||
pqor.option_submit_answer,
|
||||
pqor.option_sort,
|
||||
pqor.option_remark
|
||||
FROM patient_question_submit_result pqsm
|
||||
LEFT JOIN patient_question_subject_result pqsj ON pqsm.id = pqsj.question_submit_result_id
|
||||
LEFT JOIN patient_question_option_result pqor ON pqor.question_subject_result_id = pqsj.id
|
||||
where pqsm.task_execute_record_id = #{taskExecuteRecordId}
|
||||
LEFT JOIN patient_question_subject_result pqsj ON pqsm.id = pqsj.question_submit_result_id
|
||||
LEFT JOIN patient_question_option_result pqor ON pqor.question_subject_result_id = pqsj.id
|
||||
<where>
|
||||
<if test="taskExecuteRecordId != null">
|
||||
and pqsm.task_execute_record_id = #{taskExecuteRecordId}
|
||||
</if>
|
||||
<if test="patientQuestionSubmitResultId != null">
|
||||
and pqsm.id = #{patientQuestionSubmitResultId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSatisfactionSurvey" resultType="com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO">
|
||||
select
|
||||
pqsr.id patientQuestionSubmitResultId,
|
||||
pqsr.patient_name,
|
||||
pi.patient_phone,
|
||||
pi.birth_date,
|
||||
pi.card_no,
|
||||
pi.sex,
|
||||
pi.patient_type,
|
||||
pi.sign_status,
|
||||
pi.visit_method,
|
||||
pi.patient_health_state,
|
||||
pi.hospital_agency_name,
|
||||
pi.department_name
|
||||
from patient_question_submit_result pqsr
|
||||
LEFT JOIN question_info qi on pqsr.question_info_id = qi.id
|
||||
LEFT JOIN patient_info pi ON pi.id = pqsr.patient_id
|
||||
where
|
||||
pi.del_flag = 0
|
||||
<if test="questionType != null and questionType != ''">
|
||||
and qi.question_type = #{questionType}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and pi.patient_name like concat('%', #{patientName}, '%')
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">
|
||||
and pi.patient_phone like concat('%', #{patientPhone}, '%')
|
||||
</if>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and pi.card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="sex != null and sex != ''">
|
||||
and pi.sex = #{sex}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user