select inhospid,
patname,
fuflag,
fudate,
fuperiod,
futypecode,
futypedesc,
fuadvice,
fuspecialadvice,
remark,
guid,
operator,
operator_id,
out_way_id,
out_way_name,
nurse_id,
nurse_name,
deptcheck_flag,
wardcheck_flag,
diagcheck_flag,
inhospstate,
patno,
long_task_reason,
inhospno,
serialnum,
hospitalname,
hospitalcode,
hospitaldistrictcode,
hospitaldistrictname,
icd10code,
diagname,
starttime,
endtime,
deptcode,
deptname,
roomno,
bed_no,
orgid,
del_flag,
update_by,
update_time,
create_by,
create_time,
isupload,
upload_time,
patid,
leavediagname,
leaveicd10code,
drcode,
drname,
schemestatus,
generalschemestatus,
leaveldeptcode,
leaveldeptname,
hospitaldistrictid,
leavehospitaldistrictcode,
leavehospitaldistrictname,
leavehospitaldistrictid,
deptid,
leaveldeptid,
schemetime
from pat_med_inhosp
insert into pat_med_inhosp
serialnum,
hospitalname,
hospitalcode,
hospitaldistrictcode,
hospitaldistrictname,
icd10code,
diagname,
starttime,
endtime,
deptcode,
deptname,
roomno,
bed_no,
orgid,
del_flag,
update_by,
update_time,
create_by,
create_time,
isupload,
upload_time,
patid,
leavediagname,
leaveicd10code,
drcode,
drname,
schemestatus,
generalschemestatus,
leaveldeptcode,
leaveldeptname,
hospitaldistrictid,
leavehospitaldistrictcode,
leavehospitaldistrictname,
leavehospitaldistrictid,
deptid,
leaveldeptid,
schemetime,
patname,
patno,
inhospstate,
deptcheck_flag,
wardcheck_flag,
diagcheck_flag,
long_task_reason,
nurse_id,
nurse_name,
out_way_id,
out_way_name,
guid,
operator,
operator_id,
inhospno,
remark,
fuflag,
fudate,
fuperiod,
futypecode,
futypedesc,
fuadvice,
fuspecialadvice,
#{serialnum},
#{hospitalname},
#{hospitalcode},
#{hospitaldistrictcode},
#{hospitaldistrictname},
#{icd10code},
#{diagname},
#{starttime},
#{endtime},
#{deptcode},
#{deptname},
#{roomno},
#{bedNo},
#{orgid},
#{delFlag},
#{updateBy},
#{updateTime},
#{createBy},
#{createTime},
#{isupload},
#{uploadTime},
#{patid},
#{leavediagname},
#{leaveicd10code},
#{drcode},
#{drname},
#{schemestatus},
#{generalschemestatus},
#{leaveldeptcode},
#{leaveldeptname},
#{hospitaldistrictid},
#{leavehospitaldistrictcode},
#{leavehospitaldistrictname},
#{leavehospitaldistrictid},
#{deptid},
#{leaveldeptid},
#{schemetime},
#{patname},
#{patno},
#{inhospstate},
#{deptcheckFlag},
#{wardcheckFlag},
#{diagcheckFlag},
#{longTaskReason},
#{nurseId},
#{nurseName},
#{outWayId},
#{outWayName},
#{guid},
#{operator},
#{operatorId},
#{inhospno},
#{remark},
#{fuflag},
#{fudate},
#{fuperiod},
#{futypecode},
#{futypedesc},
#{fuadvice},
#{fuspecialadvice},
update pat_med_inhosp
serialnum = #{serialnum},
hospitalname = #{hospitalname},
hospitalcode = #{hospitalcode},
hospitaldistrictcode = #{hospitaldistrictcode},
hospitaldistrictname = #{hospitaldistrictname},
icd10code = #{icd10code},
diagname = #{diagname},
starttime = #{starttime},
endtime = #{endtime},
deptcode = #{deptcode},
deptname = #{deptname},
roomno = #{roomno},
bed_no = #{bedNo},
orgid = #{orgid},
del_flag = #{delFlag},
update_by = #{updateBy},
update_time = #{updateTime},
create_by = #{createBy},
create_time = #{createTime},
isupload = #{isupload},
upload_time = #{uploadTime},
patid = #{patid},
leavediagname = #{leavediagname},
leaveicd10code = #{leaveicd10code},
drcode = #{drcode},
drname = #{drname},
schemestatus = #{schemestatus},
generalschemestatus = #{generalschemestatus},
leaveldeptcode = #{leaveldeptcode},
leaveldeptname = #{leaveldeptname},
hospitaldistrictid = #{hospitaldistrictid},
leavehospitaldistrictcode = #{leavehospitaldistrictcode},
leavehospitaldistrictname = #{leavehospitaldistrictname},
leavehospitaldistrictid = #{leavehospitaldistrictid},
deptid = #{deptid},
leaveldeptid = #{leaveldeptid},
schemetime = #{schemetime},
patname = #{patname},
patno = #{patno},
inhospstate = #{inhospstate},
deptcheck_flag = #{deptcheckFlag},
wardcheck_flag = #{wardcheckFlag},
diagcheck_flag = #{diagcheckFlag},
long_task_reason = #{longTaskReason},
nurse_id = #{nurseId},
nurse_name = #{nurseName},
out_way_id = #{outWayId},
out_way_name = #{outWayName},
guid = #{guid},
operator = #{operator},
operator_id = #{operatorId},
remark = #{remark},
fuflag = #{fuflag},
fudate = #{fudate},
fuperiod = #{fuperiod},
futypecode = #{futypecode},
futypedesc = #{futypedesc},
fuadvice = #{fuadvice},
fuspecialadvice = #{fuspecialadvice},
where inhospid = #{inhospid}
update pat_med_inhosp
del_flag =1
where inhospid = #{inhospid}
update pat_med_inhosp
del_flag =1
where inhospno = #{inhospno}
delete from pat_med_inhosp where inhospid in
#{inhospid}