ผู้เขียน หัวข้อ: รายงานแบบฟอร์มระยะเวลาการรับบริการ  (อ่าน 5763 ครั้ง)

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

ออฟไลน์ Bluebird

  • Hero Member
  • *****
  • กระทู้: 1,062
  • Respect: +2
    • ดูรายละเอียด
    • โรงพยาบาลระแงะ จังหวัดนราธิวาส
0
แบบฟอร์มนี้เป็นคนไข้ทั้งหมดเลย
อยากให้แก้รายงานตัวนี้เลือกคนไข้เฉพาะ ถอนฟันครับ  ICD-10 เท่ากับ K04

« แก้ไขครั้งสุดท้าย: ตุลาคม 25, 2008, 08:01:50 AM โดย bluebird »
นักวิชาการคอมพิวเตอร์ โรงพยาบาลระแงะ  จังหวัดนราธิวาส
www.rangaehospital.com

เริ่มใช้งานระบบ 1 ตุลาคม 2550
Server     :  HP Proliant DL180G6 RAM 16Gb. 
Replicate  : DELL PowerEdge 1800   RAM 16 Gb.
MySQL 5.5.31
OS CentOS 5 64bit
HOSxP Version : 3.59.4.27(ตาม Version ที่ออกใหม่ล่าสุด)

ออฟไลน์ atit

  • Hero Member
  • *****
  • กระทู้: 1,233
  • ขออภัย ความรู้ไม่มาก
  • Respect: +3
    • ดูรายละเอียด
Re: รายงานแบบฟอร์มระยะเวลาการรับบริการ
« ตอบกลับ #1 เมื่อ: ตุลาคม 25, 2008, 00:16:04 AM »
0
select a.vstdate,a.vn,a.hn,concat(pname,fname,"    ",lname) as ptname,a.vsttime as begintime,
a.service12 as endtime,substring(icd1.name,1,100) as icdname, concat(odx.icd10,' ',ix.name) as pdxname ,
sec_to_time(time_to_sec(a.service12)-time_to_sec(a.vsttime)) as watingtime, odx.icd10 as icdcode
from service_time a
left outer join patient b on a.hn=b.hn
left outer join ovstdiag odx on odx.vn=a.vn and odx.diagtype='1'
 left outer join icd101 icd1 on icd1.code=odx.icd10
 left outer join icd101 ix on ix.code=substring(odx.icd10,1,3)
where a.vstdate between'2008-01-01'and'2008-01-31'and odx.icd10 like "%k04%"
and a.service12>a.vsttime

ลองดูครับ 8)
« แก้ไขครั้งสุดท้าย: ตุลาคม 25, 2008, 16:10:34 PM โดย atit_seka »
"-"           รู้อะไรไม่สู้รู้วิชา รู้จักหาในบอร์ดเป็นยอดคน                   tel 081-3202497 
ความรู้เพียงเล็กน้อย อาจช่วยคนเป็นร้อยแก้ปัญหา
เพราะฉะนั้น อย่ากลัวที่จะบอกสิ่งที่คุณรู้กับคนอื่น แม้จะเป็นเรื่องพื้นๆ ก็ตาม
cen-os 64 bit ,ram 4 g ,my sql 5.1.33
วิธีแนะนำตัวเอง  http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4413.0
ก่อนตั้งกระทู้ใหม่ ลองหาดูกระทู่เก่าก่อนดีบ่? อาจได้คำตอบเร็วกว่าเด้อ   http://hosxp.net/index.php?option=com_smf&Itemid=28&action=search
วิธีขอบคุณผู้ที่ตอบคำถามถูกใจ   http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=8180.0
การเปิดใช้ Server แยก เก็บรูปภาพ/log http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=10169.0
การติดตั้ง mysql http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=11513.0
sql วันละคำกับคุณperjer http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4007.0
8)ยินดีต้อนรับสู่สังคมแห่งการแบ่งปัน- การแบ่งปันทำให้สังคมน่าอยู่- ;Dขอขอบคุณ
- อ.mn ผู้เขียนโปรแกรมดีๆและช่วยขึ้นระบบ
- อ.อ๊อด,อ.นาจ,อ.ขวด,อ.โก้,อ.nutawut,อ.ตั๊ก,อ.JD,อ.กิจ...ที่คอยช่วยเหลือและให้ความรู้
- ทุกท่านที่ช่วย review โปรแกรมทำให้เราได้ใช้โปรแกรมที่สุดยอด(อยากให้เป็นโปรแกรมระดับประเทศเร็วๆจังจะได้ไม่ต้องง้อ สปสช 5555 :D)

ออฟไลน์ atit

  • Hero Member
  • *****
  • กระทู้: 1,233
  • ขออภัย ความรู้ไม่มาก
  • Respect: +3
    • ดูรายละเอียด
Re: รายงานแบบฟอร์มระยะเวลาการรับบริการ
« ตอบกลับ #2 เมื่อ: ตุลาคม 25, 2008, 00:32:30 AM »
0
 :D
