Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
HOSPITAL
MANAGEMENT
SYSTEM
[ HOSPITAL
MANAGEMENT
SYSTEM ]
HOSPITAL MANAGEMENT SYSTEM
2015 – 2016
Project Report On
SUBMITTED BY
PROJECT GUIDE
MS. SNEHAL YEOLE
Page 2 of 116
HOSPITAL MANAGEMENT SYSTEM
CERTIFICATE
Project Guide
Page 3 of 116
HOSPITAL MANAGEMENT SYSTEM
Acknowledgement
Last but not the least, we are thankful to our parents , friends&
seniors who gave us the much needed moral support and encouragement
which made developing this project a work of sheer joy and satisfaction .
Thank you all once again.
Page 4 of 116
HOSPITAL MANAGEMENT SYSTEM
Preface
Page 5 of 116
HOSPITAL MANAGEMENT SYSTEM
INDEX
Sr. No Title Page
No.
I. Preliminary Investigation 7
1.1 Organization Overview 8
2.2 Prototype
Page 6 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 7 of 116
HOSPITAL MANAGEMENT SYSTEM
Preliminary Investigation
Page 8 of 116
HOSPITAL MANAGEMENT SYSTEM
Organizational Overview
Hospitals currently use a manual system for the management and
maintenance of critical information. The current system requires numerous
paper forms, with data stores spread throughout the hospital management
infrastructure. Often information (on forms) is incomplete, or does not follow
management standards. Forms are often lost in transit between departments
requiring a comprehensive auditing process to ensure that no vital information
is lost. Multiple copies of the same information exist in the hospital and may
lead to inconsistencies in data in various data stores.
A significant part of the operation of any hospital involves the acquisition,
management and timely retrieval of great volumes of information. This
information typically involves; patient personal information and medical
history, staff information, room and ward scheduling, staff scheduling,
operating theater scheduling and various facilities waiting lists. All of this
information must be managed in an efficient and cost wise fashion so that an
institution's resources may be effectively utilized HMS will automate the
management of the hospital making it more efficient and error free. It aims at
standardizing data, consolidating data ensuring data integrity and reducing
inconsistencies.
Page 9 of 116
HOSPITAL MANAGEMENT SYSTEM
Description Of System
The Hospital Management System (HMS) is designed for Any Hospital
to replace their existing manual, paper based system. The new system is to
control the following information; patient information, room availability, staff
and operating room schedules, and patient invoices. These services are to be
provided in an efficient, cost effective manner, with the goal of reducing the
time and resources currently required for such tasks.
A significant part of the operation of any hospital involves the
acquisition, management and timely retrieval of great volumes of information.
This information typically involves; patient personal information and medical
history, staff information, room and ward scheduling, staff scheduling,
operating theater scheduling and various facilities waiting lists. All of this
information must be managed in an efficient and cost wise fashion so that an
institution's resources may be effectively utilized HMS will automate the
management of the hospital making it more efficient and error free. It aims at
standardizing data, consolidating data ensuring data integrity and reducing
inconsistencies.
.
Page 10 of 116
HOSPITAL MANAGEMENT SYSTEM
It is time consuming
Page 11 of 116
HOSPITAL MANAGEMENT SYSTEM
Advantages
Page 12 of 116
HOSPITAL MANAGEMENT SYSTEM
Feasibility Study
The next step in analysis is to verify the feasibility of the proposed
system. All projects are feasible given unlimited resource and time. The project
should be optimalin three consumption of resources. This places a constant on
approval any project.
Feasibilityasuppliedtooursystempartinthefollowingarea:-
1. Economic Feasibility
2. Operational Feasibility
3. Technical Feasibility
Page 13 of 116
HOSPITAL MANAGEMENT SYSTEM
1. Economic Feasibility:-
Higher level of automation most often requires more funds. Hence based on
the hardware and software specification a desirable alternative costs and
benefits to see if the investment made in creating / developing a new system is
costlier or more beneficial.
Financial benefits must equal or exceed the costs. To assure this, one must
estimate thefollowing:
i) If the Organization has adequate cash flow for funding the development
iii) The cost of hardware and software for the class of application being
considered.
iv) The benefits in the form of reduced costs or fewer costly errors.
v) The cost if nothing changes (i.e. the proposed system is not developed)
for a project to be judged feasible, it must pass all these tests.
vi) If any one of these issues appears infeasible the decision must be
reconsidered.
Page 14 of 116
HOSPITAL MANAGEMENT SYSTEM
2. Operational Feasibility:-
The operational feasibility is obtained by consulting the system user
whether it satisfies the user’s requirements.
A system with an easy interface will always help the user to usethe
system.
The new system is completely user friendly interface. It has been
designed to be pretty intuitive, so that even an inexperienced person can easily
handle the system.
Business functions are reengineered to achieve broader scope and higher
level of automation.
Manual processes too are modified. Every shop has its own culture and
new system should fit the shop culture.
Page 15 of 116
HOSPITAL MANAGEMENT SYSTEM
3. Technical Feasibility:-
To determine whether the proposed system is technically feasible we
should take consideration the technical issues involved behind the system. The
proposed system uses the Microsoft Visual Studio.Net 2008 which is rampantly
employed these days worldwide. The world without the web is
incomprehensible today. That goes to prove that the system is done on existing
and widely popular technologies. Hence the proposed system is technically
feasible.
There is requirement for the mentioned software and an expertise for handling
system.
Thus in the presence of required hardware, software the proposed system is
technically feasible.
Page 16 of 116
HOSPITAL MANAGEMENT SYSTEM
Hardware Requirements:-
2 GB RAM or more.
Software Requirements:-
Page 17 of 116
HOSPITAL MANAGEMENT SYSTEM
Technology Used:-
ASP .NET 2010
ASP.NET is a unified Web development model that includes the services
necessary for you to build enterprise-class Web applications with a minimum of
coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET
applications you have access to classes in the .NET Framework. You can code
your applications in any language compatible with the common language
runtime (CLR), including Microsoft Visual Basic and C#. These languages
enable you to develop ASP.NET applications that benefit from the common
language runtime, type safety, inheritance, and so on.
If you want to try ASP.NET, you can install Visual Web Developer Express
using the Microsoft web platform which is a free tool that makes it simple to
download, install, and service components of the Microsoft Web Platform.
These components include Visual Web Developer Express, Internet Information
Services (IIS), SQL Server Express, and the .NET Framework. All of these are
tools that you use to create ASP.NET Web applications. You can also use the
Microsoft Web Platform Installer to install open-source ASP.NET and PHP
Web applications.Asp.net allows you to create following applications:
Simplified Deployment
Improved Coding
Page 18 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 19 of 116
HOSPITAL MANAGEMENT SYSTEM
GANTT CHART:-
Gantt charts are a project-planning tool that can be used to represent the
timing of tasks required to complete a project, because Gantt charts are simple
to understand and easy to construct, they are used by most project managers for
all but the most complex projects.
In a Gantt chart, each task takes up one row. Dates run along the top in
increments of days, weeks or months, depending on the total length of the
project. The expected time for each task is represented by a horizontal bar
whose left end marks the expected beginning of the task and whose right end
marks the expected completion date. Tasks may run sequentially, in parallel or
overlapping.
Page 20 of 116
HOSPITAL MANAGEMENT SYSTEM
Gantt Chart
Page 21 of 116
HOSPITAL MANAGEMENT SYSTEM
SYSTEM ANALYSIS
Page 22 of 116
HOSPITAL MANAGEMENT SYSTEM
Documentation:-
This involves review of written documents, literature, procedures, forms,
manuals govt. publications etcthe preliminary drawback is search time.
Sometimes it may be difficult to get certain reports and documentation or may
be outdated or expensive and may not be updated. Close look at printed forms
are necessary since printed forms are widely used for capturing and providing
information. The objective of this is to understand how forms are used.
Page 23 of 116
HOSPITAL MANAGEMENT SYSTEM
Prototype
Each trip around the spiral traverses four basic quadrants: (1) determine
objectives, alternatives, and constraints of the iteration; (2) evaluate
alternatives; Identify and resolve risks; (3) develop and verify
deliverables from the iteration; and (4) plan the next iteration.
Page 24 of 116
HOSPITAL MANAGEMENT SYSTEM
Event Table
• Event table: A Table that lists events in rows and key pieces of information
about each event in columns.
• Event: An Event occurs at a specific time and place, can be described and
should be remembered by the system.
• Trigger: An occurrence that tells the system that a event has occurred, either
arrival of data needing processing or of a point in time.
• Destination: An external agent or an actor that receives data from the system.
Description:
• Events are the transactions.
•The list events with trigger, source, activity, response(s), and destination for
each event can be placed in the event table to keep track of them for later use.
Page 25 of 116
HOSPITAL MANAGEMENT SYSTEM
The main purpose of a use case diagram is to show what system functions are
performed for which actor. Roles of the actors in the system can be depicted.
A use case is a set of scenarios that describing an interaction between a user and
a system. A use case diagram
displays the relationship among actors and use cases. The two main components
of a use case diagram are use
Cases and actors.
An actor is represents a user or another system that will interact with the system
you are modeling. A use case
is an external view of the system that represents some action the user might
perform in order to complete a task.
Page 26 of 116
HOSPITAL MANAGEMENT SYSTEM
Registration
Reception
Discharge Summary
Patient
Doctor
Laboratory
Pharmacy
Page 27 of 116
HOSPITAL MANAGEMENT SYSTEM
Entity-Relationship Diagram
Data models are tools used in diagrams to describe the data requirements and
assumptions in the system from a top down perspective.
Entity relationship diagrams are abstractions of the real world which simplify
the problem to be solved while retaining its essential features. Entity
relationship diagrams are used to identify the data that must be captured, stored
and retrieved in order to support the business activities performed by the
organization; and identify the data required to derive and report on the
performance measures that an organization should be monitoring.
Page 28 of 116
HOSPITAL MANAGEMENT SYSTEM
Other objects.
sufficient attributes to
Several entities.
Called as identifier.
allows distinguishing
Page 30 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 31 of 116
HOSPITAL MANAGEMENT SYSTEM
Activity Diagram
Activity diagrams describe the workflow behavior of a system. Activity
diagrams are similar to state diagrams because activities are the state of doing
something.
The main reason to use activity diagrams is to model the workflow behind the
system being designed.
Activity Diagrams are also useful for: analyzing a use case by describing what
actions needs to take place and when they should occur; describing a
complicated sequential algorithm; and modeling applications with parallel
processes.
However, activity diagrams should not take the place of interaction diagrams
and state diagrams.
Activity diagrams do not give detail about how objects behave or how objects
collaborate
Page 32 of 116
HOSPITAL MANAGEMENT SYSTEM
start
Doctor Patient
Registration
Pharmacy
Reception
Discharge
Laboratory summary
End
Page 33 of 116
HOSPITAL MANAGEMENT SYSTEM
Class diagram
The class diagram is the main building block in object oriented modeling. It is
used both for general conceptual modeling of the systematic of the application,
and for detailed modeling translating the models into programming code. The
classes in a class diagram represent both the main objects and or interactions in
the application and the objects to be programmed. In the class diagram these
classes are
•The bottom part gives the methods or operations the class can take or
undertake.
Page 34 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 35 of 116
HOSPITAL MANAGEMENT SYSTEM
Sequence Diagram
A sequence diagram in Unified Modeling Language (UML) is a kind of
interaction diagram that shows how processes operate with one another and in
what order.
During the requirements phase of a project, analysts can take use cases to the
next level by providing a more formal level of refinement.
When that occurs, use cases are often refined into one or more sequence
diagrams.
During the design phase, architects and developers can use the diagram to force
out the system's object interactions, thus fleshing out overall system design.
. Use cases are often refined into one or more sequence diagrams.In addition to
their use in designing new systems, sequence diagrams can be used to document
how objects in an existing (call it "legacy") system currently interact.
Page 36 of 116
HOSPITAL MANAGEMENT SYSTEM
Sequence Diagram
Patient Discharge
Doctor Resgistration Reception Laboratory Pharmacy Summary
login
View appointments
Register
Send request
Go to Laboratory
Take madicine
Discharge patient
Page 37 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 38 of 116
HOSPITAL MANAGEMENT SYSTEM
SYSTEM DATABASE
Page 39 of 116
HOSPITAL MANAGEMENT SYSTEM
Employee Registration:
Name NULL / NOTNULL TYPE KEY
Page 40 of 116
HOSPITAL MANAGEMENT SYSTEM
Inpatient Registration:
Name NULL / NOTNULL TYPE KEY
Page 41 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 42 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 43 of 116
HOSPITAL MANAGEMENT SYSTEM
For Operation:
Name NULL / NOTNULL TYPE KEY
Page 44 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 45 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 46 of 116
HOSPITAL MANAGEMENT SYSTEM
Main page:
Page 47 of 116
HOSPITAL MANAGEMENT SYSTEM
Home page:
Page 48 of 116
HOSPITAL MANAGEMENT SYSTEM
Login page:
Page 49 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
publicpartialclassAdministration : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx");
}
}
Page 50 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 51 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassdoctorlogin : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
SqlDataReader dr;
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
string qry;
qry = "select * from hospital_doctorsignup where loginid='"+lidtxt.Text+"' and
password='"+pwdtxt.Text+"'";
SqlCommand cmd = newSqlCommand(qry, cn);
dr = cmd.ExecuteReader();
if (dr.Read())
{
Response.Redirect("doctorsden.aspx");
}
else
{
pwdlb.Text = "Enter valid UserName/Password";
}
}
Page 52 of 116
HOSPITAL MANAGEMENT SYSTEM
Doctor’s signup:
Page 53 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassdoctorsignup : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid subbtn_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_doctorsignup";
cmd.Connection = cn;
SqlParameter p = newSqlParameter("@name",SqlDbType.VarChar,20);
p.Value = nametxt.Text;
cmd.Parameters.Add(p);
SqlParameter p1 = newSqlParameter("@loginid",SqlDbType.VarChar,20);
p1.Value = lidtxt.Text;
cmd.Parameters.Add(p1);
SqlParameter p2 = newSqlParameter("@password",SqlDbType.VarChar,20);
p2.Value = pwdtxt.Text;
cmd.Parameters.Add(p2);
SqlParameter p3 = newSqlParameter("@department",SqlDbType.VarChar,20);
p3.Value = depddl.Text;
cmd.Parameters.Add(p3);
SqlParameter p4 = newSqlParameter("@specialization",SqlDbType.VarChar,20);
p4.Value = speddl.Text;
cmd.Parameters.Add(p4);
SqlParameter p5 = newSqlParameter("@phonenumber",SqlDbType.BigInt);
p5.Value = phtxt.Text;
cmd.Parameters.Add(p5);
SqlParameter p6 = newSqlParameter("@address",SqlDbType.VarChar,20);
p6.Value = addtxt.Text;
cmd.Parameters.Add(p6);
SqlParameter p7 = newSqlParameter("@email",SqlDbType.VarChar,20);
p7.Value = emtxt.Text;
cmd.Parameters.Add(p7);
Page 54 of 116
HOSPITAL MANAGEMENT SYSTEM
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("doctorlogin.aspx");
}
protectedvoid Resbtn_Click(object sender, EventArgs e)
{
Response.Redirect("doctorsignup.aspx");
}
protectedvoid canbtn_Click(object sender, EventArgs e)
{
Response.Redirect("~/doctorlogin.aspx");
}
Page 55 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 56 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassdoctorforgot : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
Panel1.Visible = false;
}
protectedvoid pwdbtn_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_doctorforgot";
cmd.Connection = cn;
SqlParameter p = newSqlParameter("@loginid",SqlDbType.VarChar,20);
p.Value = lidtxt.Text;
cmd.Parameters.Add(p);
SqlParameter p1 = newSqlParameter("@password",SqlDbType.VarChar,20);
p1.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p1);
cmd.ExecuteReader();
pwdtxt.Text = cmd.Parameters["@password"].Value.ToString();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
Response.Redirect("doctorlogin.aspx");
}
}
Page 57 of 116
HOSPITAL MANAGEMENT SYSTEM
Doctors appointments:
Page 58 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 59 of 116
HOSPITAL MANAGEMENT SYSTEM
Patient info:
Page 60 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data .SqlClient ;
publicpartialclasspatientinfo : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
if (type.SelectedItem.Value =="In-Patient")
{
SqlDataAdapter Da = newSqlDataAdapter("select * from hospital_inpatient where
patientid="+TextBox1 .Text+ "", cn);
//SqlCommandBuilder Cmd = new SqlCommandBuilder(Da);
DataSet Ds = newDataSet();
Da.Fill(Ds, "hospital_inpatient");
GridView1.DataSource = Ds.Tables[0];
GridView1.DataBind();
}
else
{
SqlDataAdapter Da = newSqlDataAdapter("select * from hospital_outpatient where
patientid="+TextBox1 .Text +"", cn);
//SqlCommandBuilder Cmd = new SqlCommandBuilder(Da);
DataSet Ds1 = newDataSet();
Da.Fill(Ds1, "hospital_outpatient");
GridView1.DataSource = Ds1.Tables[0];
GridView1.DataBind();
}
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("doctorsden.aspx");
}
}
Page 61 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 62 of 116
HOSPITAL MANAGEMENT SYSTEM
Operation details:
Page 63 of 116
HOSPITAL MANAGEMENT SYSTEM
Employee login
Page 64 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassuserlogin : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
SqlDataReader dr;
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
string qry;
qry = "select * from hospital_empsignup where loginid='" + lidtxt.Text + "'
and password='" + pwdtxt.Text + "'";
SqlCommand cmd = newSqlCommand(qry, cn);
dr = cmd.ExecuteReader();
if (dr.Read())
{
Response.Redirect("emphome.aspx");
}
else
{
pwdlb.Text = "Enter valid UserName/Password";
}
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Administration.aspx");
}
}
Page 65 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassempforgot : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
Panel1.Visible = false;
}
protectedvoid pwdbtn_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_empforgot";
cmd.Connection = cn;
SqlParameter p = newSqlParameter("@loginid",SqlDbType.VarChar,20);
p.Value = lidtxt.Text;
cmd.Parameters.Add(p);
SqlParameter p1 = newSqlParameter("@password",SqlDbType.VarChar,20);
p1.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p1);
cmd.ExecuteReader();
pwdtxt.Text = cmd.Parameters["@password"].Value.ToString();
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("emplogin.aspx");
}
}
Page 66 of 116
HOSPITAL MANAGEMENT SYSTEM
Doctors signup:
Page 67 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassempsignup : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid subbtn_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_empsignup";
cmd.Connection = cn;
SqlParameter p = newSqlParameter("@name",SqlDbType.VarChar,20);
p.Value = nametxt.Text;
cmd.Parameters.Add(p);
SqlParameter p1 = newSqlParameter("@loginid",SqlDbType.VarChar,20);
p1.Value = lidtxt.Text;
cmd.Parameters.Add(p1);
SqlParameter p2 = newSqlParameter("@password",SqlDbType.VarChar,20);
p2.Value = pwdtxt.Text;
cmd.Parameters.Add(p2);
SqlParameter p3 = newSqlParameter("@department",SqlDbType.VarChar,20);
p3.Value = depddl.Text;
cmd.Parameters.Add(p3);
SqlParameter p4 = newSqlParameter("@phonenumber",SqlDbType.BigInt);
p4.Value = phtxt.Text;
cmd.Parameters.Add(p4);
SqlParameter p5 = newSqlParameter("@address",SqlDbType.VarChar,20);
p5.Value = addtxt.Text;
cmd.Parameters.Add(p5);
SqlParameter p6 = newSqlParameter("@email",SqlDbType.VarChar,20);
p6.Value = emtxt.Text;
cmd.Parameters.Add(p6);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("emplogin.aspx");
}
protectedvoid Resbtn_Click(object sender, EventArgs e)
Page 68 of 116
HOSPITAL MANAGEMENT SYSTEM
{
Response.Redirect("empsignup.aspx");
}
protectedvoid canbtn_Click(object sender, EventArgs e)
{
Response.Redirect("emplogin.aspx");
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("emplogin.aspx");
}
}
Page 69 of 116
HOSPITAL MANAGEMENT SYSTEM
Employee homepage:
Page 70 of 116
HOSPITAL MANAGEMENT SYSTEM
Laboratory:
Page 71 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
publicpartialclasslaborataries : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx");
}
}
Page 72 of 116
HOSPITAL MANAGEMENT SYSTEM
Page 73 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassoperationth : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
cn.Open();
if (pttypeddl.SelectedItem.Value == "In-Patient")
{
SqlCommand cmd = newSqlCommand("select patientid from hospital_inpatient", cn);
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
pidddl.DataSource = ds;
pidddl.DataTextField = "patientid";
pidddl.DataBind();
// pidddl.Items.Insert(0, "...Select...");
}
else
if (pttypeddl.SelectedItem.Value == "Out-Patient")
{
SqlCommand cmd = newSqlCommand("select patientid from hospital_outpatient", cn);
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
pidddl.DataSource = ds;
pidddl.DataTextField = "patientid";
pidddl.DataBind();
// pidddl.Items.Insert(0, "...Select...");
}
cn.Close();
}
protectedvoid pidddl_SelectedIndexChanged(object sender, EventArgs e)
{
if (pttypeddl.SelectedItem.Value == "In-Patient")
{
Page 74 of 116
HOSPITAL MANAGEMENT SYSTEM
cn.Open();
SqlCommand cmd = newSqlCommand("select patientname,doctor from hospital_inpatient
where patientid='"+ pidddl.Text +"'", cn);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
pntxt.Text = dr[0].ToString();
doctxt.Text = dr[1].ToString();
}
cn.Close();
}
elseif (pttypeddl.SelectedItem.Value == "Out-Patient")
{
cn.Open();
SqlCommand cmd = newSqlCommand("select patientname,assigndoctor from
hospital_outpatient where patientid='"+ pidddl.Text +"'", cn);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
pntxt.Text = dr[0].ToString();
doctxt.Text = dr[1].ToString();
}
cn.Close();
}
cmd.ExecuteNonQuery();
Page 75 of 116
HOSPITAL MANAGEMENT SYSTEM
cn.Close();
Response.Redirect("laborataries.aspx");
}
protectedvoid canbtn_Click(object sender, EventArgs e)
{
Response.Redirect("laborataries.aspx");
}
}
Page 76 of 116
HOSPITAL MANAGEMENT SYSTEM
Medical test:
Page 77 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassmedicaltests : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Panel1.Visible = false;
Panel2.Visible = false;
Panel3.Visible = false;
}
}
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
if (mttddl.SelectedValue == "Blood Test")
{
Panel1.Visible = true;
}
elseif (mttddl.SelectedValue == "Urin test")
{
Panel2.Visible = true;
}
else
{
Panel3.Visible = true;
}
}
protectedvoid pidddl_SelectedIndexChanged(object sender, EventArgs e)
{
cn.Open();
if (pttypeddl.SelectedItem.Value == "In-Patient")
{
Page 78 of 116
HOSPITAL MANAGEMENT SYSTEM
p.Value = pidddl.SelectedValue.ToString();
cmd.Parameters.Add(p);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
pntxt.Text = dr[0].ToString();
}
}
elseif (pttypeddl.SelectedItem.Value == "Out-Patient")
{
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_medicaltestout";
cmd.Connection = cn;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
pntxt.Text = dr[0].ToString();
}
}
cn.Close();
}
protectedvoid pttypeddl_SelectedIndexChanged(object sender, EventArgs e)
{
cn.Open();
if (pttypeddl.SelectedItem.Value == "In-Patient")
{
string qry;
qry = "select patientid from hospital_inpatient";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_inpatient");
pidddl.DataSource = ds;
pidddl.DataTextField = "patientid";
pidddl.DataBind();
pidddl.Items.Insert(0, "...Select...");
}
else
if (pttypeddl.SelectedItem.Value == "Out-Patient")
{
string qry;
qry = "select patientid from hospital_outpatient";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_outpatient");
pidddl.DataSource = ds;
pidddl.DataTextField = "patientid";
pidddl.DataBind();
pidddl.Items.Insert(0, "...Select...");
Page 79 of 116
HOSPITAL MANAGEMENT SYSTEM
else
{
Response.Write("excute");
}
cn.Close();
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
if (Panel1.Visible == true)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_bloodtest";
cmd.Connection = cn;
cmd.ExecuteNonQuery();
cn.Close();
}
elseif (Panel2.Visible == true)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_urintest";
Page 80 of 116
HOSPITAL MANAGEMENT SYSTEM
cmd.Connection = cn;
cmd.ExecuteNonQuery();
cn.Close();
}
elseif (Panel3.Visible == true)
{
cn.Open();
//SqlCommand cmd1 = new SqlCommand("select max(patientid) from hospital_livertest",
cn);
//SqlDataReader drauto = cmd1.ExecuteReader();
//drauto.Read();
//int pid = Convert.ToInt32(drauto.GetValue(0));
//pid = pid + 1;
cn.Close();
SqlCommand cmd = newSqlCommand("insert into hospital_livertest values('" +
pttypeddl.SelectedItem.ToString() + "','" + pidddl.SelectedItem.ToString() + "','" +
pntxt.Text +"','" + TextBox1.Text + "','" + TextBox6.Text + "','" + TextBox7.Text +
"','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" +
TextBox5.Text + "')", cn);
cn.Open();
Page 81 of 116
HOSPITAL MANAGEMENT SYSTEM
cmd.ExecuteNonQuery();
cn.Close();
}
Response.Redirect("laborataries.aspx");
}
protectedvoid Button3_Click(object sender, EventArgs e)
{
Response.Redirect("laborataries.aspx");
}
}
Page 82 of 116
HOSPITAL MANAGEMENT SYSTEM
Pharmacy:
Page 83 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclasspharmacy : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_pharmacy";
cmd.Connection = cn;
SqlParameter p = newSqlParameter("@patienttype", SqlDbType.VarChar, 20);
p.Value = ptntyp.Text;
cmd.Parameters.Add(p);
SqlParameter p1 = newSqlParameter("@patientid", SqlDbType.Int);
p1.Value = ptntid.Text;
cmd.Parameters.Add(p1);
SqlParameter p2 = newSqlParameter("@department", SqlDbType.VarChar, 20);
p2.Value =dpt.Text;
cmd.Parameters.Add(p2);
SqlParameter p3 = newSqlParameter("@patientname", SqlDbType.VarChar, 20);
p3.Value =ptntname.Text;
cmd.Parameters.Add(p3);
SqlParameter p4 = newSqlParameter("@medicine", SqlDbType.VarChar, 20);
p4.Value =mdcnusd.Text;
cmd.Parameters.Add(p4);
cmd.ExecuteNonQuery();
cn.Close();
}
protectedvoid DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
{
cn.Open();
if (ptntyp.SelectedItem.Value == "In-Patient")
{
Page 84 of 116
HOSPITAL MANAGEMENT SYSTEM
ptntid.DataTextField = "patientid";
ptntid.DataBind();
ptntid.Items.Insert(0, "...Select...");
}
elseif (ptntyp.SelectedItem.Value == "Out-Patient")
{
string qry = "select patientid from hospital_outpatient";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_outpatient");
ptntid.DataSource = ds;
ptntid.DataTextField = "patientid";
ptntid.DataBind();
ptntid.Items.Insert(0, "...Select...");
}
elseif (ptntyp.SelectedItem.Value == "...Select...")
{
Response.Redirect("pharmacy.aspx");
}
cn.Close();
}
protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (ptntyp.SelectedItem.Value == "In-Patient")
{
cn.Open();
SqlCommand Cmd = newSqlCommand("select department,patientname from hospital_inpatient
WHERE patientid ='" + ptntid.SelectedValue + "'", cn);
SqlDataReader dr = Cmd.ExecuteReader();
if (dr.Read())
{
dpt.Text = dr[0].ToString();
ptntname.Text = dr[1].ToString();
}
dr.Close();
cn.Close();
}
elseif (ptntyp.SelectedItem.Value == "Out-Patient")
{
cn.Open();
SqlCommand Cmd = newSqlCommand("select department,patientname from
hospital_outpatient WHERE patientid ='" + ptntid.SelectedValue + "'", cn);
SqlDataReader dr = Cmd.ExecuteReader();
if (dr.Read())
{
dpt.Text = dr[0].ToString();
ptntname.Text = dr[1].ToString();
}
dr.Close();
cn.Close();
}
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Page 85 of 116
HOSPITAL MANAGEMENT SYSTEM
Response.Redirect("pharmacy.aspx");
}
protectedvoid Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
}
}
Page 86 of 116
HOSPITAL MANAGEMENT SYSTEM
Patient registration:
Page 87 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
publicpartialclassregistration : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx");
}
}
Page 88 of 116
HOSPITAL MANAGEMENT SYSTEM
In-patient registration:
Page 89 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassipregister : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
filldrop();
DropDownList5.Items.Insert(0, "...Select...");
}
string dt = DateTime.Now.ToShortDateString();
string dtm = DateTime.Now.ToShortTimeString();
TextBox9.Text = dt;
TextBox10.Text = dtm;
cn.Open();
int pid =0;
int b = 0;
pid =Convert.ToInt32(newSqlCommand("select patientid from hospital_inpatient order by
1 desc", cn).ExecuteScalar().ToString()) + 1;
b = Convert.ToInt32(newSqlCommand("select admid from hospital_inpatient order
by 1 desc", cn).ExecuteScalar().ToString()) + 1;
TextBox2.Text = pid.ToString();
TextBox8.Text = b.ToString();
cn.Close();
}
void filldrop()
{
cn.Open();
string qry = "select name from hospital_doctorsignup";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_doctorsignup");
DropDownList5.DataSource = ds;
DropDownList5.DataTextField = "name";
DropDownList5.DataBind();
cn.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_inpatient";
cmd.Connection = cn;
Page 90 of 116
HOSPITAL MANAGEMENT SYSTEM
SqlParameter p = newSqlParameter("@patientname",SqlDbType.VarChar,20);
p.Value = TextBox1.Text;
cmd.Parameters.Add(p);
Page 91 of 116
HOSPITAL MANAGEMENT SYSTEM
cmd.ExecuteNonQuery();
cn.Close();
Response.Write("<script>alert('Data inserted successfully')</script>");
Response.Redirect("doctorsden.aspx");
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("registration.aspx");
}
protectedvoid Button2_Click1(object sender, EventArgs e)
{
Response.Redirect("ipregister.aspx");
}
}
Page 92 of 116
HOSPITAL MANAGEMENT SYSTEM
Out-patient registration:
Page 93 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassdoctorsignup : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
string dt = DateTime.Now.ToShortDateString();
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
filldrop();
DropDownList5.Items.Insert(0, "...Select...");
string dt = DateTime.Now.ToShortDateString();
optxt.Text = dt;
cn.Open();
int pid = 0;
pidtxt.Text = pid.ToString();
cn.Close();
}
void filldrop()
{
cn.Open();
string qry = "select name from hospital_doctorsignup";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_doctorsignup");
DropDownList5.DataSource = ds;
DropDownList5.DataTextField = "name";
DropDownList5.DataBind();
cn.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_outpatient";
cmd.Connection = cn;
Page 94 of 116
HOSPITAL MANAGEMENT SYSTEM
SqlParameter p = newSqlParameter("@patientname",SqlDbType.VarChar,20);
p.Value = pntxt.Text;
cmd.Parameters.Add(p);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("outpatient.aspx");
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Calendar1.Visible = true;
}
protectedvoid Calendar1_SelectionChanged(object sender, EventArgs e)
{
optxt.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
protectedvoid Button2_Click1(object sender, EventArgs e)
{
Response.Redirect("registration.aspx");
}
}
Page 95 of 116
HOSPITAL MANAGEMENT SYSTEM
Discharge summary:
Page 96 of 116
HOSPITAL MANAGEMENT SYSTEM
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassdischargesummary : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string dt = DateTime.Now.ToShortDateString();
TextBox3.Text = dt;
}
Page 97 of 116
HOSPITAL MANAGEMENT SYSTEM
Reception:
Page 98 of 116
HOSPITAL MANAGEMENT SYSTEM
Ambulatory info:
Page 99 of 116
HOSPITAL MANAGEMENT SYSTEM
Appointments:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclassreception : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
filldrop();
pidddl.Items.Insert(0, "...Select...");
}
}
void filldrop()
{
cn.Open();
string qry;
qry = "select patientid from hospital_inpatient";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_inpatient");
pidddl.DataSource = ds;
pidddl.DataTextField = "patientid";
pidddl.DataBind();
cn.Close();
}
cmd.ExecuteReader();
pntxt.Text = cmd.Parameters["@patientname"].Value.ToString();
agtxt.Text = cmd.Parameters["@age"].Value.ToString();
deptxt.Text = cmd.Parameters["@department"].Value.ToString();
cn.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_patientinfoenter";
cmd.Connection = cn;
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("receptionhome.aspx");
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("receptionhome.aspx");
}
protectedvoid Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
} }
Surgery information:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
publicpartialclasssurgeries : System.Web.UI.Page
{
SqlConnection cn = newSqlConnection("Data Source=RAWANKAR-PC;Initial
Catalog=Hospitalmanagement;Integrated Security=True");
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
filldrop();
pidddl.Items.Insert(0, "...Select...");
}
}
void filldrop()
{
cn.Open();
string qry;
qry = "select patientid from hospital_inpatient";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_inpatient");
pidddl.DataSource = ds;
pidddl.DataTextField = "patientid";
pidddl.DataBind();
cn.Close();
}
protectedvoid Calendar1_SelectionChanged(object sender, EventArgs e)
{
sdtxt.Text = Calendar1.SelectedDate.ToShortDateString();
}
protectedvoid pidddl_SelectedIndexChanged(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_patientinfo";
cmd.Connection = cn;
cmd.ExecuteReader();
pntxt.Text = cmd.Parameters["@patientname"].Value.ToString();
agtxt.Text = cmd.Parameters["@age"].Value.ToString();
deptxt.Text = cmd.Parameters["@department"].Value.ToString();
cn.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_surgeryinfo";
cmd.Connection = cn;
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("receptionhome.aspx");
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("receptionhome.aspx");
}
}
Contact us:
System Implementation
Maintenance
SYSTEM MAINTENANCE:
The maintenance of software is the time period in which the software product
performs useful work. Maintenance activities involve making enhancement
activities to the, adapting product to new environment and correcting problems.
Software enhancement may involve providing new functional capabilities,
improving user displays and modes of interaction.
Corrective Maintenance
Preventive Maintenance
Perfective Maintenance
Adaptive Maintenance
Corrective Maintenance:
Corrective maintenance can be defined as the maintenance which is required
when an item has failed or worn out, to bring it back to working order.
Adaptive Maintenance:
Adaptive maintenance is an activity that modifies software to properly interface
with the changing environment.
Perfective Maintenance:
Perfective maintenance is performed to satisfy user requests such as new
Capabilities, modifications to existing functions and general enhancements.
Preventive Maintenance:
Preventive maintenance occurs when software is changed to improve future
maintainability or to provide a better basic for future enhancements.
TESTING
Testing is a process of executing a program with the indent of finding an error.
Testing is a crucial element of software quality assurance and presents ultimate
review of specification, design and coding.
Testing Objectives:
Testing Principles:
The primary objective for test case design is to derive a set of tests that has
the highest livelihood for uncovering defects in software. To accomplish this
objective two different categories of test case design techniques are used. They
are
White-box testing:
White box testing focus on the program control structure. Test cases are
derived to ensure that all statements in the program have been executed at least
once during testing and that all logical conditions have been executed.
Block-box testing:
Testing strategies:
A strategy for software testing must accommodate low-level tests that are
necessary to verify that all small source code segment has been correctly
implemented as well as high-level tests that validate major system functions
against customer requirements.
Testing fundamentals:
Page 111 of 116
HOSPITAL MANAGEMENT SYSTEM
Information flow for testing flows the pattern. Two class of input
provided to test the process. The software configuration includes a software
requirements specification, a design specification and source code.
Test configuration includes test plan and test cases and test tools. Tests
are conducted and all the results are evaluated. That is test results are compared
with expected results. When erroneous data are uncovered, an error is implied
and debugging commences.
Unit testing:
Unit testing is essential for the verification of the code produced during
the coding phase and hence the goal is to test the internal logic of the modules.
Using the detailed design description as a guide, important paths are tested to
uncover errors with in the boundary of the modules. These tests were carried
out during the programming stage itself. All units of Vienna SQL were
successfully tested.
Integration testing:
Integration testing focuses on unit tested modules and build the program
structure that is dictated by the design phase.
System testing:
System testing tests the integration of each module in the system. It also
tests to find discrepancies between the system and it’s original objective, current
specification and system documentation. The primary concern is the
compatibility of individual modules. Entire system is working properly or not
will be tested here, and specified path ODBC connection will correct or not, and
giving output or not are tested here these verifications and validations are done
by giving input values to the system and by comparing with expected output.
Top-down testing implementing here.
Acceptance Testing:
This testing is done to verify the readiness of the system for the
implementation. Acceptance testing begins when the system is complete. Its
purpose is to provide the end user with the confidence that the system is ready
for use. It involves planning and execution of functional tests, performance tests
and stress tests in order to demonstrate that the implemented system satisfies its
requirements.
Test coverage Analyzer – records the control paths followed for each test case.
Timing Analyzer – also called a profiler, reports the time spent in various
regions of the code are areas to concentrate on to improve system performance.
Coding standards – static analyzers and standard checkers are used to inspect
code for deviations from standards and guidelines.
Test Cases:
Test cases are derived to ensure that all statements in the program have
been executed at least once during testing and that all logical conditions have
been executed.
Using White-Box testing methods, the software engineer can drive test cases
that
Conclusion
An attempt is made in all its earnest towards the successful completion of the
project. This system was verified with valid as well as with invalid data.
This system is user friendly since it has been developed in Visual Studio
2008, a successful GUI environment. Since the connection can be extended to
any database. The control will be more powerful.
BIBLIOGRAPHY:
For Database:
i) System Analysis and Design –By Satzinger
For ASP.NET:
www.google.com
http://www.zedge.net/phone-index
www.w3schools.com