Hospital Management System

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

School of Computer Science and Information Technology

Department of BCA

V Semester - GENERAL

SUBJECT CODE: 20BCA5D21


SUBJECT NAME: .NET TECHNOLOGY
Activity #2
Mini Project

Specialization: BCA – GENERAL

Date of Submission: 03-Oct-2021


Submitted by:
Student Name: Sarwar Khan Safi
USN No: 19bcar1065

Name of Faculty In-Charge : Mr. Amarnath J L


EVALUATION CRITERIA

Report Viva On time Creativity & Total Converted


25 M voce Submission additional 50M 5M
10 M 5M hours spent
10 M
Introduction - /10
Applications - /5
Report- /10
Total - /25

Certificate

This is to certify that Mr/Ms. Sarwar Khan Safi has satisfactorily completed the course of
assignment prescribed by the Jain Deemed to be University for the fifth semester Bachelor of
computer application Degree Course in the year 2020-2021.

MARKS
MAX OBTAINED
5

Signature of the faculty


In-charge

2 | Page
INDEX

Sl. No. Title Page No.


1 Hospital Management System 4

2 Introduction 5-10

3 Code 11-15

4 Screenshot/Execution 16-23

Team Members:

S. No. Name USN


1 Sarwar Khan Safi 19BCAR1065
2 Mohammad Edris Noori 19BCAR1043
3 Mir Abdul Mosawer 19BCAR1042
4 Hamid Zazai 19BCAR1081
5 Sivani Raj 19BCAR1036

3 | Page
REPORT EXPLANATION
Sl. No. 1
Project Name
Project
Demonstration
Introduction 5 points – 2 marks for each
Application 3 points
(Simple
explanation)
Project
Results
Conclusion
Report
Submission

Hospital Management System (HMS)

1. Introduction Of the Project

4 | Page
Human Body is a very complex and sophisticated structure and comprises of millions of
functions. All these complicated functions have been understood by man him, part-by-part
their research and experiments. As science and technology progressed, medicine became an
integral part of the research. Gradually, medical science became an entirely new branch of
science. As of today, the Health Sector comprises of medical institutions i.e., Hospitals,
HOSPITALs etc. research and development institutions and medical colleges. Thus, the Health
sector aims at providing the best medical facilities to the common man.

Problem Statement

Since Hospital is associated with the lives of common people and their day-to-day routines
so We decided to work on this project. The manual handling of the record is time consuming
and highly prone to error. The purpose of this project is to automate or make online, the
process of day-to-day activities like Room activities, Admission of New Patient, Discharge of
Patient, assign a doctor, and finally compute the bill etc. I have tried my best to make the
complicated process Hospital Management System.

as simple as possible using Structured & Modular technique & Menu oriented interface. I
have tried to design the software in such a way that user may not have any difficulty in using
this package & further expansion is possible without much effort. Even though I cannot claim
that this work to be entirely
exhaustive, the main purpose of my exercise is performing each Hospital’s activity in
computerized way
rather than manually, which is time consuming. I am confident that this software package
can be readily used by non-programming personal avoiding human handled chance of error.

Objective

Hospital is the essential part of our lives, providing best medical facilities to people suffering

5 | Page
from various ailments, which may be due to change in climatic conditions, increased work-
load, emotional trauma stress etc. It is necessary for the hospitals to keep track of its day-to-
day activities & records of its patients, doctors, nurses, ward boys and other staff personals
that keep the hospital running smoothly & successfully.

But keeping track of all the activities and their records on paper is very cumbersome and
error prone. It also is very inefficient and a time-consuming process Observing the
continuous increase in population and number of people visiting the hospital. Recording and
maintaining all these records is highly unreliable, inefficient and error-prone. It is also not
economically & technically feasible to maintain these records on paper.

The main aim of our project is to provide a paper-less hospital up to 90%. It also aims at
providing low-cost reliable automation of the existing systems. The system also provides
excellent security of data at every level of user-system interaction and also provides robust &
reliable storage and backup facilities.

Scope

