doctor

36
PROJECT PROGRESS REPORT PROJECT 754 “HOSPITAL MANAGEMENT SYSTEM” BY:- SAURABH SRIVASTAVA B.Tech final year Computer science & Engineering 0725710049

Upload: niro-thakur

Post on 11-Nov-2015

7 views

Category:

Documents


2 download

DESCRIPTION

The Indian healthcare industry has witnessed a massive spurt in healthcare spend and is expected to reach US$100billion1 by 2015 from the current ~US$65 billion in 2012, growing at a CAGR of 20% a year. India currently faces a chronic shortage of healthcare infrastructure, especially in rural areas and Tier II and Tier III cities, and it is expected that India will have potential requirement of 1.75 million new beds by the end of 2025.

TRANSCRIPT

PROJECT PROGRESS REPORTPROJECT 754HOSPITAL MANAGEMENT SYSTEM

BY:-SAURABH SRIVASTAVAB.Tech final yearComputer science &Engineering0725710049

PROJECT TITLE

HOSPITAL MANAGEMENT SYSTEM

INTRODUCTION

HOSPITAL MANAGEMENT SYSTEM is a computerized management system. This management system has been developed to form whole management system including Employees, Doctors, Nurses, Patients, Bills, and Complains etc. The proposed system will keep a track of Employees, Doctors, Patients, Accounts and generation of report regarding the present status. Health of citizen is the wealth of Nation. By using the cutting edge technologies, Hospital Management can be improved with efficient work flow and communication. Details of the Patients, their previous visits etc. are totally not perceptible without a computer. Relevant Informations are always stored in the computer and are available instantly in front of the user.

OBJECTIVESThe project Hospital Management System is aimed to develop to maintain the day-to-day state of admission/discharge of Patients, List of Doctors, List of medicines, Bills etc.

There are following main objectives of the Hospital: Keeping records of admission of patient. Keeping patient-care as utmost priority. Scheduling the appointment of Patient with Doctor to make it convenient for both.

Keeping the records of prescriptions provided by the doctor to the patients. Keeping records of Medicine department in an arranged order so that the treatment of Patient becomes quick and satisfactory.

Keeping details about the consultants, their Prescriptions and treatments, surgery reports etc.

TOOLS USEDSOFTWARE: FRONT END TOOL : C# & .NET REPORTING TOOL : MS-OFFICE DESIGNING TOOL : VISUAL STUDIO 2008 PLATFORM : WINDOWS XP, VISTA, 7 etc. BACKEND TOOL : SQL SERVER 2005

HARDWARE:

PROCESSOR : Core 2 Duo RAM : 3 GB HDD : 250 GB

ANALYSISHMS : context diagram

REGISTRATIONREGISTER

0 LEVEL DATA FLOW DIAGRAM

1 LEVEL DFD

MODULE DESCRIPTIONThere are five major modules which are being focused in the project.First module is IPD (enrolment patient detail)IPD: IN PATIENT DETAIL or IPD is section or department of a hospital in which a patient is admitted to the hospital and occupies a bed. IPD comprises of patients who are admitted to the hospital minimum for one day and patients admitted in emergency ward, ICU etc.

Second major module discussed is OPD (OUT PATIENT DETAIL) or OPD is the section in which general cases are handled in which a patient generally visits a doctor and leave the hospital after consulting. The patients of OPD are not admitted.These are some cases like routine checkup, feverSome cases like body pain, muscular pain etc.

Third module is BILLING:

BILLING WIZARD involves the feature of keeping the details of installment given by the patient. It keeps the whole record of installment at the time of admission, various installments while the patient is admitted and at the time of discharge.It involves both OPD and IPD sectionBilling is done by making the complete chart of diagnosis done (of patient)

Fourth module is VIEW: IPD & OPD view keeps the details of each patient admitted to the hospital. We can access details of each patient just by knowing the name or any single detail of the patient entered by him at the time of admission.Like we can access the record of any patient by just entering the name of patientBy entering the patient IDBy entering the date of admit etc.

Fifth module on which emphasis is done is EMPLOYEES

It involves the daily routine of staff working in the hospital, which includes DOCTORNURSESWARD BOYSRECEPTIONISTPEONCLEANING STAFF etc.

SECURITY

