⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kittyhawkpms.~pas

📁 简易的患者监护系统
💻 ~PAS
📖 第 1 页 / 共 4 页
字号:
begin
image15.Visible:=true;
image16.Visible:=false;
end;

adoquery3.Last;
adoquery3.Insert;
adoquery3.FieldValues['病房号']:=inttostr(roomnum);
adoquery3.FieldValues['床号']:=2;
adoquery3.FieldValues['体温']:=t1;
adoquery3.FieldValues['脉搏']:=t2;
adoquery3.FieldValues['呼吸']:=t5;
adoquery3.FieldValues['异常标记']:=abnomal1+abnomal2+abnomal3+abnomal4;
adoquery3.FieldValues['日期时间']:=datetimetostr(now);
adoquery3.FieldValues['血压']:=inttostr(t3)+'/'+inttostr(t4);

{bn:=random(40);
if (bn=2)then
begin
listbox2.Items.Add(inttostr(random(10)+1)+'           '+inttostr(bn)+'          '+timetostr(Now()));
end;}
end;

procedure TForm1.Timer4Timer(Sender: TObject);
var t2,t3,t4,t5:integer;
    t1:single;
    abnomal1,abnomal2,abnomal3,abnomal4:string;
begin
label31.Visible:=true;
label32.Visible:=true;
label33.Visible:=true;
label34.Visible:=true;
randomize;
t1:=(random(2)/10)+(trunc(random(41)/40))+36.2;//体温
t5:=random(3)-random(3)+(10*trunc(random(81)/80))-(10*trunc(random(81)/80))+15;   //呼吸
t2:=random(4)-random(4)+20*(trunc(random(51)/50))-20*(trunc(random(51)/50))+78;//脉搏
t3:=random(5)-random(5)+(25*trunc(random(81)/80))+105; //收缩压
t4:=random(5)-random(5)+(25*trunc(random(81)/80))-(25*trunc(random(41)/40))+70;//舒张压

label31.Caption:=floattostr((trunc(10*t1)/10))+' 摄氏度';
label32.Caption:=inttostr(t5)+' 次/分';
label33.Caption:=inttostr(t2)+' 次/分';
label34.Caption:=inttostr(t3)+'/'+inttostr(t4)+'mmHg';

if (t1>37.3)or(t1<35) then
begin
abnomal1:='体温';
image18.Visible:=true;
image17.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              3        体温         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image17.Visible:=true;
image18.Visible:=false;
end;

if(t5<12)or(t5>20)then
begin
abnomal2:='呼吸';
image20.Visible:=true;
image19.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              3        呼吸         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image19.Visible:=true;
image20.Visible:=false;
end;

if (t2>100)or(t2<60) then
begin
abnomal3:='脉搏';
image22.Visible:=true;
image21.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              3        脉搏         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image21.Visible:=true;
image22.Visible:=false;
end;

if (t3>130)or(t3<90)or(t4>90)or(t4<60)then
begin
abnomal4:='血压';
image24.Visible:=true;
image23.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              3        血压         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image23.Visible:=true;
image24.Visible:=false;
end;

adoquery3.Last;
adoquery3.Insert;
adoquery3.FieldValues['病房号']:=inttostr(roomnum);
adoquery3.FieldValues['床号']:=3;
adoquery3.FieldValues['体温']:=t1;
adoquery3.FieldValues['脉搏']:=t2;
adoquery3.FieldValues['呼吸']:=t5;
adoquery3.FieldValues['异常标记']:=abnomal1+abnomal2+abnomal3+abnomal4;
adoquery3.FieldValues['日期时间']:=datetimetostr(now);
adoquery3.FieldValues['血压']:=inttostr(t3)+'/'+inttostr(t4);

{bn:=random(40);
if (bn=3)then
begin
listbox2.Items.Add(inttostr(random(10)+1)+'           '+inttostr(bn)+'          '+timetostr(Now()));
end;}
end;

procedure TForm1.Timer5Timer(Sender: TObject);
var   t2,t3,t4,t5:integer;
      t1:single;
      abnomal1,abnomal2,abnomal3,abnomal4:string;
begin
label39.Visible:=true;
label40.Visible:=true;
label41.Visible:=true;
label42.Visible:=true;
randomize;
t1:=(random(2)/10)+(0.8*trunc(random(81)/80))+37;//体温
t5:=random(3)-random(3)+15;   //呼吸
t2:=random(4)-random(4)+20*(trunc(random(41)/40))-20*(trunc(random(21)/20))+78;//脉搏
t3:=random(5)-random(5)+(25*trunc(random(91)/90))+105; //收缩压
t4:=random(5)-random(5)+(25*trunc(random(91)/90))-(25*trunc(random(41)/40))+70;//舒张压

