ผู้เขียน หัวข้อ: ผมจะหาผู้ป่วย DM ที่ได้รับการตรวจ Micro albumin และได้รับยา Enarapril  (อ่าน 3152 ครั้ง)

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

ออฟไลน์ jackkawave

  • Hero Member
  • *****
  • กระทู้: 615
  • HOSxP
  • Respect: 0
    • ดูรายละเอียด
    • http://kalasin.moph.go.th/hmh
ผมจะหาผู้ป่วย DM ที่ได้รับการตรวจ Micro albumin ค่าระหว่าง 50-100  และได้รับยา Enarapril
ท่านใดมี Sql  รบกวนด้วยครับ ขอบคุณครับ  ;D ;D
โรงพยาบาลห้วยเม็ก  จังหวัดกาฬสินธุ์
Huaimek Hospital   Kalasin Thailand.
http://kalasin.moph.go.th/hmh
Admin : yingtanarak <Jack> <mobile: 08-9709-1044>
Facebook : ying-tanarak Jack
E-Mail :  yingtanarak@hotmail.com
Hosxp 3.58.2.12
Implement 27/08/2008 By : BMS. (khetrat & Aek-kapong)
Master : IBM X3400  Xeon 2.0GHz Ram8GB Centos 6.6 MySQL Percona 5.6.23-72.1
Slave 1 : IBM X3400 Xeon 1.6GHz Ram8GB  Raid1 Centos 6.6 MySQL Percona 5.6.23-72.1
Slave 2 : PC CPU Intel DualCoreE2180 2.0GHz. Ram2GB Windows Server2003
Max Client HOSxP : 60 Client

ออฟไลน์ nph2006

  • Sr. Member
  • ****
  • กระทู้: 417
  • Respect: +1
    • ดูรายละเอียด
    • www.nongphok.net
0
select v.vn,v.hn as HN,pt.cid,v.vstdate,concat(pt.pname,pt.fname," ",pt.lname) as Name,
 v.age_y,pt.addrpart,pt.moopart,t3.name,concat(pt.pttype,"-",p1.name) pts,concat(pt.addrpart," ?.",pt.moopart," ?.",t3.name," ?.",t2.name," ?.",t1.name) as Address,
 v.lastvisit,o.bps,o.bpd,o.bw,o.height ,l3.lab_items_name,l2.lab_order_result,op.icode,dr.name,op.qty,d1.name1
 from vn_stat v
 left outer join patient pt on pt.hn=v.hn
left outer join lab_head lh on lh.hn=v.hn
left outer join lab_order l2 on l2.lab_order_number=lh.lab_order_number
left outer join lab_items l3 on l3.lab_items_code=l2.lab_items_code
left outer join opitemrece op on op.hn=v.hn
 left outer join drugitems dr on dr.icode = op.icode
left outer join drugusage d1 on d1.drugusage=op.drugusage
 left outer join opdscreen o on o.hn=pt.hn
 left outer join pttype p1 on p1.pttype=pt.pttype
 left outer join thaiaddress t1 on t1.chwpart=pt.chwpart and t1.amppart="00" and t1.tmbpart="00"
 left outer join thaiaddress t2 on t2.chwpart=pt.chwpart and t2.amppart=pt.amppart and t2.tmbpart="00"
 left outer join thaiaddress t3 on t3.chwpart=pt.chwpart and t3.amppart=pt.amppart and t3.tmbpart=pt.tmbpart
 where  v.vstdate  between "2012-04-01" and "2012-04-01" and   l2.lab_order_result  between 50 and 100
 and v.hn in(select hn from clinicmember where clinic ="001")
and op.icode="1440028"
 group by v.vn
 order by  v.vn

1440028 = รหัส ยา Enarapril
รพ.หนองพอก จ.ร้อยเอ็ด 30 เตียง
www.nongphok.net
cup_nph@yahoo.com
may_put@hotmail.com
Server :  CentOS 6.4 64 Bit  Ram 32 Gb SAS 300*3 RAID 5 MySQL Percona Server 5.5.30 64 Bit
Slave : CentOS 5.4 64 Bit  Ram 4 Gb MySQL 5.1.55 64 Bit
Lis : Smart LIMS

Client : Windows XP  HosXP : 3.56.6.20, 72 client