id,resident_id,patient_id,patient_name, patient_phone,card_no,sex, birth_date,family_member_phone,address, main_diagnosis,hospital_agency_id,hospital_agency_name, campus_agency_id,campus_agency_name,department_id, department_name,ward_id,ward_name, appointment_treatment_group,registration_no,registration_date, appointment_date,certificate_issuing_doctor_id,certificate_issuing_doctor_name, responsible_nurse,del_flag,create_by, create_time,update_by,update_time delete from patient_pre_hospitalization where id = #{id,jdbcType=BIGINT} insert into patient_pre_hospitalization ( id, resident_id, patient_id, patient_name , patient_phone, card_no, sex , birth_date, family_member_phone, address , main_diagnosis, hospital_agency_id, hospital_agency_name , campus_agency_id, campus_agency_name, department_id , department_name, ward_id, ward_name , appointment_treatment_group, registration_no, registration_date , appointment_date, certificate_issuing_doctor_id, certificate_issuing_doctor_name , responsible_nurse, del_flag, create_by , create_time, update_by, update_time) values ( #{id,jdbcType=BIGINT}, #{residentId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{patientName,jdbcType=VARCHAR} , #{patientPhone,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR} , #{birthDate,jdbcType=DATE}, #{familyMemberPhone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR} , #{mainDiagnosis,jdbcType=VARCHAR}, #{hospitalAgencyId,jdbcType=BIGINT}, #{hospitalAgencyName,jdbcType=VARCHAR} , #{campusAgencyId,jdbcType=BIGINT}, #{campusAgencyName,jdbcType=VARCHAR}, #{departmentId,jdbcType=BIGINT} , #{departmentName,jdbcType=VARCHAR}, #{wardId,jdbcType=BIGINT}, #{wardName,jdbcType=VARCHAR} , #{appointmentTreatmentGroup,jdbcType=VARCHAR}, #{registrationNo,jdbcType=VARCHAR}, #{registrationDate,jdbcType=DATE} , #{appointmentDate,jdbcType=DATE}, #{certificateIssuingDoctorId,jdbcType=BIGINT}, #{certificateIssuingDoctorName,jdbcType=VARCHAR} , #{responsibleNurse,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR} , #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}) insert into patient_pre_hospitalization id, resident_id, patient_id, patient_name, patient_phone, card_no, sex, birth_date, family_member_phone, address, main_diagnosis, hospital_agency_id, hospital_agency_name, campus_agency_id, campus_agency_name, department_id, department_name, ward_id, ward_name, appointment_treatment_group, registration_no, registration_date, appointment_date, certificate_issuing_doctor_id, certificate_issuing_doctor_name, responsible_nurse, del_flag, create_by, create_time, update_by, update_time, #{id,jdbcType=BIGINT}, #{residentId,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{patientName,jdbcType=VARCHAR}, #{patientPhone,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{birthDate,jdbcType=DATE}, #{familyMemberPhone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{mainDiagnosis,jdbcType=VARCHAR}, #{hospitalAgencyId,jdbcType=BIGINT}, #{hospitalAgencyName,jdbcType=VARCHAR}, #{campusAgencyId,jdbcType=BIGINT}, #{campusAgencyName,jdbcType=VARCHAR}, #{departmentId,jdbcType=BIGINT}, #{departmentName,jdbcType=VARCHAR}, #{wardId,jdbcType=BIGINT}, #{wardName,jdbcType=VARCHAR}, #{appointmentTreatmentGroup,jdbcType=VARCHAR}, #{registrationNo,jdbcType=VARCHAR}, #{registrationDate,jdbcType=DATE}, #{appointmentDate,jdbcType=DATE}, #{certificateIssuingDoctorId,jdbcType=BIGINT}, #{certificateIssuingDoctorName,jdbcType=VARCHAR}, #{responsibleNurse,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, update patient_pre_hospitalization resident_id = #{residentId,jdbcType=BIGINT}, patient_id = #{patientId,jdbcType=BIGINT}, patient_name = #{patientName,jdbcType=VARCHAR}, patient_phone = #{patientPhone,jdbcType=VARCHAR}, card_no = #{cardNo,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR}, birth_date = #{birthDate,jdbcType=DATE}, family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, address = #{address,jdbcType=VARCHAR}, main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, department_id = #{departmentId,jdbcType=BIGINT}, department_name = #{departmentName,jdbcType=VARCHAR}, ward_id = #{wardId,jdbcType=BIGINT}, ward_name = #{wardName,jdbcType=VARCHAR}, appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, registration_no = #{registrationNo,jdbcType=VARCHAR}, registration_date = #{registrationDate,jdbcType=DATE}, appointment_date = #{appointmentDate,jdbcType=DATE}, certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, responsible_nurse = #{responsibleNurse,jdbcType=VARCHAR}, del_flag = #{delFlag,jdbcType=TINYINT}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, where id = #{id,jdbcType=BIGINT} update patient_pre_hospitalization set resident_id = #{residentId,jdbcType=BIGINT}, patient_id = #{patientId,jdbcType=BIGINT}, patient_name = #{patientName,jdbcType=VARCHAR}, patient_phone = #{patientPhone,jdbcType=VARCHAR}, card_no = #{cardNo,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR}, birth_date = #{birthDate,jdbcType=DATE}, family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, address = #{address,jdbcType=VARCHAR}, main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, department_id = #{departmentId,jdbcType=BIGINT}, department_name = #{departmentName,jdbcType=VARCHAR}, ward_id = #{wardId,jdbcType=BIGINT}, ward_name = #{wardName,jdbcType=VARCHAR}, appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, registration_no = #{registrationNo,jdbcType=VARCHAR}, registration_date = #{registrationDate,jdbcType=DATE}, appointment_date = #{appointmentDate,jdbcType=DATE}, certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, responsible_nurse = #{responsibleNurse,jdbcType=VARCHAR}, del_flag = #{delFlag,jdbcType=TINYINT}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT} update patient_pre_hospitalization set del_flag = 1 where id in #{id} insert into patient_pre_hospitalization(id,resident_id,patient_id,patient_name, patient_phone,card_no,sex, birth_date,family_member_phone,address, main_diagnosis,hospital_agency_id,hospital_agency_name, campus_agency_id,campus_agency_name,department_id, department_name,ward_id,ward_name, appointment_treatment_group,registration_no,registration_date, appointment_date,certificate_issuing_doctor_id,certificate_issuing_doctor_name, responsible_nurse,del_flag, create_by,create_time,update_by, update_time) values (#{item.id,jdbcType=NUMERIC},#{item.residentId,jdbcType=NUMERIC},#{item.patientId,jdbcType=NUMERIC},#{item.patientName,jdbcType=VARCHAR}, #{item.patientPhone,jdbcType=VARCHAR},#{item.cardNo,jdbcType=VARCHAR},#{item.sex,jdbcType=VARCHAR}, #{item.birthDate,jdbcType=TIMESTAMP},#{item.familyMemberPhone,jdbcType=VARCHAR},#{item.address,jdbcType=VARCHAR}, #{item.mainDiagnosis,jdbcType=VARCHAR},#{item.hospitalAgencyId,jdbcType=NUMERIC},#{item.hospitalAgencyName,jdbcType=VARCHAR}, #{item.campusAgencyId,jdbcType=NUMERIC},#{item.campusAgencyName,jdbcType=VARCHAR},#{item.departmentId,jdbcType=NUMERIC}, #{item.departmentName,jdbcType=VARCHAR},#{item.wardId,jdbcType=NUMERIC},#{item.wardName,jdbcType=VARCHAR}, #{item.appointmentTreatmentGroup,jdbcType=VARCHAR},#{item.registrationNo,jdbcType=VARCHAR},#{item.registrationDate,jdbcType=TIMESTAMP}, #{item.appointmentDate,jdbcType=TIMESTAMP},#{item.certificateIssuingDoctorId,jdbcType=NUMERIC},#{item.certificateIssuingDoctorName,jdbcType=VARCHAR}, #{item.responsibleNurse,jdbcType=VARCHAR},#{item.delFlag,jdbcType=NUMERIC}, #{item.createBy,jdbcType=VARCHAR},#{item.createTime,jdbcType=TIMESTAMP},#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP})