ไม่แน่ใจว่าใช่ที่ต้องการหรือไม่ครับ..
Value :='';
if DBPipeline['alert_critical_value']='Y' then
begin
if DBPipeline['result_type'] ='0' then
begin
if (((DBPipeline['lab_items_code']='4') or (DBPipeline['lab_items_code']='3'))
and (((DBPipeline['ay']='0') and (DBPipeline['am']='0')and (DBPipeline['ad'] <='7')and (DBPipeline['vy']='0') and (DBPipeline['vm']='0') and (DBPipeline['vd'] ='0') )
or((DBPipeline['vy']='0') and (DBPipeline['vm']='0') and (DBPipeline['vd'] <='7') and (DBPipeline['ay']='0') and (DBPipeline['am']='0')and (DBPipeline['ad'] ='0') ))) then
begin
Value :='';
end
else
begin
if (DBPipeline['lab_order_result'] < DBPipeline['range_check_min']) then
Value := '(µèÓÇԡĵ)';
if (DBPipeline['lab_order_result'] > DBPipeline['range_check_max']) then
Value := '(ÊÙÇԡĵ)';
end;
end;
if DBPipeline['result_type'] ='1' then
if (DBPipeline['lab_order_result'] <>DBPipeline['normal_value'] ) then
Value := '(Çԡĵ)';
end;