Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Hospital Management System: SQL Server 2005 Application with Form5 and Form1, Thesis of Computer Science

The development of a hospital management system using sql server 2005, including hardware specifications, context diagram, data flow diagrams, and module descriptions for form5 and form1. The system aims to manage employees, doctors, nurses, patients, bills, and complaints. Form5 handles ipd patient details, while form1 is used for opd patient registration.

Typology: Thesis

2017/2018

Uploaded on 04/02/2018

josiah-emmy
josiah-emmy 🇳🇬

2 documents

1 / 29

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PROJECT PROGRESS REPORT
PROJECT 754
“HOSPITAL MANAGEMENT SYSTEM”
BY:-
SAURABH SRIVASTAVA
B.Tech final year
Computer science &
Engineering
0725710049
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d

Partial preview of the text

Download Hospital Management System: SQL Server 2005 Application with Form5 and Form1 and more Thesis Computer Science in PDF only on Docsity!

PROJECT PROGRESS REPORT

PROJECT 754

“HOSPITAL MANAGEMENT SYSTEM”

BY:-

SAURABH SRIVASTAVA

B.Tech final year

Computer science &

Engineering

PROJECT TITLE

“HOSPITAL MANAGEMENT

SYSTEM”

OBJECTIVES

The 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 USED

SOFTWARE:

♦ 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

“0” LEVEL DATA FLOW DIAGRAM

“1” LEVEL DFD

MODULE DESCRIPTION

There 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

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 section

Billing 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 patient

By entering the patient ID

By entering the date of admit etc.

SECURITY

As in today’s 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.

CODING

FORM 5

using 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();

FORM 1

using 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 == "")

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();