label39.Caption:=floattostr((trunc(10*t1)/10))+' 摄氏度';
label40.Caption:=inttostr(t5)+' 次/分';
label41.Caption:=inttostr(t2)+' 次/分';
label42.Caption:=inttostr(t3)+'/'+inttostr(t4)+'mmHg';

if (t1>37.3)or(t1<35) then
begin
abnomal1:='体温';
image26.Visible:=true;
image25.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              4        体温         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image25.Visible:=true;
image26.Visible:=false;
end;

if(t5<12)or(t5>20)then
begin
abnomal2:='呼吸';
image28.Visible:=true;
image27.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              4        呼吸         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image27.Visible:=true;
image28.Visible:=false;
end;

if (t2>100)or(t2<60) then
begin
abnomal3:='脉搏';
image30.Visible:=true;
image29.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              4        脉搏         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image29.Visible:=true;
image30.Visible:=false;
end;

if (t3>130)or(t3<90)or(t4>90)or(t4<60)then
begin
abnomal4:='血压';
image32.Visible:=true;
image31.Visible:=false;
ListBox1.Items.Add(inttostr(roomnum)+'              4        血压         '+timetostr(Now()));
SndPlaySound(PAnsiChar(ExtractFilePath(Application.EXENAME)+'报警声\BEEP1.wav'),SND_ASYNC);
end
else
begin
image31.Visible:=true;
image32.Visible:=false;
end;

adoquery3.Last;
adoquery3.Insert;
adoquery3.FieldValues['病房号']:=inttostr(roomnum);
adoquery3.FieldValues['床号']:=4;
adoquery3.FieldValues['体温']:=t1;
adoquery3.FieldValues['脉搏']:=t2;
adoquery3.FieldValues['呼吸']:=t5;
adoquery3.FieldValues['异常标记']:=abnomal1+abnomal2+abnomal3+abnomal4;
adoquery3.FieldValues['日期时间']:=datetimetostr(now);
adoquery3.FieldValues['血压']:=inttostr(t3)+'/'+inttostr(t4);

{bn:=random(40);
if (bn=4)then
begin
listbox2.Items.Add(inttostr(random(10)+1)+'           '+inttostr(bn)+'          '+timetostr(Now()));
end;}
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
Form2.show;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
Form3.ComboBox1.Text:=Form1.ComboBox1.Text;
Form3.show;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if BitBtn1.caption='空闲' then
begin

with ADOQuery2 do
begin
Close;
Sql.Clear;
sql.Add('select * from 患者监护信息,患者基本信息');
sql.Add(' where 病房号='+inttostr(roomnum)+' and 床号=1');
sql.Add(' and 患者监护信息.患者就诊号=患者基本信息.患者就诊号');
Open;
if ADOQuery2.RecordCount>0 then
begin
Edit1.Text:=Form1.ADOQuery2.FieldValues['患者监护信息.患者就诊号'];
Edit5.Text:=Form1.ADOQuery2.FieldValues['患者姓名'];
Edit9.Text:=Form1.ADOQuery2.FieldValues['患者年龄'];
Edit13.Text:=Form1.ADOQuery2.FieldValues['症状'];
bitbtn1.Caption:='监护中...';
image36.Visible:=true;
image37.Visible:=false;
combobox1.Enabled:=true;
Timer2.Enabled:=true;
if (flagheart='1号床')then
begin
Timer6.Enabled:=true;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: '+ComboBox1.Text;
end;
end
 else
 begin
 Form9.show;
 end;
