<?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="SGxhpzFollowUpRecordsMapper">
    <!-- 修改 随访记录全量表-->
    <update id="updateSGxhpzFollowUpRecords" parameterType="pd">
        UPDATE s_gxhpz_follow_up_records
        <set>
            <!-- 合并用药是否引起不良反应 -->
            <if test="combinedMedicationAdverseReaction != null and combinedMedicationAdverseReaction != ''">
                combined_medication_adverse_reaction = #{combinedMedicationAdverseReaction},
            </if>
            <!-- 合并用药其他不良反应 -->
            <if test="combinedMedicationOtherAdverseReactions != null and combinedMedicationOtherAdverseReactions != ''">
                combined_medication_other_adverse_reactions = #{combinedMedicationOtherAdverseReactions},
            </if>
            <!-- 合并用药其他不良反应图片 -->
            <if test="combinedMedicationOtherAdverseReactionsImage != null and combinedMedicationOtherAdverseReactionsImage != ''">
                combined_medication_other_adverse_reactions_image = #{combinedMedicationOtherAdverseReactionsImage},
            </if>
            <!-- 合并用药其他不良反应处理 -->
            <if test="combinedMedicationOtherAdverseReactionsHandling != null and combinedMedicationOtherAdverseReactionsHandling != ''">
                combined_medication_other_adverse_reactions_handling = #{combinedMedicationOtherAdverseReactionsHandling},
            </if>
            <!-- 是否复查 -->
            <if test="isReview != null and isReview != ''">
                is_review = #{isReview},
            </if>
            <!-- 影像学检查 医保类型 -->
            <if test="imagingInsuranceTypeList != null and imagingInsuranceTypeList != ''">
                imaging_insurance_type = #{imagingInsuranceTypeList},
            </if>
            <!-- CT 单选 -->
            <if test="ctCheck != null and ctCheck != ''">
                ct_check = #{ctCheck},
            </if>
            <!-- CT文本 -->
            <if test="ctText != null and ctText != ''">
                ct_text = #{ctText},
            </if>
            <!-- B超 单选 -->
            <if test="ultrasoundCheck != null">
                ultrasound_check = #{ultrasoundCheck},
            </if>
            <!-- B超文本 -->
            <if test="ultrasoundText != null and ultrasoundText != ''">
                ultrasound_text = #{ultrasoundText},
            </if>
            <!-- 核磁 单选 -->
            <if test="mriCheck != null">
                mri_check = #{mriCheck},
            </if>
            <!-- 核磁文本 -->
            <if test="mriText != null and mriText != ''">
                mri_text = #{mriText},
            </if>
            <!-- 影像学检查其它 -->
            <if test="otherImagingExaminations != null and otherImagingExaminations != ''">
                other_imaging_examinations = #{otherImagingExaminations},
            </if>
            <!-- 影像学检查图片 -->
            <if test="imagingExaminationsImage != null and imagingExaminationsImage != ''">
                imaging_examinations_image = #{imagingExaminationsImage},
            </if>
            <!-- 肿瘤标记物检查 多选 -->
            <if test="tumorMarkerCheckList != null and tumorMarkerCheckList != ''">
                tumor_marker_check = #{tumorMarkerCheckList},
            </if>
            <!-- CEA -->
            <if test="cea != null and cea != ''">
                cea = #{cea},
            </if>
            <!-- AFP -->
            <if test="afp != null and afp != ''">
                afp = #{afp},
            </if>
            <!-- CA-199 -->
            <if test="ca199 != null and ca199 != ''">
                ca_199 = #{ca199},
            </if>
            <!-- CA125 -->
            <if test="ca125 != null and ca125 != ''">
                ca125 = #{ca125},
            </if>
            <!-- CA153 -->
            <if test="ca153 != null and ca153 != ''">
                ca153 = #{ca153},
            </if>
            <!-- HCG -->
            <if test="hcg != null and hcg != ''">
                hcg = #{hcg},
            </if>
            <!-- NSE -->
            <if test="nse != null and nse != ''">
                nse = #{nse},
            </if>
            <!-- CYFRA21-1 -->
            <if test="cyfra211 != null and cyfra211 != ''">
                cyfra21_1 = #{cyfra211},
            </if>
            <!-- TG -->
            <if test="tg != null and tg != ''">
                tg = #{tg},
            </if>
            <!-- PSA -->
            <if test="psa != null and psa != ''">
                psa = #{psa},
            </if>
            <!-- 肿瘤物标记检查图片 -->
            <if test="tumorMarkerImage != null and tumorMarkerImage != ''">
                tumor_marker_image = #{tumorMarkerImage},
            </if>
            <!-- 实验室检查指标 -->
            <if test="labTestIndicators != null and labTestIndicators != ''">
                lab_test_indicators = #{labTestIndicators},
            </if>
            <!-- 实验室检查指标图片 -->
            <if test="labTestIndicatorsImage != null and labTestIndicatorsImage != ''">
                lab_test_indicators_image = #{labTestIndicatorsImage},
            </if>
            <!-- 治疗类型 -->
            <if test="treatmentTypeList != null and treatmentTypeList != ''">
                treatment_type = #{treatmentTypeList},
            </if>
            <!-- 用药前治疗方案 -->
            <if test="pre_medication_plan != null and pre_medication_plan != ''">
                pre_medication_plan = #{pre_medication_plan},
            </if>
            <!-- 目前治疗方案 -->
            <if test="current_treatment_plan != null and current_treatment_plan != ''">
                current_treatment_plan = #{current_treatment_plan},
            </if>
            <!-- 进展后治疗方案 -->
            <if test="post_progression_treatment_plan != null and post_progression_treatment_plan != ''">
                post_progression_treatment_plan = #{post_progression_treatment_plan},
            </if>
            <!-- 有无药品适应症 -->
            <if test="hasMedicationIndications != null">
                has_medication_indications = #{hasMedicationIndications},
            </if>
            <!-- 药物对该疾病是否有效 -->
            <if test="drugEffectiveness != null">
                drug_effectiveness = #{drugEffectiveness},
            </if>
            <!-- 药物间是否存在临床相互作用 -->
            <if test="clinicalInteraction != null">
                clinical_interaction = #{clinicalInteraction},
            </if>
            <!-- 请描述临床相互作用 -->
            <if test="clinicalInteractionDescription != null and clinicalInteractionDescription != ''">
                clinical_interaction_description = #{clinicalInteractionDescription},
            </if>
            <!-- 是否有不必要重复用药 -->
            <if test="unnecessaryRepeatedMedication != null and unnecessaryRepeatedMedication != ''">
                unnecessary_repeated_medication = #{unnecessaryRepeatedMedication},
            </if>
            <!-- 重复用药首次使用日期 -->
            <if test="repeatedMedicationFirstUseDate != null">
                repeated_medication_first_use_date = #{repeatedMedicationFirstUseDate},
            </if>
            <!-- 请描述不必要重复用药 -->
            <if test="unnecessaryRepeatedMedicationDescription != null">
                unnecessary_repeated_medication_description = #{unnecessaryRepeatedMedicationDescription},
            </if>
            <!-- 是否出现用药错误 -->
            <if test="medicationError != null">
                medication_error = #{medicationError},
            </if>
            <!-- 用药错误出现时间 -->
            <if test="medicationErrorTime != null">
                medication_error_time = #{medicationErrorTime},
            </if>
            <!-- 请描述用药错误 -->
            <if test="medicationErrorDescription != null">
                medication_error_description = #{medicationErrorDescription},
            </if>
            <!-- 用药记录 -->
            <if test="medication_record != null and medication_record != ''">
                medication_record = #{medication_record},
            </if>
            <!-- 合并用药记录 -->
            <if test="combined_medication_record != null and combined_medication_record != ''">
                combined_medication_record = #{combined_medication_record},
            </if>
            <!-- 疼痛标准评分NRS -->
            <if test="painNrsScore != null">
                pain_nrs_score = #{painNrsScore},
            </if>
            <!-- 体力状况评分 -->
            <if test="physicalConditionScore != null">
                physical_condition_score = #{physicalConditionScore},
            </if>
            <!-- 本次回访是否咨询 -->
            <if test="isConsultation != null">
                is_consultation = #{isConsultation},
            </if>
            <!-- 咨询问题类型 -->
            <if test="consultationType != null and consultationType != ''">
                consultation_type = #{consultationType},
            </if>
            <!-- 具体问题 -->
            <if test="specificQuestion != null and specificQuestion != ''">
                specific_question = #{specificQuestion},
            </if>
            <!-- 药师解答 -->
            <if test="pharmacistResponse != null and pharmacistResponse != ''">
                pharmacist_response = #{pharmacistResponse},
            </if>
            <!-- 患者病情评估 -->
            <if test="patientConditionAssessment != null">
                patient_condition_assessment = #{patientConditionAssessment},
            </if>
            <!-- 共建项目描述 -->
            <if test="projectDescription != null and projectDescription != ''">
                project_description = #{projectDescription},
            </if>
            <!-- 更新时间 -->
            updatedTime = CURRENT_TIMESTAMP,
        </set>
        WHERE id = #{follow_up_id}
    </update>
    <!-- 随访记录全量表 添加-->
    <insert id="insertSGxhpzFollowUpRecords" parameterType="pd">
        INSERT INTO s_gxhpz_follow_up_records
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <!-- 合并用药是否引起不良反应 -->
            <if test="combinedMedicationAdverseReaction != null and combinedMedicationAdverseReaction != ''">
                combined_medication_adverse_reaction,
            </if>
            <!-- 合并用药其他不良反应 -->
            <if test="combinedMedicationOtherAdverseReactions != null and combinedMedicationOtherAdverseReactions != ''">
                combined_medication_other_adverse_reactions,
            </if>
            <!-- 合并用药其他不良反应图片 -->
            <if test="combinedMedicationOtherAdverseReactionsImage != null and combinedMedicationOtherAdverseReactionsImage != ''">
                combined_medication_other_adverse_reactions_image,
            </if>
            <!-- 合并用药其他不良反应处理 -->
            <if test="combinedMedicationOtherAdverseReactionsHandling != null and combinedMedicationOtherAdverseReactionsHandling != ''">
                combined_medication_other_adverse_reactions_handling,
            </if>
            <!-- 是否复查 -->
            <if test="isReview != null and isReview != ''">
                is_review,
            </if>
            <!-- 影像学检查 医保类型 -->
            <if test="imagingInsuranceTypeList != null and imagingInsuranceTypeList != ''">
                imaging_insurance_type,
            </if>
            <!-- CT 单选 -->
            <if test="ctCheck != null and ctCheck != ''">
                ct_check,
            </if>
            <!-- CT文本 -->
            <if test="ctText != null and ctText != ''">
                ct_text,
            </if>
            <!-- B超 单选 -->
            <if test="ultrasoundCheck != null and ultrasoundCheck != ''">
                ultrasound_check,
            </if>
            <!-- B超文本 -->
            <if test="ultrasoundText != null and ultrasoundText != ''">
                ultrasound_text,
            </if>
            <!-- 核磁 单选 -->
            <if test="mriCheck != null and mriCheck != ''">
                mri_check,
            </if>
            <!-- 核磁文本 -->
            <if test="mriText != null and mriText != ''">
                mri_text,
            </if>
            <!-- 影像学检查其它 -->
            <if test="otherImagingExaminations != null and otherImagingExaminations != ''">
                other_imaging_examinations,
            </if>
            <!-- 影像学检查图片 -->
            <if test="imagingExaminationsImage != null and imagingExaminationsImage != ''">
                imaging_examinations_image,
            </if>
            <!-- 肿瘤标记物检查 多选 -->
            <if test="tumorMarkerCheckList != null and tumorMarkerCheckList != ''">
                tumor_marker_check,
            </if>
            <!-- CEA -->
            <if test="cea != null and cea != ''">
                cea,
            </if>
            <!-- AFP -->
            <if test="afp != null and afp != ''">
                afp,
            </if>
            <!-- CA-199 -->
            <if test="ca199 != null and ca199 != ''">
                ca_199,
            </if>
            <!-- CA125 -->
            <if test="ca125 != null and ca125 != ''">
                ca125,
            </if>
            <!-- CA153 -->
            <if test="ca153 != null and ca153 != ''">
                ca153,
            </if>
            <!-- HCG -->
            <if test="hcg != null and hcg != ''">
                hcg,
            </if>
            <!-- NSE -->
            <if test="nse != null and nse != ''">
                nse,
            </if>
            <!-- CYFRA21-1 -->
            <if test="cyfra211 != null and cyfra211 != ''">
                cyfra21_1,
            </if>
            <!-- TG -->
            <if test="tg != null and tg != ''">
                tg,
            </if>
            <!-- PSA -->
            <if test="psa != null and psa != ''">
                psa,
            </if>
            <!-- 肿瘤物标记检查图片 -->
            <if test="tumorMarkerImage != null and tumorMarkerImage != ''">
                tumor_marker_image,
            </if>
            <!-- 实验室检查指标 -->
            <if test="labTestIndicators != null and labTestIndicators != ''">
                lab_test_indicators,
            </if>
            <!-- 实验室检查指标图片 -->
            <if test="labTestIndicatorsImage != null and labTestIndicatorsImage != ''">
                lab_test_indicators_image,
            </if>
            <!-- 治疗类型 -->
            <if test="treatmentTypeList != null and treatmentTypeList != ''">
                treatment_type,
            </if>
            <!-- 用药前治疗方案 -->
            <if test="pre_medication_plan != null and pre_medication_plan != ''">
                pre_medication_plan,
            </if>
            <!-- 目前治疗方案 -->
            <if test="current_treatment_plan != null and current_treatment_plan != ''">
                current_treatment_plan,
            </if>
            <!-- 进展后治疗方案 -->
            <if test="post_progression_treatment_plan != null and post_progression_treatment_plan != ''">
                post_progression_treatment_plan,
            </if>
            <!-- 有无药品适应症 -->
            <if test="hasMedicationIndications != null and hasMedicationIndications != ''">
                has_medication_indications,
            </if>
            <!-- 药物对该疾病是否有效 -->
            <if test="drugEffectiveness != null and drugEffectiveness != ''">
                drug_effectiveness,
            </if>
            <!-- 药物间是否存在临床相互作用 -->
            <if test="clinicalInteraction != null and clinicalInteraction != ''">
                clinical_interaction,
            </if>
            <!-- 请描述临床相互作用 -->
            <if test="clinicalInteractionDescription != null and clinicalInteractionDescription != ''">
                clinical_interaction_description,
            </if>
            <!-- 是否有不必要重复用药 -->
            <if test="unnecessaryRepeatedMedication != null and unnecessaryRepeatedMedication != ''">
                unnecessary_repeated_medication,
            </if>
            <!-- 重复用药首次使用日期 -->
            <if test="repeatedMedicationFirstUseDate != null and repeatedMedicationFirstUseDate != ''">
                repeated_medication_first_use_date,
            </if>
            <!-- 请描述不必要重复用药 -->
            <if test="unnecessaryRepeatedMedicationDescription != null and unnecessaryRepeatedMedicationDescription != ''">
                unnecessary_repeated_medication_description,
            </if>
            <!-- 是否出现用药错误 -->
            <if test="medicationError != null and medicationError != ''">
                medication_error,
            </if>
            <!-- 用药错误出现时间 -->
            <if test="medicationErrorTime != null and medicationErrorTime != ''">
                medication_error_time,
            </if>
            <!-- 请描述用药错误 -->
            <if test="medicationErrorDescription != null and medicationErrorDescription != ''">
                medication_error_description,
            </if>
            <!-- 用药记录 -->
            <if test="medication_record != null and medication_record != ''">
                medication_record,
            </if>
            <!-- 合并用药记录 -->
            <if test="combined_medication_record != null and combined_medication_record != ''">
                combined_medication_record,
            </if>
            <!-- 疼痛标准评分NRS -->
            <if test="painNrsScore != null and painNrsScore != ''">
                pain_nrs_score,
            </if>
            <!-- 体力状况评分 -->
            <if test="physicalConditionScore != null and physicalConditionScore != ''">
                physical_condition_score,
            </if>
            <!-- 本次回访是否咨询 -->
            <if test="isConsultation != null and isConsultation != ''">
                is_consultation,
            </if>
            <!-- 咨询问题类型 -->
            <if test="consultationType != null and consultationType != ''">
                consultation_type,
            </if>
            <!-- 具体问题 -->
            <if test="specificQuestion != null and specificQuestion != ''">
                specific_question,
            </if>
            <!-- 药师解答 -->
            <if test="pharmacistResponse != null and pharmacistResponse != ''">
                pharmacist_response,
            </if>
            <!-- 患者病情评估 -->
            <if test="patientConditionAssessment != null and patientConditionAssessment != ''">
                patient_condition_assessment,
            </if>
            <!-- 共建项目描述 -->
            <if test="projectDescription != null and projectDescription != ''">
                project_description,
            </if>
            <!-- 任务id -->
            <if  test="id != null and id != ''">
                taskId,
            </if>
            <!-- 计划ID -->
            <if test="planId != null and planId != ''">
                planId,
            </if>
            <!-- 患者id -->
            <if test="patientId != null and patientId != ''">
                patientId,
            </if>
            <!-- 门店id -->
            <if test="storeId != null">
                storeId,
            </if>
            <!-- 创建时间 -->
            <if test="createdTime != null and createdTime != ''">
                createdTime,
            </if>
            <!-- 操作人 -->
            operator
        </trim>
         VALUES
        <trim prefix="(" suffix=")" suffixOverrides=",">
        <!-- 合并用药是否引起不良反应 -->
        <if test="combinedMedicationAdverseReaction != null and combinedMedicationAdverseReaction != ''">
            #{combinedMedicationAdverseReaction},
        </if>
        <!-- 合并用药其他不良反应 -->
        <if test="combinedMedicationOtherAdverseReactions != null and combinedMedicationOtherAdverseReactions != ''">
            #{combinedMedicationOtherAdverseReactions},
        </if>
        <!-- 合并用药其他不良反应图片 -->
        <if test="combinedMedicationOtherAdverseReactionsImage != null and combinedMedicationOtherAdverseReactionsImage != ''">
            #{combinedMedicationOtherAdverseReactionsImage},
        </if>
        <!-- 合并用药其他不良反应处理 -->
        <if test="combinedMedicationOtherAdverseReactionsHandling != null and combinedMedicationOtherAdverseReactionsHandling != ''">
            #{combinedMedicationOtherAdverseReactionsHandling},
        </if>
        <!-- 是否复查 -->
        <if test="isReview != null and isReview != ''">
            #{isReview},
        </if>
        <!-- 影像学检查 医保类型 -->
        <if test="imagingInsuranceType != null and imagingInsuranceType != ''">
            #{imagingInsuranceType},
        </if>
        <!-- CT 单选 -->
        <if test="ctCheck != null and ctCheck != ''">
            #{ctCheck},
        </if>
        <!-- CT文本 -->
        <if test="ctText != null and ctText != ''">
            #{ctText},
        </if>
        <!-- B超 单选 -->
        <if test="ultrasoundCheck != null and ultrasoundCheck != ''">
            #{ultrasoundCheck},
        </if>
        <!-- B超文本 -->
        <if test="ultrasoundText != null and ultrasoundText != ''">
            #{ultrasoundText},
        </if>
        <!-- 核磁 单选 -->
        <if test="mriCheck != null and mriCheck != ''">
            #{mriCheck},
        </if>
        <!-- 核磁文本 -->
        <if test="mriText != null and mriText != ''">
            #{mriText},
        </if>
        <!-- 影像学检查其它 -->
        <if test="otherImagingExaminations != null and otherImagingExaminations != ''">
            #{otherImagingExaminations},
        </if>
        <!-- 影像学检查图片 -->
        <if test="imagingExaminationsImage != null and imagingExaminationsImage != ''">
            #{imagingExaminationsImage},
        </if>
        <!-- 肿瘤标记物检查 多选 -->
        <if test="tumorMarkerCheck != null and tumorMarkerCheck != ''">
            #{tumorMarkerCheck},
        </if>
        <!-- CEA -->
        <if test="cea != null and cea != ''">
            #{cea},
        </if>
        <!-- AFP -->
        <if test="afp != null and afp != ''">
            #{afp},
        </if>
        <!-- CA-199 -->
        <if test="ca199 != null and ca199 != ''">
            #{ca199},
        </if>
        <!-- CA125 -->
        <if test="ca125 != null and ca125 != ''">
            #{ca125},
        </if>
        <!-- CA153 -->
        <if test="ca153 != null and ca153 != ''">
            #{ca153},
        </if>
        <!-- HCG -->
        <if test="hcg != null and hcg != ''">
            #{hcg},
        </if>
        <!-- NSE -->
        <if test="nse != null and nse != ''">
            #{nse},
        </if>
        <!-- CYFRA21-1 -->
        <if test="cyfra211 != null and cyfra211 != ''">
            #{cyfra211},
        </if>
        <!-- TG -->
        <if test="tg != null and tg != ''">
            #{tg},
        </if>
        <!-- PSA -->
        <if test="psa != null and psa != ''">
            #{psa},
        </if>
        <!-- 肿瘤物标记检查图片 -->
        <if test="tumorMarkerImage != null and tumorMarkerImage != ''">
            #{tumorMarkerImage},
        </if>
        <!-- 实验室检查指标 -->
        <if test="labTestIndicators != null and labTestIndicators != ''">
            #{labTestIndicators},
        </if>
        <!-- 实验室检查指标图片 -->
        <if test="labTestIndicatorsImage != null and labTestIndicatorsImage != ''">
            #{labTestIndicatorsImage},
        </if>
        <!-- 治疗类型 -->
        <if test="treatmentType != null and treatmentType != ''">
            #{treatmentType},
        </if>
        <!-- 用药前治疗方案 -->
        <if test="pre_medication_plan != null and pre_medication_plan != ''">
            #{pre_medication_plan},
        </if>
        <!-- 目前治疗方案 -->
        <if test="current_treatment_plan != null and current_treatment_plan != ''">
            #{current_treatment_plan},
        </if>
        <!-- 进展后治疗方案 -->
        <if test="post_progression_treatment_plan != null and post_progression_treatment_plan != ''">
            #{post_progression_treatment_plan},
        </if>
        <!-- 有无药品适应症 -->
        <if test="hasMedicationIndications != null and hasMedicationIndications != ''">
            #{hasMedicationIndications},
        </if>
        <!-- 药物对该疾病是否有效 -->
        <if test="drugEffectiveness != null and drugEffectiveness != ''">
            #{drugEffectiveness},
        </if>
        <!-- 药物间是否存在临床相互作用 -->
        <if test="clinicalInteraction != null and clinicalInteraction != ''">
            #{clinicalInteraction},
        </if>
        <!-- 请描述临床相互作用 -->
        <if test="clinicalInteractionDescription != null and clinicalInteractionDescription != ''">
            #{clinicalInteractionDescription},
        </if>
        <if test="unnecessaryRepeatedMedication != null and unnecessaryRepeatedMedication != ''">
            #{unnecessaryRepeatedMedication},
        </if>
        <!-- 重复用药首次使用日期 -->
        <if test="repeatedMedicationFirstUseDate != null and repeatedMedicationFirstUseDate != ''">
            #{repeatedMedicationFirstUseDate},
        </if>
        <!-- 请描述不必要重复用药 -->
        <if test="unnecessaryRepeatedMedicationDescription != null and unnecessaryRepeatedMedicationDescription != ''">
            #{unnecessaryRepeatedMedicationDescription},
        </if>
        <!-- 是否出现用药错误 -->
        <if test="medicationError != null and medicationError != ''">
           #{medicationError},
        </if>
        <!-- 用药错误出现时间 -->
        <if test="medicationErrorTime != null and medicationErrorTime != ''">
             #{medicationErrorTime},
        </if>
        <!-- 请描述用药错误 -->
        <if test="medicationErrorDescription != null and medicationErrorDescription != ''">
             #{medicationErrorDescription},
        </if>
        <!-- 用药记录 -->
        <if test="medicationRecord != null and medicationRecord != ''">
            #{medicationRecord},
        </if>
        <!-- 合并用药记录 -->
        <if test="combinedMedicationRecord != null and combinedMedicationRecord != ''">
           #{combinedMedicationRecord},
        </if>
        <!-- 疼痛标准评分NRS -->
        <if test="painNrsScore != null and painNrsScore != ''">
             #{painNrsScore},
        </if>
        <!-- 体力状况评分 -->
        <if test="physicalConditionScore != null and physicalConditionScore != ''">
             #{physicalConditionScore},
        </if>
        <!-- 本次回访是否咨询 -->
        <if test="isConsultation != null and isConsultation != ''">
            #{isConsultation},
        </if>
        <!-- 咨询问题类型 -->
        <if test="consultationType != null and consultationType != ''">
            #{consultationType},
        </if>
        <!-- 具体问题 -->
        <if test="specificQuestion != null and specificQuestion != ''">
            #{specificQuestion},
        </if>
        <!-- 药师解答 -->
        <if test="pharmacistResponse != null and pharmacistResponse != ''">
             #{pharmacistResponse},
        </if>
        <!-- 患者病情评估 -->
        <if test="patientConditionAssessment != null and patientConditionAssessment != ''">
           #{patientConditionAssessment},
        </if>
        <!-- 共建项目描述 -->
        <if test="projectDescription != null and projectDescription != ''">
            #{projectDescription},
        </if>
        <!-- 任务id -->
        <if test="id != null and id != ''">
             #{id},
        </if>
        <!-- 计划ID -->
        <if test="planId != null and planId != ''">
             #{planId},
        </if>
        <!-- 患者id -->
        <if test="patientId != null and patientId != ''">
           #{patientId},
        </if>
        <!-- 门店id -->
        <if test="storeId != null">
             #{storeId},
        </if>
        <!-- 创建时间 -->
        <if test="createdTime != null and createdTime != ''">
             #{createdTime},
        </if>
        <!-- 操作人 -->
        <if test="operator != null and operator != ''">
           #{operator},
        </if>
       </trim>
    </insert>
    <select id="selectFollowUpRecordsByTaskId" parameterType="pd" resultType="pd">
    select * from s_gxhpz_follow_up_records where 1=1
    <if test="taskId !=null and taskId !='' ">
        and taskId = #{taskId}
    </if>
    <if test="patientId !=null and patientId !='' ">
        and patientId = #{patientId}
    </if>
    <if test="storeId !=null and storeId !='' ">
        and storeId = #{storeId}
    </if>
    <if test="patientId !=null and patientId !='' ">
        and patientId = #{patientId}
    </if>
   </select>
</mapper>