The proposed software product is the Hospital Management system (HMS). The system will
be used in any hospital, clinic, dispensary or pathology labs. Clinic, dispensary or pathology
to get the information from the patients and then storing that data for future usages. The
current system in use is a paper-based system. It is too slow and cannot provide updated
lists of patients within reasonable timeframe. The intention of the system is to reduce over-
time pay and increase the number of patients that can be treated accurately. Requirement
statements in these documents are both functional and-non-functional.

2. Project Management

Project planning and scheduling

6 | Page
Project planning is part of project management, which relates to the use of schedules such
as Gantt charts to plan and subsequently report progress within the project environment.
Initially, the project scope is defined and the appropriate methods for completing the project
are determined. Following this step, the durations for the various tasks necessary to
complete the work are listed and grouped into a work breakdown structure. The logical
dependencies between tasks are defined using an activity network diagram that enables
identification of the critical path.

Methodology

We have used Iterative and Incremental Development model (IID) for our project
development. This development approach is also referred to as Iterative Waterfall
Development approach. Iterative and Incremental Development is a software development
process developed in response to the more traditional waterfall model. This model is
designed to take care of such big project. The large and complicate project chiefly demand
better development and testing procedure. The waterfall model is well known for its
repeated testing process. Hence, I choose the waterfall model for developing my software.

Some advantages of waterfall model:


 Simple and easy to understand and use.
 Easy to manage due to the rigidity of the model.
 Phases are processed and completed one at a time
 Works well for smaller projects where requirements are very well understood.

Project Management Life Cycle

The Project Management Life Cycle has four phases. Each project life cycle phase is described

7 | Page
along with the tasks need to complete it the four phases is1.
 Initiation
 Planning
 Execution
 Closure

Tools/ Techniques used

8 | Page
Microsoft Visual Studio:

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is


used to develop computer programs, as well as websites, web apps, web services and mobile
apps. Visual Studio uses Microsoft software development platforms such as Windows API,
Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft
Silverlight. It can produce both native code and managed code.

Visual Studio includes a code editor supporting IntelliSense (the code completion
component) as well as code refactoring. The integrated debugger works both as a source-
level debugger and a machine-level debugger. Other built-in tools include a code profiler,
designer for building GUI applications, web designer, class designer, and database schema
designer. It accepts plug-ins that expand the functionality at almost every level—including
adding support for source control systems (like Subversion and Git) and adding new toolsets
like editors and visual designers for domain-specific languages or toolsets for other aspects
of the software development lifecycle (like the Azure DevOps client: Team Explorer).