end;
end
else
begin
BitBtn1.Caption:='空闲';
Timer2.Enabled:=false;
label11.Visible:=false;
label12.Visible:=false;
label13.Visible:=false;
label14.Visible:=false;
Form1.Image1.Visible:=false;
Form1.Image2.Visible:=false;
Form1.Image3.Visible:=false;
Form1.Image4.Visible:=false;
Form1.Image5.Visible:=false;
Form1.Image6.Visible:=false;
Form1.Image7.Visible:=false;
Form1.Image8.Visible:=false;
image36.Visible:=false;
image37.Visible:=true;
if (flagheart='1号床')then
begin
Timer6.Enabled:=false;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: 未工作';
end;
if (bitbtn1.Caption='空闲')and(bitbtn2.Caption='空闲')and(bitbtn3.Caption='空闲')and(bitbtn4.Caption='空闲')then
begin
combobox1.Enabled:=false;
end;
end;
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
if BitBtn2.caption='空闲' then
begin
with ADOQuery2 do
begin
Close;
Sql.Clear;
sql.Add('select * from 患者监护信息,患者基本信息 where 病房号='+inttostr(roomnum)+' and 床号=2 and 患者监护信息.患者就诊号=患者基本信息.患者就诊号');
Open;
if ADOQuery2.RecordCount>0 then
begin
Edit2.Text:=Form1.ADOQuery2.FieldValues['患者监护信息.患者就诊号'];
Edit6.Text:=Form1.ADOQuery2.FieldValues['患者姓名'];
Edit10.Text:=Form1.ADOQuery2.FieldValues['患者年龄'];
Edit14.Text:=Form1.ADOQuery2.FieldValues['症状'];
bitbtn2.Caption:='监护中...';
image38.Visible:=true;
image39.Visible:=false;
Timer3.Enabled:=true;
combobox1.Enabled:=true;
if (flagheart='2号床')then
begin
Timer6.Enabled:=true;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: '+ComboBox1.Text;
end;
end
else
begin
Form9.show;
end;
end;
end
else
begin
BitBtn2.Caption:='空闲';
Timer3.Enabled:=false;
label23.Visible:=false;
label24.Visible:=false;
label25.Visible:=false;
label26.Visible:=false;
Form1.Image9.Visible:=false;
Form1.Image10.Visible:=false;
Form1.Image11.Visible:=false;
Form1.Image12.Visible:=false;
Form1.Image13.Visible:=false;
Form1.Image14.Visible:=false;
Form1.Image15.Visible:=false;
Form1.Image16.Visible:=false;
image39.Visible:=true;
image38.Visible:=false;
if (flagheart='2号床')then
begin
Timer6.Enabled:=false;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: 未工作';
end;
if (bitbtn1.Caption='空闲')and(bitbtn2.Caption='空闲')and(bitbtn3.Caption='空闲')and(bitbtn4.Caption='空闲')then
begin
combobox1.Enabled:=false;
end;
end;
end;

procedure TForm1.BitBtn3Click(Sender: TObject);
begin
if BitBtn3.caption='空闲' then
begin
with ADOQuery2 do
begin
Close;
Sql.Clear;
sql.Add('select * from 患者监护信息,患者基本信息 where 病房号='+inttostr(roomnum)+' and 床号=3 and 患者监护信息.患者就诊号=患者基本信息.患者就诊号');
Open;
if ADOQuery2.RecordCount>0 then
begin
Edit3.Text:=Form1.ADOQuery2.FieldValues['患者监护信息.患者就诊号'];
Edit7.Text:=Form1.ADOQuery2.FieldValues['患者姓名'];
Edit11.Text:=Form1.ADOQuery2.FieldValues['患者年龄'];
Edit15.Text:=Form1.ADOQuery2.FieldValues['症状'];
bitbtn3.Caption:='监护中...';
image40.Visible:=true;
image41.Visible:=false;
Timer4.Enabled:=true;
combobox1.Enabled:=true;
if (flagheart='3号床')then
begin
Timer6.Enabled:=true;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: '+ComboBox1.Text;
end;
end
else
begin
Form9.show;
end;
end;
end
else
begin
BitBtn3.Caption:='空闲';
Timer4.Enabled:=false;
label31.Visible:=false;
label32.Visible:=false;
label33.Visible:=false;
label34.Visible:=false;
Form1.Image17.Visible:=false;
Form1.Image18.Visible:=false;
Form1.Image19.Visible:=false;
Form1.Image20.Visible:=false;
Form1.Image21.Visible:=false;
Form1.Image22.Visible:=false;
Form1.Image23.Visible:=false;
Form1.Image24.Visible:=false;
image41.Visible:=true;
image40.Visible:=false;
if (flagheart='3号床')then
begin
Timer6.Enabled:=false;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: 未工作';
end;
if (bitbtn1.Caption='空闲')and(bitbtn2.Caption='空闲')and(bitbtn3.Caption='空闲')and(bitbtn4.Caption='空闲')then
begin
combobox1.Enabled:=false;
end;
end;
end;

procedure TForm1.BitBtn4Click(Sender: TObject);
begin
if BitBtn4.caption='空闲' then
begin
with ADOQuery2 do
begin
Close;
Sql.Clear;
sql.Add('select * from 患者监护信息,患者基本信息 where 病房号='+inttostr(roomnum)+' and 床号=4 and 患者监护信息.患者就诊号=患者基本信息.患者就诊号');
Open;
if ADOQuery2.RecordCount>0 then
begin
Edit4.Text:=Form1.ADOQuery2.FieldValues['患者监护信息.患者就诊号'];
Edit8.Text:=Form1.ADOQuery2.FieldValues['患者姓名'];
Edit12.Text:=Form1.ADOQuery2.FieldValues['患者年龄'];
Edit16.Text:=Form1.ADOQuery2.FieldValues['症状'];
bitbtn4.Caption:='监护中...';
image42.Visible:=true;
image43.Visible:=false;
Timer5.Enabled:=true;
combobox1.Enabled:=true;
if (flagheart='4号床')then
begin
Timer6.Enabled:=true;   /////////心电图////////////
Statusbar1.Panels[2].Text:='当前心电监测床号: '+ComboBox1.Text;
end;
end
else
begin
Form9.show;
end;
end;
end
else
begin

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -