|
|
1、门诊自动处理医生未回复的结果为同意,前提创建定时任务,直接复制可用,
create or replace procedure dc_mzdpys
is
begin
update peaas.presc a
set a.doctor_receive_reason = '同意点评意见',
a.doctor_receive_date=to_date(to_char((a.check_time+interval '440608' second),'yyyy/mm/dd hh24:mi:ss'),'yyyy/mm/dd hh24:mi:ss'),--自动生成点评日期后几天的数据,
a.is_doctor_received = '1',
a.received_doctor_code = a.doctor_code
where a.check_state = 2
and a.check_error_flag = 1
and a.received_doctor_code is null
and a.check_time < sysdate-15;--点评日期15天前未回复的
commit;
end;
注意:a.doctor_receive_date 医生回复时间需结合点评时间参考,
|
|