รพจศ

วันอังคารที่ 26 กรกฎาคม พ.ศ. 2559

เพิ่มวัคซีนJEเชื้อเป็น

1.เพิ่มข้อมูลที่ตารางperson_vaccine
2.เพิ่มข้อมูลตาราง epi_vaccine
3.ทำให้วัคซีนรู้จักกันโดยเพิ่มที่ตาราง vaccine_combination
4.ส่งรหัสวัคชีนออก provis ทำให้รู้ว่าเราส่งออก43แฟ้มเป็นรหัสอะไร เพิ่มใน provis_vcctype

วันจันทร์ที่ 25 กรกฎาคม พ.ศ. 2559

SQL วันล่ะเล็กละน้อย

การมารับริการใน รพ
select s.vn,s.hn,s.vstdate,s.vsttime as "มา",s.service3,s.service4 as "ดึงมาซักประวัติ",s.service11 as "บันทึกซักประวัติเสร็จ",s.service5 as "เริ่มตรวจ",

s.service12 as "บันทึกตรวจเสร็จ",s.service6 as "บันทึกรายการยา MOD2",s.service7 as "ออกใบเสร็จรับเงิน" ,
sec_to_time(time_to_sec(service6)-time_to_sec(vsttime)) as total_time

from service_time s
where s.vstdate between "2016-01-01" and "2016-06-01"
and s.service3 is not null and s.service6 is not null
and s.service3 >= "08:00:00" and s.service3 <= "16:00:00"
and s.service6 > s.service3
and s.service6 > service5
order by s.vn