As in todays world we need security as a main purpose for implementing any logic so as to keep it safe.Thus we need to authenticate the user for using or accessing the data of the hospital management system and for that we provide a USERNAME & PASSWORD to the admin so to keep the data safe.

CODINGFORM 5using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace hospital_management{ public partial class Form5 : Form { SqlDataAdapter ad = new SqlDataAdapter(); SqlConnection con = new SqlConnection();

public Form5() { InitializeComponent(); }

private void Form5_Paint(object sender, PaintEventArgs e) {

SolidBrush sb = new SolidBrush(Color.Black); SolidBrush s = new SolidBrush(Color.White); Pen p = new Pen(sb, 1); Graphics g = this.CreateGraphics(); Rectangle r = new Rectangle(1, 1, 461, 50); Rectangle rr = new Rectangle(2, 2, 460, 49); g.DrawRectangle(p, r); g.FillRectangle(s, rr);

SolidBrush sb2 = new SolidBrush(Color.Purple); SolidBrush s2 = new SolidBrush(Color.Magenta); SolidBrush s3 = new SolidBrush(Color.GreenYellow);

String str = " HOSPITAL MANAGEMENT SYSTEM";

Font f = new Font("Times New Roman", 19, FontStyle.Regular); g.DrawString(str, f, sb2, 5, 7); g.DrawString(str, f, s2, 6, 8); g.DrawString(str, f, s3, 4, 6);

g.Dispose(); }

private void button1_Click(object sender, EventArgs e) {

DataSet ds = new DataSet(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from logins where username='"+textBox1.Text+"' and password='"+textBox2.Text+"'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t"); if (ds.Tables["t"].Rows.Count > 0) { MessageBox.Show("User Authenticated"); Form9 f = new Form9(); f.ShowDialog(); f.Close(); Form.ActiveForm.Close(); }

else {

MessageBox.Show("Invalid User Name Or Password"); textBox1.Text = ""; textBox2.Text = ""; } }

private void Form5_Load(object sender, EventArgs e) { con.ConnectionString = "data source=saurabh\\sqlexpress; initial catalog=hospital; integrated security=true";

}

private void button2_Click(object sender, EventArgs e) { Form.ActiveForm.Close(); }

}}

FORM 1using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace hospital_management{ public partial class Form1 : Form {

SqlConnection con = new SqlConnection(); SqlDataAdapter ad = new SqlDataAdapter(); DataSet ds = new DataSet();

public static string s; public static string d; public static string n; public void clear() { textBox1.Text = null; textBox2.Text = null; textBox3.Text = null; textBox4.Text = null; textBox5.Text = null; textBox6.Text = null; textBox7.Text = null; textBox8.Text = null; textBox9.Text = null; textBox18.Text = null; textBox19.Text = null; textBox20.Text = null; textBox21.Text = null; textBox22.Text = null; textBox23.Text = null; textBox24.Text = null; textBox25.Text = null; comboBox1.SelectedItem = null; comboBox2.SelectedItem = null; comboBox3.SelectedItem = null; }

public Form1() { InitializeComponent(); }

private void Form1_Load(object sender, EventArgs e) { con.ConnectionString = "data source = saurabh\\sqlexpress; initial catalog = hospital; integrated security = true"; }

private void button2_Click(object sender, EventArgs e) { try { s = textBox1.Text.ToString(); d = dateTimePicker1.Value.ToShortDateString(); n = textBox2.Text;

SqlCommand cmd = new SqlCommand(); con.Open();

cmd.CommandText = "insert patient values('" + int.Parse(textBox1.Text) + "','" + textBox2.Text + "','" +

textBox3.Text + "','" + int.Parse(textBox4.Text) + "','" + comboBox1.SelectedItem.ToString() + "','" + dateTimePicker1.Value.ToShortDateString() + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','IPD','FALSE')";

cmd.Connection = con;

cmd.ExecuteNonQuery(); button1.Enabled = true; MessageBox.Show("inserted"); clear(); Form3 f = new Form3(); f.ShowDialog(); f.Close(); } catch { // MessageBox.Show("Error Occured"); if (textBox1.Text == "") errorProvider1.SetError(textBox1, "insert patient ID"); if (textBox2.Text == "") errorProvider1.SetError(textBox2, "insert patient's name");

if (textBox3.Text == "") errorProvider1.SetError(textBox3, "insert patient father's name"); if (textBox4.Text == "") errorProvider1.SetError(textBox4, "insert patient's age"); if (textBox5.Text == "") errorProvider1.SetError(textBox5, "insert patient address"); if (textBox6.Text == "") errorProvider1.SetError(textBox6, "insert patient's contact no.");

if (textBox7.Text == "") errorProvider1.SetError(textBox7, "insert reference"); if (textBox8.Text == "") errorProvider1.SetError(textBox8, "insert patient's room_no."); if (textBox9.Text == "") errorProvider1.SetError(textBox9, "insert custody");

if (comboBox1.SelectedItem == null) errorProvider1.SetError(comboBox1, "select sex of the patient"); else { MessageBox.Show("unexpected error occured"); } } finally { con.Close(); } }

private void button1_Click(object sender, EventArgs e) { try { SqlCommand cmd = new SqlCommand();

int i = 0;

cmd.CommandText = "select max(p_id) from patient";

cmd.Connection = con;

con.Open();

i = (int)cmd.ExecuteScalar();

textBox1.Text = (i + 1).ToString();

button1.Enabled = false; } catch { MessageBox.Show("Error occured"); }

finally { con.Close(); }

}

private void button8_Click(object sender, EventArgs e) { try { s = textBox24.Text.ToString(); d = dateTimePicker3.Value.ToShortDateString(); n = textBox23.Text;

SqlCommand cmd = new SqlCommand();

con.Open();

cmd.CommandText = "insert patient values('" + int.Parse(textBox24.Text) + "','" + textBox23.Text + "','" +

textBox22.Text + "','" + int.Parse(textBox21.Text) + "','" + comboBox3.SelectedItem.ToString() + "','" + dateTimePicker3.Value.ToShortDateString() + "','" + textBox25.Text + "','" + textBox20.Text + "','" + textBox19.Text + "','OPD PATIENT','" + textBox18.Text + "','OPD','OPD PATIENT')";

cmd.Connection = con;

cmd.ExecuteNonQuery();

MessageBox.Show("inserted");

clear(); button9.Enabled = true; con.Close(); Form3 f = new Form3(); f.ShowDialog(); f.Close(); } catch { // MessageBox.Show("Error Occured"); if (textBox24.Text == "") errorProvider2.SetError(textBox24, "insert patient ID"); if (textBox23.Text == "") errorProvider2.SetError(textBox23, "insert patient's name"); if (textBox22.Text == "") errorProvider2.SetError(textBox22, "insert patient father's name"); if (textBox21.Text == "") errorProvider2.SetError(textBox21, "insert patient's age"); if (textBox25.Text == "") errorProvider2.SetError(textBox25, "insert patient address"); if (textBox20.Text == "") errorProvider2.SetError(textBox20, "insert patient's contact no."); if (textBox19.Text == "") errorProvider2.SetError(textBox19, "insert reference"); if (textBox18.Text == "") errorProvider2.SetError(textBox18, "insert custody"); if (comboBox3.SelectedItem == null) errorProvider2.SetError(comboBox3, "select sex of the patient"); else { MessageBox.Show("CHECK PATIENTS AGE"); } } finally { con.Close(); }

}

private void button9_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand();

int i = 0;

cmd.CommandText = "select max(p_id) from patient";

cmd.Connection = con;

con.Open();

i = (int)cmd.ExecuteScalar();

con.Close();

textBox24.Text = (i + 1).ToString();

button9.Enabled = false;

s = textBox24.Text.ToString(); d = dateTimePicker3.Value.ToShortDateString();

}

private void tabPage1_Paint(object sender, PaintEventArgs e) { SolidBrush sb = new SolidBrush(Color.Black); SolidBrush s = new SolidBrush(Color.White); Pen p = new Pen(sb, 10); Graphics g = this.CreateGraphics(); g.DrawLine(p, 1, 400, 500, 400); g.Dispose(); }

private void button3_Click(object sender, EventArgs e) { clear(); button1.Enabled = true; }

private void button7_Click(object sender, EventArgs e) { clear(); button9.Enabled = true; }

private void textBox2_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox9_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox7_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else // allow alphabets. e.Handled = false; }

private void textBox4_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsSymbol(pressedKey) || char.IsSeparator(pressedKey) || char.IsPunctuation(pressedKey) || char.IsLetter(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox6_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsSymbol(pressedKey) || char.IsSeparator(pressedKey) || char.IsPunctuation(pressedKey) || char.IsLetter(pressedKey)) { e.Handled = true; } else

e.Handled = false; }

private void textBox3_KeyPress(object sender, KeyPressEventArgs e) {

Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox23_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox22_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox19_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsPunctuation(pressedKey) || Char.IsNumber(pressedKey) || Char.IsSymbol(pressedKey)) { e.Handled = true; } else e.Handled = false; }

private void textBox21_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsSymbol(pressedKey) || char.IsSeparator(pressedKey) || char.IsPunctuation(pressedKey) || char.IsLetter(pressedKey)) { e.Handled = true; } else

