select ipn.born_date,concat(pt.pname,pt.fname,' ',pt.lname) as newbornname,ipn.born_time,ipn.birth_weight,
concat(pt.fathername,' ',pt.fatherlname)as fathername,concat(pt.mathername,' ',pt.motherlname) from ipt_newborn ipn
left outer join ipt i on i.an = ipn.an
left outer join patient pt on pt.hn = i.hn