问卷新增字段
This commit is contained in:
parent
efde030176
commit
4c44424fbf
@ -166,4 +166,6 @@ public class PatientPreHospitalization extends BaseEntity {
|
||||
@ApiModelProperty("删除标识,0:未删除,1:已删除")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ public class PatientQuestionOptionResult extends BaseEntity {
|
||||
* 问卷题目选项表的ID
|
||||
* 2024/12/2
|
||||
*/
|
||||
private String questionSubjectOptionId;
|
||||
private Long questionSubjectOptionId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -143,7 +143,7 @@ public class PatientQuestionSubjectResult extends BaseEntity {
|
||||
* 问卷题目选项表的ID
|
||||
* 2024/12/2
|
||||
*/
|
||||
private String questionSubjectOptionId;
|
||||
private Long questionSubjectId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -7,18 +7,9 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
||||
import com.xinelu.common.config.SystemBusinessConfig;
|
||||
import com.xinelu.common.constant.AiobTaskTypeContant;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.constant.PhoneMessageRemindConstants;
|
||||
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||
import com.xinelu.common.constant.TaskStatisticsTypeConstants;
|
||||
import com.xinelu.common.constant.*;
|
||||
import com.xinelu.common.core.redis.RedisCache;
|
||||
import com.xinelu.common.enums.ErrorStatusEnum;
|
||||
import com.xinelu.common.enums.NodeExecuteResultStatusEnum;
|
||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
||||
import com.xinelu.common.enums.PhoneRedialTimesEnum;
|
||||
import com.xinelu.common.enums.TaskNodeTypeEnum;
|
||||
import com.xinelu.common.enums.*;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
@ -36,12 +27,7 @@ import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
|
||||
import com.xinelu.manage.domain.textmessage.TextMessage;
|
||||
import com.xinelu.manage.dto.aiob.ActualTimeTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.AiobRecord;
|
||||
import com.xinelu.manage.dto.aiob.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CustomerInfoDto;
|
||||
import com.xinelu.manage.dto.aiob.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.TaskCallbackDataDto;
|
||||
import com.xinelu.manage.dto.aiob.*;
|
||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||
@ -68,41 +54,29 @@ import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRo
|
||||
import com.xinelu.manage.vo.aiob.ImportTaskVo;
|
||||
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo;
|
||||
import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: 百度客悦·智能外呼平台Service实现
|
||||
* @author: haown
|
||||
@ -653,7 +627,20 @@ public class AIOBServiceImpl implements IAIOBService {
|
||||
patientQuestionOptionResult.setQuestionSubjectResultId(patientQuestionSubjectResult.getId());
|
||||
patientQuestionOptionResults.add(patientQuestionOptionResult);
|
||||
});
|
||||
patientQuestionOptionResultMapper.saveQuestionOptionList(patientQuestionOptionResults);
|
||||
//判断问卷 满意项与异常项
|
||||
if (CollectionUtils.isNotEmpty(patientQuestionOptionResults)) {
|
||||
List<PatientQuestionOptionResult> remarkableFlag = patientQuestionOptionResults.stream().filter(Objects::nonNull).filter(item -> org.apache.commons.lang3.StringUtils.isBlank(item.getRemarkableFlag()) && Objects.nonNull(item.getOptionChooseSign()) && item.getOptionChooseSign().equals(0) && ContentedAndRemarkableFlagEnum.REMARKABLE.getInfo().equals(item.getRemarkableFlag())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(remarkableFlag)) {
|
||||
patientQuestionSubmitResult.setRemarkableFlag(ContentedAndRemarkableFlagEnum.REMARKABLE.getInfo());
|
||||
}
|
||||
List<PatientQuestionOptionResult> contentedFlag = patientQuestionOptionResults.stream().filter(Objects::nonNull).filter(item -> org.apache.commons.lang3.StringUtils.isBlank(item.getContentedFlag()) && Objects.nonNull(item.getOptionChooseSign()) && item.getOptionChooseSign().equals(0) && ContentedAndRemarkableFlagEnum.DISCONTENTED.getInfo().equals(item.getRemarkableFlag())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(contentedFlag)) {
|
||||
patientQuestionSubmitResult.setContentedFlag(ContentedAndRemarkableFlagEnum.DISCONTENTED.getInfo());
|
||||
}
|
||||
}
|
||||
questionSubmitResultMapper.updatePatientQuestionSubmitResult(patientQuestionSubmitResult);
|
||||
|
||||
patientQuestionOptionResultMapper.saveQuestionOptionList(patientQuestionOptionResults);
|
||||
totalScore[0] = totalScore[0].add(questionSubjectVO.getQuestionScore() == null ? BigDecimal.ZERO : questionSubjectVO.getQuestionScore());
|
||||
} else {
|
||||
// 没问到问卷中的问题,则保存空问题+空选项
|
||||
|
||||
@ -10,11 +10,7 @@ import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
import com.xinelu.common.annotation.DataScope;
|
||||
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
||||
import com.xinelu.common.constant.TaskContentConstants;
|
||||
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||
import com.xinelu.common.constant.TaskNodeTypeConstants;
|
||||
import com.xinelu.common.constant.TaskStatisticsTypeConstants;
|
||||
import com.xinelu.common.constant.TemplateTypeConstants;
|
||||
import com.xinelu.common.constant.*;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.*;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
@ -78,17 +74,6 @@ import com.xinelu.manage.vo.specialdiseasenode.RouteTaskAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo;
|
||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@ -97,6 +82,13 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径Service业务层处理
|
||||
@ -434,15 +426,23 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
Long taskExecuteRecordId = insertPatientTaskExecuteRecord(dto, routeHandlePerson, time);
|
||||
PatientQuestionSubmitResult patientQuestionSubmitResult = new PatientQuestionSubmitResult();
|
||||
BeanUtils.copyBeanProp(patientQuestionSubmitResult, dto);
|
||||
List<PatientQuestionOptionResultDTO> patientQuestionOptionResultsFlag = new ArrayList<>();
|
||||
patientQuestionSubmitResult.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
|
||||
patientQuestionSubmitResult.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
|
||||
dto.getSubjectResultDTOList().forEach(item -> patientQuestionOptionResultsFlag.addAll(item.getOptionResultList()));
|
||||
if (CollectionUtils.isNotEmpty(patientQuestionOptionResultsFlag)) {
|
||||
List<PatientQuestionOptionResultDTO> remarkableFlag = patientQuestionOptionResultsFlag.stream().filter(Objects::nonNull).filter(item -> StringUtils.isBlank(item.getRemarkableFlag()) && Objects.nonNull(item.getOptionChooseSign()) && item.getOptionChooseSign().equals(0) && ContentedAndRemarkableFlagEnum.REMARKABLE.getInfo().equals(item.getRemarkableFlag())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(remarkableFlag)) {
|
||||
patientQuestionSubmitResult.setRemarkableFlag(ContentedAndRemarkableFlagEnum.REMARKABLE.getInfo());
|
||||
}
|
||||
List<PatientQuestionOptionResultDTO> contentedFlag = patientQuestionOptionResultsFlag.stream().filter(Objects::nonNull).filter(item -> StringUtils.isBlank(item.getContentedFlag()) && Objects.nonNull(item.getOptionChooseSign()) && item.getOptionChooseSign().equals(0) && ContentedAndRemarkableFlagEnum.DISCONTENTED.getInfo().equals(item.getRemarkableFlag())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(contentedFlag)) {
|
||||
patientQuestionSubmitResult.setContentedFlag(ContentedAndRemarkableFlagEnum.DISCONTENTED.getInfo());
|
||||
}
|
||||
}
|
||||
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("新增患者问卷提交结果失败");
|
||||
@ -459,6 +459,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
saveQuestionSubject.setQuestionSubmitResultId(patientQuestionSubmitResult.getId());
|
||||
saveQuestionSubject.setCreateBy(routeHandlePerson);
|
||||
saveQuestionSubject.setCreateTime(time);
|
||||
saveQuestionSubject.setQuestionSubjectId(questionSubjectResult.getId());
|
||||
patientQuestionSubjectResults.add(saveQuestionSubject);
|
||||
patientQuestionOptionResults.addAll(questionSubjectResult.getOptionResultList());
|
||||
}
|
||||
@ -476,12 +477,14 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
saveQuestionOption.setQuestionSubjectResultId(patientQuestionSubjectResult.getId());
|
||||
saveQuestionOption.setCreateTime(time);
|
||||
saveQuestionOption.setCreateBy(routeHandlePerson);
|
||||
if (StringUtils.isBlank(patientQuestionOptionResult.getContentedFlag())){
|
||||
//2024-12-4
|
||||
if (StringUtils.isBlank(patientQuestionOptionResult.getContentedFlag())) {
|
||||
saveQuestionOption.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
|
||||
}
|
||||
if (StringUtils.isBlank(patientQuestionOptionResult.getRemarkableFlag())){
|
||||
if (StringUtils.isBlank(patientQuestionOptionResult.getRemarkableFlag())) {
|
||||
saveQuestionOption.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
|
||||
}
|
||||
saveQuestionOption.setQuestionSubjectOptionId(patientQuestionOptionResult.getId());
|
||||
saveQuestionSubjectOptions.add(saveQuestionOption);
|
||||
}
|
||||
// 新增患者问卷题目选项提交结果
|
||||
@ -500,7 +503,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @param time 时间
|
||||
* @param b 状态
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
public void shortMessageSendRecordExtracted(PatientQuestionSubmitResultDTO dto, LocalDateTime time, Boolean b, String createBy) {
|
||||
ShortMessageSendRecord shortMessageSendRecord = new ShortMessageSendRecord();
|
||||
shortMessageSendRecord.setPatientId(dto.getPatientId());
|
||||
|
||||
@ -67,4 +67,7 @@ public class PatientPortaitVo {
|
||||
|
||||
@ApiModelProperty("复诊信息")
|
||||
private List<JSONObject> consultationInfo;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
}
|
||||
|
||||
@ -47,6 +47,18 @@ public class PatientQuestionSubmitResultVO {
|
||||
@ApiModelProperty(value = "问卷总得分,根据患者提交问卷得出的分值")
|
||||
private BigDecimal totalScore;
|
||||
|
||||
/**
|
||||
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
|
||||
* 2024/12/2
|
||||
*/
|
||||
private String contentedFlag;
|
||||
|
||||
/**
|
||||
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
|
||||
* 2024/12/2
|
||||
*/
|
||||
private String remarkableFlag;
|
||||
|
||||
|
||||
List<PatientQuestionSubjectResultVO> subjectResultList;
|
||||
}
|
||||
|
||||
@ -90,4 +90,7 @@ public class SatisfactionSurveyVO {
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室名称")
|
||||
private String departmentName;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
}
|
||||
|
||||
@ -183,4 +183,7 @@ public class PatientVisitRecordVo {
|
||||
@ApiModelProperty(value = "画像审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime portaitCheckDate;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
}
|
||||
|
||||
@ -212,4 +212,7 @@ public class SignPatientListVo {
|
||||
|
||||
@ApiModelProperty(value = "服务周期单位")
|
||||
private String packageTermUnit;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer age;
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@
|
||||
select
|
||||
p.id,p.patient_id,patient.patient_name,
|
||||
patient.patient_phone,patient.card_no,patient.sex,
|
||||
patient.birth_date,patient.family_member_phone,patient.address,
|
||||
patient.birth_date,patient.family_member_phone,patient.address,patient.age,
|
||||
p.main_diagnosis,p.hospital_agency_id,p.hospital_agency_name,
|
||||
p.campus_agency_id,p.campus_agency_name,
|
||||
p.department_id,p.department_name,p.ward_id,p.ward_name,
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="contentedFlag" column="contented_flag"/>
|
||||
<result property="remarkableFlag" column="remarkable_flag"/>
|
||||
<result property="questionSubjectOptionId" column="question_subject_option_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPatientQuestionOptionResultVo">
|
||||
@ -37,7 +40,10 @@
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
update_time,
|
||||
contented_flag,
|
||||
remarkable_flag,
|
||||
question_subject_option_id
|
||||
from patient_question_option_result
|
||||
</sql>
|
||||
|
||||
@ -75,6 +81,15 @@
|
||||
<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>
|
||||
<if test="questionSubjectOptionId != null and questionSubjectOptionId != ''">
|
||||
and question_subject_option_id = #{questionSubjectOptionId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -116,6 +131,12 @@
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="contentedFlag != null">contented_flag,
|
||||
</if>
|
||||
<if test="remarkableFlag != null">remarkable_flag,
|
||||
</if>
|
||||
<if test="questionSubjectOptionId != null">question_subject_option_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionSubjectResultId != null">#{questionSubjectResultId},
|
||||
@ -146,6 +167,12 @@
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="contentedFlag != null">#{contentedFlag},
|
||||
</if>
|
||||
<if test="remarkableFlag != null">#{remarkableFlag},
|
||||
</if>
|
||||
<if test="questionSubjectOptionId != null">#{questionSubjectOptionId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -162,7 +189,10 @@
|
||||
option_sort,
|
||||
option_remark,
|
||||
create_by,
|
||||
create_time
|
||||
create_time,
|
||||
contented_flag,
|
||||
remarkable_flag,
|
||||
question_subject_option_id
|
||||
) values
|
||||
<foreach item="QuestionSubjectOption" index="index" collection="list" separator=",">
|
||||
(
|
||||
@ -177,7 +207,10 @@
|
||||
#{QuestionSubjectOption.optionSort},
|
||||
#{QuestionSubjectOption.optionRemark},
|
||||
#{QuestionSubjectOption.createBy},
|
||||
#{QuestionSubjectOption.createTime}
|
||||
#{QuestionSubjectOption.createTime},
|
||||
#{QuestionSubjectOption.contentedFlag},
|
||||
#{QuestionSubjectOption.remarkableFlag},
|
||||
#{QuestionSubjectOption.questionSubjectOptionId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
@ -227,6 +260,15 @@
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="contentedFlag != null">contented_flag =
|
||||
#{contentedFlag},
|
||||
</if>
|
||||
<if test="remarkableFlag != null">remarkable_flag =
|
||||
#{remarkableFlag},
|
||||
</if>
|
||||
<if test="questionSubjectOptionId != null">question_subject_option_id =
|
||||
#{questionSubjectOptionId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="questionSubjectId" column="question_subject_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPatientQuestionSubjectResultVo">
|
||||
@ -47,7 +48,8 @@
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
update_time,
|
||||
question_subject_id
|
||||
from patient_question_subject_result
|
||||
</sql>
|
||||
|
||||
@ -100,6 +102,9 @@
|
||||
<if test="questionRemark != null and questionRemark != ''">
|
||||
and question_remark = #{questionRemark}
|
||||
</if>
|
||||
<if test="questionSubjectId != null and questionSubjectId != ''">
|
||||
and question_subject_id = #{questionSubjectId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -151,7 +156,9 @@
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<if test="questionSubjectId != null">question_subject_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionSubmitResultId != null">#{questionSubmitResultId},
|
||||
</if>
|
||||
@ -191,6 +198,8 @@
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="questionSubjectId != null">#{questionSubjectId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -213,7 +222,8 @@
|
||||
question_sort,
|
||||
question_remark,
|
||||
create_by,
|
||||
create_time
|
||||
create_time,
|
||||
question_subject_id
|
||||
) values
|
||||
<foreach item="QuestionSubject" index="index" collection="list" separator=",">
|
||||
(
|
||||
@ -233,7 +243,8 @@
|
||||
#{QuestionSubject.questionSort},
|
||||
#{QuestionSubject.questionRemark},
|
||||
#{QuestionSubject.createBy},
|
||||
#{QuestionSubject.createTime}
|
||||
#{QuestionSubject.createTime},
|
||||
#{QuestionSubject.questionSubjectId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
@ -298,6 +309,9 @@
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="questionSubjectId != null">question_subject_id =
|
||||
#{questionSubjectId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="contentedFlag" column="contented_flag"/>
|
||||
<result property="remarkableFlag" column="remarkable_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO"
|
||||
@ -39,6 +41,8 @@
|
||||
<result property="questionnaireDescription" column="questionnaire_description"/>
|
||||
<result property="questionnaireTotalScore" column="questionnaire_total_score"/>
|
||||
<result property="totalScore" column="total_score"/>
|
||||
<result property="contentedFlag" column="contented_flag"/>
|
||||
<result property="remarkableFlag" column="remarkable_flag"/>
|
||||
<collection property="subjectResultList" javaType="java.util.List"
|
||||
resultMap="PatientQuestionSubjectResultResult"/>
|
||||
</resultMap>
|
||||
@ -60,6 +64,7 @@
|
||||
<result property="questionScore" column="question_score"/>
|
||||
<result property="questionSort" column="question_sort"/>
|
||||
<result property="questionRemark" column="question_remark"/>
|
||||
<result property="questionSubjectId" column="question_subject_id"/>
|
||||
<collection property="optionResults" javaType="java.util.List"
|
||||
resultMap="PatientQuestionOptionResultResult"/>
|
||||
</resultMap>
|
||||
@ -76,6 +81,9 @@
|
||||
<result property="optionSubmitAnswer" column="option_submit_answer"/>
|
||||
<result property="optionSort" column="option_sort"/>
|
||||
<result property="optionRemark" column="option_remark"/>
|
||||
<result property="contentedFlag" column="contented_flag"/>
|
||||
<result property="remarkableFlag" column="remarkable_flag"/>
|
||||
<result property="questionSubjectOptionId" column="question_subject_option_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPatientQuestionSubmitResultVo">
|
||||
@ -103,7 +111,9 @@
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
update_time,
|
||||
contented_flag,
|
||||
remarkable_flag
|
||||
from patient_question_submit_result
|
||||
</sql>
|
||||
|
||||
@ -168,6 +178,12 @@
|
||||
<if test="totalScore != null ">
|
||||
and total_score = #{totalScore}
|
||||
</if>
|
||||
<if test="contentedFlag != null ">
|
||||
and contented_flag = #{contentedFlag}
|
||||
</if>
|
||||
<if test="remarkableFlag != null ">
|
||||
and remarkable_flag = #{remarkableFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -231,6 +247,10 @@
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="contentedFlag != null">contented_flag,
|
||||
</if>
|
||||
<if test="remarkableFlag != null">remarkable_flag,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskExecuteRecordId != null">#{taskExecuteRecordId},
|
||||
@ -283,6 +303,10 @@
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="contentedFlag != null">#{contentedFlag},
|
||||
</if>
|
||||
<if test="remarkableFlag != null">#{remarkableFlag},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -361,6 +385,12 @@
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="contentedFlag != null">contented_flag =
|
||||
#{contentedFlag},
|
||||
</if>
|
||||
<if test="remarkableFlag != null">remarkable_flag =
|
||||
#{remarkableFlag},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -387,6 +417,8 @@
|
||||
pqsm.questionnaire_description,
|
||||
pqsm.questionnaire_total_score,
|
||||
pqsm.total_score,
|
||||
pqsm.contented_flag,
|
||||
pqsm.remarkable_flag,
|
||||
pqsj.id subjectResult,
|
||||
pqsj.question_submit_result_id,
|
||||
pqsj.question_info_id,
|
||||
@ -403,6 +435,7 @@
|
||||
pqsj.question_score,
|
||||
pqsj.question_sort,
|
||||
pqsj.question_remark,
|
||||
pqsj.question_subject_id,
|
||||
pqor.id,
|
||||
pqor.question_subject_result_id,
|
||||
pqor.questionnaire_subject_id,
|
||||
@ -413,7 +446,10 @@
|
||||
pqor.option_choose_sign,
|
||||
pqor.option_submit_answer,
|
||||
pqor.option_sort,
|
||||
pqor.option_remark
|
||||
pqor.option_remark,
|
||||
pqor.contented_flag,
|
||||
pqor.remarkable_flag,
|
||||
pqor.question_subject_option_id
|
||||
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
|
||||
@ -440,7 +476,8 @@
|
||||
pi.visit_method,
|
||||
pi.patient_health_state,
|
||||
pi.hospital_agency_name,
|
||||
pi.department_name
|
||||
pi.department_name,
|
||||
pi.age
|
||||
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
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
select patient.id as patientId, patient.resident_id, patient.patient_name, patient.patient_phone, patient.family_member_phone,
|
||||
patient.birth_date, patient.card_no, patient.sex, patient.address, patient.visit_method,
|
||||
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.patient_source,
|
||||
patient.department_id, patient.department_name, patient.ward_id, patient.ward_name, patient.patient_source,patient.age,
|
||||
record.id as patientVisitRecordId, record.visit_method, record.visit_date, record.main_diagnosis,
|
||||
record.admission_time, record.discharge_time, record.in_hospital_info, record.out_hospital_info, record.surgical_name, record.surgical_record,
|
||||
sign.portait_check_status, sign.portait_check_date
|
||||
|
||||
@ -389,7 +389,7 @@
|
||||
</update>
|
||||
<select id="selectList" parameterType="com.xinelu.manage.dto.signpatientrecord.SignPatientListDto" resultType="com.xinelu.manage.vo.signpatientrecord.SignPatientListVo">
|
||||
select
|
||||
patient.service_status,patient.sign_status,
|
||||
patient.service_status,patient.sign_status,patient.age,
|
||||
sign.id,sign.patient_id,sign.patient_name,
|
||||
sign.patient_phone,sign.card_no,sign.sex,sign.birth_date, sign.sign_time,
|
||||
sign.hospital_agency_id,sign.hospital_agency_name,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user