701
Report Exchange / Re: รายงานการปฏิบัติการห้อง Lab ตามกลุ่มLab
« เมื่อ: ตุลาคม 21, 2009, 11:35:58 AM »
ลืมแนบไฟล์ report ซะงั้น
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
function substr(str:String;s_index:Integer;e_index:Integer):String;
begin
result:= Copy(str,s_index,e_index-s_index);
end;
function splitstr(str,split:String):String;
var i_start,i_end,index:Integer;
temp,return:String;
begin
i_start:=1;
i_end := Length(str);
return:='';
for index := 1 to i_end do
begin
temp:=substr(str,index,index+1);
if CompareText(temp,split)=0 then
begin
return := return +'"' + substr(str,i_start,index)+'",';
i_start := index +1;
end;
end;
return := return +'"' +substr(str,i_start,i_end+1)+'"';
Result:=return;
end;
อาจารย์อ๊อด ครับของผมเรียกแล้ว ขึ้น error ดังรูป
ขอบคุณพี่ Imnuke มากๆคับ
.... ขออนุญาตท่าน Imnuke เพิ่มเติมให้คุณ cb_garfield นิดหน่อยนะครับ ..
ตรง ชื่อ-สกุล ดูจาก patient ส่วน วินิจฉัย เอามาจาก vn_stat ก็น่าจะ OK แล้วครับ ... ....
หรือลอง
select o1.hn,o1.vn,o1.vstdate,o1.vsttime,
concat(p1.pname,p1.fname,' ',p1.lname) as pt_name,
o2.cc,v1.pdx,v1.dx0,v1.dx1,v1.dx3,v1.dx4,v1.dx5
from ovst o1
left outer join patient p1 on p1.hn = o1.hn
left outer join opdscreen o2 on o2.vn = o1.vn
left outer join vn_stat v1 on v1.vn = o1.vn
where o1.vstdate between '2009-07-01' and '2009-07-02'