อันนี้เป็นแบบแก้ให้แล้วครับ
"-"           รู้อะไรไม่สู้รู้วิชา รู้จักหาในบอร์ดเป็นยอดคน                   tel 081-3202497 
ความรู้เพียงเล็กน้อย อาจช่วยคนเป็นร้อยแก้ปัญหา
เพราะฉะนั้น อย่ากลัวที่จะบอกสิ่งที่คุณรู้กับคนอื่น แม้จะเป็นเรื่องพื้นๆ ก็ตาม
cen-os 64 bit ,ram 4 g ,my sql 5.1.33
วิธีแนะนำตัวเอง  http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4413.0
ก่อนตั้งกระทู้ใหม่ ลองหาดูกระทู่เก่าก่อนดีบ่? อาจได้คำตอบเร็วกว่าเด้อ   http://hosxp.net/index.php?option=com_smf&Itemid=28&action=search
วิธีขอบคุณผู้ที่ตอบคำถามถูกใจ   http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=8180.0
การเปิดใช้ Server แยก เก็บรูปภาพ/log http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=10169.0
การติดตั้ง mysql http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=11513.0
sql วันละคำกับคุณperjer http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4007.0
8)ยินดีต้อนรับสู่สังคมแห่งการแบ่งปัน- การแบ่งปันทำให้สังคมน่าอยู่- ;Dขอขอบคุณ
- อ.mn ผู้เขียนโปรแกรมดีๆและช่วยขึ้นระบบ
- อ.อ๊อด,อ.นาจ,อ.ขวด,อ.โก้,อ.nutawut,อ.ตั๊ก,อ.JD,อ.กิจ...ที่คอยช่วยเหลือและให้ความรู้
- ทุกท่านที่ช่วย review โปรแกรมทำให้เราได้ใช้โปรแกรมที่สุดยอด(อยากให้เป็นโปรแกรมระดับประเทศเร็วๆจังจะได้ไม่ต้องง้อ สปสช 5555 :D)

ออฟไลน์ Bluebird

  • Hero Member
  • *****
  • กระทู้: 1,062
  • Respect: +2
    • ดูรายละเอียด
    • โรงพยาบาลระแงะ จังหวัดนราธิวาส
Re: รายงานแบบฟอร์มระยะเวลาการรับบริการ
« ตอบกลับ #3 เมื่อ: ตุลาคม 25, 2008, 07:55:40 AM »
0
select a.vstdate,a.vn,a.hn,concat(pname,fname,"    ",lname) as ptname,a.vsttime as begintime,
a.service12 as endtime,substring(icd1.name,1,100) as icdname, concat(odx.icd10,' ',ix.name) as pdxname ,
sec_to_time(time_to_sec(a.service12)-time_to_sec(a.vsttime)) as watingtime, odx.icd10 as icdcode
from service_time a
left outer join patient b on a.hn=b.hn
left outer join ovstdiag odx on odx.vn=a.vn and odx.diagtype='1'
 left outer join icd101 icd1 on icd1.code=odx.icd10
 left outer join icd101 ix on ix.code=substring(odx.icd10,1,3)
where a.vstdate between'2008-01-01'and'2008-01-31'and odx.icd10 like "K04"
and a.service12>a.vsttime

ลองดูครับ 8)
ขอบคุณมากครับ
« แก้ไขครั้งสุดท้าย: ตุลาคม 25, 2008, 08:20:12 AM โดย bluebird »
นักวิชาการคอมพิวเตอร์ โรงพยาบาลระแงะ  จังหวัดนราธิวาส
www.rangaehospital.com

เริ่มใช้งานระบบ 1 ตุลาคม 2550
Server     :  HP Proliant DL180G6 RAM 16Gb. 
Replicate  : DELL PowerEdge 1800   RAM 16 Gb.
MySQL 5.5.31
OS CentOS 5 64bit
HOSxP Version : 3.59.4.27(ตาม Version ที่ออกใหม่ล่าสุด)

ออฟไลน์ Bluebird

  • Hero Member
  • *****
  • กระทู้: 1,062
  • Respect: +2
    • ดูรายละเอียด
    • โรงพยาบาลระแงะ จังหวัดนราธิวาส
Re: รายงานแบบฟอร์มระยะเวลาการรับบริการ
« ตอบกลับ #4 เมื่อ: ตุลาคม 25, 2008, 10:29:46 AM »
0
หากจะกำหนดเอาเฉพาะคนไข้ในเวลาราชการเท่านั้นกำหนดตรงไหนครับ จากสูตร
select a.vstdate,a.vn,a.hn,concat(pname,fname,"    ",lname) as ptname,a.vsttime as begintime,
a.service12 as endtime,substring(icd1.name,1,100) as icdname, concat(odx.icd10,' ',ix.name) as pdxname ,
sec_to_time(time_to_sec(a.service12)-time_to_sec(a.vsttime)) as watingtime, odx.icd10 as icdcode
from service_time a
left outer join patient b on a.hn=b.hn
left outer join ovstdiag odx on odx.vn=a.vn and odx.diagtype='1'
 left outer join icd101 icd1 on icd1.code=odx.icd10
 left outer join icd101 ix on ix.code=substring(odx.icd10,1,3)
