ผู้เขียน หัวข้อ: รายละเอียดยากลับบ้านผู้ป่วยใน ตามรูป มันอยู่ตรงไหนครับ  (อ่าน 3638 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ gu_prajag

  • Sr. Member
  • ****
  • กระทู้: 253
  • Respect: +1
    • ดูรายละเอียด
จะทำปริีนออกมาเป็นฟอร์มแบบคัสตอม หรือ sql ก็ดีครับ
« แก้ไขครั้งสุดท้าย: มกราคม 15, 2015, 14:55:17 PM โดย gu_prajag »
ศูนย์สารสนเทศ โรงพยาบาลมายอ/รพร.สายบุรี จ.ปัตตานี 
e-mail : my_kop@hotmail.com
SERVER :
CentOS+MariaDB

ออฟไลน์ golf_win

  • Hero Member
  • *****
  • กระทู้: 3,481
  • Respect: +112
    • ดูรายละเอียด
select o.hn,o.an,concat(p.pname,' ',fname,'  ',lname) as ptname,rx.qty,rx.sum_price,p.drugallergy,o.age_y,rx.rxdate,
concat(du.name1," ",du.name2," ",du.name3) as drugu,concat(spu.name1," ",spu.name2," ",spu.name3) as spus,
concat(d.name," ",d.strength," ",d.units) as drugname
from an_stat o
left outer join patient p on p.hn=o.hn
left outer join opitemrece rx on rx.an=o.an
left outer join drugitems d on d.icode=rx.icode
left outer join sp_use spu on spu.sp_use=rx.sp_use
left outer join drugusage du on du.drugusage=rx.drugusage
where o.an='560000366' and rx.icode like "1%"
and item_type like 'H'
order by rx.icode
โรงพยาบาลเจ็ดเสมียน จังหวัดราชบุรี
Start 19-1-51    35 station
HOSxP  3.59.5.18 Activate License
Tel. 032-305096-7 ต่อ 118
Web. http://csmhos.thaiddns.com:8080
         http://csmhos.thaieasydns.com:8080

ออฟไลน์ gu_prajag

  • Sr. Member
  • ****
  • กระทู้: 253
  • Respect: +1
    • ดูรายละเอียด
select o.hn,o.an,concat(p.pname,' ',fname,'  ',lname) as ptname,rx.qty,rx.sum_price,p.drugallergy,o.age_y,rx.rxdate,
concat(du.name1," ",du.name2," ",du.name3) as drugu,concat(spu.name1," ",spu.name2," ",spu.name3) as spus,
concat(d.name," ",d.strength," ",d.units) as drugname
from an_stat o
left outer join patient p on p.hn=o.hn
left outer join opitemrece rx on rx.an=o.an
left outer join drugitems d on d.icode=rx.icode
left outer join sp_use spu on spu.sp_use=rx.sp_use
left outer join drugusage du on du.drugusage=rx.drugusage
where o.an='560000366' and rx.icode like "1%"
and item_type like 'H'
order by rx.icode

ขอบคุณมากครับ
ศูนย์สารสนเทศ โรงพยาบาลมายอ/รพร.สายบุรี จ.ปัตตานี 
e-mail : my_kop@hotmail.com
SERVER :
CentOS+MariaDB