copy from smartor/src/main/resources/mapper/smartor/PatMaternityChildArchiveMapper.xml
copy to smartor/src/main/resources/mapper/smartor/PatMaternityArchiveDetailMapper.xml
| 文件从 smartor/src/main/resources/mapper/smartor/PatMaternityChildArchiveMapper.xml 复制 |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatMaternityChildArchiveMapper"> |
| | | <mapper namespace="com.smartor.mapper.PatMaternityArchiveDetailMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMaternityChildArchive" id="PatMaternityChildArchiveResult"> |
| | | <resultMap type="com.smartor.domain.PatMaternityArchiveDetail" id="PatMaternityArchiveDetailResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="type" column="type"/> |
| | | <result property="archiveid" column="archiveid"/> |
| | | <result property="archiveType" column="archive_type"/> |
| | | <result property="sourceType" column="source_type"/> |
| | | <result property="outhospno" column="outhospno"/> |
| | | <result property="inhospno" column="inhospno"/> |
| | | <result property="serialnum" column="serialnum"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="parentname" column="parentname"/> |
| | | <result property="birthdate" column="birthdate"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="diagTime" column="diag_time"/> |
| | | <result property="archiveTime" column="archive_time"/> |
| | | <result property="plannedFollowTime" column="planned_follow_time"/> |
| | | <result property="followupCycleTimes" column="followup_cycle_times"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="doctorCode" column="doctor_code"/> |
| | | <result property="doctorName" column="doctor_name"/> |
| | |
| | | <result property="icd10code" column="icd10code"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="pregnancySituation" column="pregnancy_situation"/> |
| | | <result property="appointmentSituation" column="appointment_situation"/> |
| | | <result property="specificSituation" column="specific_situation"/> |
| | | <result property="handleSuggestion" column="handle_suggestion"/> |
| | | <result property="closeStatus" column="close_status"/> |
| | | <result property="nutritionIcd10Code" column="nutrition_icd10_code"/> |
| | | <result property="nutritionDiagName" column="nutrition_diag_name"/> |
| | | <result property="gestationalWeek" column="gestational_week"/> |
| | | <result property="birthWeight" column="birth_weight"/> |
| | | <result property="highRiskChildType" column="high_risk_child_type"/> |
| | | <result property="highRiskChildName" column="high_risk_child_name"/> |
| | | <result property="isRecordEstablished" column="is_record_established"/> |
| | | <result property="dueDate" column="due_date"/> |
| | | <result property="registerUser" column="register_user"/> |
| | | <result property="followupPeriod" column="followup_period"/> |
| | | <result property="epEarlyPregnancyFollowupForm" column="ep_early_pregnancy_followup_form"/> |
| | | <result property="mhiMenopauseFollowupSystemIssuesForm" column="mhi_menopause_followup_system_issues_form"/> |
| | | <result property="mhiMhtInitialVisitMedicalRecordForm" column="mhi_mht_initial_visit_medical_record_form"/> |
| | | <result property="mhiMhtFollowUpMedicalRecordForm" column="mhi_mht_follow_up_medical_record_form"/> |
| | | <result property="mhiModifiedKuppermanScoringScaleForm" column="mhi_modified_kupperman_scoring_scale_form"/> |
| | | <result property="mhiMenopauseRatingScaleForm" column="mhi_menopause_rating_scale_form"/> |
| | | <result property="mhiPittsburghSleepQualityIndexForm" column="mhi_pittsburgh_sleep_quality_index_form"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="campusid" column="campusid"/> |
| | |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMaternityChildArchiveVo"> |
| | | <sql id="selectPatMaternityArchiveDetailVo"> |
| | | select id, |
| | | type, |
| | | archiveid, |
| | | archive_type, |
| | | source_type, |
| | | outhospno, |
| | | inhospno, |
| | | serialnum, |
| | | patid, |
| | | patname, |
| | | parentname, |
| | | birthdate, |
| | | idcardno, |
| | | phone, |
| | | diag_time, |
| | | archive_time, |
| | | planned_follow_time, |
| | | followup_cycle_times, |
| | | sex, |
| | | doctor_code, |
| | | doctor_name, |
| | |
| | | icd10code, |
| | | diagname, |
| | | pregnancy_situation, |
| | | appointment_situation, |
| | | specific_situation, |
| | | handle_suggestion, |
| | | close_status, |
| | | nutrition_icd10_code, |
| | | nutrition_diag_name, |
| | | gestational_week, |
| | | birth_weight, |
| | | high_risk_child_type, |
| | | high_risk_child_name, |
| | | is_record_established, |
| | | due_date, |
| | | register_user, |
| | | followup_period, |
| | | ep_early_pregnancy_followup_form, |
| | | mhi_menopause_followup_system_issues_form, |
| | | mhi_mht_initial_visit_medical_record_form, |
| | | mhi_mht_follow_up_medical_record_form, |
| | | mhi_modified_kupperman_scoring_scale_form, |
| | | mhi_menopause_rating_scale_form, |
| | | mhi_pittsburgh_sleep_quality_index_form, |
| | | remark, |
| | | orgid, |
| | | campusid, |
| | |
| | | create_by, |
| | | create_time, |
| | | del_flag |
| | | from pat_maternity_child_archive |
| | | from pat_maternity_archive_detail |
| | | </sql> |
| | | |
| | | <select id="selectPatMaternityChildArchiveList" parameterType="com.smartor.domain.PatMaternityChildArchive" |
| | | resultMap="PatMaternityChildArchiveResult"> |
| | | <include refid="selectPatMaternityChildArchiveVo"/> |
| | | <select id="selectPatMaternityArchiveDetailList" parameterType="com.smartor.domain.PatMaternityArchiveDetail" |
| | | resultMap="PatMaternityArchiveDetailResult"> |
| | | <include refid="selectPatMaternityArchiveDetailVo"/> |
| | | where 1=1 |
| | | and del_flag = '0' |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="archiveid != null">and archiveid = #{archiveid}</if> |
| | | <if test="archiveType != null and archiveType != ''">and archive_type = #{archiveType}</if> |
| | | <if test="sourceType != null and sourceType != ''">and source_type = #{sourceType}</if> |
| | | <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if> |
| | | <if test="inhospno != null and inhospno != ''">and inhospno = #{inhospno}</if> |
| | | <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if> |
| | | <if test="patid != null">and patid = #{patid}</if> |
| | | <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="parentname != null and parentname != ''">and parentname like concat('%', #{parentname}, '%')</if> |
| | | <if test="birthdate != null">and birthdate = #{birthdate}</if> |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="diagTime != null">and diag_time = #{diagTime}</if> |
| | | <if test="plannedFollowTime != null">and planned_follow_time = #{plannedFollowTime}</if> |
| | | <if test="followupCycleTimes != null and followupCycleTimes != ''">and followup_cycle_times = #{followupCycleTimes}</if> |
| | | <if test="sex != null">and sex = #{sex}</if> |
| | | <if test="doctorCode != null and doctorCode != ''">and doctor_code = #{doctorCode}</if> |
| | | <if test="doctorName != null and doctorName != ''">and doctor_name like concat('%', #{doctorName}, '%')</if> |
| | |
| | | <if test="wardname != null and wardname != ''">and wardname like concat('%', #{wardname}, '%')</if> |
| | | <if test="icd10code != null and icd10code != ''">and icd10code = #{icd10code}</if> |
| | | <if test="diagname != null and diagname != ''">and diagname like concat('%', #{diagname}, '%')</if> |
| | | <if test="pregnancySituation != null and pregnancySituation != ''">and pregnancy_situation = #{pregnancySituation}</if> |
| | | <if test="appointmentSituation != null and appointmentSituation != ''">and appointment_situation = #{appointmentSituation}</if> |
| | | <if test="closeStatus != null and closeStatus != ''">and close_status = #{closeStatus}</if> |
| | | <if test="nutritionIcd10Code != null and nutritionIcd10Code != ''">and nutrition_icd10_code = #{nutritionIcd10Code}</if> |
| | | <if test="nutritionDiagName != null and nutritionDiagName != ''">and nutrition_diag_name like concat('%', #{nutritionDiagName}, '%')</if> |
| | | <if test="gestationalWeek != null">and gestational_week = #{gestationalWeek}</if> |
| | | <if test="birthWeight != null">and birth_weight = #{birthWeight}</if> |
| | | <if test="highRiskChildType != null and highRiskChildType != ''">and high_risk_child_type = #{highRiskChildType}</if> |
| | | <if test="highRiskChildName != null and highRiskChildName != ''">and high_risk_child_name like concat('%', #{highRiskChildName}, '%')</if> |
| | | <if test="isRecordEstablished != null and isRecordEstablished != ''">and is_record_established = #{isRecordEstablished}</if> |
| | | <if test="registerUser != null and registerUser != ''">and register_user = #{registerUser}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectPatMaternityChildArchiveById" parameterType="Long" resultMap="PatMaternityChildArchiveResult"> |
| | | <include refid="selectPatMaternityChildArchiveVo"/> |
| | | <select id="selectPatMaternityArchiveDetailById" parameterType="Long" resultMap="PatMaternityArchiveDetailResult"> |
| | | <include refid="selectPatMaternityArchiveDetailVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatMaternityChildArchive" parameterType="com.smartor.domain.PatMaternityChildArchive" |
| | | <insert id="insertPatMaternityArchiveDetail" parameterType="com.smartor.domain.PatMaternityArchiveDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into pat_maternity_child_archive |
| | | insert into pat_maternity_archive_detail |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="type != null">type,</if> |
| | | <if test="archiveid != null">archiveid,</if> |
| | | <if test="archiveType != null">archive_type,</if> |
| | | <if test="sourceType != null">source_type,</if> |
| | | <if test="outhospno != null">outhospno,</if> |
| | | <if test="inhospno != null">inhospno,</if> |
| | | <if test="serialnum != null">serialnum,</if> |
| | | <if test="patid != null">patid,</if> |
| | | <if test="patname != null">patname,</if> |
| | | <if test="parentname != null">parentname,</if> |
| | | <if test="birthdate != null">birthdate,</if> |
| | | <if test="idcardno != null">idcardno,</if> |
| | | <if test="phone != null">phone,</if> |
| | | <if test="diagTime != null">diag_time,</if> |
| | | <if test="archiveTime != null">archive_time,</if> |
| | | <if test="plannedFollowTime != null">planned_follow_time,</if> |
| | | <if test="followupCycleTimes != null">followup_cycle_times,</if> |
| | | <if test="sex != null">sex,</if> |
| | | <if test="doctorCode != null">doctor_code,</if> |
| | | <if test="doctorName != null">doctor_name,</if> |
| | |
| | | <if test="icd10code != null">icd10code,</if> |
| | | <if test="diagname != null">diagname,</if> |
| | | <if test="pregnancySituation != null">pregnancy_situation,</if> |
| | | <if test="appointmentSituation != null">appointment_situation,</if> |
| | | <if test="specificSituation != null">specific_situation,</if> |
| | | <if test="handleSuggestion != null">handle_suggestion,</if> |
| | | <if test="closeStatus != null">close_status,</if> |
| | | <if test="nutritionIcd10Code != null">nutrition_icd10_code,</if> |
| | | <if test="nutritionDiagName != null">nutrition_diag_name,</if> |
| | | <if test="gestationalWeek != null">gestational_week,</if> |
| | | <if test="birthWeight != null">birth_weight,</if> |
| | | <if test="highRiskChildType != null">high_risk_child_type,</if> |
| | | <if test="highRiskChildName != null">high_risk_child_name,</if> |
| | | <if test="isRecordEstablished != null">is_record_established,</if> |
| | | <if test="dueDate != null">due_date,</if> |
| | | <if test="registerUser != null">register_user,</if> |
| | | <if test="followupPeriod != null">followup_period,</if> |
| | | <if test="epEarlyPregnancyFollowupForm != null">ep_early_pregnancy_followup_form,</if> |
| | | <if test="mhiMenopauseFollowupSystemIssuesForm != null">mhi_menopause_followup_system_issues_form,</if> |
| | | <if test="mhiMhtInitialVisitMedicalRecordForm != null">mhi_mht_initial_visit_medical_record_form,</if> |
| | | <if test="mhiMhtFollowUpMedicalRecordForm != null">mhi_mht_follow_up_medical_record_form,</if> |
| | | <if test="mhiModifiedKuppermanScoringScaleForm != null">mhi_modified_kupperman_scoring_scale_form,</if> |
| | | <if test="mhiMenopauseRatingScaleForm != null">mhi_menopause_rating_scale_form,</if> |
| | | <if test="mhiPittsburghSleepQualityIndexForm != null">mhi_pittsburgh_sleep_quality_index_form,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="campusid != null">campusid,</if> |
| | |
| | | <if test="delFlag != null and delFlag != ''">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="archiveid != null">#{archiveid},</if> |
| | | <if test="archiveType != null">#{archiveType},</if> |
| | | <if test="sourceType != null">#{sourceType},</if> |
| | | <if test="outhospno != null">#{outhospno},</if> |
| | | <if test="inhospno != null">#{inhospno},</if> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | | <if test="patid != null">#{patid},</if> |
| | | <if test="patname != null">#{patname},</if> |
| | | <if test="parentname != null">#{parentname},</if> |
| | | <if test="birthdate != null">#{birthdate},</if> |
| | | <if test="idcardno != null">#{idcardno},</if> |
| | | <if test="phone != null">#{phone},</if> |
| | | <if test="diagTime != null">#{diagTime},</if> |
| | | <if test="archiveTime != null">#{archiveTime},</if> |
| | | <if test="plannedFollowTime != null">#{plannedFollowTime},</if> |
| | | <if test="followupCycleTimes != null">#{followupCycleTimes},</if> |
| | | <if test="sex != null">#{sex},</if> |
| | | <if test="doctorCode != null">#{doctorCode},</if> |
| | | <if test="doctorName != null">#{doctorName},</if> |
| | |
| | | <if test="icd10code != null">#{icd10code},</if> |
| | | <if test="diagname != null">#{diagname},</if> |
| | | <if test="pregnancySituation != null">#{pregnancySituation},</if> |
| | | <if test="appointmentSituation != null">#{appointmentSituation},</if> |
| | | <if test="specificSituation != null">#{specificSituation},</if> |
| | | <if test="handleSuggestion != null">#{handleSuggestion},</if> |
| | | <if test="closeStatus != null">#{closeStatus},</if> |
| | | <if test="nutritionIcd10Code != null">#{nutritionIcd10Code},</if> |
| | | <if test="nutritionDiagName != null">#{nutritionDiagName},</if> |
| | | <if test="gestationalWeek != null">#{gestationalWeek},</if> |
| | | <if test="birthWeight != null">#{birthWeight},</if> |
| | | <if test="highRiskChildType != null">#{highRiskChildType},</if> |
| | | <if test="highRiskChildName != null">#{highRiskChildName},</if> |
| | | <if test="isRecordEstablished != null">#{isRecordEstablished},</if> |
| | | <if test="dueDate != null">#{dueDate},</if> |
| | | <if test="registerUser != null">#{registerUser},</if> |
| | | <if test="followupPeriod != null">#{followupPeriod},</if> |
| | | <if test="epEarlyPregnancyFollowupForm != null">#{epEarlyPregnancyFollowupForm},</if> |
| | | <if test="mhiMenopauseFollowupSystemIssuesForm != null">#{mhiMenopauseFollowupSystemIssuesForm},</if> |
| | | <if test="mhiMhtInitialVisitMedicalRecordForm != null">#{mhiMhtInitialVisitMedicalRecordForm},</if> |
| | | <if test="mhiMhtFollowUpMedicalRecordForm != null">#{mhiMhtFollowUpMedicalRecordForm},</if> |
| | | <if test="mhiModifiedKuppermanScoringScaleForm != null">#{mhiModifiedKuppermanScoringScaleForm},</if> |
| | | <if test="mhiMenopauseRatingScaleForm != null">#{mhiMenopauseRatingScaleForm},</if> |
| | | <if test="mhiPittsburghSleepQualityIndexForm != null">#{mhiPittsburghSleepQualityIndexForm},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="campusid != null">#{campusid},</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatMaternityChildArchive" parameterType="com.smartor.domain.PatMaternityChildArchive"> |
| | | update pat_maternity_child_archive |
| | | <update id="updatePatMaternityArchiveDetail" parameterType="com.smartor.domain.PatMaternityArchiveDetail"> |
| | | update pat_maternity_archive_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="archiveid != null">archiveid = #{archiveid},</if> |
| | | <if test="archiveType != null">archive_type = #{archiveType},</if> |
| | | <if test="sourceType != null">source_type = #{sourceType},</if> |
| | | <if test="outhospno != null">outhospno = #{outhospno},</if> |
| | | <if test="inhospno != null">inhospno = #{inhospno},</if> |
| | | <if test="serialnum != null">serialnum = #{serialnum},</if> |
| | | <if test="patid != null">patid = #{patid},</if> |
| | | <if test="patname != null">patname = #{patname},</if> |
| | | <if test="parentname != null">parentname = #{parentname},</if> |
| | | <if test="birthdate != null">birthdate = #{birthdate},</if> |
| | | <if test="idcardno != null">idcardno = #{idcardno},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | | <if test="diagTime != null">diag_time = #{diagTime},</if> |
| | | <if test="archiveTime != null">archive_time = #{archiveTime},</if> |
| | | <if test="plannedFollowTime != null">planned_follow_time = #{plannedFollowTime},</if> |
| | | <if test="followupCycleTimes != null">followup_cycle_times = #{followupCycleTimes},</if> |
| | | <if test="sex != null">sex = #{sex},</if> |
| | | <if test="doctorCode != null">doctor_code = #{doctorCode},</if> |
| | | <if test="doctorName != null">doctor_name = #{doctorName},</if> |
| | |
| | | <if test="icd10code != null">icd10code = #{icd10code},</if> |
| | | <if test="diagname != null">diagname = #{diagname},</if> |
| | | <if test="pregnancySituation != null">pregnancy_situation = #{pregnancySituation},</if> |
| | | <if test="appointmentSituation != null">appointment_situation = #{appointmentSituation},</if> |
| | | <if test="specificSituation != null">specific_situation = #{specificSituation},</if> |
| | | <if test="handleSuggestion != null">handle_suggestion = #{handleSuggestion},</if> |
| | | <if test="closeStatus != null">close_status = #{closeStatus},</if> |
| | | <if test="nutritionIcd10Code != null">nutrition_icd10_code = #{nutritionIcd10Code},</if> |
| | | <if test="nutritionDiagName != null">nutrition_diag_name = #{nutritionDiagName},</if> |
| | | <if test="gestationalWeek != null">gestational_week = #{gestationalWeek},</if> |
| | | <if test="birthWeight != null">birth_weight = #{birthWeight},</if> |
| | | <if test="highRiskChildType != null">high_risk_child_type = #{highRiskChildType},</if> |
| | | <if test="highRiskChildName != null">high_risk_child_name = #{highRiskChildName},</if> |
| | | <if test="isRecordEstablished != null">is_record_established = #{isRecordEstablished},</if> |
| | | <if test="dueDate != null">due_date = #{dueDate},</if> |
| | | <if test="registerUser != null">register_user = #{registerUser},</if> |
| | | <if test="followupPeriod != null">followup_period = #{followupPeriod},</if> |
| | | <if test="epEarlyPregnancyFollowupForm != null">ep_early_pregnancy_followup_form = #{epEarlyPregnancyFollowupForm},</if> |
| | | <if test="mhiMenopauseFollowupSystemIssuesForm != null">mhi_menopause_followup_system_issues_form = #{mhiMenopauseFollowupSystemIssuesForm},</if> |
| | | <if test="mhiMhtInitialVisitMedicalRecordForm != null">mhi_mht_initial_visit_medical_record_form = #{mhiMhtInitialVisitMedicalRecordForm},</if> |
| | | <if test="mhiMhtFollowUpMedicalRecordForm != null">mhi_mht_follow_up_medical_record_form = #{mhiMhtFollowUpMedicalRecordForm},</if> |
| | | <if test="mhiModifiedKuppermanScoringScaleForm != null">mhi_modified_kupperman_scoring_scale_form = #{mhiModifiedKuppermanScoringScaleForm},</if> |
| | | <if test="mhiMenopauseRatingScaleForm != null">mhi_menopause_rating_scale_form = #{mhiMenopauseRatingScaleForm},</if> |
| | | <if test="mhiPittsburghSleepQualityIndexForm != null">mhi_pittsburgh_sleep_quality_index_form = #{mhiPittsburghSleepQualityIndexForm},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatMaternityChildArchiveById" parameterType="Long"> |
| | | update pat_maternity_child_archive |
| | | <update id="deletePatMaternityArchiveDetailById" parameterType="Long"> |
| | | update pat_maternity_archive_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag = '1' |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatMaternityChildArchiveByIds" parameterType="String"> |
| | | update pat_maternity_child_archive set del_flag = '1' where id in |
| | | <update id="deletePatMaternityArchiveDetailByIds" parameterType="String"> |
| | | update pat_maternity_archive_detail set del_flag = '1' where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |