问卷修改

This commit is contained in:
zhangheng 2024-12-02 17:56:24 +08:00
parent 1701804e7c
commit eb277f29d6
10 changed files with 142 additions and 18 deletions

View File

@ -0,0 +1,38 @@
package com.xinelu.common.enums;
import lombok.Getter;
/**
* @Description 问卷中是否包含不满意项 整个问卷中是否包含异常项
* @Author zh
* @Date 2024-03-19
*/
@Getter
public enum ContentedAndRemarkableFlagEnum {
/**
* 不满意
*/
DISCONTENTED("DISCONTENTED"),
/**
* 满意
*/
CONTENTED("CONTENTED"),
/**
* 异常的
*/
REMARKABLE("REMARKABLE"),
/**
* 正常的
*/
ROUTINE("ROUTINE"),
;
final private String info;
ContentedAndRemarkableFlagEnum(String info) {
this.info = info;
}
}

View File

@ -102,6 +102,23 @@ public class PatientQuestionOptionResult extends BaseEntity {
@Excel(name = "选项备注")
private String optionRemark;
/**
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
* 2024/12/2
*/
private String contentedFlag;
/**
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
* 2024/12/2
*/
private String remarkableFlag;
/**
* 问卷题目选项表的ID
* 2024/12/2
*/
private String questionSubjectOptionId;
@Override
public String toString() {

View File

@ -139,6 +139,11 @@ public class PatientQuestionSubjectResult extends BaseEntity {
@Excel(name = "题目备注")
private String questionRemark;
/**
* 问卷题目选项表的ID
* 2024/12/2
*/
private String questionSubjectOptionId;
@Override
public String toString() {

View File

@ -168,6 +168,18 @@ public class PatientQuestionSubmitResult extends BaseEntity {
private Long residentId;
/**
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
* 2024/12/2
*/
private String contentedFlag;
/**
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
* 2024/12/2
*/
private String remarkableFlag;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -91,6 +91,18 @@ public class QuestionSubjectOption extends BaseEntity {
*/
private String intent;
/**
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
* 2024/12/2
*/
private String contentedFlag;
/**
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
* 2024/12/2
*/
private String remarkableFlag;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -406,7 +406,9 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
//组装返回数据
List<PatientInfoImport> patientInfoImports = new ArrayList<>(patientInfoImportList);
patientInfoImportVO.setSn(sn);
patientInfoImportVO.setDepartments(departmentList);
if (CollectionUtils.isNotEmpty(departmentList) && departmentList.size() > 0) {
patientInfoImportVO.setDepartments(departmentList);
}
if (CollectionUtils.isNotEmpty(deptAliasVOS)) {
deptAliasVOS = deptAliasVOS.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getDeptAlias())).distinct().collect(Collectors.toList());
patientInfoImportVO.setDeptAliasVOS(deptAliasVOS);

View File

@ -2,6 +2,7 @@ package com.xinelu.manage.service.questioninfo.impl;
import com.xinelu.common.annotation.DataScope;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.ContentedAndRemarkableFlagEnum;
import com.xinelu.common.enums.QuestionnaireStatusEnum;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
@ -150,6 +151,12 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
if (StringUtils.isBlank(questionSubjectOption.getContentedFlag())){
saveQuestionSubjectOption.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
}
if (StringUtils.isBlank(questionSubjectOption.getRemarkableFlag())){
saveQuestionSubjectOption.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
}
saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
saveQuestionSubjectOption.setCreateTime(LocalDateTime.now());
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());

View File

@ -16,19 +16,7 @@ import com.xinelu.common.constant.TaskNodeTypeConstants;
import com.xinelu.common.constant.TaskStatisticsTypeConstants;
import com.xinelu.common.constant.TemplateTypeConstants;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.ErrorStatusEnum;
import com.xinelu.common.enums.NodeExecuteResultStatusEnum;
import com.xinelu.common.enums.NodeExecuteStatusEnum;
import com.xinelu.common.enums.PhoneConnectStatusEnum;
import com.xinelu.common.enums.PhoneDialMethodEnum;
import com.xinelu.common.enums.PhoneMessageRemindEnum;
import com.xinelu.common.enums.PhoneRedialTimesEnum;
import com.xinelu.common.enums.RouteNodeNameEnum;
import com.xinelu.common.enums.ShortMessageTypeEnum;
import com.xinelu.common.enums.SmsErrorCodeEnum;
import com.xinelu.common.enums.TaskContentEnum;
import com.xinelu.common.enums.TaskCreateTypeEnum;
import com.xinelu.common.enums.TaskNodeTypeEnum;
import com.xinelu.common.enums.*;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.AgeUtil;
import com.xinelu.common.utils.SecurityUtils;
@ -449,6 +437,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
patientQuestionSubmitResult.setCreateBy(routeHandlePerson);
patientQuestionSubmitResult.setCreateTime(time);
patientQuestionSubmitResult.setTaskExecuteRecordId(taskExecuteRecordId);
if (StringUtils.isBlank(dto.getContentedFlag())){
patientQuestionSubmitResult.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
}
if (StringUtils.isBlank(dto.getRemarkableFlag())){
patientQuestionSubmitResult.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
}
// 新增患者问卷提交结果
if (patientQuestionSubmitResultMapper.insertPatientQuestionSubmitResult(patientQuestionSubmitResult) <= 0) {
throw new ServiceException("新增患者问卷提交结果失败");
@ -482,6 +476,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
saveQuestionOption.setQuestionSubjectResultId(patientQuestionSubjectResult.getId());
saveQuestionOption.setCreateTime(time);
saveQuestionOption.setCreateBy(routeHandlePerson);
if (StringUtils.isBlank(patientQuestionOptionResult.getContentedFlag())){
saveQuestionOption.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
}
if (StringUtils.isBlank(patientQuestionOptionResult.getRemarkableFlag())){
saveQuestionOption.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
}
saveQuestionSubjectOptions.add(saveQuestionOption);
}
// 新增患者问卷题目选项提交结果

View File

@ -633,6 +633,7 @@
FROM agency a
LEFT JOIN department d ON a.id = d.hospital_agency_id
where a.id = #{hospitalAgencyId}
and d.id is not null
</select>
<update id="updateDepartmentListByIds">

View File

@ -19,6 +19,8 @@
<result property="updateTime" column="update_time"/>
<result property="speechContextText" column="speech_context_text"/>
<result property="intent" column="intent"/>
<result property="contentedFlag" column="contented_flag"/>
<result property="remarkableFlag" column="remarkable_flag"/>
</resultMap>
<sql id="selectQuestionSubjectOptionVo">
@ -35,7 +37,9 @@
update_by,
update_time,
speech_context_text,
intent
intent,
contented_flag,
remarkable_flag
from question_subject_option
</sql>
@ -64,6 +68,12 @@
<if test="optionRemark != null and optionRemark != ''">
and option_remark = #{optionRemark}
</if>
<if test="contentedFlag != null and contentedFlag != ''">
and contented_flag = #{contentedFlag}
</if>
<if test="remarkableFlag != null and remarkableFlag != ''">
and remarkable_flag = #{remarkableFlag}
</if>
</where>
</select>
@ -103,6 +113,10 @@
</if>
<if test="intent != null">intent,
</if>
<if test="contentedFlag != null">contented_flag,
</if>
<if test="remarkableFlag != null">remarkable_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="questionnaireSubjectId != null">#{questionnaireSubjectId},
@ -131,6 +145,10 @@
</if>
<if test="intent != null">#{intent},
</if>
<if test="contentedFlag != null">#{contentedFlag},
</if>
<if test="remarkableFlag != null">#{remarkableFlag},
</if>
</trim>
</insert>
@ -176,6 +194,12 @@
<if test="intent != null">intent =
#{intent},
</if>
<if test="contentedFlag != null">contented_flag =
#{contentedFlag},
</if>
<if test="remarkableFlag != null">remarkable_flag =
#{remarkableFlag},
</if>
</trim>
where id = #{id}
</update>
@ -205,7 +229,9 @@
create_by,
create_time,
speech_context_text,
intent
intent,
contented_flag,
remarkable_flag
) values
<foreach item="QuestionSubjectOption" index="index" collection="list" separator=",">
(
@ -219,7 +245,9 @@
#{QuestionSubjectOption.createBy},
#{QuestionSubjectOption.createTime},
#{QuestionSubjectOption.speechContextText},
#{QuestionSubjectOption.intent}
#{QuestionSubjectOption.intent},
#{QuestionSubjectOption.contentedFlag},
#{QuestionSubjectOption.remarkableFlag}
)
</foreach>
</insert>
@ -239,7 +267,9 @@
update_by,
update_time,
speech_context_text,
intent
intent,
contented_flag,
remarkable_flag
from question_subject_option
<where>
<if test="questionSubjectIds != null and questionSubjectIds.size() > 0">