java課設(shè) 醫(yī)院管理信息系統(tǒng)_第1頁(yè)
java課設(shè) 醫(yī)院管理信息系統(tǒng)_第2頁(yè)
java課設(shè) 醫(yī)院管理信息系統(tǒng)_第3頁(yè)
java課設(shè) 醫(yī)院管理信息系統(tǒng)_第4頁(yè)
java課設(shè) 醫(yī)院管理信息系統(tǒng)_第5頁(yè)
已閱讀5頁(yè),還剩35頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、醫(yī)院管理信息系統(tǒng)1需求分析1.1現(xiàn)狀當(dāng)前,醫(yī)院作為病人就診的地方,有許多信息需要處理和管理?,F(xiàn)今,有很多門(mén)診信息都是初步開(kāi)始使用,甚至尚未使用計(jì)算機(jī)進(jìn)行信息處理。根據(jù)調(diào)查得知,他們以前對(duì)信息管理的主要方式是基于文本、表格等紙介質(zhì)的手工處理,對(duì)于醫(yī)歷等很多信息都是用人工計(jì)算、手抄進(jìn)行。數(shù)據(jù)信息處理工作量大,容易出錯(cuò);由于數(shù)據(jù)繁多,容易丟失,且不易查找??偟膩?lái)說(shuō),缺乏系統(tǒng),規(guī)范的信息管理手段。數(shù)據(jù)處理手工操作,工作量大,出錯(cuò)率高,出錯(cuò)后不易更改?;谶@此問(wèn)題,我認(rèn)為有必要建立一個(gè)醫(yī)院管理系統(tǒng),使醫(yī)院管理工作規(guī)范化,系統(tǒng)化,程序化,避免醫(yī)院管理的隨意性,提高信息處理的速度和準(zhǔn)確性,能夠及時(shí)、準(zhǔn)確、有

2、效的查詢(xún)和修改醫(yī)院情況。醫(yī)院信息系統(tǒng)簡(jiǎn)稱(chēng)HIS,是Hospital Information System的簡(jiǎn)稱(chēng),是指利用計(jì)算機(jī)和網(wǎng)絡(luò)通信設(shè)備,為醫(yī)院所屬的各個(gè)部門(mén)提供病人診療和行政管理信息的手機(jī)、存儲(chǔ)、處理提取和數(shù)據(jù)交換的能力。此次我課程設(shè)計(jì)的目標(biāo)就是設(shè)計(jì)一個(gè)能使醫(yī)院的管理工作系統(tǒng)化、規(guī)范化、自動(dòng)化的系統(tǒng),從而提高醫(yī)院管理工作的效率。1.2模塊功能 本系統(tǒng)功能主要包括:?jiǎn)T工信息、病人信息、藥劑管理、儀器管理、工資管理、病床管理。員工信息:儲(chǔ)存了醫(yī)院的醫(yī)務(wù)人員的基本情況,包括員工編號(hào),姓名,性別,所在部門(mén),聯(lián)系電話等信息。員工各種的查詢(xún)、修改,包括員工基本信息、職稱(chēng)、崗位、工資等。 員工的人事調(diào)

3、動(dòng)管理。病人信息:病人基本資料表中所有項(xiàng)目(姓名,性別,婚否,出生日期,職業(yè),職稱(chēng),門(mén)診診斷),病人基本資料表錄入、修改、刪除、復(fù)制。藥劑管理:實(shí)現(xiàn)對(duì)醫(yī)院藥品信息的分類(lèi)管理和數(shù)據(jù)分析,從而使信息整理快速、準(zhǔn)確、簡(jiǎn)單,以便于相關(guān)部門(mén)給予統(tǒng)籌安排,從而提高改進(jìn)傳統(tǒng)的管理方法,提高企業(yè)管理水平。儀器管理:保存了醫(yī)院所需醫(yī)療用品的基本情況,庫(kù)存量和單品價(jià)格。以便管理人員查看,隨時(shí)進(jìn)行補(bǔ)貨。工資管理:存儲(chǔ)醫(yī)生員工號(hào),工資級(jí)別和工資總額,管理人員可以進(jìn)行增刪查改。病床管理:實(shí)現(xiàn)床位分配、空床查詢(xún)、包床/退床、轉(zhuǎn)床出院處理。圖1.功能結(jié)構(gòu)圖1.3用例圖圖2.用例圖2系統(tǒng)設(shè)計(jì)2.1識(shí)別需求文檔中的類(lèi)1.管理員

