insert into reg_apply(
PatId,
PatCardType,
PatCardNo,
PatType,
RegNo,
PatName,
PatSex,
PatAge,
AgeUnit,
PatAgeShow,
PatBirthday,
PatIdentity,
Phone,
Address,
PatFeeType,
DepartCode,
DepartName,
AreaCode,
AreaName,
PatBed,
DiagnosisCode,
DiagnosisName,
ReciNumber,
DoctorCode,
DoctorName,
OrderTime,
ExecDeptCode,
ExecDeptName,
SrcHospCode,
SrcHospName,
Amount,
ChargeState,
PatInvoiceNum,
UserCode,
UserName,
DataSource,
applyid,
Status,
reqDetailName,
create_by,create_time
)
values (
#{PatId},
#{PatCardType},
#{PatCardNo},
#{PatType},
#{RegNo},
#{PatName},
#{PatSex},
#{PatAge},
#{AgeUnit},
#{PatAgeShow},
#{PatBirthday},
#{PatIdentity},
#{Phone},
#{Address},
#{PatFeeType},
#{DepartCode},
#{DepartName},
#{AreaCode},
#{AreaName},
#{PatBed},
#{DiagnosisCode},
#{DiagnosisName},
#{ReciNumber},
#{DoctorCode},
#{DoctorName},
#{OrderTime},
#{ExecDeptCode},
#{ExecDeptName},
#{SrcHospCode},
#{SrcHospName},
#{Amount},
#{ChargeState},
#{PatInvoiceNum},
#{UserCode},
#{UserName},
#{DataSource},
#{applyid},
#{Status},
#{reqDetailName},
#{create_by},#{create_time}
)
update reg_apply
PatId = #{PatId},
PatCardType = #{PatCardType},
PatCardNo = #{PatCardNo},
PatType = #{PatType},
RegNo = #{RegNo},
PatName = #{PatName},
PatSex = #{PatSex},
PatAge = #{PatAge},
AgeUnit = #{AgeUnit},
PatAgeShow = #{PatAgeShow},
PatBirthday = #{PatBirthday},
PatIdentity = #{PatIdentity},
Phone = #{Phone},
Address = #{Address},
PatFeeType = #{PatFeeType},
DepartCode = #{DepartCode},
DepartName = #{DepartName},
AreaCode = #{AreaCode},
AreaName = #{AreaName},
PatBed = #{PatBed},
DiagnosisCode = #{DiagnosisCode},
DiagnosisName = #{DiagnosisName},
ReciNumber = #{ReciNumber},
DoctorCode = #{DoctorCode},
DoctorName = #{DoctorName},
OrderTime = #{OrderTime},
ExecDeptCode = #{ExecDeptCode},
ExecDeptName = #{ExecDeptName},
SrcHospCode = #{SrcHospCode},
SrcHospName = #{SrcHospName},
Amount = #{Amount},
ChargeState = #{ChargeState},
PatInvoiceNum = #{PatInvoiceNum},
UserCode = #{UserCode},
UserName = #{UserName},
DataSource = #{DataSource},
create_by = #{create_by},
create_time = #{create_time},
update_by = #{update_by},
update_time = #{update_time},
Status = #{Status},
reqDetailName = #{reqDetailName},
applyid = #{applyid}
where applyid = #{applyid}
delete from reg_apply where applyid = #{applyid}