You are on page 1of 33

SIX WEEKS SUMMER TRAINING (CSE443)

REPORT
On

Hospital Management System

Submitted by

Abhisekh Kumar Singh


Registration No: 11210646
Programme & Section: 1202-B.Tech-CSE

Under the Guidance of

Mr. Ashok
Verma

School of Computer Science & Engineering


Lovely Professional University, Phagwara
(June-July, 2015)

DECLARATION

I hereby declare that I have completed my six weeks summer training at


Sreyanshi Consultancy (Microsoft Certification), LPU from 12/06/2015
to 12/07/2015 under the guidance of Mr. Ashok Verma I have declare that
I have worked with full dedication during these six weeks of training and
my learning outcomes fulfil the requirements of training for the award of
degree of B.Tech-CSE Lovely Professional University, Phagwara.

Abhisekh Kumar Singh


Reg No.: 11210646

Date: 03/08/2015

ACKNOWLEDGEMENT

First of all I would like to express our heartful thanks to The Almighty
God for this opportunity, which he rendered to us and gives the
Physical strength and pleasant mind to complete this project work.
I thank our Institute Training Co-ordinator Mr. Peeyush, for his inspiration.
And I thank our Teacher Mr.Ashok Verma, Industrial Training Coordinator
and also my project guide for the correct guidance and advice.

We extent our thanks and gratitude to our parents, Friends and those who
Helped us directly and indirectly for the successful completion of this
Project work.

INDEX

1. Organization Overview
2. Profile of the Problem
3. Existing System
4. Problem Analysis
o Product definition
o Feasibility Analysis
5. Software Requirement Analysis
6. Design
o Tables and their relationships
o Flowcharts/Pseudo code
7. Source Code
8. Screen Shots
9. Gantt chart (Describing a timeline of how did you act in six weeks of training?)
10. Project Legacy
o Technical and Managerial lessons learnt.
12. Bibliography

ORGANIZATION OVERVIEW
Shreyanshi Consultancy is a Leading Education Consultancy in India,
established 2009 by veteran Corporate Leaders, Shreyanshi
Consultancy is now converted into company incorporation which
is Shreyanshi Consultancy Pvt. Ltd. company associate with Brand
Companies and provide Professional Training Services including Guidance to
Engineering Colleges Students. It was set up in response to the emerging
need of education services in India where a number of engineering colleges
is being set up by the private body year by year. Scenario is like a total
confusion among the students community at the time of choosing the right
one among thousands. Understanding this problem we started offering
Vocational Training & Industrial Training Projects assistance and guidance to
prospective students to get update in a environment that can make their
dream of being a Engineering / Manager / Entrepreneur true. The Trainings
act as guides who channelize your talents and interest to help you choose
the right path and help you build a bright future. We are associated with
Certiport. We provide multiple Brand Companys Certifications.

Mission
Our mission is to provide our clients the best possible service and support to ensure that
their study environment is safe and conducive to achieve their career goals. We strive to
provide a One Stop Service to our students so that everything, which is relevant to
studying.

Experience
Shreyanshi Consultancy are leading education consultancy last 3 year, we have good
experience trainer team, we have associated some high brand companys. Our Tie-up
with Quint Wellington Redwood for College Initiative in All North India. Quint is

redounded brand in Global Corporate Training. Quint deals with 1000 Client in all over
world.

PROFILE OF PROBLEM

To computerize all details regarding patient details & hospital details.


To automate the process of ward entries.
To maintain records effectively.
To manage current status of staff and doctor availability.
The project has information regarding the inpatient details, outpatient

Details, Billing details and Ambulance details.


This project includes modules such as
1) Admission

Inpatient
Outpatient

2) Staff Details

Payroll
Personnel Details
Attendance

3) Billing

Inpatient
Outpatient

4) Consultation
5) Doctor page

Appointments check
My Message Tab

EXISTING SYSTEM
The existing system uses manual transaction processing.
Drawbacks
1. Large amount of clerical time is required.
2. The record maintainability is difficult.
3. Accessibility of accurate information from the past record is difficult.
4. There is always delay in information search and retrieval. It requires
many people to carry out a single problem.
5. Lot of human resources is required.
6. Data reliability and maintainability is difficult.
7. Lot amount of records need much place to save.
8. The paper works have to be taken care.
9. The patient entry form may miss.
10.

The doctor appointment cannot be maintained in properly.