e.Handled = false; }

private void textBox20_KeyPress(object sender, KeyPressEventArgs e) { Char pressedKey = e.KeyChar; if (Char.IsSymbol(pressedKey) || char.IsSeparator(pressedKey) || char.IsPunctuation(pressedKey) || char.IsLetter(pressedKey)) { e.Handled = true; } else

e.Handled = false; }

private void textBox4_TextChanged(object sender, EventArgs e) { try { if (int.Parse(textBox4.Text) > 123) { MessageBox.Show("age limit exceeded"); } } catch { } }

private void textBox21_TextChanged(object sender, EventArgs e) { try { if (int.Parse(textBox21.Text) > 123) { MessageBox.Show("age limit exceeded"); } } catch { } }

}}

FORM 2using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace hospital_management{ public partial class Form2 : Form { DataSet ds = new DataSet(); SqlDataAdapter ad = new SqlDataAdapter(); SqlConnection con = new SqlConnection();

public Form2() { InitializeComponent(); }

private void textBox1_KeyUp(object sender, KeyEventArgs e) { ds.Clear(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from patient where p_name like '" + textBox1.Text + "%'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t1"); dataGridView1.DataSource = ds.Tables["t1"];

}

private void Form2_Load(object sender, EventArgs e) { con.ConnectionString = "data source=saurabh\\sqlexpress; initial catalog=hospital; integrated security=true"; }

private void textBox3_KeyUp(object sender, KeyEventArgs e) { if (textBox3.Text==null) MessageBox.Show("enter ID"); else { try {

ds.Clear(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from patient where p_id='" + int.Parse(textBox3.Text) + "'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t1"); dataGridView1.DataSource = ds.Tables["t1"]; } catch { }//MessageBox.Show("error"); } } }

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { ds.Clear(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from patient where p_status='" + comboBox1.SelectedItem.ToString()+ "'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t1"); dataGridView1.DataSource = ds.Tables["t1"];

}

private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { ds.Clear(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from patient where doa='" +dateTimePicker1.Value.ToShortDateString() + "'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t1"); dataGridView1.DataSource = ds.Tables["t1"];

}

private void textBox2_KeyUp(object sender, KeyEventArgs e) { try { ds.Clear(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from patient where p_father like '" + textBox2.Text + "%'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t1"); dataGridView1.DataSource = ds.Tables["t1"]; } catch { }

}

private void textBox4_KeyUp(object sender, KeyEventArgs e) { try { ds.Clear(); ad.SelectCommand = new SqlCommand(); ad.SelectCommand.CommandText = "select * from patient where room_no = '" + textBox4.Text + "'"; ad.SelectCommand.Connection = con; con.Open(); ad.SelectCommand.ExecuteNonQuery(); con.Close();

ad.Fill(ds, "t1"); dataGridView1.DataSource = ds.Tables["t1"]; } catch { }

}

private void textBox1_TextChanged(object sender, EventArgs e) {

} }}

FUTURE SCOPEThere is always a scope of betterment and the candidate system is not against this perception. At present the system satisfy most of the functions of hospital management system. This project is especially designed for HOSPITAL to take appropriate step to improve the working standard and documentation through computerization. Since our system is going to be implemented as the application of Hospital management system on visual studio as Front end and SQL as Back end tool, so it will help better for both user as well as developer.The main scope of futures may be: Generates the important report on day wise or month wise. Storing large amount of data for future point of view. Reducing manual efforts for maintaining the system. Reducing process time. Emphasis on accuracy data. Assures security and validity. Provision for enhancement without disturbing the developed modules. Object oriented design. Fully automated, need for human intervention. The project being developed with friendly user interface can be used by any user.