Visual Studio supports 36 different programming languages and allows the code editor and
debugger to support (to varying degrees) nearly any programming language, provided a
language-specific service exists. Built-in languages include C,[7] C++, C++/CLI, Visual
Basic .NET, C#, F#,[8] JavaScript, TypeScript, XML, XSLT, HTML, and CSS. Support for other
languages such as Python,[9] Ruby, Node.js, and M among others is available via plug-ins.
Java (and J#) were supported in the past.

The most basic edition of Visual Studio, the Community edition, is available free of charge.
The slogan for Visual Studio Community edition is "Free, fully-featured IDE for students,
open-source and individual developers".

As of March 2021, the current production-ready Visual Studio version was 2019, with older
versions such as 2012 and 2013 on Extended Support, and 2015 and 2017 on Mainstream
Support.[10].

SQL Server Management Studio:

9 | Page
SQL Server Management Studio (SSMS) is a software application first launched with
Microsoft SQL Server 2005 that is used for configuring, managing, and administering all
components within Microsoft SQL Server. It is the successor to the Enterprise Manager in
SQL 2000 or before. The tool includes both script editors and graphical tools which work
with objects and features of the server.[2]

A central feature of SSMS is the Object Explorer, which allows the user to browse, select, and
act upon any of the objects within the server.[3] It also shipped a separate Express edition
that could be freely downloaded, however recent versions of SSMS are fully capable of
connecting to and manage any SQL Server Express instance. Microsoft also incorporated
backwards compatibility for older versions of SQL Server thus allowing a newer version of
SSMS to connect to older versions of SQL Server instances. It also comes with Microsoft SQL
Server Express 2012, or users can download it separately.

Starting from version 11, the application was based on the Visual Studio 2010 shell, using
WPF for the user interface. Versions 18 and after are based on the Visual Studio 2017
Isolated Shell.[4]

In June 2015, Microsoft announced their intention to release future versions of SSMS
independently of SQL Server database engine releases.[5].

Code of the entire project:

10 | Page
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace HospitalManagment
{
public partial class Dashboard1 : System.Windows.Forms.Form
{
public Dashboard1()
{
InitializeComponent();
}

private void btnExit_Click(object sender, EventArgs e)


{
this.Close();
}

private void Dashboard_Load(object sender, EventArgs e)


{
panel1.Visible = false;
panel2.Visible = false;
panel3.Visible = false;
panel4.Visible = false;
panel5.Visible = false;
panel6.Visible = false;

private void panel1_Paint(object sender, PaintEventArgs e)


{

private void btnAddPatient_Click(object sender, EventArgs e)


{
labelIndecator1.ForeColor = System.Drawing.Color.Red;
labelIndecator2.ForeColor = System.Drawing.Color.Black;
labelIndecator3.ForeColor = System.Drawing.Color.Black;
labelIndecator4.ForeColor = System.Drawing.Color.Black;

panel1.Visible = true;
panel2.Visible = false;
panel3.Visible = false;
panel4.Visible = false;
panel6.Visible = false;

private void btnAddDiagnosis_Click(object sender, EventArgs e)


{
labelIndecator2.ForeColor = System.Drawing.Color.Red;
labelIndecator1.ForeColor = System.Drawing.Color.Black;
labelIndecator3.ForeColor = System.Drawing.Color.Black;

11 | Page
labelIndecator4.ForeColor = System.Drawing.Color.Black;

panel1.Visible = true;
panel2.Visible = true;
panel3.Visible = false;
panel4.Visible = false;
panel6.Visible = false;

private void btnFullHistory_Click(object sender, EventArgs e)


{
labelIndecator3.ForeColor = System.Drawing.Color.Red;
labelIndecator2.ForeColor = System.Drawing.Color.Black;
labelIndecator1.ForeColor = System.Drawing.Color.Black;
labelIndecator4.ForeColor = System.Drawing.Color.Black;

panel1.Visible = true;
panel2.Visible = true;
panel3.Visible = true;
panel4.Visible = true;
panel5.Visible = false;
panel6.Visible = false;

SqlConnection con = new SqlConnection();


con.ConnectionString = "data source = SARWAR-SAFI\\SQLEXPRESS; database=
hospital;integrated security= True";

SqlCommand cmd = new SqlCommand();


cmd.Connection = con;
cmd.CommandText = "select * from addPatient inner join PatientMore on
addPatient.pid= PatientMore.pid";
SqlDataAdapter DA = new SqlDataAdapter(cmd);
DataSet DS = new DataSet();
DA.Fill(DS);

dataGridView2.DataSource = DS.Tables[0];

private void btnHospital_Click(object sender, EventArgs e)


{
labelIndecator4.ForeColor = System.Drawing.Color.Red;
labelIndecator2.ForeColor = System.Drawing.Color.Black;
labelIndecator3.ForeColor = System.Drawing.Color.Black;
labelIndecator1.ForeColor = System.Drawing.Color.Black;

panel5.Visible = true;
panel4.Visible = true;
panel1.Visible = true;
panel2.Visible = true;
panel3.Visible = true;
panel6.Visible = false;

private void btnSave_Click(object sender, EventArgs e)

12 | Page
{
try
{

String name = txtName.Text;


String address = txtAddress.Text;
Int64 contact = Convert.ToInt64(txtContact.Text);
int age = Convert.ToInt32(txtAge.Text);
String gender = comboGender.Text;
String blood = txtBlood.Text;
String any = txtAny.Text;
int pid = Convert.ToInt32(txtPid.Text);

SqlConnection con = new SqlConnection();


con.ConnectionString = "data source =SARWAR-
SAFI\\SQLEXPRESS;database=hospital;Integrated Security=True";
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "insert into addPatient values('" + name + "', '" +
address + "', " + contact + ", " + age + ", '" + gender + "', '" + blood + "', '" +
any + "', " + pid + ")";
SqlDataAdapter DA = new SqlDataAdapter(cmd);
DataSet DS = new DataSet();
DA.Fill(DS);
}
catch (Exception)
{
MessageBox.Show("Enter Valid Information 'OR' check the Patient ID");

MessageBox.Show("Data Saved!");
txtName.Clear();
txtAddress.Clear();
txtContact.Clear();
txtAge.Clear();
txtBlood.Clear();
txtAny.Clear();
txtPid.Clear();
comboGender.ResetText();
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
if (textBox1.Text != "")
{
int pid = Convert.ToInt32(textBox1.Text);
SqlConnection con = new SqlConnection();
con.ConnectionString = "data source = SARWAR-SAFI\\SQLEXPRESS;
database= hospital;integrated security= True";

SqlCommand cmd = new SqlCommand();


cmd.Connection = con;
cmd.CommandText = "select * from addPatient where pid = " + pid + "";
SqlDataAdapter DA = new SqlDataAdapter(cmd);
DataSet DS = new DataSet();
DA.Fill(DS);

dataGridView1.DataSource = DS.Tables[0];
}
}

13 | Page
private void button1_Click(object sender, EventArgs e)
{
try
{
int pid = Convert.ToInt32(textBox1.Text);
String sympt = txtBxSymptoms.Text;
String diag = txtBxDiagnosis.Text;
String medicine = txtBxMedicines.Text;
String ward = comboBxWard.Text;
String wardType = comboBxWardType.Text;

SqlConnection con = new SqlConnection();


con.ConnectionString = "data source = SARWAR-SAFI\\SQLEXPRESS;
database= hospital;integrated security= True";

SqlCommand cmd = new SqlCommand();


cmd.Connection = con;
cmd.CommandText = "insert into PatientMore values (" + pid + ",'" +
sympt + "', '" + diag + "', '" + medicine + "', '" + ward + "', '" + wardType + "')";

SqlDataAdapter DA = new SqlDataAdapter(cmd);


DataSet DS = new DataSet();
DA.Fill(DS);

}
catch (Exception)
{
MessageBox.Show("Any field is empty 'OR' Data is in wrong format");
}
MessageBox.Show("Data Saved!");

textBox1.Clear();
txtBxDiagnosis.Clear();
txtBxMedicines.Clear();
txtBxSymptoms.Clear();
comboBxWard.ResetText();
comboBxWardType.ResetText();

private void panel5_Paint(object sender, PaintEventArgs e)


{

private void panel6_Paint(object sender, PaintEventArgs e)


{

private void btnAboutUs_Click(object sender, EventArgs e)


{
panel5.Visible = true;
panel4.Visible = true;
panel1.Visible = true;
panel2.Visible = true;

14 | Page
panel3.Visible = true;
panel6.Visible = true;

}
}
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HospitalManagment
{
public partial class Form : System.Windows.Forms.Form
{
public Form()
{
InitializeComponent();
}

private void pictureBox1_Click(object sender, EventArgs e)


{

private void pictureBox1_Click_1(object sender, EventArgs e)


{

private void Login_Click(object sender, EventArgs e)


{
String username = textUseName.Text;
String pass = textPassword.Text;

if (username == "admin" && pass == "khan")


{

Dashboard1 ds = new Dashboard1();


ds.Show();
}
else
{
MessageBox.Show("wrong user id or password");
}
}

private void Form1_Load(object sender, EventArgs e)


{

}
}
Screenshot/Execution

15 | Page
16 | Page
17 | Page
18 | Page
19 | Page
20 | Page
21 | Page
22 | Page
23 | Page

You might also like