แสดงกระทู้
|
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. |
Messages - weerachaijit
|
หน้า: [1]
|
6
|
หมวดหมู่ทั่วไป / REPORT Exchange / Re: ขอความช่วยเหลือ ER-IMAGE-1
|
เมื่อ: มกราคม 16, 2013, 11:31:12 AM
|
set @vn = "560101190928"; select e1.image1,e1.image2,e1.image3,e1.image4,e1.image5,v.hn,p.pname,p.fname,p.lname,v.age_y,p.addrpart,p.moopart,t.full_name,v.vstdate,o.temperature,v.pdx,i.name,o.cc from vn v left outer join er_image e1 on v.vn=e1.vn left outer join patient p on p.hn=v.hn left outer join opdscreen o on v.vn=o.vn left outer join icd101 i on v.pdx=i.code left outer join thaiaddress t on (t.addressid=concat(p.chwpart,p.amppart,p.tmbpart)) where v.vn = @vn
ประมาณนี้เปล่า
|
|
|
11
|
หมวดหมู่ทั่วไป / HOSxP / sql ตรวจ surveil
|
เมื่อ: ตุลาคม 16, 2012, 02:09:57 PM
|
ใช้ตรวจ surveil ที่มี diag ไม่ตรงกับรหัส 506 ครับ
select * from surveil_member where pdx not in (select min from code506) and vstdate between '2012-09-01' and '2012-09-30'
แต่ต้องใช้กับตาราง code506 ที่แนบมานี้นะครับ หรือจะเอารหัสโรคทั้งหมดมาใส่ในวงเล็ปก็ได้
|
|
|
12
|
หมวดหมู่ทั่วไป / การเขียน SQL Script / Re: SQLร่วมจ่าย30บาทสำหรับโรงพยาบาล
|
เมื่อ: ตุลาคม 16, 2012, 02:00:55 PM
|
ขอผมใช้ตัวนี้ รายชื่อผู้ป่วยนอกสิทธิ์ 89 ที่ได้รับการรักษาและยา เอาไปเทียบกับใบเสร็จ
select ovst.vstdate,ovst.vsttime,patient.cid,ovst.hn,concat(patient.pname,patient.fname," ",patient.lname) as ptname,concat(patient.addrpart," Á.",patient.moopart," ",thaiaddress.full_name) as addresspt,ovst.hospmain,ovst.hospsub,ovst.pttypeno,ovst.pttype,vn_stat.pdx, vn_stat.income from ovst LEFT OUTER JOIN vn_stat ON vn_stat.vn = ovst.vn LEFT OUTER JOIN patient ON patient.hn = vn_stat.hn LEFT OUTER JOIN thaiaddress ON ((patient.tmbpart = thaiaddress.tmbpart) AND (patient.amppart = thaiaddress.amppart) AND (patient.chwpart = thaiaddress.chwpart)) LEFT OUTER JOIN opitemrece ON opitemrece.vn = ovst.vn where (vn_stat.income > 0) and ( ovst.vstdate between "2012-09-17" and "2012-09-17" ) and ovst.pttype in ("89") and ovst.an is null and opitemrece.icode not in ('3001427','3001439','3001428','3003359','3003346','3003347','3000509','3000508','3001100','3003367','3003358') group by ovst.vn
icode ที่ใส่ เป็นพวกรหัสค่าบริการทั้งหลาย เช่นค่าบริการผู้ป่วยนอก, ค่า refer
|
|
|
|