PROBLEM ANALYSIS
This project will automate the daily operations of LIFE LINE hospital.
The project keeps track of the staff and patient (in-patient, out-patient)
details. It also takes care of the ward, medical, invoice and the doctors
appointment details. The system generates the daily ward availability,
the status of the operation theatres and ICU.
HOSPITAL MANAGEMENT is an integrated Hospital Information
System, which addresses all the major functional areas of multispecialty hospitals. The HOSPITAL MANAGEMENT enables better patient
care, patient safety, patient confidentiality, efficiency, reduced costs
and better management information system. It provides easy access to
critical information thus enabling the management to take better
decisions on time.
This project deals with processing of each and every department in the
Hospital. This project sincerely aims to reduce the manual processing
of each department. The Scope of the project takes care of the details
of each and every Department. These details gives the doctor, staffs,
specialists and patient details including their salary, attendance ,
doctors appointments and the billing system. The details of Doctor
and staff help the hospital to maintain the record of every person.
Their attendance details help them to know about their attentive
presence while salary is calculated. The billing system provides an
efficient way for calculating bill details of the patients.

Software Requirement Analysis


Visual Studio 2013 is a complete set of development tools for building

ASP Web applications


XML Web services
Desktop applications
mobile applications

Visual Basic .NET, Visual C++ .NET, and Visual C# .NET all use the same integrated
development environment (IDE), which allows them to share tools and facilitates in the
creation of mixed-language solutions.
Visual C#, pronounced C sharp, is a new object-oriented programming language that is an
evolution of C and C++, providing a simple and type-safe language for developing
applications.
The .NET Framework
Overview
The .NET Framework is a new computing platform that simplifies application development
in the highly distributed environment of the Internet. The .NET Framework is designed to
fulfil the following objectives:

To provide a consistent object-oriented programming environment whether object


code is stored and executed locally, executed locally but Internet-distributed, or

executed remotely.
To provide a code-execution environment that minimizes software deployment and

versioning conflicts.
To provide a code-execution environment that guarantees safe execution of code,

including code created by an unknown or semi-trusted third party.


To provide a code-execution environment that eliminates the performance problems
of scripted or interpreted environments.

To make the developer experience consistent across widely varying types of


applications, such as Windows-based applications and Web-based applications.

The .NET Framework is a multi-language environment for building, deploying, and running
XML Web services and applications.

Common Language Runtime Despite its name, the runtime actually has a role in
both a component's runtime and development time experiences. While the component
is running, the runtime is responsible for managing memory allocation, starting up
and stopping threads and processes, and enforcing security policy, as well as
satisfying any dependencies that the component might have on other components. At
development time, the runtime's role changes slightly; because it automates so much
(for example, memory management), the runtime makes the developer's experience
very simple, especially when compared to COM as it is today. In particular, features
such as reflection dramatically reduce the amount of code a developer must write in

order to turn business logic into a reusable component.


ASP.NET ASP.NET builds on the programming classes of the .NET Framework,
providing a Web application model with a set of controls and infrastructure that make
it simple to build ASP Web applications. ASP.NET includes a set of controls that
encapsulate common HTML user interface elements, such as text boxes and dropdown menus. These controls run on the Web server, however, and push their user
interface as HTML to the browser. On the server, the controls expose an objectoriented programming model that brings the richness of object-oriented programming
to the Web developer. ASP.NET also provides infrastructure services, such as session
state management and process recycling that further reduce the amount of code a
developer must write and increase application reliability.
ADO (ActiveX Data Objects).Net
Most Visual Basic and Visual C# applications revolve around reading and updating
information in databases. To allow data integration in distributed, scalable
applications, Visual Studio .NET provides support for a new generation of data access
technology: ADO.NET.
Data Access with ADO.NET
As you develop applications using ADO.NET, you will have different requirements
for working with data. In some cases, you might simply want to display data on a
form. In other cases, you might need to devise a way to share information with

another company. No matter what you do with data, there are certain fundamental
concepts that you should understand about the data approach in ADO.NET. You might
never need to know some of the details of data handling for example, you might
never need to directly edit an XML file containing data.
New in ADO.Net
ADO.NET Does Not Depend On Continuously Live Connections
In traditional client/server applications, components establish a connection to a
database and keep it open while the application is running. For a variety of reasons,

this approach is impractical in many applications:


Open database connections take up valuable system resources. In most cases,
databases can maintain only a small number of concurrent connections. The overhead

of maintaining these connections detracts from overall application performance.


Similarly, applications that require an open database connection are extremely
difficult to scale up. An application that does not scale up well might perform
acceptably with four users but will likely not do so with hundreds. ASP.NET Web
applications in particular need to be easily scalable, because traffic to a Web site can

