ผู้เขียน หัวข้อ: ช่วยไล่ VN_scrip ให้หน่อยครับ  (อ่าน 1117 ครั้ง)

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

ออฟไลน์ fnhero125

  • Newbie
  • *
  • กระทู้: 3
  • Respect: 0
    • ดูรายละเอียด
    • www.catconferences
ช่วยไล่ VN_scrip ให้หน่อยครับ
« เมื่อ: สิงหาคม 29, 2022, 11:56:33 AM »
0
ช่วยไล่ VN_scrip ให้หน่อยครับ

var
fvn : string;
fhn : string;
fptname : string;
fperson_id :string;
begin
fvn := GetGlobalValue('VN');
fhn := getsqldata('select hn from opdscreen where vn="'+fvn+'" ');
fptname := getsqldata('select concat(pname,fname," ",lname)as pt from patient where hn="'+fhn+'" ');
fperson_id := vartostr(getsqldata(' select count(o.vn) as cc from opdscreen o LEFT JOIN vn_stat v on v.vn=o.vn '+
' where v.age_y >= "15" and o.vn = "'+fvn+'" and  concat(concat(if(temperature<=0,0,if(temperature BETWEEN 36.1 and 38,0, if(temperature BETWEEN 35.1 and 36,1,if(temperature BETWEEN 38.1 and 38.4,1, if((temperature <=35 or temperature>=38.5 ),2,0 )))))) +  '+
' concat(if(bps=0,0,if(bps BETWEEN 101 and 180,0,if(bps BETWEEN 91 and 100,1, if(bps BETWEEN 181 and 199,1,if(bps BETWEEN 81 and 90,2, if(bps >=200,2,if(bps <=80,3,0  )))))))) + concat(if(pulse<=20,0,if(pulse BETWEEN 51 and 100,0,if(pulse '+
' BETWEEN 41 and 50,1, if(pulse BETWEEN 100 and 120,1,if(pulse BETWEEN 121 and 139,2, if(pulse <=40,3,if(pulse >=140,3,0  ))))))))+ concat(if(rr<=0,0,if(rr BETWEEN 9 and 20,0,if(rr BETWEEN 21 and 25,1, '+
' if(rr BETWEEN 26 and 35,2,if((rr>=35 or rr<=8),3,0 )))))))>="4"  '));

if fperson_id >= 0 then



begin

showmessage (' ¼Ùé»èÇÂÁÕ SOS Score >= 4 ' );
end;


end;

ออฟไลน์ fnhero125

  • Newbie
  • *
  • กระทู้: 3
  • Respect: 0
    • ดูรายละเอียด
    • www.catconferences
Re: ช่วยไล่ VN_scrip ให้หน่อยครับ
« ตอบกลับ #1 เมื่อ: สิงหาคม 30, 2022, 10:25:59 AM »
0
คือ มันไม่น่าโชว์ในเด็กอายุ ต่ำกว่า 15 แต่มันยังมีโชว์ เลยงงว่ามีส่วนไหนที่ผิด

ออฟไลน์ waradmin01

  • Newbie
  • *
  • กระทู้: 45
  • Respect: +1
    • ดูรายละเอียด
Re: ช่วยไล่ VN_scrip ให้หน่อยครับ
« ตอบกลับ #2 เมื่อ: กันยายน 12, 2022, 09:38:06 AM »
+1
เพราะ if fperson_id >= 0 then  เพราะ มันเท่ากับ 0 ลองแก้เป็น  if fperson_id > 0 then
Mr.Apichart Butsoongnoen เจ้าพนักงานสาธารณะ...(สุขชำนาญงาน)General  รับงาน ดูแลระบบรอ... ต.ค.53
Waritchaphum Hospital ,Sakolnakhon
Server :N/A OS:CentOS V N/A Hosxp: V3.54.12.20 RAM : N/A คนเก่าลงไว้ไม่ได้อัพใหม่เลยยังไม่รู้
ขึ้นระบบ โดย ทีมงาน BMS ต.ค.49