เอาไปใส่ใน SYS_VN_PRE_SCRIPT ประยุกต์ใช้เอานะครับ
WarfarinDim:=getsqldata('select concat("On " , drugitems.name," LastDate (",vstdate ,") Becareful Drug Interaction") from opitemrece left join drugitems on drugitems.icode=opitemrece.icode where hn="'+fhn+'" and drugitems.name like "%warfarin%" order by vstdate desc limit 1');
if (WarfarinDim) <> '' then
showmessage(WarfarinDim);