go up by orders of magnitude in a very short period.


In ASP.NET Web applications, the components are inherently disconnected from each
other. The browser requests a page from the server; when the server has finished
processing and sending the page, it has no further connection with the browser until
the next request.

SQL SERVER
SQL server is a client/server relational database management system (RDBMS) that uses
transact-SQL to send request between a client and SQL server.
Client/server Architecture
SQL server is designed to be a client/server system. Client/server systems are constructed so
that the database can reside on a central computer, known as a server, and be shared among
several users. When users want to access the date in SQL server, they run an application on
their local computer, known as a client that connects over a network to the server running
SQL server. SQL server can work with thousands of client applications simultaneously. The

server has features to prevent the logical problems that occur if a user tries to read or modify
data currently being used by others.

DESIGN
TABLES
1:-Appointments

2:-INPatientsDetails

3:-INPatienBill

4:-Outpatient Bill

5:-OutPatient_Info

6:-Staff Info

7:-Doctor Info

Flowcharts/Pseudo code

Login User
HOME

Login Failed

A/staffpage
B/adminpage
C/doctor

A/staffpage
INpatient

INpatie
nt

OUTpatient

OUTpatie
nt

REGISTRATIO
N

BILLING

Inpatient Bill

IN Bill

INpatient

B/adminpage
Staff

Staff
data

Registration

Doctor

Doctor
data

Staff
Staff data
View/Modify
Staff data
Doctor

Doctor
data
Doctor
data

Doctorpage

Appointments

OUTpatient
Appoinmen
tsdata

My patient

Appoinmen
tsd
Inpatient

Inpatient

Inpatient

SOURCE CODE
A:-login page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public int validate_login(string userid,string password,string login)
{
string cs = "server=.\\LPUDB;database=Project;user id=sa;pwd=11210646";
SqlConnection conn = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand();
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.CommandText = login;
cmd.Parameters.AddWithValue("@userid", userid);
cmd.Parameters.AddWithValue("@password", password);
cmd.Parameters.Add("@result",System.Data.SqlDbType.Int,4);
cmd.Parameters["@result"].Direction = System.Data.ParameterDirection.Output;
cmd.Connection = conn;
int result = 0;
try
{
conn.Open();
cmd.ExecuteNonQuery();
result = (int)cmd.Parameters["@result"].Value;
}
catch (SqlException ex) { lblmessage.Text = ex.Message; }
finally
{

}
}

if (conn != null)
{
conn.Close();
}

return result;

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)