where a.vstdate between'2008-01-01'and'2008-01-31'and odx.icd10 like "K04"
and a.service12>a.vsttime
นักวิชาการคอมพิวเตอร์ โรงพยาบาลระแงะ  จังหวัดนราธิวาส
www.rangaehospital.com

เริ่มใช้งานระบบ 1 ตุลาคม 2550
Server     :  HP Proliant DL180G6 RAM 16Gb. 
Replicate  : DELL PowerEdge 1800   RAM 16 Gb.
MySQL 5.5.31
OS CentOS 5 64bit
HOSxP Version : 3.59.4.27(ตาม Version ที่ออกใหม่ล่าสุด)

ออฟไลน์ atit

  • Hero Member
  • *****
  • กระทู้: 1,233
  • ขออภัย ความรู้ไม่มาก
  • Respect: +3
    • ดูรายละเอียด
Re: รายงานแบบฟอร์มระยะเวลาการรับบริการ
« ตอบกลับ #5 เมื่อ: ตุลาคม 25, 2008, 16:16:09 PM »
0
หากจะกำหนดเอาเฉพาะคนไข้ในเวลาราชการเท่านั้นกำหนดตรงไหนครับ จากสูตร
select a.vstdate,a.vn,a.hn,concat(pname,fname,"    ",lname) as ptname,a.vsttime as begintime,
a.service12 as endtime,substring(icd1.name,1,100) as icdname, concat(odx.icd10,' ',ix.name) as pdxname ,
sec_to_time(time_to_sec(a.service12)-time_to_sec(a.vsttime)) as watingtime, odx.icd10 as icdcode
from service_time a
left outer join patient b on a.hn=b.hn
left outer join ovstdiag odx on odx.vn=a.vn and odx.diagtype='1'
 left outer join icd101 icd1 on icd1.code=odx.icd10
 left outer join icd101 ix on ix.code=substring(odx.icd10,1,3)
where a.vstdate between'2008-01-01'and'2008-01-31'and odx.icd10 like "K04"
and a.service12>a.vsttime

select a.vstdate,a.vn,a.hn,concat(pname,fname,"    ",lname) as ptname,a.vsttime as begintime,
a.service12 as endtime,substring(icd1.name,1,100) as icdname, concat(odx.icd10,' ',ix.name) as pdxname ,
sec_to_time(time_to_sec(a.service12)-time_to_sec(a.vsttime)) as watingtime, odx.icd10 as icdcode
from service_time a
left outer join patient b on a.hn=b.hn
left outer join ovstdiag odx on odx.vn=a.vn and odx.diagtype='1'
 left outer join icd101 icd1 on icd1.code=odx.icd10
 left outer join icd101 ix on ix.code=substring(odx.icd10,1,3)
where a.vstdate between'2008-01-01'and'2008-01-31'and odx.icd10 like "K04"
and a.service12>a.vsttime and a.vsttime between "08:00" and "16:00"

น่าจะได้นะครับ
"-"           รู้อะไรไม่สู้รู้วิชา รู้จักหาในบอร์ดเป็นยอดคน                   tel 081-3202497 
ความรู้เพียงเล็กน้อย อาจช่วยคนเป็นร้อยแก้ปัญหา
เพราะฉะนั้น อย่ากลัวที่จะบอกสิ่งที่คุณรู้กับคนอื่น แม้จะเป็นเรื่องพื้นๆ ก็ตาม
cen-os 64 bit ,ram 4 g ,my sql 5.1.33
วิธีแนะนำตัวเอง  http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4413.0
ก่อนตั้งกระทู้ใหม่ ลองหาดูกระทู่เก่าก่อนดีบ่? อาจได้คำตอบเร็วกว่าเด้อ   http://hosxp.net/index.php?option=com_smf&Itemid=28&action=search
วิธีขอบคุณผู้ที่ตอบคำถามถูกใจ   http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=8180.0
การเปิดใช้ Server แยก เก็บรูปภาพ/log http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=10169.0
การติดตั้ง mysql http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=11513.0
sql วันละคำกับคุณperjer http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=4007.0
8)ยินดีต้อนรับสู่สังคมแห่งการแบ่งปัน- การแบ่งปันทำให้สังคมน่าอยู่- ;Dขอขอบคุณ
- อ.mn ผู้เขียนโปรแกรมดีๆและช่วยขึ้นระบบ
- อ.อ๊อด,อ.นาจ,อ.ขวด,อ.โก้,อ.nutawut,อ.ตั๊ก,อ.JD,อ.กิจ...ที่คอยช่วยเหลือและให้ความรู้
- ทุกท่านที่ช่วย review โปรแกรมทำให้เราได้ใช้โปรแกรมที่สุดยอด(อยากให้เป็นโปรแกรมระดับประเทศเร็วๆจังจะได้ไม่ต้องง้อ สปสช 5555 :D)