BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: mixer_79 ที่ เมษายน 23, 2013, 11:41:27 AM
-
ขอความช่วยเหลือเรื่องรายงานหน่อยครับ
ผมอยากให้รายการยา หรื่อชื่อรายการ LAB วางแบบเป็นบรรทัดเดียวกันต้องใช้คำสั่งในรายงานอย่างไรครับ เวลาเขียนใน ตัว Report Designer เช่น
เวลาเราทำในMySQLจะเป็น
1 นาย xxx ยา ASPIRIN
2 นาย xxx ยา AMOXY
แต่เวลาเขียนหน้ารายงานอยากให้เป็น
1 นาย xxx ยา ASPIRIN , AMOXY ,
ต้องเขียนอย่างไรครับ ช่วยหน่อยนะครับ ขอบคุณครับ...
-
ใช้ function GetSQLSubQueryData ครับ
-
ใช้ function GetSQLSubQueryData ครับ
พอมีตัวอย่างรายงานไหมครับ
ตัวอย่างรายงานของผมนะครับ
oapp_lab1 คือตัวที่ผมทำ
oapp_lab2 คือรายงานที่อยากให้ออก
และมีเงื่อนไบของพี่พยาบาลเพิ่มว่า รายการแล็บ ต้องมีรายการดังต่อไปนี้ร่วมด้วยอย่างน้อย 1 รายการ คือ FBS , TG , HDL , LDL , Cholesterol , lipid
-
select a.hn,pt.pname,pt.fname,pt.lname
,a.vstdate,a.clinic,c.name clinicname,a.app_user
,cast(replace(replace(a.note2,char(13),','),char(10),'') as char(100)) Lab
from oapp a
left join patient pt on a.hn=pt.hn
left join clinic c on c.clinic=a.clinic
where a.nextdate between '2013-1-1' and '2013-1-10'
and a.note2 is not null
order by a.hn
-
select a.hn,pt.pname,pt.fname,pt.lname
,a.vstdate,a.clinic,c.name clinicname,a.app_user
,cast(replace(replace(a.note2,char(13),','),char(10),'') as char(100)) Lab
from oapp a
left join patient pt on a.hn=pt.hn
left join clinic c on c.clinic=a.clinic
where a.nextdate between '2013-1-1' and '2013-1-10'
and a.note2 is not null
order by a.hn
ขอบคุณมากนะครับ...พอดีกดไลค์ไม่ได้..อิอิ
-
select a.hn,pt.pname,pt.fname,pt.lname
,a.vstdate,a.clinic,c.name clinicname,a.app_user
,cast(replace(replace(a.note2,char(13),','),char(10),'') as char(100)) Lab
from oapp a
left join patient pt on a.hn=pt.hn
left join clinic c on c.clinic=a.clinic
where a.nextdate between '2013-1-1' and '2013-1-10'
and a.note2 is not null
order by a.hn
ยอดเยี่ยมจริงๆครับ