{
int results=0 ;
if (TextBox1.Text.Trim().Length==3 || TextBox1.Text.Trim().Length==7)
{
string login = "doctorlogin";
results = validate_login(TextBox1.Text.Trim(), TextBox2.Text.Trim(),login);
if (results == 1)
{
Session["doctorid"] = TextBox1.Text.Trim();
Response.Redirect("dAppoinments.aspx");
Session.RemoveAll();
}
else
{
lblmessage.Text = "Invalid Login";

}
}
else
{
if (TextBox1.Text.Trim().Length == 2 || TextBox1.Text.Trim().Length == 9)
{
string login="stafflogin";
results = validate_login(TextBox1.Text.Trim(), TextBox2.Text.Trim(),login);
if (results == 1)
{
Session["staffid"] = TextBox1.Text.Trim();
Response.Redirect("staffProfile.aspx");
}
else
{
lblmessage.Text = "Invalid Login";

}
}

B:- Inpatient form


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class inpatientregistration : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Random _random = new Random();
TextBox13.Text = "INPAT_"+_random.Next(100,999).ToString();
TextBox13.Enabled = false;

}
protected void Button1_Click(object sender, EventArgs e)
{
string gender = DropDownList1.SelectedValue;
string bg = DropDownList2.SelectedValue;
string dept = DropDownList4.SelectedValue;
string roomno = DropDownList5.SelectedValue;
string rt = DropDownList6.SelectedValue;
string ms = DropDownList3.SelectedValue;
String cs = "server=.\\LPUDB;database=Project;user id=sa;password=11210646";
SqlConnection conn = new SqlConnection(cs);
SqlCommand
cmd
=
new
SqlCommand("insert
into
tblinpatient(patient_id,First_name,Last_name,gender,occupation,Date_of_Birth,age,Blood_Group,marital_status,ad
dress,city,mobile,emailid,date_of_admit,department,room_no,room_type,bed_no) values('" + TextBox13.Text + "','"
+ TextBox1.Text + "','" + TextBox2.Text + "','" + gender + "','" + TextBox3.Text + "','" +
Convert.ToDateTime(TextBox4.Text).ToString("MM-dd-yyyy") + "','" + TextBox5.Text.ToString() + "','" + bg + "','"
+ ms + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" +
Convert.ToDateTime(TextBox10.Text).ToString("MM-dd-yyyy") + "','" + dept + "','" + roomno + "','" + rt + "','" +
TextBox12.Text + "')", conn);
try
{
conn.Open();
cmd.ExecuteNonQuery();
Response.Write("<script language=javascript>alert('Recored Submitted Successfully.');</script>");
// Response.Redirect("inpatientregistration.aspx");
}
catch (SqlException ex)
{
Label2.Text = ex.Message;
}
finally
{
if (conn != null)
{
conn.Close();
}
}

C:-OUTpatient Detail
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Data.SqlClient;

public partial class outPatientRegistration : System.Web.UI.Page


{

protected void Page_Load(object sender, EventArgs e)


{
Random _random = new Random();
TextBox13.Text = "OUTPAT_" + _random.Next(100, 999).ToString();
Session["apid"]=TextBox13.Text.ToString();
TextBox13.Enabled = false;
}

protected void Button1_Click(object sender, EventArgs e)


{
string gender = DropDownList1.SelectedValue;
string bg = DropDownList2.SelectedValue;
string dept = DropDownList4.SelectedValue;
String
cs
=
"server=.\\LPUDB;database=Project;user
id=sa;password=11210646";
SqlConnection conn = new SqlConnection(cs);
SqlCommand
cmd
=
new
SqlCommand("insert
into
tbloutpatient(Appoinment_id,First_name,Last_name,gender,occupation,age,Blood_G
roup,address,city,mobile,emailid,date_of_visit,department,consultant_doctor)
values('" + TextBox13.Text + "','" + TextBox1.Text + "','" + TextBox2.Text +
"','" + gender + "','" + TextBox3.Text + "','" + TextBox5.Text.ToString() +
"','" + bg + "','"
+ TextBox6.Text + "','" + TextBox7.Text + "','" +
TextBox8.Text
+
"','"
+
TextBox9.Text
+
"','"
+
Convert.ToDateTime(TextBox10.Text).ToString("MM-dd-yyyy") + "','" + dept +
"','"+ TextBox14.Text + "')", conn);
try
{
conn.Open();
cmd.ExecuteNonQuery();
Session["name"] = TextBox1.Text.ToString() +" "+
TextBox2.Text.ToString();
Session["dname"] = TextBox14.Text.ToString();
Response.Write("<script language=javascript>alert('Recored
Submitted Successfully.');</script>");
Response.Redirect("billing.aspx");

}
catch (SqlException ex)
{
Label2.Text = ex.Message;
}
finally
{
if (conn != null)
{
conn.Close();
}

D:-Inpatient Billing
using System;

using
using
using
using
using
using

System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Data.SqlClient;

public partial class billing : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
Random _random = new Random();
TextBox1.Text = "Bill_" + _random.Next(100, 999).ToString();
TextBox1.Enabled = false;
TextBox2.Text = Session["apid"].ToString();
TextBox2.Enabled = false;
TextBox9.Text = Session["name"].ToString();
TextBox9.Enabled = false;
TextBox11.Text = Session["dname"].ToString();
TextBox11.Enabled = false;
}

protected void Button1_Click(object sender, EventArgs e)


{
int x = Convert.ToInt32(TextBox12.Text.Trim());
int y = Convert.ToInt32(TextBox13.Text.Trim());
int z = x + y;
TextBox14.Text = (z).ToString();
TextBox14.Enabled = false;
String
cs
=
"server=.\\LPUDB;database=Project;user
id=sa;password=11210646";
SqlConnection conn = new SqlConnection(cs);
SqlCommand
cmd
=
new
SqlCommand("insert
into
outpatientbill(Bill_no,Appoinment_id,Patient_name,Date,Consultant_doctor,Docto
r_Fees,Misc,Total)
values(@Bill_no,@Appoinment_id,@Patient_name,@Date,@Consultant_doctor,@Doctor_
Fees,@Misc,@Total)", conn);
cmd.Parameters.AddWithValue("@Bill_no",TextBox1.Text);
cmd.Parameters.AddWithValue("@Appoinment_id", TextBox2.Text);
cmd.Parameters.AddWithValue("@Patient_name", TextBox9.Text);
cmd.Parameters.AddWithValue("@Date", TextBox10.Text);
cmd.Parameters.AddWithValue("@Consultant_doctor", TextBox11.Text);
cmd.Parameters.AddWithValue("@Doctor_Fees", TextBox12.Text);
cmd.Parameters.AddWithValue("@Misc", TextBox13.Text);
cmd.Parameters.AddWithValue("@Total", TextBox14.Text);
try
{

conn.Open();
cmd.ExecuteNonQuery();
Response.Write("<script language=javascript>alert('Recored
Submitted
Successfully.And
Total
Amount
is
:"+
TextBox14.Text
+"');</script>");
}

catch (SqlException ex)


{
Label2.Text = ex.Message;
}
finally
{
if (conn != null)
{
conn.Close();
}}

E:-staff registration
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Data.SqlClient;

public partial class astaffregistration : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
Random _random = new Random();
TextBox13.Text = "staff_" + _random.Next(100, 999).ToString();
TextBox13.Enabled = false;
}

protected void Button1_Click(object sender, EventArgs e)


{
string gender = DropDownList1.SelectedValue;
string bg = DropDownList2.SelectedValue;
String
cs
=
"server=.\\LPUDB;database=Project;user
id=sa;password=11210646";
SqlConnection conn = new SqlConnection(cs);
SqlCommand
cmd
=
new
SqlCommand("insert
into
staffinfo(Staff_id,First_name,Last_name,gender,Date_of_Birth,Salary,Age,Blood_
Group,Address,city,Mobile_No,Email_id,Date_of_joining,qualification,Password)
values('" + TextBox13.Text + "','" + TextBox1.Text + "','" + TextBox2.Text +
"','" + gender + "','" + TextBox4.Text.ToString() + "','" + TextBox3.Text +
"','" + TextBox5.Text.ToString() + "','" + bg + "','" + TextBox6.Text + "','"
+ TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" +
TextBox10.Text.ToString()
+
"','"
+
TextBox14.Text
+
"','"+TextBox13.Text+"')", conn);
try
{
conn.Open();
cmd.ExecuteNonQuery();
TextBox1.Text = "";
TextBox2.Text = "";
DropDownList1.SelectedValue = "";
TextBox4.Text = "";
TextBox3.Text = "";
TextBox5.Text = "";

DropDownList2.SelectedValue = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox10.Text = "";
TextBox14.Text = "";
Response.Write("<script language=javascript>alert('Recored
Submitted Successfully.');</script>");
}
catch (SqlException ex)
{
Label2.Text = ex.Message;
}
finally
{
if (conn != null)
{
conn.Close();
}
}
}
}
F:-Doctor Appoinments
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Data.SqlClient;

public partial class doctorsHomepage : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if(Session["doctorid"]==null)
{
Response.Redirect("login.aspx");
}
else
{
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
//SqlDataSource sqld = new SqlDataSource();
//sqld.SelectCommand = "SELECT [Patient_id], [Patient_Name], [Date],
[Time], [Status], [Remark], [admited] FROM [Appoinments] WHERE [Doctor_id] ='"
+ Session["id"] + "' AND patient_id='"+TextBox1.Text+"'AND status='pending'";
//GridView1.DataSource = sqld;

//GridView1.DataBind();
}

SCREEN SHOTS
A:-Login Page

B:-Inpatient Registration(staff page)

C:-Inpatient Billing(staff page)

D:-view/modify inpatient/outpatien info(staff page)

E:-Appoinments List(doctor page)

F:-ADD DOCTOR (ADMIN PAGE)

Gantt chart

Project Legacy

I learnt about .NET framework Platform, asp.net and C# programming.

And learn how to deal with real life situation problems. Using These Technology:.NET framework Platform:
The .NET Framework is a new computing platform that simplifies application development in
the highly distributed environment of the Internet.
ASP.NET:
Asp.net is a web application development platform to create websites, desktop application etc.
ADO (ActiveX Data Objects).Net:
As you develop applications using ADO.NET, you will have different requirements for working
with data. In some cases, you might simply want to display data on a form. In other cases, you
might need to devise a way to share information with another company. No matter what you do
with data, there are certain fundamental concepts that you should understand about the data
approach in ADO.NET. You might never need to know some of the details of data handling
for example, you might never need to directly edit an XML file containing data.

Bibliography

Microsoft ADO.NET Step by Step Microsoft Press.


Software Engineering Concepts, By Richard E.Fairley Tata McGraw Hill Publishing

Company Limited.
Professional ASP.NET in C# and VB.
Beginning ASP.NET in C#.
Microsoft C# Programming.

Learn C# Programming.

www.asp.net
www.tutorialspoint.com/asp.net/

You might also like