Автор работы: Пользователь скрыл имя, 11 Апреля 2013 в 17:18, курсовая работа
Модельдеу кез келген құбылыстардың, процестердің немесе обьект жүйелерінің қасиеттері мен сипаттамаларын зерттеу үшін олардың үлгісін құру және талдау, бар немесе жаңадан құрастырылған обьектілердің сипатын анықтау немесе айқындау үшін, олардың модельдерінде обьектілердің әртүрлі табиғатын зерттеу әдісі.
Бұл курстық жобаның тақырыбы: «Монте-Карло әдісін модельдеу» және де Delphi бағдарламалау ортасында «Отбасылық дәрігерлік амбулаторияда науқастың жеке картасын жүргізу және тіркеу бойынша АЖ құру».
КІРІСПЕ................................................................................................................
1 БАҒДАРЛАМАЛАУДЫ ӨҢДЕУ ОРТАСЫН ТАҢДА...................................
1.1 Монте-Карло әдісімен модельдеу ..............................................................
1.2 Delphi бағдарламалау тілінің мүмкіндіктерін сипаттау ...........................
2 ЖОБАНЫ ӨҢДЕУДІ ЖОСПАРЛАУ БӨЛІМІ................................................
2.1 Отбасылық дәрігерлік амбулаторияны сипаттау......................................
2.2 Бағдарламалық жолмен модельді өңдеу ...................................................
3 ЖОБАНЫ ӨҢДЕУ БӨЛІМІ..............................................................................
3.1 Бағдарламаның құру кезеңдері..................................................................
3.2 Бағдарламада қолданылған компоненттерді сипаттау.............................
3.3 Қолданушы интерфейсі .............................................................................
ҚОРЫТЫНДЫ....................................................................................................
ҚОЛДАНЫЛҒАН ӘДЕБИЕТТЕР..
DBText63: TDBText;
DBText64: TDBText;
DBText65: TDBText;
DBText66: TDBText;
DBText67: TDBText;
Label112: TLabel;
Label113: TLabel;
Label114: TLabel;
Label115: TLabel;
Label116: TLabel;
Label117: TLabel;
Label118: TLabel;
DBText68: TDBText;
DBText69: TDBText;
DBText70: TDBText;
DBText71: TDBText;
DBText72: TDBText;
DBText73: TDBText;
DBText74: TDBText;
DBText75: TDBText;
DBText76: TDBText;
Button10: TscButton;
Button11: TscButton;
Button13: TscButton;
Button2: TscButton;
Button3: TscButton;
Button9: TscButton;
Button14: TscButton;
Button15: TscButton;
Button16: TscButton;
Button17: TscButton;
Button24: TscButton;
Button25: TscButton;
Button26: TscButton;
Button27: TscButton;
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Timer1Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button18Click(Sender: TObject);
procedure Button16Click(Sender: TObject);
procedure Button15Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button17Click(Sender: TObject);
procedure Button20Click(Sender: TObject);
procedure Button21Click(Sender: TObject);
procedure Button19Click(Sender: TObject);
procedure Button14Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure DBLookupComboBox1Click(Sender: TObject);
procedure Edit2Change(Sender: TObject);
procedure Edit3Change(Sender: TObject);
procedure Edit4Change(Sender: TObject);
procedure Edit5Change(Sender: TObject);
procedure Button13Click(Sender: TObject);
procedure Edit6Change(Sender: TObject);
procedure Button22Click(Sender: TObject);
procedure Button23Click(Sender: TObject);
procedure Button25Click(Sender: TObject);
procedure Button26Click(Sender: TObject);
procedure Button24Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure Edit7Change(Sender: TObject);
procedure Edit8Change(Sender: TObject);
procedure Edit9Change(Sender: TObject);
procedure Edit10Change(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure Button12Click(Sender: TObject);
procedure Button27Click(Sender: TObject);
procedure Button28Click(Sender: TObject);
procedure Edit11Change(Sender: TObject);
procedure Edit12Change(Sender: TObject);
procedure Edit13Change(Sender: TObject);
procedure Edit14Change(Sender: TObject);
procedure Edit15Change(Sender: TObject);
procedure Edit16Change(Sender: TObject);
procedure DBLookupComboBox2Click(Sender: TObject);
procedure DBLookupComboBox3Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N7Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit1, Unit3, Unit4;
{$R *.dfm}
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form1.close;
end;
procedure TForm2.Timer1Timer(Sender: TObject);
begin
with StatusBar1 do
begin
if GetKeyState(VK_CAPITAL) <> 0 then
panels[0].text := ' CAP'
else
panels[0].text := '';
if GetKeyState(VK_NUMLOCK) <> 0 then
panels[1].text := ' NUM'
else
panels[1].text := '';
if GetKeyState(VK_SCROLL) <> 0 then
panels[2].text := ' SCRL'
else
panels[2].text := '';
panels[3].text := ' ' + DateTimeToStr(now);
end;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
data.info_vrach.Edit;
GroupBox5.Visible:=true;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
data.info_vrach.Edit;
GroupBox6.Visible:=true;
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
data.info_vrach.Edit;
GroupBox7.Visible:=true;
end;
procedure TForm2.Button4Click(Sender: TObject);
begin
data.info_vrach.Post;
GroupBox5.Visible:=false;
end;
procedure TForm2.Button5Click(Sender: TObject);
begin
Data.info_vrach.Cancel;
GroupBox5.Visible:=false;
end;
procedure TForm2.Button6Click(Sender: TObject);
begin
Data.info_vrach.Post;
GroupBox6.Visible:=false;
end;
procedure TForm2.Button7Click(Sender: TObject);
begin
data.info_vrach.Cancel;
GroupBox6.Visible:=false;
end;
procedure TForm2.Button8Click(Sender: TObject);
begin
Data.info_vrach.Post;
GroupBox7.Visible:=false;
end;
procedure TForm2.Button9Click(Sender: TObject);
begin
data.info_vrach.Cancel;
GroupBox7.Visible:=false;
end;
procedure TForm2.Button18Click(Sender: TObject);
begin
data.info_pasient.Append;
GroupBox11.Visible:=false;
GroupBox9.Visible:=true;
end;
procedure TForm2.Button16Click(Sender: TObject);
begin
data.poisk_pasient.Cancel;
GroupBox10.Visible:=false;
GroupBox11.Visible:=true;
end;
procedure TForm2.Button15Click(Sender: TObject);
begin
data.info_pasient.Cancel;
GroupBox9.Visible:=false;
GroupBox11.Visible:=true;
end;
procedure TForm2.Button10Click(Sender: TObject);
begin
GroupBox1.Visible:=false;
GroupBox2.Visible:=false;
GroupBox3.Visible:=false;
GroupBox4.Visible:=false;
GroupBox5.Visible:=false;
GroupBox6.Visible:=false;
GroupBox7.Visible:=false;
GroupBox9.Visible:=false;
GroupBox10.Visible:=false;
GroupBox13.Visible:=false;
GroupBox14.Visible:=false;
GroupBox17.Visible:=false;
GroupBox18.Visible:=false;
GroupBox8.Visible:=true;
GroupBox11.Visible:=true;
end;
procedure TForm2.Button17Click(Sender: TObject);
begin
data.poisk_pasient.Edit;
GroupBox11.Visible:=false;
GroupBox10.Visible:=true;
end;
procedure TForm2.Button20Click(Sender: TObject);
begin
data.kvartal.post;
GroupBox12.Visible:=false;
end;
procedure TForm2.Button21Click(Sender: TObject);
begin
data.kvartal.cancel;
GroupBox12.Visible:=false;
end;
procedure TForm2.Button19Click(Sender: TObject);
begin
data.kvartal.append;
GroupBox5.Visible:=false;
GroupBox6.Visible:=false;
GroupBox7.Visible:=false;
GroupBox9.Visible:=false;
GroupBox10.Visible:=false;
GroupBox13.Visible:=false;
GroupBox14.Visible:=false;
GroupBox17.Visible:=false;
GroupBox18.Visible:=false;
GroupBox8.Visible:=false;
GroupBox11.Visible:=false;
GroupBox12.Visible:=true;
GroupBox1.Visible:=true;
GroupBox2.Visible:=true;
GroupBox3.Visible:=true;
GroupBox4.Visible:=true;
end;
procedure TForm2.Button14Click(Sender: TObject);
begin
data.info_pasient.Post;
data.poisk_pasient.Active:=
data.poisk_pasient.Active:=
GroupBox9.Visible:=false;
GroupBox11.Visible:=true;
end;
procedure TForm2.Edit1Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE imya LIKE '+''''+Edit1.Text+'%'+''''
+'and raion='+''''+DBLookupComboBox1
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.DBLookupComboBox1Click(
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE raion LIKE '+''''+DBLookupComboBox1.Text+
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
data.poisk_rebenok.SQL.clear;
data.poisk_rebenok.SQL.Add('
'WHERE raion LIKE '+''''+DBLookupComboBox1.Text +'%'+'''' +
' ORDER BY fam_mlad ');
data.poisk_rebenok.close;
data.poisk_rebenok.open;
end;
procedure TForm2.Edit2Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE fam LIKE '+''''+Edit2.Text+'%'+'''' +'and raion='+''''+
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.Edit3Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE otch LIKE '+''''+Edit3.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.Edit4Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE adress LIKE '+''''+Edit4.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.Edit5Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE diagnoz LIKE '+''''+Edit5.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.Button13Click(Sender: TObject);
begin
GroupBox8.Visible:=false;
GroupBox9.Visible:=false;
GroupBox10.Visible:=false;
GroupBox11.Visible:=false;
GroupBox12.Visible:=false;
GroupBox13.Visible:=false;
GroupBox14.Visible:=false;
GroupBox17.Visible:=false;
GroupBox18.Visible:=false;
GroupBox1.Visible:=true;
GroupBox2.Visible:=true;
GroupBox3.Visible:=true;
GroupBox4.Visible:=true;
end;
procedure TForm2.Edit6Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE god_rozh LIKE '+''''+Edit6.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.Button22Click(Sender: TObject);
begin
GroupBox14.Visible:=false;
GroupBox15.Visible:=true;
end;
procedure TForm2.Button23Click(Sender: TObject);
begin
data.info_rebenok.append;
GroupBox14.Visible:=false;
GroupBox16.Visible:=true;
end;
procedure TForm2.Button25Click(Sender: TObject);
begin
data.info_rebenok.post;
data.poisk_rebenok.active:=
data.poisk_rebenok.active:=
GroupBox16.Visible:=false;
GroupBox14.Visible:=true;
end;
procedure TForm2.Button26Click(Sender: TObject);
begin
data.info_rebenok.Cancel;
GroupBox16.Visible:=false;
GroupBox14.Visible:=true;
end;
procedure TForm2.Button24Click(Sender: TObject);
begin
GroupBox15.Visible:=false;
GroupBox14.Visible:=true;
end;
procedure TForm2.Button11Click(Sender: TObject);
begin
GroupBox1.Visible:=false;
GroupBox2.Visible:=false;
GroupBox3.Visible:=false;
GroupBox4.Visible:=false;
GroupBox5.Visible:=false;
GroupBox6.Visible:=false;
GroupBox7.Visible:=false;
GroupBox8.Visible:=false;
GroupBox9.Visible:=false;
GroupBox10.Visible:=false;
GroupBox11.Visible:=false;
GroupBox12.Visible:=false;
GroupBox17.Visible:=false;
GroupBox18.Visible:=false;
GroupBox13.Visible:=true;
GroupBox14.Visible:=true;
end;
procedure TForm2.Edit7Change(Sender: TObject);
begin
data.poisk_rebenok.SQL.clear;
data.poisk_rebenok.SQL.Add('
'WHERE imya_mlad LIKE '+''''+Edit7.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam_mlad ');
data.poisk_rebenok.close;
data.poisk_rebenok.open;
end;
procedure TForm2.Edit8Change(Sender: TObject);
begin
data.poisk_rebenok.SQL.clear;
data.poisk_rebenok.SQL.Add('
'WHERE fam_mlad LIKE '+''''+Edit8.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam_mlad ');
data.poisk_rebenok.close;
data.poisk_rebenok.open;
end;
procedure TForm2.Edit9Change(Sender: TObject);
begin
data.poisk_rebenok.SQL.clear;
data.poisk_rebenok.SQL.Add('
'WHERE otch_mlad LIKE '+''''+Edit9.Text+'%'+'''' +'and raion='+''''+
' ORDER BY fam_mlad ');
data.poisk_rebenok.close;
data.poisk_rebenok.open;
end;
procedure TForm2.Edit10Change(Sender: TObject);
begin
data.poisk_rebenok.SQL.clear;
data.poisk_rebenok.SQL.Add('se
'WHERE god_rozh LIKE '+''''+Edit10.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam_mlad ');
data.poisk_rebenok.close;
data.poisk_rebenok.open;
end;
procedure TForm2.ComboBox1Change(Sender: TObject);
begin
data.poisk_rebenok.SQL.clear;
data.poisk_rebenok.SQL.Add('
'WHERE pol_mlad LIKE '+''''+ComboBox1.Text+'%'+''''
+'and raion='+''''+
' ORDER BY fam_mlad ');
data.poisk_rebenok.close;
data.poisk_rebenok.open;
end;
procedure TForm2.ComboBox2Change(Sender: TObject);
begin
data.poisk_pasient.SQL.clear;
data.poisk_pasient.SQL.Add('
'WHERE pol LIKE '+''''+ComboBox2.text+'%'+''''
+'and raion='+''''+DBLookupComboBox1
' ORDER BY fam ');
data.poisk_pasient.close;
data.poisk_pasient.open;
end;
procedure TForm2.Button12Click(Sender: TObject);
begin
GroupBox1.Visible:=false;
GroupBox2.Visible:=false;
GroupBox3.Visible:=false;
GroupBox4.Visible:=false;
GroupBox5.Visible:=false;
GroupBox6.Visible:=false;
GroupBox7.Visible:=false;
GroupBox8.Visible:=false;
GroupBox9.Visible:=false;
GroupBox10.Visible:=false;
GroupBox11.Visible:=false;
GroupBox12.Visible:=false;
GroupBox13.Visible:=false;
GroupBox14.Visible:=false;
GroupBox17.Visible:=true;
GroupBox18.Visible:=true;
end;
procedure TForm2.Button27Click(Sender: TObject);
begin
data.poisk_vrach.Edit;
GroupBox18.Visible:=false;
GroupBox19.Visible:=true;
end;
procedure TForm2.Button28Click(Sender: TObject);
begin
GroupBox19.Visible:=false;
GroupBox18.Visible:=true;
end;
procedure TForm2.Edit11Change(Sender: TObject);
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE imya_vrach LIKE '+''''+Edit11.Text+'%'+'''' +
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.Edit12Change(Sender: TObject);
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE fam_vrach LIKE '+''''+Edit12.Text+'%'+'''' +
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.Edit13Change(Sender: TObject);
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE prof_vrach LIKE '+''''+Edit13.Text+'%'+'''' +
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.Edit14Change(Sender: TObject);
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE imya_med LIKE '+''''+Edit14.Text+'%'+'''' +
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.Edit15Change(Sender: TObject);
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE fam_med LIKE '+''''+Edit15.Text+'%'+'''' +
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.Edit16Change(Sender: TObject);
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE prof_med LIKE '+''''+Edit16.Text+'%'+'''' +
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.DBLookupComboBox2Click(
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE vrach LIKE '+''''+DBLookupComboBox2.Text+
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.DBLookupComboBox3Click(
begin
data.poisk_vrach.SQL.clear;
data.poisk_vrach.SQL.Add('
'WHERE medsestra LIKE '+''''+DBLookupComboBox3.Text+
' ORDER BY fam_vrach ');
data.poisk_vrach.close;
data.poisk_vrach.open;
end;
procedure TForm2.N2Click(Sender: TObject);
begin
form4.showmodal;
end;
procedure TForm2.N3Click(Sender: TObject);
var
XLApp,Sheet,Colum:Variant;
index,i:Integer;
begin
XLApp:= CreateOleObject('Excel.
XLApp.Visible:=true;
XLApp.Workbooks.Add(-4167);
XLApp.Workbooks[1].WorkSheets[
Colum:=XLApp.Workbooks[1].
Colum.Columns[1].ColumnWidth:=
Colum.Columns[2].ColumnWidth:=
Colum.Columns[3].ColumnWidth:=
Colum.Columns[4].ColumnWidth:=
Colum.Columns[5].ColumnWidth:=
Colum.Columns[6].ColumnWidth:=
Colum.Columns[7].ColumnWidth:=
Colum:=XLApp.Workbooks[1].
Colum.Rows[2].Font.Bold:=true;
Colum.Rows[1].Font.Bold:=true;
Colum.Rows[1].Font.Color:=
Colum.Rows[1].Font.Size:=12;
Colum.Rows[7].Font.Color:=
Sheet:=XLApp.Workbooks[1].
Sheet.Cells[1,3]:='
ОДА-га тіркелген ересек
Sheet.Cells[3,1]:='Аудан:';
Sheet.Cells[4,1]:='Дарігер:';
Sheet.Cells[5,1]:='Медбике:';
Sheet.Cells[7,1]:='Аты';
Информация о работе Отбасылық дәрігерлік амбулатория жобасын құру