program yindenaja;
var
tc:tclientdataset;
begin
tc:=tclientdataset.create(nil);
tc.data :=hosxp_getdataset('select hn,drugallergy from patient where length(drugallergy)=2 ');
while not tc.eof do
begin
tc.edit;
tc.fieldbyname('drugallergy').asstring:='';
tc.post;
showdebugtext('HN = '+tc.fieldbyname('hn').asstring+' >>>>>>>> Drugallergy change result '+tc.fieldbyname('drugallergy').asstring+' OK');
tc.next
end;
if tc.changecount>0 then
hosxp_updatedelta(tc.delta,'select hn,drugallergy from patient where length(drugallergy)=2 ');
tc.free;
showmessage('PROCESS DONE');
end.