还剩27页未读,继续阅读
本资源只提供10页预览,全部文档请下载后查看!喜欢就下载吧,查找使用更方便
文本内容:
医院管理系统
1.课程设计的目的面向对象的开辟方法是当今世界最流行的开辟方法,它不仅具有更贴近自然的语义,而且有利于软件的维护和继承现代化的医院也应该有现代化的管理系统在科技日益发达的今天,人们的身体健康也在不断受到重视因此,医院进行现代化管理就变得尤其重要,需要建立一个使用的医院管理系统为了进一步巩固JAVA相关的知识,深刻把握JAVA语言的重要概念及其面向对象的特性,锻炼学生熟练的应用面向对象的思想和设计方法解决实际问题的能力,开设了JAVA程序设计课程设计通过此次课程设计,使学生通过该教学环节与手段,把所学课程及相关知识加以融会贯通,全面掌握JAVA语言的编程思想及面向对象程序设计的方法,为今后的学习和工作打下基础
2.设计方案论证
2.1境JAVA编程工具JDK
1.
5.0,操作系统Windows
7.
2.2系统功能描述系统需要完成功能主要有1医生各种信息的输入,包括员工基本细细、职称、岗位2医生各种的查询、修改,包括员工基本信息、职称、岗位、工资等3医生的人事调动管理4病人信息、病床、药剂、仪器的管理5系统用户管理、权限管理
2.3系统功能模块设计在系统功能分析的基础上,考虑Microsoft VisualStudio2022程序编制的特点,得到如图1所示的系统功能模块图图退药界面
114.设计体味通过这一次JAVA课程设计,我深深的理解到面向对象编程的方便与快捷和JAVA的重要性,也使我本学期所学的JAVA知识得到巩固和应用,在设计的过程中我遇到了很到问题,为了解决问题进行了各种各样的实验和资料的查找,这此课程设计还让我懂得了写程序不能闭门造车,要努力拓宽知识面,丰富知识它还让我学会了在网上查阅那些无限的资料通过对此课题的开辟,使我对用JAVA开辟系统有了一个比较清晰的认识,体味到理论和实践的重要性由于自己的分析设计和程序经验不足,该系统设计和实现过程中,还有许多没有完善的地方,比如用户界面设计不够美观,异常出错处理比较差等多方面问题,这些都有待进一步完善和提高本次课程设计对我将来的学习工作必会起到很大的匡助作用
5.参考文献
[1].范立南,刘天惠等.SQL Server2000实用教程[M].北京:清华大学出版社,
2004.02:47-138⑵.李诚等.Java2简明教程[M],第2版.北京清华大学出版社,
2004.08165-201⑶.陈轶.姚晓昆编著.Java程序设计实验指导.北京清华大孚出版社,2022
[4],杨昭编著.二级Java语言程序设计教程.北京中国水利水电出版社,2022⑸.[美]Herbert Schidt著.Java参考大全.鄢爱兰.鹿江春译.北京清华大学出版社,2022标namespace HospitalMISpublic partial class Frm login:Formdatabaseoperate myoperate=new databaseoperate;public Frm_loginInitializeComponent;}private voidbtn_exit_Cl ick object sender,EventArgs eApplication.Exit;}private voidFrmloginFormClosed object sender,FormCl osedEvcntArgse]Application.Exit;private voidbtn_ok_Click object sender,EventArgs e{〃首先查询数据库,获取与指定用户名和密码匹配的信息SqlDataReader sqlread=myoperate,getreadCselect name,password,discipline fromemployee〃+〃where name=〃+txt name.Text.Trim+〃and password=+txt_pwd.Text.TrimO+〃〃;trysqlread.Read;〃读取SqlDataReaderif sqlread.HasRows〃如果存在匹配行{//在operate inf o中记录用户名信息operateinfo.opcratenamc二txt_name.Text.TrimO;〃显示主窗体Frm Mainnewfrm=new FrmMain;this.Hide;newfrm.Show;}else{//如果密码错误,则显示提示信息并要求用户重新输入MessageBox.Show〃用户名或者密码错误!〃,〃提示〃,MessageBoxButtons.OK,MessageBoxIcon.Information;txt name.Text=;txtjpwd.Text=〃〃;txt_name.Focus;}}finally{〃如果己经实例化了SqlDataReaderif sqlread!=null{〃关闭SqlDataReadersqlread.Close;主界面代码及挂号界面代码namespace HospitalMISpublic partialclassFrm appointment:Formdatabaseoperate myoperate=new databaseoperate;public Fnnappointment{InitializeComponent;private voidbutton3_Click objectsender,EventArgs e〃获取病人的编号operateinfo.patientno=txt_patientno.Text.Trim;〃实例化并显示打印预览窗口Frm_printreg frmnew Frm_printreg;frm.Show;private voidFrm appointmentjnadobjectsender,EventArgs e〃进行病人名称的自动完成操作this.cmb_name.AutoComp1eteMode=AutoCompleteMode.SuggestAppend;this,cmb name.AutoCompleteSource=AutoCompleteSource.Listitems;〃添加要进行操作的类型cmb optype.Items.Add〃预约“;cmb optype.Items.Add〃预约挂号〃;cmb optype.Items.Add〃现场挂号〃;cmb_optype.Selectedlndex=0;//将病人信息的文本框控件设置为不可用SetControlFalse;〃加载病人姓名this,getname;〃添加医师名称以及预约科室DataSet getdocnameds=myoperate,getdsCselect ID,name,discipline fromemployee,employee;for inti=0;igetdocnameds.Tables
[0].Rows.Count;i++{〃将预约科室添加到ComboBox控件中this,cmb docdiscipline.Items.Addgetdocnameds.Tables
[0].Rows[i]
[2];〃对医师信息进行数据绑定cmb docname.DataSource=getdocnameds.Tables
[0];cmb docname.DisplayMember=name;cmb_docname.ValueMember二〃ID〃;//添加员工表中所有员工的信息,绑定到预约医生ComboBox控件中DataSet getappointdocds=myoperate,getds select ID,name fromemployee,employee;cmb appointdoc.DataSource=getappointdocds.Tables
[0];cmb_appointdoc.DisplayMember=name;cmb_appointdoc.ValueMember二〃ID〃;//添加挂号名称到ComboBox控件中DataSet getregnameds=myoperate,getds selectname fromdict_regz/,〃dict_reg〃;for inti=0;igetregnameds.Tables
[0].Rows.Count;i++this.cmb regname.Items.Addgetregnameds.Tables
[0].Rows[i]
[0];}cmbj-egname.Selectedlndex=0;}private voidSetControlFalse txt balance.Enabled=false;txt birthday.Enabled=false;txt_cardname.Enabled=false;txt celladdress.Enabled=false;txt celIphone.Enabled=false;txt_email.Enabled=false;txt_patientno.Enabled=false;txt sex.Enabled=false;txt sidno.Enabled=false;txt_sidtype.Enabled=false;}private voidcmb optypeSelectedlndexChanged objectsender,EventArgs e{this,getname;if cmb optype.Selectedltem.ToStringO=〃预约〃cmbjegname.Enabled=false;cmb_regfee.Enabled=false;if cmb optype.Selectedltem ToString=〃预约挂号〃cmb regname.Enabled=true;cmb regfee.Enabled=true;if cmboptype.SelectedTtem.ToString=〃现场挂号〃cmb_regname.Enabled=true;cmb_regfee.Enabled二true;private voidgetname if cmboptype.Selectedltem.ToString0=〃预约〃{cmb_name.Items.Clear;DataSet getnameds=myoperate,getds Cselectname from patient,patient;for inti=0;igetnameds.Tables
[0].Rows.Count;i++this,cmb name.Items.Add getnameds.Tables
[0].Rows[i]
[0];}if cmboptype.Selectedltem.ToString=〃预约挂号”cmb name.Items.Clear;DataSet getnameds=myoperate,getdsselect patientname from appointmentwhere appointment_done=1/z,appoint;for inti=0;igetnameds.Tables
[0].Rows.Count;i++this,cmb name.Items.Addgetnameds.Tables
[0].Rows[i]
[0];if cmboptype.Selectedltem.ToString=现场挂号〃cmb_name.Items.Clear;DataSet getnameds=myoperate,getds selectnamefrom patient,patient;for inti=0;igetnameds.Tables
[0].Rows.Count;i++this.cmb_name.Items.Addgetnameds.Tables
[0].Rows[i]
[0];}}private voidcmb nameSelectedlndexChanged objectsender,EventArgs eif cmboptype.Selectedltem.ToStringO=〃挂号〃string tempstr=cmb name.Text;DataSet chanagenameds=myoperate,get ds,zselect*frompatientwhere name=〃+tempstr+〃〃,patient;txt_sidtype.Text=chanagenameds.Tables
[0].Rows
[0][〃sidtype〃].ToStringO;txt sidno.Text=chanagenameds.Tabies
[0].Rows
[0][,,sidnoz,].ToStringO;txt_sex.Text=chanagenameds.Tables
[0].Rows
[0][〃sex〃1・ToStringO;txt_patientno.Text=chanagenameds.Tables
[0].Rows
[0][〃patientno〃].ToString;txt_email.Text=chanagenameds.Tables
[0].Rows
[0]ToStringO;txt cellphone.Text=chanagenameds.Tables[
01.Rows
[0][z,cellphone,z].ToStringO;txt_celladdress.Text=chanagenameds.Tables[01・Rows
[0][/,celladdress,/].ToStringO;txtjcardname.Text=chanagenameds.Tables
[0].Rows
[0][〃cardtype〃1・TcStringO;txt_birthday.Text=chanagenameds.Tables
[0].Rows
[0][birthday].ToString;txtbalance.Text=chanagenameds.Tables
[0].Rows
[0][balance]・ToStringO;DataSet appinfods=myoperate.getds^Select*from appointmentwhere patientname-z,+tempstr+anda.ppointment_done-1appointment;cmb docname.Selectedltem=appinfods.Tables
[0].Rows
[0][doctor]・ToStringO;cmb docdiscipline.Selectedltem=appinfods.Tables
[0]・Rows
[0][discipline[ToStringO;dtp_thisdate.Value=Convert.ToDateTimeappinfods.Tables
[0].Rows
[0][〃thisdate〃];dtp thistime.Value=Convert.ToDateTimeappinfods.Tables
[0].Rows
[0][,,thistime,/];else{string tempstr=cmb name.Text;DataSet chanagenameds=myoperate,getds z,select*frompatientwhere name=〃+〃,〃〃.〃、tempstr+,patient;txt_sidtype.Text=chanagenameds.TablestO].Rows
[0][〃sidtype〃].ToStringO;txt_sidno.Text=chanagenameds.Tables
[0].Rows
[0][〃sidno〃].ToStringO;txt sex.Text=chanagenameds.Tables
[0].Rows
[0][〃sex〃1,ToStringO;txt_patientno.Text=chanagenameds.Tables
[0].Rows
[0][〃patientno〃1・ToString;txt_email.Text=chanagenameds.Tables
[0].Rows
[0][〃e_mail〃1・ToStringO;txt eelIphone.Text=chanagenameds.Tables
[0].Rows
[0][z,cellphone,z].ToStringO;txt_celladdress.Text=chanagenameds.Tables[01・Rows
[0][〃celladdress〃]・ToStringO;txtjeardname.Text=chanagenameds.Tables
[0].Rows
[0][〃cardtype〃1・TcString0;txt_birthday.Text=chanagenameds.Tables
[0].Rows
[0][birthday].ToStringO;txt_balance.Text=chanagenameds.Tables
[0].Rows
[0][balance]ToStringO;♦private voidbtn addappointmentClickobject sender,EventArgs eif cmb_optype.Selectedltem.ToStringO!二〃预约〃{〃如果操作类型不为预约时,则提示用户MessageBox.Show〃请将操作类型设为预约!;}else{〃如果没有指定病人姓名,也不能进行预约if cmbname.Text=〃〃MessageBox.Show〃请选择预约人的姓名!;else{〃如果没有指定预约医生,不能进行预约if cmb_docname.Text=〃〃MessageBox.Show〃请选择预约医生!!〃;else{〃同时要指定预约科室if cmb_docdiscipline.Text=〃〃MessageBox.Show〃请选择预约科室!;else{〃如果预约的各个条件都符合,则调用执行插入语句插入到数据库中myoperate.getcom/zinsert intoappointment patientname,patientno,,z+“doctor,discipline,thisdate,thistime,appointment_done,z+〃values C〃+cmb_name.Selectedltem.ToString+〃,〃+txt_patientno.Text.Trim+〃,〃+cmb docname.SelectedValue.ToString+〃,〃+cmb_docdiscipline.Selectedltem.ToString+〃,〃+dtpthisdate.Value.ToShor tDateStri ng+〃,〃+dtp_thistime.Value.ToShortTimeStringO+〃’,〃+Convert.ToSBytetrue+〃〃;MessageBox.Show〃添加预约成功!〃;〃提示添加成功this.gridviewinitO;〃重新刷新GridView控件}}}private voidbtn addregClick objectsender,EventArgs e图系统功能模块图
12.4数据库需求分析在数据库应用系统的开辟过程中,数据库的结构设计是一个非常重要的问题数据库结构设计的好坏将直接对应用系统的效率以及实现的效果产生影响,好的数据库结构会减小数据库的存储量,数据的完整性和一致性比较高,系统具有较快的相应速度,简化基于此数据库的应用程序的实现等在数据库系统开始设计的时候应该尽量考虑全面,特别应该子细考虑用户的各种需求,避免浪费不要的人力和物力数据库需求分析是数据结构设计的第一阶段,是非常重要的一个阶段在这个阶段主要是采集基本数据、数据结构以及确定数据处理的流程,组成一份详尽的数据字典,为以后进一步设计打下基础在子细调查医院管理过程的基础上,我们得到本系统所处理的数据关系如图2所示if cmb_optype.Selectedltem.ToStringO=〃预约”MessageBox.Show〃请将操作类型选成挂号!方可进行挂号!〃;else{//this,getname;if cmbname.Text=〃〃MessageBox.Show〃请选择预约人的姓名!〃;else{if cmbdocname.Text=〃〃MessageBox.Show〃请选择预约医生!!〃;else{ifcmb docdiscipline.Text=〃〃MessageBox.Show〃请选择预约科室!〃;elseif cmb_regname.Text=〃〃MessageBox.Show〃请选择挂号名称!;else{ifcmboptype.Selectedltem.ToStringO=〃预约挂号〃myoperate.getcom/zUpdate appointmentset reg name=〃+cmb_regname.Selectedltem.ToString0+〃,reg_fe所〃+cmb_regfee.Text+/z,,reg_done=,T岫ere patientno-,z+txt_patientno.Text.Trim+〃〃;MessageBox.Show〃添加挂号成功!!〃;this.gridviewinitO;else{myoperate,getcom〃insert intoappointmentpatientname,patientno,doctor,discipline,thisdate,thistime,appointment done,regname,reg fee,re g_done〃+〃values〃+cmb_name.Text+”/〃+txt_patientno.Text.Trim+〃,〃+cmbdocname.SelectedValue.ToStringO+〃,〃+cmbdocdiscipline.Selectedltem.ToString+〃,〃+dtp thisdate.Value.ToShortDateString+〃,〃+dtp thistime.Value.ToShortTimeString+1,〃+cmb_regname.Selectedltem.ToString+〃,〃+cmb_regfee.Text+〃,T〃;MessagcBox.Show〃添加挂号成功!!〃;this.gridviewinitO;}}}}private voidcmb_regtype_SelectedlndexChanged objectsender,EventArgs e]this,getname;private voidgridviewinitO{〃获取预约表中的指定医师在指定时间内的预约信息DataSet viewlds=myoperate,getds selectappointmentid as预约号,〃+“patientname as病人姓名,patientno as病历号,doctor as预约医生,〃+^discipline as预约科室,thistime as预约时间from appointment〃+“where doctor=z,+cmb_appointdoc.SelectedValue.ToString+〃and Ihisdate=/z+dtp_appointdate.Value.ToShortDateString+〃〃,appointment;//绑定预约信息到Da taGr id Vi ew控件上this.dataGridViewl.DataSource=viewlds.Tables
[0];〃获取值班表中当前日期和指定医师的值班信息DataSet view2ds二myoperate.getdsz,select TDas编号,doc as医师,〃+Part as科室,StartDate as开始时间,EndDate as结束时间,“+z,CurrentDate as日期from dutywhere doc-+cmb_appointdoc.SelectedValue.ToString0+and currentDate=,〃+System.DateTime.Now.Date.ToString0+〃〃,〃值班表〃;〃将值班信息保存到DataGridView2控件上this.dataGridView
2.DataSource=view2ds.Tables
[0];private voidcmb appointdocSelectedlndexChanged objectsender,EventArgs e]this.gridviewinitO;〃根据选择的挂号名称获得挂号费用private voidcmb_regname_SelectedIndexChanged objectsender,EventArgs e]string taipstr=cmb regname.Selectedltcm.ToString;DataSet regfreeds=myoperate,getds selectprice fromdict_reg wherename=〃+tempstr+〃,〃dict_reg〃;for inti=0;iregfreeds.Tables
[0].Rows.Count;i++this,cmb regfee.Text=regfreeds.Tables
[0].Rows[i]
[0].ToString;private voidbtn_addne\\patient_Click objectsender,EventArgs e{FrmjDatient frm=new FrmjDatient;frm.MdiParent=ActiveForm;frm.Show;}药品管理代码namespace HospitalMISpublicpartialclass Frmjnedimanage:Formdatabaseoperate myoperate=new databaseoperate;private intsavevalue;public Frmjnedimanage]InitializeComponent;}〃定义查询Med ica表的SQL语句private stringsqlstr=selectIDas编号,name as药品名,〃+Z/Unit as单位,Price as价格,Style as规格,Chinese as拼音码,〃+“Class as类别,Better as功能,factory as厂家,num as数量,〃+“ableuse as是否可用,note as备注from Medica;private stringmytable=〃药品表〃;〃指定表名BindingSource mybdsource=new BindingSource;〃定义BindingSource进行绑定private voidFrm medimanageLoad objectsender,EventArgs e{〃调用getds方法执行SQL并返回一个填充了数据的DataSetDataSet myds=myoperate,getds sqlstr,my table;mybdsource.DataSource=myds.Tables
[0];//等B定BindingSource//将DataGr idVi ew控件绑定到Bi nd i ngSource控件this.dataGridViewl.DataSource=mybdsource;//将B indingNav igat or控件绑定到B indingSourcethis.bindingNavigatorl.BindingSource=mybdsource;〃隐藏药品编号的显示txtid.Visible=false;txt id.DataBindings.Add text”,mybdsource,〃编号〃;SetControlToFal se;//将控件的可用状态设为false}private voidSetControlToFalse txt_unit.Enabled=false;txtstyle.Enabled=false;txt_num Enabled=false;txt_note.Enabled=false;txt_name.Enabled=false;txt_factory.Enabled=false;txt_class.Enabled=false;txt_chinese.Enabled=false;txt better.Enabled=false;nudjrice.Enabled=false;chkableuse.Enabled=false;}private voidinitDataSet myds=myoperate,getds sqlstr,mytable;mybdsource.DataSource=myds.Tables
[0];this.dataGridViewl.DataSource=mybdsource;this.bindingNavigatorl.BindingSource=mybdsource;private voidbindin^favigatorAddNewItem_Clickobject sender,EventArgs eSetControlToTrue;txt_name.Focus;savevalue=1;private voidSetControlToTrue0txt unit.Enabled=true;txt_style.Enabled=true;txt num.Enabled=true;txt note.Enabled=true;txt name.Enabled=true;txt_factory.Enabled=true;txt_class.Enabled=true;txt chinese.Enabled=true;txt_better.Enabled=true;nudjprice.Enabled=true;chk_ableuse.Enabled=true;private void保存SToolStripButtonjCl ickobjectsender,EventArgs eif savevalue=l〃savevalue为表示新增状态if txt_name.Text!=〃〃〃判断是否输入了药品名称{〃执行插入SQL语句将用户输入的信息插入到数据库中myoperate.getcom/zinsert intoMedicaname,Unit,price,Style,〃+“Chinese,Class,Better,factory,num,ableuse,note〃+,zvalues C〃+txt_name.Text.TrimO+〃’,〃+txt_unit.Text.TrimO+〃,〃+nud_price.Value+〃,,〃+txt style.Text.TrimO+〃〃+〃,〃+txt_chinese.Text.Trim+〃,+txt_class.Text.Trim+〃,〃+txt_better.Text.Trim+〃,〃+txt_factory.Text.Trim+〃,〃+txt_num.Text.Trim+〃,〃Convert.ToByte chk_ableuse.Checked+〃+txt_note.Text.Trim+〃〃;SetControIToFalse0;//设置控件状态为falsesave value=0;〃将标志初始为MessageBox.Show〃添加成功!;〃提示成功else{〃如果没有输入药品名称,要求用户输入MessageBox.Show〃请添加药品名名称!〃;SetControlToFalse0;〃设置控件为状态为falseelseif savevalue=2〃如果是编辑状态if txt_name.Text!=〃〃〃判断用户是否输入了药品名称{〃执行Update语句更新药品信息myoperate.getcomz,Update Medicaset name=〃+txt_name.Text.Trim+〃,Unit-〃+txt unit.Text.Trim+〃,Price-+nud_price.Value+〃,Style=〃+txt_style.Text.Trim+〃,Chinese-〃+txt_chinese.Text.TrimO++〃,Class-+txt_class.Text.TrimO+〃,Better-〃+txt better.Text.TrimO+〃,factory^z,+txt_factory.Text.TrimO+〃,num=〃+txt_num.Text.TrimO+,ableuse=〃+Convert.ToByte chkableuse.Checked+〃,note=+txt note.Text.TrimO+〃where ID=〃+txt_id.Text.TrimO+〃〃;SetControlToFalse0;//设置控件为状态为falsesavevalue=0;〃将标志初始为MessageBox.Show〃数据库更新成攻!〃;〃提示成功else{〃如果没有输入药品名称,要求用户输入MessageBox.Show〃请添加药品名名称!;SetControlToFalse0;〃设置控件为状态为falsethis.initO;//刷新控件的数据private voidtoolStripButtonl Click objectsender,EventArgs eSetControlToTrue0;savevalue=2;private voidtoolStripButton2Clickobjectsender,EventArgs eif txt_name.Text!二〃〃myoperate.getcomCdelete fromMedica where11=〃+txt_id Text.Trim+〃〃;elseMessageBox.Show(〃请添力口新的药品名!〃);private voidtxt nameTextChanged objectsender,EventArgs etxt_chinese.Text=myoperate.GetPYStringtxt_namc.Text.Tolxwer;private voiddataGridViewl_Cel1C1ickobjectsender,DataGridViewCellEventArgs e〃编号,药品名,单位,价格,规格,拼音码,类别,功能,厂家,数量,是否可用txt_id.Text=Convert.ToStringdataGridViewl[0,dataGridViewl.CuirentCell.Rowindex].Value.Trim;txt_name.Text二Convert.ToString dataGridViewl[1,dataGridViewl.CurrentCell.Rowindex].Value.Trim0;txtjmm.Text=Convert.ToString dataGridViewl[9,dataGridViewl.CurrentCell.Rowindex].Value.Trim0;txt_style.Text=Convert.ToStringdataGridViewl[4,dataGridViewl.CurrentCell.Rowindex].Value.Trim0;txtjanit.Text=Convert.ToString dataGridViewl[2,dataGridViewl.CurrentCell.Rowindex].Value.Trim;txt_factory.Text=Convert.ToStringdataGridViewl[8,dataGridViewl.CurrentCell.Rowindex].Value.Trim0;txt_class.Text=Convert.ToString dataGridViewl[6,dataGridViewl.CurrentCell.Rowindex].Value.Trim;txt chinese.Text=Convert.ToString dataGridViewl[5,dataGridViewl.CurrentCell.RowTndex].Vaiue.Trim0;txt_better.Text=Convert.ToStringdataGridViewl[7,dataGridViewl.CurrentCell.Rowindex].Value.Trim;chk^bleuse.Checked二Convert.ToBoolean dataGridViewl[10,dataGridViewl.CurrentCell.Rowindex].Value;nud_price.Value=Convert.ToDecimal dataGridViewl[3,dataGridViewl.CurrentCell.Rowindex].Value;}病床病人资料医生图数据关系图
22.5数据库设计通过对医院管理的内容和数据关系分析,我们设计的数据项和数据结构如下员工基本状况包括的数据项有员工号、员工姓名、性别、所在部门、身份证号、生日、籍贯、国籍、民族、婚姻状况、健康状况、参加工作时间、员工状态、家庭住址、联系电话等员工工资状况包括的数据项有员工号、工资项别、工资金额等医院工作岗位信息包括的数据项有工作岗位代号、工作岗位名称等医院部门信息包括的数据项有部门代号、部门名称、部门负责人等病人信息包括的数据项有病人姓名、病人性别、入院时间、病人所属科室、病人状况、病人主治医生、房间号、病床号等药剂资源管理信息包括的数据项有药剂代号、药剂名称、药剂价格、药剂库存数量、备注等医疗仪器管理包括的数据项有仪器代号、仪器名称、仪器价格、仪器数量、备注等这一设计阶段是在需求分析的基础上,设计出能够满足用户需求的各种实体,以及确定他们之间的关系,为后面的逻辑结构设计打下基础本实例根据上面的设计规划出的实体有员工实体、部门实体、岗位实体、病人实体、药剂实体、仪器实体实体和实体之间的关系E-R图如图3所示图3实体之间关系E-R图我们需要将上面的数据库概念结构转化为Microsoft VisualStudio2022数据库系统所支持的实际数据模型,也就是数据库的逻辑结构在上面的实体以及实体之间关系的基础上,我们就可以形成数据库中的表格以及各个表格之间的关系医院管理系统数据库中各个表格的设计结果如表每一个表格对应在数据库中的一八表列名数据英型可否为空说明员工号《主键》EMP^NO NUX!BERIC6NOT NULLE\[P_XANIE CHARACIER10NULL员二姓名E\P_DEPT」D NUXBERIC3NULL可在部门号期务EMP_DUTY CHARACTER0yjuu.学历EZP_XL CH^RAfTFRlO NULL|EMP.GENDER CHARACIERZ2NULL性别生日tMP BIRTHDAYDATE NULLtMPHOMhIOWN CHARACItK8NULL国籍E\£P_COUNTRY CHARACTER10NULL民族EMP NARONCHARACTCRK NULL二身份证号EMP.ID NUMBRIC6NULLEMP_MARRIAGE CIIARAC7ER2NULL婚姻状况EMP-HEALTH CHARACTCRUNULL使康状况表2JOB工作岗位情况表豹更汕列名可否为空说明NUMBERIC3工作岗位代号(主址)JOBJD NTONULL.-—---.一一一工作岗位名称JOB_NAME CHARACIER10NULL表3DEPI郃门信息表列名数据类里可否为主说明部门代号<$)DEPT.ID NUMBEXICiJNOT NULL«、部,泾称DEPT AMtCMARACTERi10NULL部门土任代言DEPT_MANAGER NUVBERJQ6NULLDEPTAICEMANAGE NULL看国、制王任代m表4病人信息表niihi列名数据英型可否为空说明病人姓名(王城)PATIEN7_NAME aiARACHR10NLLLPATIEN7_GENDER CHARACTERNOT NULL向人性另1入院时值PATIEKT—DAIE.STAKT CHARACITIt10NLLLPATIENT DEPTCHARACTER10NOT NULL猗人所唐科革病人伏况PAT1EN7SIATt CHARACTEKUONLLL病人主治医生PATIEN7_DOC CHARACIZR10NOT NULL病人房同号PAnEN7_ROOM aiARACITR3NOT NULLPATIEN7_BED CHARACTERSNOT NULL病人席床号表5为剂信息表POI
1、列名黔据我纽可否为空说明药剂代号(王健)POTION IDNLMBERIQ3NOT NULLPOTIONNAME-I OiARACTER/lO NULL防判名称药剂价格POTION_PRICE NUXIBERICCINULLPOTION QUANTITYNLNBERICH NULL药剂库存料量窗注POTION-REM aiARACTER40NULL表6医疗仪器信息表APPARATUS列名数提类生可否为主说明仪器代号(王键APPARARTSJD WJMBERICNOT NULL仪器名称APPARATUS.NAME CHAKACIhR10NULL仪器价格APPARATUS_PRICE NUMBERIC5,2NULL仪器数量APPARATUS.QUANTITY NUMBER1C3NULLAPPARATUS JtFMCHARACTER40NUIX备注表7管理IMS系统的用户口令表TMS列名数据5耀!可否为空说明■IM・■S■U・■S・E■R■1・CHARA・CTE■R”■2一0・・NOT NULL・l・用・户名■(・壬■■健■)—・・一・1nfS_PSWD CHARALTFRCTNOT NULL口今
2.6功能模块的创建首先设计的是登录界面(如图4所示,所有程序代码参照“程序原代码”)图4登陆界面然后设计的是登录后的主界面(如图5所示)图5主界面之后设计病人挂号界面(如图6所示)药品管理界面(如图7所示)
3.设计结果分析首先我们运行程序,弹出登录界面在输入用户名和密码之后(如图8所示),主界进入面(如图9所示)图戾奈8图药品管理界面7图9登录后的主界面然后我们进行病人登记(如图10所示),在输入一系列的信息之后,单击添加挂号,成功添加一个新挂号图10病人挂号界面之后我们在数据库中添加一系列的相关数据,再进行退药管理(如图11所示)。
个人认证
优秀文档
获得点赞 0