4、管理員工編號(hào),姓名,性別,所在部門(mén),聯(lián)系電話等信息,進(jìn)行增刪查改。普通用戶查看員工信息。2.管理員設(shè)置病人姓名,性別,婚否,出生日期,職業(yè),職稱(chēng),門(mén)診診斷,進(jìn)行病人基本資料表錄入、修改、刪除、查詢(xún)。3.管理員實(shí)現(xiàn)對(duì)醫(yī)院藥品信息的分類(lèi)管理,進(jìn)行增刪查改。4.管理員保存醫(yī)院所需醫(yī)療用品的基本情況,庫(kù)存量和單品價(jià)格。5.管理員錄入醫(yī)生員工號(hào),工資級(jí)別和工資總額,進(jìn)行增刪查改。普通用戶查看自己的工資。6.管理員實(shí)現(xiàn)床位分配、空床查詢(xún)、包床/退床、轉(zhuǎn)床出院處理。需求文檔中的名詞/名詞短語(yǔ),按照出現(xiàn)順序,從左到右排列(不重復(fù)):管理員(admin)、普通用戶(person)、病人(invalid)、藥品(

5、stuff)、醫(yī)療用品)(apparatus、工資(pay)、床位(bed)。2.2初步建模類(lèi)及類(lèi)間關(guān)系員工信息包括:醫(yī)生編號(hào)、姓名、性別、學(xué)歷、職務(wù)、所在科室。病人基本情況描述包括病人的病人編號(hào)、姓名、性別、聯(lián)系電話、籍貫、國(guó)家、民族、身份證號(hào)、健康狀況、科室名稱(chēng)、病房號(hào)、床號(hào)。病號(hào)唯一確定一個(gè)病人。藥品信息描述包括:藥品編號(hào)、藥品名稱(chēng)、庫(kù)存量、單價(jià)。儀器信息描述包括:儀器代號(hào)、名稱(chēng)、單價(jià)、數(shù)量。床位信息描述包括床號(hào)、病房號(hào)、是否已住人。一個(gè)床號(hào)和病房號(hào)唯一確定一個(gè)床位情況。2.3初步的UML圖Database+sql:String+url:String+user:String+passwo

6、rd:String+<<create>>Database()+OpenConn():void+executeQuery(in sql:String):ResultSet+executeUpdate(in sql:Sring):boolean+closestmt():void+closeConn():void圖3.Database UML設(shè)計(jì)Apparatus+Datas:String+Columntitles:String+type:int+<<create>>Apparatus(in datas:String,in type:int)+acti

7、onPerformed(in e:ActionEvent):void圖4.Apparatus UML設(shè)計(jì)Invalid+datas:String+columntitles:String+type:int+<<create>>Invalid(in datas:String,in type:int)+actionPerformed(in e:ActionEvent):void圖5.Invalid UML設(shè)計(jì)Personcheck-pclass:String+columns:String+datas:String+<<create>>Personche

8、ck(in data:String)+actionPerformed(in e:ActionEvent):void圖6.Personcheck UML設(shè)計(jì)Invalidupdate+<<create>>Invalidupdate()+actionPerformed(in e:ActionEvent):void圖7.Invalidupate UML設(shè)計(jì)Invalidcheck-pclass:String+columns:String+datas:String+<<create>>Invalidcheck(in data:String)+action

9、Performed(in e:ActionEvent):void圖8.Invalidcheck UML設(shè)計(jì)Invalidadd-pclass:String+<<create>>Invalidadd()+actionPerformed(in e:ActionEvent):void圖9.Invalidadd UML設(shè)計(jì)InvalidBeansql:Stringiname:Stringsex:stringpclass: Stringstate:Stringdoctor: Stringitime: Stringrno: Stringbno: StringAdd(in name:

10、String,in sex:String,in time:String,in plass:String,in state:String,in doctor:String,in rno:String,in bno:String):voidsearchInvalidiname(in iname:String):StringeditInvalid(in iname:String,in sex:String,in itime:String,in plass:String,in state:String,in doctor:String,in rno:String,in bno:String):void

11、deleteInvalid(in iname:String):voidsearchAllInvalidor(in iname:String,in itime:String,in pclass:String,in state:String,in rno:String,in bno:String):StringsearchAllInvalidand(in iname:String,in itime:String,in pclass:String,in state:String,in rno:String,in bno:String):StringgetAlliname():Stringrefres

12、h():String圖10.InvalidBean UML設(shè)計(jì)3系統(tǒng)實(shí)現(xiàn)3.1UML類(lèi)圖轉(zhuǎn)換成Java代碼框架 Database.Java是數(shù)據(jù)庫(kù)連接,源代碼如下:public class Database public Database()public void OpenConn()throws Exceptiontrycatch(Exception e) public ResultSet executeQuery(String sql)catch(SQLException e) public boolean executeUpdate(String sql)public void clos

13、eStmt() public void closeConn() public static void main(Stringargs) throws Exception Personframe.java為員工信息窗口的代碼,可以進(jìn)行查詢(xún),刪除,刷新,修改,源代碼如下:public class PersonFrame extends JFrame implements ActionListenerprivate JButton button_add;private JButton button_check;private JButton button_delete;private JButton

14、 button_refresh;private JButton button_update; private JTable table; /表格組件 private DefaultTableModel tableModel; String datas;String columntitles="員工號(hào)","員工姓名","性別","所在部門(mén)","身份證","生日","籍貫","國(guó)家","民族","婚姻狀況&qu

15、ot;,"健康狀況","工作時(shí)間","家庭住址","聯(lián)系電話 "public PersonFrame(String datas,int type) public boolean isCellEditable(int row, int column) return false;/表格不允許被編輯 ; Overridepublic void actionPerformed(ActionEvent e) public static void main(String args) /測(cè)試方法/new PersonFrame(

16、null,0); Invalid.java是病人管理模塊的代碼,可以進(jìn)行入院,查詢(xún),刷新和更新的操作,源代碼如下:public class Invalid extends JFrame implements ActionListenerprivate JButton button_add;private JButton button_check;private JButton button_edit;private JButton button_refresh;private JButton button_delete; private JTable table; /表格組件 private

17、DefaultTableModel tableModel; String datas;String columntitles="病人姓名","病人性別","入院時(shí)間","所屬科室","病人狀況","主治醫(yī)生","病房號(hào)","病床號(hào)"public Invalid(String datas, int type) public boolean isCellEditable(int row, int column) return false;/

18、表格不允許被編輯 ; Overridepublic void actionPerformed(ActionEvent e) public static void main(String args) /測(cè)試方法/new Invalid(null,0); Apparatus.java是對(duì)儀器進(jìn)行管理,源代碼如下:public class Apparatus extends JFrame implements ActionListenerprivate JButton button_add;private JButton button_check;private JButton button_edi

19、t;private JButton button_refresh;private JButton button_delete; private JTable table; /表格組件 private DefaultTableModel tableModel; String datas;String columntitles="儀器代號(hào)","儀器名稱(chēng)","儀器價(jià)格","儀器數(shù)量","備注"int type;public Apparatus(String datas,int type) public

20、 boolean isCellEditable(int row, int column) return false;/表格不允許被編輯 ; Overridepublic void actionPerformed(ActionEvent e) public static void main(String args) /測(cè)試方法new Apparatus(null,0); Stuff.java是藥劑管理,可以查詢(xún)庫(kù)存藥品的信息,源代碼如下:public class Stuff extends JFrame implements ActionListenerprivate JButton butto

21、n_add;private JButton button_check;private JButton button_edit;private JButton button_refresh;private JButton button_delete;private JTable table; /表格組件 private DefaultTableModel tableModel; String datas;String columntitles="藥劑代號(hào)","藥劑名稱(chēng)","藥劑價(jià)格","儲(chǔ)存量","備注&q

22、uot;int type;public Stuff(String datas,int type) Overridepublic void actionPerformed(ActionEvent e) public static void main(String args) /測(cè)試方法new Stuff(null,0); Pay.Java是對(duì)員工工資進(jìn)行管理錄入的操作,源代碼如下:public class Pay extends JFrame implements ActionListenerprivate JButton button_add;private JButton button_ch

23、eck;private JButton button_edit;private JButton button_refresh;private JButton button_delete; private JTable table; /表格組件 private DefaultTableModel tableModel; String datas;String columntitles="員工號(hào)","工資等級(jí)","工資總額"public Pay(String datas) Overridepublic void actionPerform

24、ed(ActionEvent e) public static void main(String args) /測(cè)試方法new Pay(null); Bed.java是對(duì)醫(yī)院病床進(jìn)行管理,顯示病房及病床的使用信息,源代碼如下:Public class Bed extends JFrame implements ActionListenerprivate JButton button_add;private JButton button_check;private JButton button_refresh;private JButton button_delete; private JTab

25、le table; /表格組件 private DefaultTableModel tableModel; String datas;String columntitles="病床號(hào)","病房號(hào)","狀態(tài)"public Bed(String datas) public boolean isCellEditable(int row, int column) return false;/表格不允許被編輯 ; Overridepublic void actionPerformed(ActionEvent e) public static v

26、oid main(String args) /測(cè)試方法new Bed(null);3.2添加表示層,實(shí)現(xiàn)交互功能3.2.1Login類(lèi)系統(tǒng)的用戶有管理員、醫(yī)生,因此,在進(jìn)入主界面之前,應(yīng)該先彈出登錄界面,要求用戶輸入用戶編號(hào)(姓名可能重名)和登錄口令,以驗(yàn)證用戶身份。因此,我們首先需要設(shè)計(jì)一個(gè)登錄界面Login類(lèi)。設(shè)計(jì)思路:實(shí)現(xiàn)界面外觀,添加交互功能。登錄過(guò)程中需要進(jìn)行用戶ID與密碼的驗(yàn)證。 import java.awt.*;import javax.swing.*;import java.awt.event.*;public class Login extends JFrame imple

27、ments ActionListener private JLabel user,password; private JTextField text_user; /用戶名文本行 private JPasswordField text_password; /密碼文本行 private JButton button_ok,button_cancel; private JComboBox typeBox; JLabel jlabel; public boolean isLogin=false; /判斷登錄是否成功 public Login() super("用戶登錄"); thi

28、s.setSize(240,150); this.setLocation(550,200); this.setBackground(Color.lightGray); this.setResizable(false); this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); this.getContentPane().setLayout(new FlowLayout(); jlabel=new JLabel("歡迎登陸醫(yī)院管理信息系統(tǒng) ",JLabel.CENTER); this.getContentPane().add(jlabe

29、l); user=new JLabel("用戶名:"); user.setFont(new Font("Dialog",0,12); this.getContentPane().add(user); text_user = new JTextField(15); text_user.setEditable(true); this.getContentPane().add(text_user); password=new JLabel("密 碼:"); password.setFont(new Font("Dialog&quo

30、t;,0,12); this.getContentPane().add(password); text_password = new JPasswordField(15); this.getContentPane().add(text_password); String types = "普通用戶","管理員" typeBox = new JComboBox(types); button_ok = new JButton("登錄"); button_ok.setFont(new Font("Dialog",0,12

31、); this.getContentPane().add(new Label(); this.getContentPane().add(typeBox); this.getContentPane().add(button_ok); button_ok.addActionListener(this); button_cancel = new JButton("取消"); button_cancel.setFont(new Font("Dialog",0,12); this.getContentPane().add(button_cancel); butto

32、n_cancel.addActionListener(this); this.setVisible(true); public void actionPerformed(ActionEvent e) /單擊事件處理方法 String username = text_user.getText(); String password = new String(text_password.getPassword(); if (e.getSource()=button_cancel) /單擊退出按鈕 this.setVisible(false); else if (username.equals(&qu

33、ot;") JOptionPane.showMessageDialog(this, "請(qǐng)輸入用戶名"); else if (password.equals("") JOptionPane.showMessageDialog(this, "密碼不能為空,請(qǐng)輸入密碼"); else if (e.getSource()=button_ok) /單擊登錄按鈕 LoginBean login=new LoginBean(); isLogin=login.enter(username,password); int type = type

34、Box.getSelectedIndex(); if(isLogin) if(login.Flag=type) new HOSMain(type); else JOptionPane.showMessageDialog(this, "登陸身份不正確!"); return; text_user.setText(""); text_password.setText(""); this.setVisible(false); public void windowClosing(WindowEvent e) public void window

35、Opened(WindowEvent e) /打開(kāi)窗口 public void windowClosed(WindowEvent e) /關(guān)閉窗口后 public void windowIconified(WindowEvent e) /窗口最小化 public void windowDeiconified(WindowEvent e) /窗口恢復(fù) public void windowActivated(WindowEvent e) /激活窗口 public void windowDeactivated(WindowEvent e) /變?yōu)椴换顒?dòng)窗口 public static void ma

36、in(String args) throws Exception /測(cè)試方法 new Login(); HosMain類(lèi)HosMain類(lèi)是登錄完成后進(jìn)入的醫(yī)院管理信息系統(tǒng)的主界面,該界面顯示了整個(gè)系統(tǒng)的功能模塊。代碼如下:import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.sql.*;/* * 系統(tǒng)主界面 */public class HOSMain extends JFrame implements ActionListenerDimension faceSize = new Dimension

37、(450, 550);JPanel contentPane;JButton buttonPersonFrame;JButton buttonInvalid;JButton buttonStuff;JButton buttonApparatus;JButton buttonPay;JButton buttonBed;JButton buttonExit;int type; public HOSMain(int type) this.type=type;this.setDefaultCloseOperation(EXIT_ON_CLOSE);this.setSize(800,500);this.s

38、etTitle("醫(yī)院管理系統(tǒng)");this.setLocation(400,100);buttonPersonFrame=new JButton("員工信息");buttonInvalid=new JButton("病人信息");buttonStuff=new JButton("藥劑管理");buttonApparatus=new JButton("儀器管理");buttonPay=new JButton("工資管理");buttonBed=new JButton(&quo

39、t;病床管理");buttonExit=new JButton("退出系統(tǒng)");JPanel panel1=new JPanel();panel1.add(buttonPersonFrame);JPanel panel2=new JPanel();panel2.add(buttonInvalid);JPanel panel3=new JPanel();panel3.add(buttonStuff);JPanel panel4=new JPanel();panel4.add(buttonApparatus);JPanel panel5=new JPanel();pa

40、nel5.add(buttonPay);JPanel panel6=new JPanel();panel6.add(buttonBed);JPanel panel7=new JPanel();panel7.add(buttonExit); ImageIcon firstpage=new ImageIcon("abc.PNG"); this.getContentPane().setLayout(new BorderLayout();JPanel panel = new JPanel();panel.add(panel1);panel.add(panel2);panel.add

41、(panel3);panel.add(panel4);panel.add(panel5);panel.add(panel6);panel.add(panel7);this.getContentPane().add(panel,BorderLayout.NORTH);this.getContentPane().add(new JLabel(firstpage),BorderLayout.CENTER);buttonPersonFrame.addActionListener(this);buttonInvalid.addActionListener(this);buttonStuff.addAct

42、ionListener(this);buttonApparatus.addActionListener(this);buttonPay.addActionListener(this);buttonBed.addActionListener(this);buttonExit.addActionListener(this);/關(guān)閉程序時(shí)的操作this.addWindowListener(new WindowAdapter()public void windowClosing(WindowEvent e)System.exit(0););this.setVisible(true);public vo

43、id actionPerformed(ActionEvent e)if(e.getSource()=buttonPersonFrame) new PersonFrame(null,type); if(e.getSource()=buttonInvalid)new Invalid(null,type);if(e.getSource()=buttonStuff) new Stuff(null,type); if(e.getSource()=buttonApparatus)new Apparatus(null,type);if(e.getSource()=buttonPay)new Pay(null

44、);if(e.getSource()=buttonBed)new Bed(null);if(e.getSource()=buttonExit)JOptionPane.showConfirmDialog(null, "您確定退出系統(tǒng)嗎?","消息",JOptionPane.YES_NO_OPTION);System.exit(0);public static void main(String args)new HOSMain(1);ApparatusBean類(lèi)點(diǎn)擊進(jìn)入儀器管理的界面,實(shí)現(xiàn)添加、修改、查詢(xún)、刪除的操作。import java.util.*;i

45、mport java.util.Date;import java.sql.*;import java.awt.*;import javax.swing.*;public class ApparatusBean String sql;ResultSet rs = null;String ano;String aname;String aprice;String amount;String explain;public void add(String ano,String aname,String aprice,String amount,String explain) Database DB =

46、 new Database();sql="insert into apparatus values (' "+ano+"','"+aname+"','"+aprice+"','"+amount+"','"+explain+"')"tryDB.OpenConn();DB.executeUpdate(sql);JOptionPane.showMessageDialog(null,"成功添加儀

47、器信息!");catch(Exception e)System.out.println(e);JOptionPane.showMessageDialog(null, "保存失敗", "錯(cuò)誤", JOptionPane.ERROR_MESSAGE); finally DB.closeStmt();DB.closeConn();public String searchApparatusano(String ano)Database DB = new Database();this.ano =ano;String s = new String5;sq

48、l = "select distinct * from apparatus where ano = '"+ano+"'"tryDB.OpenConn();rs = DB.executeQuery(sql);if(rs.next()s0 = rs.getString(1);s1 = rs.getString(2);s2 = rs.getString(3);s3 = rs.getString(4);s4 = rs.getString(5);elses = null;catch(Exception e)finally DB.closeStmt(

49、);DB.closeConn();return s;public void editApparatus(String ano,String aname,String aprice,String amount,String explain)Database DB = new Database();this.ano=ano;this.aname = aname;this.aprice=aprice;this.amount = amount;this.explain = explain; sql = "update apparatus set aname = '"+ana

50、me+"', aprice='"+aprice+"',amount = '"+amount+"', explain = '"+explain+"'"tryDB.OpenConn();DB.executeUpdate(sql);JOptionPane.showMessageDialog(null,"成功修改一條儀器信息!"); catch(Exception e)JOptionPane.showMessageDialog(null, &quo

51、t;更新失敗", "錯(cuò)誤", JOptionPane.ERROR_MESSAGE); finally DB.closeStmt();DB.closeConn();public String searchAllApparatusor(String ano,String aname,String aprice,String amount) this.ano = ano;this.aname = aname;this.aprice = aprice;this.amount = amount;Database DB = new Database();String result=null;sql = "select * from apparatus where ano='"+ano+"' or aname='" +aname+"' or aprice='"+aprice+"' or amount='"+amount+"'"tryDB.OpenConn();rs = DB.executeQuery(

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論