[SQL] ดูรายชื่อผู้ป่วยที่มีการบันทึก note การจ่ายยา

/ November 25th, 2009/ Posted in HosXP / 471 Comments »
select ov.vstdate,concat(pt.pname,pt.fname,"  ",pt.lname) as ptname,ov.hn,rx.note
from ovst ov
left outer join patient pt on pt.hn = ov.hn
left outer join rx_operator rx on rx.vn = ov.vn
where ov.vstdate between "2009-10-01" and "2009-11-30" and (rx.note <> "" or rx.note is not null)

Tags: , ,

Leave a Reply

You must be logged in to post a comment.