BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: Guitar-hero ที่ มิถุนายน 12, 2014, 15:46:43 PM
-
สอบถาม sql การหาคนไข้ใหม่ในปี และ รวมวันนอน(ipd) ครับ ตามภาพที่แนบมา
จากเมนู รายงาน -> รายงานระบบ IPD -> ค้นหาจำนวนผู้ป่วยใน (Custom Search)
มีวิธีเขียน Sql เพื่อหา จำนวนคนไข้ใหม่ในปี และ รวมวันนอน อย่างไรครับ
-
;D ประมาณนี้ไหมครับ ตอบให้ 2 กระทู้นะครับ
select count(DISTINCT ov.hn) as kon,SUM(ov.admdate) as wunnon,SUM(ov.income) as price
from an_stat ov ,patient pt ,ipt ovst
where ov.an=ovst.an and ov.dchdate between "2014-01-01" and "2014-01-31" and ov.hn=pt.hn
and ov.age_y>= 0
and ov.age_y<= 200
and ov.count_in_year=0