ผู้เขียน หัวข้อ: Pop Up การตรวจ TC (total cholesterol)  (อ่าน 1679 ครั้ง)

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

ออฟไลน์ ojt26

  • Newbie
  • *
  • กระทู้: 3
  • Respect: 0
    • ดูรายละเอียด
Pop Up การตรวจ TC (total cholesterol)
« เมื่อ: มีนาคม 10, 2015, 14:00:34 PM »
0
อยากให้ มี หน้าต่าง แจ้ง เตื่อน เมื่อใส่ HN ของผุ้ป่วยที่เข้ารับการรักษา ใน คลีนนิค อายุกรรม
เมนู ระบบผู้ป่วยนอก >> ห้่องตรวจโรค >> ระบบคัดกรอง และ
เมนู ระบบผู้ป่วยนอก >> ห้่องตรวจโรค >> ระบบห้องทำงานแพทย์
ซึ่งผม Load ไฟล์ SYS_VN_PRE_SCRIP และแทรกคำสั่งแต่ยังไม่แสดงผล ขอคำแนะนำด้วยน่ะครับ..

var
  fvn,fcomputername,fdepartment,fhn : string;
  tc : TClientDataset;

begin
 // showmessage('PRE-Script');

  fvn:= GetGlobalValue('VN');
  fcomputername := GetGlobalValue('CURRENT_COMPUTER');
  fdepartment := GetGlobalValue('CURRENT_DEPCODE');

if fdepartment='035' then // 035 คือคลินิคอายุกรรม
  begin
     fhn:=getsqldata('select hn from ovst where vn = "'+fvn+'"');

    if getsqldata('select l1.lab_order_result from lab_order l1 ' +
    ' left outer join lab_head l2 on l2.lab_order_number = l1.lab_order_number '+
    ' where l2.hn = "'+fhn+'" '+
    ' and l2.order_date between "2014-10-01" and now() '+
    ' and l1.lab_items_code = "102" and l1.lab_order_result > 0 ') then
    begin
      showmessage('มีการตรวจ TC แล้ว !');
    end;

   end;
end;



 

ออฟไลน์ golf_win

  • Hero Member
  • *****
  • กระทู้: 3,481
  • Respect: +112
    • ดูรายละเอียด
Re: Pop Up การตรวจ TC (total cholesterol)
« ตอบกลับ #1 เมื่อ: มีนาคม 10, 2015, 14:55:50 PM »
0
var
  fvn,fcomputername,fdepartment,fhn : string;
  tc : TClientDataset;

begin
 // showmessage('PRE-Script');

  fvn:= GetGlobalValue('VN');
  fcomputername := GetGlobalValue('CURRENT_COMPUTER');
  fdepartment := GetGlobalValue('CURRENT_DEPCODE');

if fdepartment='035' then // 035 คือคลินิคอายุกรรม
  begin
     fhn:=getsqldata('select hn from ovst where vn = "'+fvn+'"');

    if getsqldata('select count(l2.vn) as cc from lab_order l1 ' +
    ' left outer join lab_head l2 on l2.lab_order_number = l1.lab_order_number '+
    ' where l2.hn = "'+fhn+'"  '+
    ' and l2.order_date between "2014-10-01" and now() '+
    ' and l1.lab_items_code = "102" and l1.lab_order_result>0  ')>0  then
    begin
      showmessage('มีการตรวจ TC แล้ว !');
    end;

   end;
end;
โรงพยาบาลเจ็ดเสมียน จังหวัดราชบุรี
Start 19-1-51    35 station
HOSxP  3.59.5.18 Activate License
Tel. 032-305096-7 ต่อ 118
Web. http://csmhos.thaiddns.com:8080
         http://csmhos.thaieasydns.com:8080