ผู้เขียน หัวข้อ: ฝากดูคำสั่งยอดการใช้น้ำเกลือคะ  (อ่าน 7018 ครั้ง)

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

ออฟไลน์ malee_jung

  • Newbie
  • *
  • กระทู้: 9
  • Respect: 0
    • ดูรายละเอียด
ฝากดูคำสั่งยอดการใช้น้ำเกลือคะ
« เมื่อ: กรกฎาคม 07, 2008, 22:38:37 PM »
0
- เนื่องจากทำระบบส่งน้ำเกลือที่
Server: HP ProLiant ML350 G5 Dual-Core Xeon 2.0G. RAM 16 G. SCSI 73 G.x3 Raid5 
OS: CentOS 5.1_x64 Linux Server  MySQL 5.1.39_x64  HOSXP : 3.52.8.7
E-mail:sujitta_k@hotmail.com
pharmacist at Nakhonnayok Hospital

doramon

  • บุคคลทั่วไป
Re: ฝากดูคำสั่งยอดการใช้น้ำเกลือคะ
« ตอบกลับ #1 เมื่อ: กรกฎาคม 07, 2008, 22:42:23 PM »
0
 ???

ออฟไลน์ malee_jung

  • Newbie
  • *
  • กระทู้: 9
  • Respect: 0
    • ดูรายละเอียด
Re: ฝากดูคำสั่งยอดการใช้น้ำเกลือคะ
« ตอบกลับ #2 เมื่อ: กรกฎาคม 07, 2008, 22:58:08 PM »
0
คำสั่งยอดการใช้น้ำเกลือของแต่ละตึก
select f.name as ward_name,b.name as iv_name,b.units,sum(a.qty)

from drugitems  b
left outer join opitemrece a on a.icode=b.icode
left outer join ipt_order_no d on d.order_no=a.order_no
left outer join  ward f on d.ward=f.ward

where   b.drugcategory ="INTRAVENOUS SOLUTION"
        and a.rxdate between'2008-06-05' and '2008-06-05'
        and a.an <> ""  and a.hn <>""
group by iv_name,ward_name,units
order by f.name , b.name


เนื่องจากลดปริมาณการสต๊อคน้ำเกลือที่ห้องจ่ายยาจึงทำรายงานยอดการใช้น้ำเกลือส่งจากคลังกำหนดให้ iv ที่จะส่ง เป็น drugcategory ="INTRAVENOUS SOLUTION"
1. ฝากพี่ พี่ดูโค๊ดให้หน่อยคะ test แล้วใช้ได้ แต่ทุกครั้งที่ดึงรายงาน โดน Admin ค้อนประจำว่าทำให้ระบบช้า แฮ่แฮ่

2. หน่วยงานที่ไม่ใช่ ward เช่น ผ่าตัด วิสัญญี ไตเทียม Er ก็อยากได้ระบบส่งน้ำเกลือ แต่เขาไม่ใช่ ward ไม่รู้จะผูกกับอะไรดี ช่วยแนะนำหน่อยคะ
3. กำลังคิดว่าจะเพิ่ม icode IV สำหรับแต่ละแผนก เช่น NSS(ER), NSS(anas)... เป็นต้น ไม่รู้ใช่ทางออกที่ถูกหรือเปล่า
4. ใน opitemrece มีช่อง depcode  น่าจะใช้ได้เพราะแต่ละแผนกคีย์ IV เอง แต่ทำไมข้อมูล depcode  ผู้ป่วยในมันไม่มีข้อมูลนะคะ
Server: HP ProLiant ML350 G5 Dual-Core Xeon 2.0G. RAM 16 G. SCSI 73 G.x3 Raid5 
OS: CentOS 5.1_x64 Linux Server  MySQL 5.1.39_x64  HOSXP : 3.52.8.7
E-mail:sujitta_k@hotmail.com
pharmacist at Nakhonnayok Hospital

ออฟไลน์ manoi

  • Hero Member
  • *****
  • กระทู้: 8,669
  • Respect: +170
    • ดูรายละเอียด
    • HOSxP Community Center
Re: ฝากดูคำสั่งยอดการใช้น้ำเกลือคะ
« ตอบกลับ #3 เมื่อ: กรกฎาคม 08, 2008, 06:56:48 AM »
0
ห้องผ่าตัดใช้คำสั่งคล้ายๆ แบบนี้ครับ

select o.icode,count(o.qty)
from opitemrece o,operation_invent i, operation_list l
where o.hos_guid = i.opi_guid and i.operation_id = l.operation_id and l.operation_date between '2008-01-01' and '2008-01-31'
group by o.icode

ห้องวิสัญญีก็ใช้คำสั่งคล้ายๆ แบบนี้

select o.icode,count(o.qty)
from opitemrece o,operation_anes_invent i, operation_list l
where o.hos_guid = i.opi_guid and i.operation_id = l.operation_id and l.operation_date between '2008-01-01' and '2008-01-31'
group by o.icode
HOSxP Project Manager / Cheif Developer / BMS MD

ออฟไลน์ malee_jung

  • Newbie
  • *
  • กระทู้: 9
  • Respect: 0
    • ดูรายละเอียด
Re: ฝากดูคำสั่งยอดการใช้น้ำเกลือคะ
« ตอบกลับ #4 เมื่อ: กรกฎาคม 08, 2008, 17:54:19 PM »
0
ขอบคุณนะคะอ.
แต่ว่ายังคงใช้งานไม่ได้เพราะ anas and OR คีย์ค่าใช้จ่ายเรื่องยาผ่าน drug profie คะ
operation_invent  จึงไม่มีข้อมูล

จะลองศึกษาระบบ anas และ OR ก่อนและจะมาถามอ.อีกรอบนะคะ
Server: HP ProLiant ML350 G5 Dual-Core Xeon 2.0G. RAM 16 G. SCSI 73 G.x3 Raid5 
OS: CentOS 5.1_x64 Linux Server  MySQL 5.1.39_x64  HOSXP : 3.52.8.7
E-mail:sujitta_k@hotmail.com
pharmacist at Nakhonnayok Hospital