PostDischargePatientManage/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml

672 lines
37 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper">
<resultMap type="SignPatientManageRouteNode" id="SignPatientManageRouteNodeResult">
<result property="id" column="id"/>
<result property="manageRouteId" column="manage_route_id"/>
<result property="manageRouteName" column="manage_route_name"/>
<result property="routeNodeName" column="route_node_name"/>
<result property="routeNodeDay" column="route_node_day"/>
<result property="taskType" column="task_type"/>
<result property="taskStatus" column="task_status"/>
<result property="taskSubdivision" column="task_subdivision"/>
<result property="secondClassifyDescribe" column="second_classify_describe"/>
<result property="executeTime" column="execute_time"/>
<result property="phonePushSign" column="phone_push_sign"/>
<result property="phoneId" column="phone_id"/>
<result property="phoneTemplateId" column="phone_template_id"/>
<result property="phoneTemplateName" column="phone_template_name"/>
<result property="phoneNodeContent" column="phone_node_content"/>
<result property="phoneRedialTimes" column="phone_redial_times"/>
<result property="phoneTimeInterval" column="phone_time_interval"/>
<result property="phoneMessageRemind" column="phone_message_remind"/>
<result property="phoneMessageTemplateId" column="phone_message_template_id"/>
<result property="phoneMessageTemplateName" column="phone_message_template_name"/>
<result property="questionInfoId" column="question_info_id"/>
<result property="questionnaireName" column="questionnaire_name"/>
<result property="questionnaireContent" column="questionnaire_content"/>
<result property="questionExpirationDate" column="question_expiration_date"/>
<result property="propagandaInfoId" column="propaganda_info_id"/>
<result property="propagandaTitle" column="propaganda_title"/>
<result property="propagandaContent" column="propaganda_content"/>
<result property="messagePushSign" column="message_push_sign"/>
2024-04-16 14:23:10 +08:00
<result property="messageTemplateId" column="message_template_id"/>
<result property="messageTemplateName" column="message_template_name"/>
<result property="messagePreview" column="message_preview"/>
<result property="messageNodeContent" column="message_node_content"/>
<result property="officialPushSign" column="official_push_sign"/>
<result property="officialTemplateId" column="official_template_id"/>
<result property="officialTemplateName" column="official_template_name"/>
<result property="officialRemindContent" column="official_remind_content"/>
<result property="officialNodeContent" column="official_node_content"/>
<result property="appletPushSign" column="applet_push_sign"/>
<result property="appletTemplateId" column="applet_template_id"/>
<result property="appletTemplateName" column="applet_template_name"/>
<result property="appletRemindContent" column="applet_remind_content"/>
<result property="appletPromptDescription" column="applet_prompt_description"/>
<result property="appletNodeContent" column="applet_node_content"/>
<result property="followTemplateId" column="follow_template_id"/>
<result property="followTemplateName" column="follow_template_name"/>
<result property="followContent" column="follow_content"/>
<result property="routeCheckStatus" column="route_check_status"/>
<result property="routeCheckPerson" column="route_check_person"/>
<result property="routeCheckDate" column="route_check_date"/>
<result property="routeCheckRemark" column="route_check_remark"/>
<result property="routeNodeRemark" column="route_node_remark"/>
<result property="nodeExecuteStatus" column="node_execute_status"/>
<result property="routeHandleRemark" column="route_handle_remark"/>
<result property="routeHandleId" column="route_handle_id"/>
<result property="routeHandlePerson" column="route_handle_person"/>
<result property="routeLink" column="route_link"/>
2024-03-28 17:48:09 +08:00
<result property="textRemindContent" column="text_remind_content"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectSignPatientManageRouteNodeVo">
2024-04-16 14:23:10 +08:00
select id, manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id, follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link,text_remind_content, create_by, create_time, update_by, update_time from sign_patient_manage_route_node
</sql>
<select id="selectSignPatientManageRouteNodeList" parameterType="SignPatientManageRouteNode" resultMap="SignPatientManageRouteNodeResult">
<include refid="selectSignPatientManageRouteNodeVo"/>
<where>
<if test="manageRouteId != null ">
and manage_route_id = #{manageRouteId}
</if>
<if test="manageRouteName != null and manageRouteName != ''">
and manage_route_name like concat('%', #{manageRouteName}, '%')
</if>
<if test="routeNodeName != null and routeNodeName != ''">
and route_node_name like concat('%', #{routeNodeName}, '%')
</if>
<if test="routeNodeDay != null ">
and route_node_day = #{routeNodeDay}
</if>
<if test="taskType != null and taskType != ''">
and task_type = #{taskType}
</if>
<if test="taskStatus != null and taskStatus != ''">
and task_status = #{taskStatus}
</if>
</where>
</select>
<select id="selectSignPatientManageRouteNodeById" parameterType="Long" resultMap="SignPatientManageRouteNodeResult">
<include refid="selectSignPatientManageRouteNodeVo"/>
where id = #{id}
</select>
<select id="getNodeList" parameterType="com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto"
resultMap="SignPatientManageRouteNodeResult">
select node.id, node.manage_route_id, node.manage_route_name, node.route_node_name, node.route_node_day, node.task_type,
node.task_status, node.task_subdivision,node.second_classify_describe, node.execute_time, node.phone_push_sign, node.phone_id,
node.phone_template_id, node.phone_template_name, node.phone_node_content, node.phone_redial_times, node.phone_time_interval,
node.phone_message_remind, node.phone_message_template_id, node.phone_message_template_name,
node.question_info_id, node.questionnaire_name, node.questionnaire_content, node.question_expiration_date,
node.propaganda_info_id, node.propaganda_title, node.propaganda_content,
node.message_push_sign, node.message_template_id, node.message_template_name,node.message_preview, node.message_node_content,
node.official_push_sign, node.official_template_id, node.official_template_name, node.official_remind_content, node.official_node_content,
node.applet_push_sign, node.applet_template_id, node.applet_template_name, node.applet_remind_content, node.applet_prompt_description, node.applet_node_content,
node.follow_template_id, node.follow_template_name, node.follow_content,
node.route_check_status, node.route_check_person, node.route_check_date, node.route_check_remark, node.route_node_remark,
node.node_execute_status, node.route_handle_remark, node.route_handle_id, node.route_handle_person, node.route_link,node.text_remind_content
from sign_patient_manage_route_node node
left join sign_patient_manage_route route on node.manage_route_id = route.id
<where>
<if test="patientId != null">
and route.patient_id = #{patientId}
</if>
<if test="taskType != null and taskType != ''">
and node.task_type = #{taskType}
</if>
2024-04-16 09:56:09 +08:00
<if test="taskCreateType != null and taskCreateType != ''">
and route.task_create_type = #{taskCreateType}
</if>
<choose>
<when test="routeCheckStatus != null and routeCheckStatus == 'UNAUDITED'">
and node.route_check_status is null
</when>
<when test="routeCheckStatus != null and routeCheckStatus == 'AGREE'">
and node.route_check_status = #{routeCheckStatus}
</when>
<when test="routeCheckStatus != null and routeCheckStatus == 'DISAGREE'">
and node.route_check_status = #{routeCheckStatus}
</when>
</choose>
2024-04-16 14:23:10 +08:00
<if test="signPatientRecordId != null">
and route.sign_patient_record_id = #{signPatientRecordId}
</if>
</where>
</select>
<insert id="insertSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode" useGeneratedKeys="true"
keyProperty="id">
insert into sign_patient_manage_route_node
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="manageRouteId != null">manage_route_id,
</if>
<if test="manageRouteName != null">manage_route_name,
</if>
<if test="routeNodeName != null">route_node_name,
</if>
<if test="routeNodeDay != null">route_node_day,
</if>
<if test="taskType != null">task_type,
</if>
<if test="taskStatus != null">task_status,
</if>
<if test="taskSubdivision != null">task_subdivision,
</if>
<if test="secondClassifyDescribe != null">second_classify_describe,
</if>
<if test="executeTime != null">execute_time,
</if>
<if test="phonePushSign != null">phone_push_sign,
</if>
<if test="phoneId != null">phone_id,
</if>
<if test="phoneTemplateId != null">phone_template_id,
</if>
<if test="phoneTemplateName != null">phone_template_name,
</if>
<if test="phoneNodeContent != null">phone_node_content,
</if>
<if test="phoneRedialTimes != null">phone_redial_times,
</if>
<if test="phoneTimeInterval != null">phone_time_interval,
</if>
<if test="phoneMessageRemind != null">phone_message_remind,
</if>
<if test="phoneMessageTemplateId != null">phone_message_template_id,
</if>
<if test="phoneMessageTemplateName != null">phone_message_template_name,
</if>
<if test="questionInfoId != null">question_info_id,
</if>
<if test="questionnaireName != null">questionnaire_name,
</if>
<if test="questionnaireContent != null">questionnaire_content,
</if>
<if test="questionExpirationDate != null">question_expiration_date,
</if>
<if test="propagandaInfoId != null">propaganda_info_id,
</if>
<if test="propagandaTitle != null">propaganda_title,
</if>
<if test="propagandaContent != null">propaganda_content,
</if>
<if test="messagePushSign != null">message_push_sign,
</if>
2024-04-16 14:23:10 +08:00
<if test="messageTemplateId != null">message_template_id,
</if>
<if test="messageTemplateName != null">message_template_name,
</if>
<if test="messagePreview != null">message_preview,
</if>
<if test="messageNodeContent != null">message_node_content,
</if>
<if test="officialPushSign != null">official_push_sign,
</if>
<if test="officialTemplateId != null">official_template_id,
</if>
<if test="officialTemplateName != null">official_template_name,
</if>
<if test="officialRemindContent != null">official_remind_content,
</if>
<if test="officialNodeContent != null">official_node_content,
</if>
<if test="appletPushSign != null">applet_push_sign,
</if>
<if test="appletTemplateId != null">applet_template_id,
</if>
<if test="appletTemplateName != null">applet_template_name,
</if>
<if test="appletRemindContent != null">applet_remind_content,
</if>
<if test="appletPromptDescription != null">applet_prompt_description,
</if>
<if test="appletNodeContent != null">applet_node_content,
</if>
<if test="followTemplateId != null">follow_template_id,
</if>
<if test="followTemplateName != null">follow_template_name,
</if>
<if test="followContent != null">follow_content,
</if>
<if test="routeCheckStatus != null">route_check_status,
</if>
<if test="routeCheckPerson != null">route_check_person,
</if>
<if test="routeCheckDate != null">route_check_date,
</if>
<if test="routeCheckRemark != null">route_check_remark,
</if>
<if test="routeNodeRemark != null">route_node_remark,
</if>
<if test="nodeExecuteStatus != null">node_execute_status,
</if>
<if test="routeHandleRemark != null">route_handle_remark,
</if>
<if test="routeHandleId != null">route_handle_id,
</if>
<if test="routeHandlePerson != null">route_handle_person,
</if>
<if test="routeLink != null">route_link,
</if>
2024-03-28 17:48:09 +08:00
<if test="textRemindContent != null">text_remind_content,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="manageRouteId != null">#{manageRouteId},
</if>
<if test="manageRouteName != null">#{manageRouteName},
</if>
<if test="routeNodeName != null">#{routeNodeName},
</if>
<if test="routeNodeDay != null">#{routeNodeDay},
</if>
<if test="taskType != null">#{taskType},
</if>
<if test="taskStatus != null">#{taskStatus},
</if>
<if test="taskSubdivision != null">#{taskSubdivision},
</if>
<if test="secondClassifyDescribe != null">#{secondClassifyDescribe},
</if>
<if test="executeTime != null">#{executeTime},
</if>
<if test="phonePushSign != null">#{phonePushSign},
</if>
<if test="phoneId != null">#{phoneId},
</if>
<if test="phoneTemplateId != null">#{phoneTemplateId},
</if>
<if test="phoneTemplateName != null">#{phoneTemplateName},
</if>
<if test="phoneNodeContent != null">#{phoneNodeContent},
</if>
<if test="phoneRedialTimes != null">#{phoneRedialTimes},
</if>
<if test="phoneTimeInterval != null">#{phoneTimeInterval},
</if>
<if test="phoneMessageRemind != null">#{phoneMessageRemind},
</if>
<if test="phoneMessageTemplateId != null">#{phoneMessageTemplateId},
</if>
<if test="phoneMessageTemplateName != null">#{phoneMessageTemplateName},
</if>
<if test="questionInfoId != null">#{questionInfoId},
</if>
<if test="questionnaireName != null">#{questionnaireName},
</if>
<if test="questionnaireContent != null">#{questionnaireContent},
</if>
<if test="questionExpirationDate != null">#{questionExpirationDate},
</if>
<if test="propagandaInfoId != null">#{propagandaInfoId},
</if>
<if test="propagandaTitle != null">#{propagandaTitle},
</if>
<if test="propagandaContent != null">#{propagandaContent},
</if>
<if test="messagePushSign != null">#{messagePushSign},
</if>
<if test="messageTemplateId != null">#{messageTemplateId},
</if>
<if test="messageTemplateName != null">#{messageTemplateName},
</if>
<if test="messagePreview != null">#{messagePreview},
</if>
<if test="messageNodeContent != null">#{messageNodeContent},
</if>
<if test="officialPushSign != null">#{officialPushSign},
</if>
<if test="officialTemplateId != null">#{officialTemplateId},
</if>
<if test="officialTemplateName != null">#{officialTemplateName},
</if>
<if test="officialRemindContent != null">#{officialRemindContent},
</if>
<if test="officialNodeContent != null">#{officialNodeContent},
</if>
<if test="appletPushSign != null">#{appletPushSign},
</if>
<if test="appletTemplateId != null">#{appletTemplateId},
</if>
<if test="appletTemplateName != null">#{appletTemplateName},
</if>
<if test="appletRemindContent != null">#{appletRemindContent},
</if>
<if test="appletPromptDescription != null">#{appletPromptDescription},
</if>
<if test="appletNodeContent != null">#{appletNodeContent},
</if>
<if test="followTemplateId != null">#{followTemplateId},
</if>
<if test="followTemplateName != null">#{followTemplateName},
</if>
<if test="followContent != null">#{followContent},
</if>
<if test="routeCheckStatus != null">#{routeCheckStatus},
</if>
<if test="routeCheckPerson != null">#{routeCheckPerson},
</if>
<if test="routeCheckDate != null">#{routeCheckDate},
</if>
<if test="routeCheckRemark != null">#{routeCheckRemark},
</if>
<if test="routeNodeRemark != null">#{routeNodeRemark},
</if>
<if test="nodeExecuteStatus != null">#{nodeExecuteStatus},
</if>
<if test="routeHandleRemark != null">#{routeHandleRemark},
</if>
<if test="routeHandleId != null">#{routeHandleId},
</if>
<if test="routeHandlePerson != null">#{routeHandlePerson},
</if>
<if test="routeLink != null">#{routeLink},
</if>
2024-03-28 17:48:09 +08:00
<if test="textRemindContent != null">#{textRemindContent},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<insert id="insertBatch">
insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe,
execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id,
phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign,
2024-04-16 14:23:10 +08:00
message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content,
official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id,
follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,
2024-03-28 17:48:09 +08:00
route_handle_id, route_handle_person, route_link, text_remind_content,create_by, create_time, update_by, update_time)
values
<foreach collection="nodeList" item="item" separator=",">
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeName},#{item.routeNodeDay},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.secondClassifyDescribe},
#{item.executeTime},#{item.phonePushSign},#{item.phoneId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId},#{item.phoneMessageTemplateName},
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},#{item.messageTemplateId},
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},#{item.followTemplateId},
#{item.followTemplateName},#{item.followContent},#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},
2024-03-28 17:48:09 +08:00
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})
</foreach>
</insert>
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
update sign_patient_manage_route_node
<trim prefix="SET" suffixOverrides=",">
<if test="manageRouteId != null">manage_route_id =
#{manageRouteId},
</if>
<if test="manageRouteName != null">manage_route_name =
#{manageRouteName},
</if>
<if test="routeNodeName != null">route_node_name =
#{routeNodeName},
</if>
<if test="routeNodeDay != null">route_node_day =
#{routeNodeDay},
</if>
<if test="taskType != null">task_type =
#{taskType},
</if>
<if test="taskStatus != null">task_status =
#{taskStatus},
</if>
<if test="taskSubdivision != null">task_subdivision =
#{taskSubdivision},
</if>
<if test="secondClassifyDescribe != null">second_classify_describe =
#{secondClassifyDescribe},
</if>
<if test="executeTime != null">execute_time =
#{executeTime},
</if>
<if test="phonePushSign != null">phone_push_sign =
#{phonePushSign},
</if>
<if test="phoneId != null">phone_id =
#{phoneId},
</if>
<if test="phoneTemplateId != null">phone_template_id =
#{phoneTemplateId},
</if>
<if test="phoneTemplateName != null">phone_template_name =
#{phoneTemplateName},
</if>
<if test="phoneNodeContent != null">phone_node_content =
#{phoneNodeContent},
</if>
<if test="phoneRedialTimes != null">phone_redial_times =
#{phoneRedialTimes},
</if>
<if test="phoneTimeInterval != null">phone_time_interval =
#{phoneTimeInterval},
</if>
<if test="phoneMessageRemind != null">phone_message_remind =
#{phoneMessageRemind},
</if>
<if test="phoneMessageTemplateId != null">phone_message_template_id =
#{phoneMessageTemplateId},
</if>
<if test="phoneMessageTemplateName != null">phone_message_template_name =
#{phoneMessageTemplateName},
</if>
<if test="questionInfoId != null">question_info_id =
#{questionInfoId},
</if>
<if test="questionnaireName != null">questionnaire_name =
#{questionnaireName},
</if>
<if test="questionnaireContent != null">questionnaire_content =
#{questionnaireContent},
</if>
<if test="questionExpirationDate != null">question_expiration_date =
#{questionExpirationDate},
</if>
<if test="propagandaInfoId != null">propaganda_info_id =
#{propagandaInfoId},
</if>
<if test="propagandaTitle != null">propaganda_title =
#{propagandaTitle},
</if>
<if test="propagandaContent != null">propaganda_content =
#{propagandaContent},
</if>
<if test="messagePushSign != null">message_push_sign =
#{messagePushSign},
</if>
2024-04-16 14:23:10 +08:00
<if test="messageTemplateId != null">message_template_id =
#{messageTemplateId},
</if>
<if test="messageTemplateName != null">message_template_name =
#{messageTemplateName},
</if>
<if test="messagePreview != null">message_preview =
#{messagePreview},
</if>
<if test="messageNodeContent != null">message_node_content =
#{messageNodeContent},
</if>
<if test="officialPushSign != null">official_push_sign =
#{officialPushSign},
</if>
<if test="officialTemplateId != null">official_template_id =
#{officialTemplateId},
</if>
<if test="officialTemplateName != null">official_template_name =
#{officialTemplateName},
</if>
<if test="officialRemindContent != null">official_remind_content =
#{officialRemindContent},
</if>
<if test="officialNodeContent != null">official_node_content =
#{officialNodeContent},
</if>
<if test="appletPushSign != null">applet_push_sign =
#{appletPushSign},
</if>
<if test="appletTemplateId != null">applet_template_id =
#{appletTemplateId},
</if>
<if test="appletTemplateName != null">applet_template_name =
#{appletTemplateName},
</if>
<if test="appletRemindContent != null">applet_remind_content =
#{appletRemindContent},
</if>
<if test="appletPromptDescription != null">applet_prompt_description =
#{appletPromptDescription},
</if>
<if test="appletNodeContent != null">applet_node_content =
#{appletNodeContent},
</if>
<if test="followTemplateId != null">follow_template_id =
#{followTemplateId},
</if>
<if test="followTemplateName != null">follow_template_name =
#{followTemplateName},
</if>
<if test="followContent != null">follow_content =
#{followContent},
</if>
<if test="routeCheckStatus != null">route_check_status =
#{routeCheckStatus},
</if>
<if test="routeCheckPerson != null">route_check_person =
#{routeCheckPerson},
</if>
<if test="routeCheckDate != null">route_check_date =
#{routeCheckDate},
</if>
<if test="routeCheckRemark != null">route_check_remark =
#{routeCheckRemark},
</if>
<if test="routeNodeRemark != null">route_node_remark =
#{routeNodeRemark},
</if>
<if test="nodeExecuteStatus != null">node_execute_status =
#{nodeExecuteStatus},
</if>
<if test="routeHandleRemark != null">route_handle_remark =
#{routeHandleRemark},
</if>
<if test="routeHandleId != null">route_handle_id =
#{routeHandleId},
</if>
<if test="routeHandlePerson != null">route_handle_person =
#{routeHandlePerson},
</if>
<if test="routeLink != null">route_link =
#{routeLink},
</if>
2024-03-28 17:48:09 +08:00
<if test="textRemindContent != null">text_remind_content =
#{textRemindContent},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSignPatientManageRouteNodeById" parameterType="Long">
delete from sign_patient_manage_route_node where id = #{id}
</delete>
<delete id="deleteSignPatientManageRouteNodeByIds" parameterType="String">
delete from sign_patient_manage_route_node where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
2024-04-02 16:55:08 +08:00
<delete id="deleteRouteNodeByManageRouteId">
delete
from sign_patient_manage_route_node
where manage_route_id = #{manageRouteId}
</delete>
<select id="selectPatientTaskList" parameterType="com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto" resultType="com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo">
select patient.id as patientId, patient.patient_name,
patient.patient_phone,
patient.family_member_phone,
patient.birth_date,
patient.card_no,
patient.sex,
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,
2024-04-16 09:56:09 +08:00
patient.department_id, patient.department_name,patient.ward_id, patient.ward_name, patient.patient_visit_record_id,patient.in_hospital_number, patient.visit_date, patient.discharge_time,
patient.patient_source, patient.surgical_name,route.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
<where>
<if test="patientName != null and patientName != ''">
and patient.patient_name = #{patientName}
</if>
<if test="mainDiagnosis != null and mainDiagnosis != ''">
and patient.main_diagnosis like concat('%', #{mainDiagnosis}, '%')
</if>
2024-04-10 17:37:35 +08:00
<choose>
2024-04-16 09:56:09 +08:00
<when test="routeCheckStatus != null and routeCheckStatus == 'UNAUDITED'">
and node.route_check_status is null
</when>
<when test="routeCheckStatus != null and routeCheckStatus == 'AGREE'">
and node.route_check_status = #{routeCheckStatus}
</when>
<when test="routeCheckStatus != null and routeCheckStatus == 'DISAGREE'">
2024-04-10 17:37:35 +08:00
and node.route_check_status = #{routeCheckStatus}
</when>
</choose>
<if test="hospitalAgencyId != null ">
and patient.hospital_agency_id = #{hospitalAgencyId}
</if>
<if test="campusAgencyId != null ">
and patient.campus_agency_id = #{campusAgencyId}
</if>
<if test="departmentId != null ">
and patient.department_id = #{departmentId}
</if>
<if test="wardId != null ">
and patient.ward_id = #{wardId}
</if>
2024-04-10 17:37:35 +08:00
<if test="dischargeTimeStart != null ">
and date_format(patient.discharge_time,'%y%m%d') &gt;= date_format(#{dischargeTimeStart},'%y%m%d')
</if>
2024-04-10 17:37:35 +08:00
<if test="dischargeTimeEnd != null ">
and date_format(patient.discharge_time,'%y%m%d') &lt;= date_format(#{dischargeTimeEnd},'%y%m%d')
</if>
</where>
2024-04-16 09:56:09 +08:00
group by patient.hospital_agency_id, patient.id
</select>
</mapper>