Sei sulla pagina 1di 116

2015-2016

HOSPITAL
MANAGEMENT
SYSTEM

[ HOSPITAL
MANAGEMENT
SYSTEM ]
HOSPITAL MANAGEMENT SYSTEM

LAXMAN DEVRAM SONAWANE COLLEGE

(Affiliated to University Of Mumbai)

2015 – 2016

Project Report On

Project work submitted in partial fulfillment of the


requirements for the award of the degree of
B.Sc. (Information Technology)

SUBMITTED BY

PROJECT GUIDE
MS. SNEHAL YEOLE

Page 2 of 116
HOSPITAL MANAGEMENT SYSTEM

CERTIFICATE

This is to verify that


MISS.

Hassatisfactorilycarried outtheprojectworkonthe topic


“HOSPITAL MANAGEMENT SYSTEM”
forthe T.Y.B.Sc (INFORMATION TECHNOLOGY)
ACADEMIC YEAR
2015 - 2016

Project Guide

B.Sc (IT) Co-ordinator External Examiner

Page 3 of 116
HOSPITAL MANAGEMENT SYSTEM

Acknowledgement

One of the great pleasures of writing this project book is


acknowledging the efforts of many people whose names may not appear
on the cover but whose hard work, co-operation, friendship and
understanding were crucial to the preparation of this report on “HOSPITAL
MANAGEMENT SYSTEM”.

It gives us pleasure in presenting this project book whose


justification will never sound good if we do not express our vote of
thanks to all staff members of Information Technology department of our
college for allowing us to work in the lab, without whose help our
project and its thesis would have neither begin nicely nor would have
reached the best ending.

We are much thankful to our project guide Ms.Snehal Madam , and


all other teaching staff for their suggestion, reviews, encouraging, criticism
and time to time help & support which led us to achieve our goals and
overcome the difficulties.

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

This project has been accomplished through the help of advance


programming language. The project will allow the users to keep record of
customer, suppliers, and maintain the stock of mobiles with its detailed
description.

The aim of our project is to computerize almost all transactions. It differsfrom


standard looking systems. The report we are presenting is for the user who want
to know about the function of the project and how to operate the system.

It has combined the power of VisualStudio.Net 2010 with Microsoft SQL-


Server 2008 desired results. We have strived to make this project as error free as
possible.

Page 5 of 116
HOSPITAL MANAGEMENT SYSTEM

INDEX
Sr. No Title Page
No.
I. Preliminary Investigation 7
1.1 Organization Overview 8

1.2 Description of system 9


1.3 Limitation of present system 10

1.4 Proposed System 11

1.5 Software Development Life Cycle 12

1.6 Feasibility Study 24

1.7 Stack Holder

1.7 Gantt Chart 29

II. System Analysis 31


2.1 Fact-finding Techniques 32

2.2 Prototype

2.2 Event Table 35

2.3 Use case Diagram 38

2.4 Entity Relationship Diagram 40

2.5 Activity Diagram 43

2.6 Class Diagram 45

2.7 Sequence Diagram 47

Page 6 of 116
HOSPITAL MANAGEMENT SYSTEM

2.8 State Diagram 50

2.9 Context Level DFD 52


III. System Design 54
3.1 Converting ERD into tables 55

3.2 Component Diagram 53

3.3 Package Diagram 55

3.4 Program Flow Chart 56

3.5 System Flow Chart 57

3.6 Structure Chart 58


IV. System Coding 59

4.2 List Of Tables with attributes and constraints 61

4.3 Program Description with Naming Conventions 64

4.4 Screen Layout With Source Code 66


4.5 Report Layouts 116

4.7 Test Data 122

V. System Implementation 124

VI. References and Bibliography 129

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

Limitations of Present System


The present system is the manual system, since the manual work is always
overshadowed by the automatic or mechanical work following are the major
drawbacks:-

 The information regarding the payment of bills is done in registers.

 The information regarding thepatientsis done as a paper work.

 Errors can be encountered in manual system while maintaining the


records manually.

 It is time consuming

 To point our particular record is difficult in manual system.

 It is not user friendly.

 The existing system does not provide integrated information.

 The maintenance of records of customers and suppliers is done in


registers, which also is a tedious job.

Page 11 of 116
HOSPITAL MANAGEMENT SYSTEM

Proposed system And Its Advantages

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.

Advantages

 It is quite easy and flexible to use.

 It is quite user-friendly for Doctor and Employees of hospital.

 The main Advantage of this System is that this System is


it saves much of the time which is time consuming in existing system.

 All the records of In-patient,Out-patient,doctors details are well


maintained.

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.

Feasibility Study is important in project as it gives idea about which types


of hardware, softwaretechnology &other resources can be used by the
system,the people related to project like requirement gathering people, analysts,
designers and also end users.

A feasibility study is the study of positive possibilities of the project. It is


also measure of how beneficial or practical development of information system
would be to an organization.

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

ii) The cost to conduct a full system investigation.

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.

My system is economically feasible as the costs involved in


implementing the automated system is with the cash flow of the shop. Thus the
system developed will be beneficial to the users.

However there will be an additional cost for implementing thetechnology on


which the system is to be implemented.

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.

The issues to be taken into concern are:


 Corporate Culture.
 Level of computer competency.
 Loss of control on employee by staff/management.
 Change of job responsibility.
 Loss of employment due to increased automation.
 The nature and level of user involvement in the development and
implementation of system.
 Revisal of old, longstanding work procedures.
 It is usually a practice to include people trained in organizational
behavior to assist in managing these changes.

As the system will be automated there is a sense of insecurity among the


employees working for an event. As the system provides a user friendly simple
GUI it is operationally feasible to implement it in the Mobile Shop.
This automation will save time as well as reduce errors.

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.

It is essential to check whether the proposed system is technically feasible


and to determine the technology and skills necessary to carry out the successful
implementation of the project.

The necessary software required for the development of system is


 Microsoft Visual Studio 2010

 SQL Server 2008

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 and Software Requirement-

Hardware Requirements:-

Pentium4 (P4) or higher version

2 GB RAM or more.

1 GB free space in Hard Disk.

Software Requirements:-

Back end: - SQL Server 2008

Front End: - ASP.NET 4.0

Operating System - Windows XP or higher version.

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:

Powerful Windows-based Applications

Building Web-based Applications

Simplified Deployment

Powerful, Flexible, Simplified Data Access

Improved Coding

Direct Access to the Platform

Full Object-Oriented Constructs

Page 18 of 116
HOSPITAL MANAGEMENT SYSTEM

SQL SERVER 2008:-


 Database Mirroring
 Data Partitioning
 Online Indexing Operations
 Fast Recovery
 Standards-based Information Access
 Dedicated Administrator Connection

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.

As the project progresses, the chart is updated by filling in the bars to a


length proportional to the fraction of work that has been accomplished on the
task. This way, one can get a quick reading of project progress by drawing a
vertical line through the chart at the current date.
Completed tasks lie to the left of the line and are completely filled in. Current
tasks cross the line and are behind schedule if their filled-in section is to the left
of the line and ahead of schedule if the filled-in section stops to the right of the
line. Future tasks lie completely to the right of the line.
In constructing a Gantt chart, keep the tasks to a manageable number (no
more than 15 or 20) so that the chart fits on a single page. More complex
projects may require subordinate charts which detail the timing of all the
subtasks which make up one of the main tasks.
For team projects, it often helps to have an additional column containing
numbers or initials, which identify that on the team is responsible for the task.
Often the project has important events, which you would like to appear
on the project timeline, but which are not tasks. For example, you may wish to
highlight when a prototype is complete or the date of a design review.
We planned our project using according to the Gantt chart as shown as
follows

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

Fact finding techniques


After obtaining the background knowledge, the information on the existing
system, its inputs, outputs, costs and other important requirement and features
have to be collected and analyzed. The following tools were used for knowing
more about the system and gathering more information for developing a new
system.

For developing a system for an organization one need to acquire


necessary information regarding the system. Information plays vital role in an
organization. So collection of information before designing a system solves
many problems. Following are the fact finding techniques used.
 Documentation
 On Site Observation
 Interviews
 Questionnaires
It is called information gathering.

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

Spiral Model software development

The Spiral model is a Software Development Process combining elements of


both Design and Prototyping-in-stages, in an effort to combine advantages of
Top down and Bottom Up concepts.

The basic principles are:

 Focus is on risk assessment and on minimizing project risk by breaking a


project into smaller segments and providing more ease-of-change during
the development process, as well as providing the opportunity to evaluate
risks and weigh consideration of project continuation throughout the life
cycle.

 "Each cycle involves a progression through the same sequence of steps,


for each part of the product and for each of its levels of elaboration, from
an overall concept-of-operation document down to the coding of each
individual program."

 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.

 Begin each cycle with an identification of stakeholders and their win


conditions and end each cycle with review and commitment.

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.

• Source: An external agent or an actor that supplies data to the system.

• Activity: Behavior that the system performs when an event occurs.

• Response: An output produced by the system that goes to the destination.

• Destination: An external agent or an actor that receives data from the system.

Description:
• Events are the transactions.

• Events are the cause of transactions.

• Events will generate 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.

• Event table is a convenient way to record about the requirements for


information

Page 25 of 116
HOSPITAL MANAGEMENT SYSTEM

Use Case Diagram


A Use case diagram in the Unified Modeling Language (UML) is a type of
behavioral diagram defined by and created from a Use-case analysis. Its purpose
is to present a graphical overview of the functionality provided by
a system in terms of actors, their goals (represented as use cases), and any
dependencies between those use cases.

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.

When to Use: Use Cases Diagrams


Use cases are used in almost every project. They are helpful in exposing
requirements and planning the project.
During the initial stage of a project most use cases should be defined, but as the
project continues more might
become visible.

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.

An entity relationship diagram is a graphical\cal representation of an


organization’s data storage requirements.

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.

There are three basic elements in ER models:

Entities: Entities are the “things” about which we seek information.

Attributes: Attributes are the data we collect about the entities.

Relationships: Relationships provide the structure needed to draw


information from multiple entities.

Developing an ERD requires an understanding of the system and its


components.
ERD brings out issues:
i) Ambiguities
ii) Entities and their relationships
iii) What data needs to be stored?
iv) The degree of a relationship

Page 28 of 116
HOSPITAL MANAGEMENT SYSTEM

Symbols Symbol Name Meaning

Entity An object that exist and is

distinguishable from all

Other objects.

Weak Entity An entity set with no

sufficient attributes to

form a primary key.

Relationship An association among

Several entities.

Identifying Relationship A relationship associating

weak entity set with

identifying entity set

Attribute A specification that

defines the property of an

Object, element of file.

Primary Key A candidate key that has

A been selected as the

identifier for an entity

Type. Primary key values

May be null. It is also

Called as identifier.

Multi-valued Attribute An attribute that can have


Page 29 of 116
more than one value for

each entity instance.


HOSPITAL MANAGEMENT SYSTEM

Discriminating Attribute A set of attributes that

allows distinguishing

among the entities

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 diagrams describe the state of activities by showing the


sequence of activities performed. Activity diagrams can show activities that are
conditional or parallel.

When to Use: Activity Diagrams

Activity diagrams should be used in conjunction with other modeling


techniques such as interaction diagrams and state diagrams.

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

Below are figures:


The given below is figure for the activity diagram of the system

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

Represented with boxes which contain three parts:

• A class with three sections.

• The upper part holds the name of the class

• The middle part contains the attributes of the class.

•The bottom part gives the methods or operations the class can take or
undertake.

In the system design of a system, a number of classes are identified


and grouped together in a class diagram which helps to determine the statically
relations between those objects. With detailed modeling, the classes of the
conceptual design are often split in a number of subclasses.

In order to further describe the behavior of systems, these class


diagrams can be complemented by state diagram or UML state machine. Also
instead of class diagrams Object role modeling can be used if you just want to
model the classes and their relationships.

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.

It is a construct of a Message Sequence Chart.


Sequence diagrams are sometimes called Event-trace diagrams, event scenarios,
and timing diagrams.

The sequence diagram is used primarily to show the interactions between


objects in the sequential order that those interactions occur.
Much like the class diagram, developers typically think sequence diagrams
were meant exclusively for them.

However, an organization's business staff can find sequence diagrams useful to


communicate how the business currently works by showing how various
business objects interact.

Besides documenting an organization's current affairs, a business-level


sequence diagram can be used as a requirements document to communicate
requirements for a future system implementation.

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.

An organization's technical staff can find sequence diagrams useful in


documenting how a future system should
behave.

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.

This documentation is very useful when transitioning a


system to another person or organization.

Page 36 of 116
HOSPITAL MANAGEMENT SYSTEM

Sequence Diagram

Patient Discharge
Doctor Resgistration Reception Laboratory Pharmacy Summary

login

View appointments

Register

Send request

done any surgeries

Go to Laboratory

Take madicine

send discharge summary

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

List Of Tables with Attributes and constraint


Doctors Registration:
Name NULL / NOTNULL TYPE KEY

Name Null Varchar (20)

Loginid Null Varchar(20)

password Null Varchar(20)

Department Null Varchar(20)

Specialization Null Varchar(20)

Phonenumber Null Bigint

Address Null Varchar(20)

Email Null Varchar(20)

Employee Registration:
Name NULL / NOTNULL TYPE KEY

Name Null Varchar (20)

Loginid Null Varchar(20)

password Null Varchar(20)

Department Null Varchar(20)

Phonenumber Null Bigint

Address Null Varchar(20)

Email Null Varchar(20)

Page 40 of 116
HOSPITAL MANAGEMENT SYSTEM

Inpatient Registration:
Name NULL / NOTNULL TYPE KEY

Patientname Null Varchar (20)

Patientid Not Null Varchar(20) Primary

Gender Null Varchar(20)

Age Null Int

Phoneres Null Bigint

Phonemob Null Bigint

Maritual Null Varchar(20)

Occupation Null Varchar(20)

Admid Null Int

Admdate Null Datetime

Admtime Null Datetime

Status Null Varchar(20)

Symptoms Null Varchar(20)

Department Null Varchar(20)

Wardno Null Int

Bedno Null Int

Doctor Null Varchar(20)

Page 41 of 116
HOSPITAL MANAGEMENT SYSTEM

Out patient registration:


Name NULL / NOTNULL TYPE KEY

Patientname Null Varchar (20)

Patientid Not Null Varchar(20) Primary

Gender Null Varchar(20)

Age Null Int

Address Null Varchar(20)

Assigndoctor Null Varchar(20)

Phoneres Null Bigint

Phonemob Null Bigint

Opdate Null Datetime

Department Null Varchar(20)

For Patient Information:


Name NULL / NOTNULL TYPE KEY

pid Not null Varchar(20) Foreign

Patientname Null Varchar(20)

Age Null Int

Department Null Varchar(20)

Doctor Null Varchar(20)

Page 42 of 116
HOSPITAL MANAGEMENT SYSTEM

For Surgery Information:


Name NULL / NOTNULL TYPE KEY

pid Not null Varchar(20) Foreign

Patientname Null Varchar(20)

Age Null Int

Department Null Varchar(20)

Doctor Null Varchar(20)

Surgerydate Null Datetime

For Blood Test:


Name NULL / NOTNULL TYPE KEY

Patienttype Null Varchar(20)

Patientid Null Varchar(20)

Patientname Null Varchar(20)

Mediclatestype Null Varchar(20)

Bloodgroup Null Varchar(20)

Haemoglobin Null Varchar(20)

Bloodsugar Null Varchar(20)

Sacid Null Varchar(20)

Description Null Varchar(20)

Page 43 of 116
HOSPITAL MANAGEMENT SYSTEM

For Urine Test:


Name NULL / NOTNULL TYPE KEY

Patienttype Null Varchar(20)

Patientid Null Varchar(20)

Patientname Null Varchar(20)

Mediclatestype Null Varchar(20)

Color Null Varchar(20)

Clarity Null Varchar(20)

Odor Null Varchar(20)

Specificgravity Null Varchar(20)

Glucose Null Varchar(20)

Description Null Varchar(20)

For Operation:
Name NULL / NOTNULL TYPE KEY

Patienttype Null Varchar(20)

Patientid Null Varchar(20)

Patientname Null Varchar(20)

Refdoctor Null Varchar(20)

Operationtype Null Varchar(20)

Operatonresult Null Datetime

Page 44 of 116
HOSPITAL MANAGEMENT SYSTEM

For Pharmacy Information:


Name NULL / NOTNULL TYPE KEY

Patienttype Null Varchar(20)

Patientid Null Varchar(20)

Department Null Varchar(20)

Patientname Null Varchar(20)

Medicine Null Varchar(20)

For Discharge Summary:


Name NULL / NOTNULL TYPE KEY

Patientid Null Varchar(20)

Patientname Null Varchar(20)

Joiondate Null Datetime

Dischargedate Null Datetime

Page 45 of 116
HOSPITAL MANAGEMENT SYSTEM

Screen LayoutWith Coding

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";
}
}

protectedvoid Button2_Click(object sender, EventArgs e)


{
Response.Redirect("Administration.aspx");
}
protectedvoid Menu2_MenuItemClick(object sender, MenuEventArgs e)
{
Response.Redirect("Administration.aspx");
}
}

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

Doctor forgot password:

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

Doctor’s Surgery details:

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

Patient test report:

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

Operation theater detail:

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)
{

}
}

protectedvoid pttypeddl_SelectedIndexChanged(object sender, EventArgs e)


{

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

protectedvoid sbtn_Click(object sender, EventArgs e)


{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_operation";
cmd.Connection = cn;

SqlParameter p = newSqlParameter("@patienttype", SqlDbType.VarChar, 20);


p.Value = pttypeddl.Text;
cmd.Parameters.Add(p);

SqlParameter p1 = newSqlParameter("@patientid", SqlDbType.Int);


p1.Value = pidddl.Text;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


p2.Value = pntxt.Text;
cmd.Parameters.Add(p2);

SqlParameter p3 = newSqlParameter("@refdoctor", SqlDbType.VarChar, 20);


p3.Value = doctxt.Text;
cmd.Parameters.Add(p3);

SqlParameter p4 = newSqlParameter("@operationtype", SqlDbType.VarChar, 20);


p4.Value = optddl.Text;
cmd.Parameters.Add(p4);

SqlParameter p5 = newSqlParameter("@operatonresult", SqlDbType.VarChar, 20);


p5.Value = orddl.Text;
cmd.Parameters.Add(p5);

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 mttddl_SelectedIndexChanged(object sender, EventArgs e)


{

}
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")
{

SqlCommand cmd = newSqlCommand();


cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_medicaltest";
cmd.Connection = cn;

SqlParameter p = newSqlParameter("@pid", SqlDbType.Int);

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;

SqlParameter p = newSqlParameter("@pid", SqlDbType.Int);


p.Value = pidddl.SelectedValue.ToString();
cmd.Parameters.Add(p);

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;

SqlParameter p = newSqlParameter("@patienttype", SqlDbType.VarChar, 20);


p.Value = pttypeddl.Text;
cmd.Parameters.Add(p);

SqlParameter p1 = newSqlParameter("@patientid", SqlDbType.Int);


p1.Value = pidddl.Text;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


p2.Value = pntxt.Text;
cmd.Parameters.Add(p2);

SqlParameter p3 = newSqlParameter("@mediclatestype", SqlDbType.VarChar, 20);


p3.Value = mttddl.Text;
cmd.Parameters.Add(p3);

SqlParameter p4 = newSqlParameter("@bloodgroup", SqlDbType.VarChar, 20);


p4.Value = bgtxt.Text;
cmd.Parameters.Add(p4);

SqlParameter p5 = newSqlParameter("@haemoglobin", SqlDbType.VarChar,20);


p5.Value = hmtxt.Text;
cmd.Parameters.Add(p5);

SqlParameter p6 = newSqlParameter("@bloodsugar", SqlDbType.VarChar,20);


p6.Value = bstxt.Text;
cmd.Parameters.Add(p6);

SqlParameter p7 = newSqlParameter("@sacid", SqlDbType.VarChar,20);


p7.Value = suatxt.Text;
cmd.Parameters.Add(p7);

SqlParameter p8 = newSqlParameter("@description", SqlDbType.VarChar,20);


p8.Value = rd1txt.Text;
cmd.Parameters.Add(p8);

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;

SqlParameter p = newSqlParameter("@patienttype", SqlDbType.VarChar, 20);


p.Value = pttypeddl.Text;
cmd.Parameters.Add(p);

SqlParameter p1 = newSqlParameter("@patientid", SqlDbType.Int);


p1.Value = pidddl.Text;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


p2.Value = pntxt.Text;
cmd.Parameters.Add(p2);

SqlParameter p3 = newSqlParameter("@mediclatestype", SqlDbType.VarChar, 20);


p3.Value = mttddl.Text;
cmd.Parameters.Add(p3);

SqlParameter p4 = newSqlParameter("@color", SqlDbType.VarChar, 20);


p4.Value = colortxt.Text;
cmd.Parameters.Add(p4);

SqlParameter p5 = newSqlParameter("@clarity", SqlDbType.VarChar,20);


p5.Value = clartxt.Text;
cmd.Parameters.Add(p5);

SqlParameter p6 = newSqlParameter("@odor", SqlDbType.VarChar,20);


p6.Value = odtxt.Text;
cmd.Parameters.Add(p6);

SqlParameter p7 = newSqlParameter("@specificgravity", SqlDbType.VarChar,20);


p7.Value = sgtxt.Text;
cmd.Parameters.Add(p7);

SqlParameter p8 = newSqlParameter("@glucose", SqlDbType.VarChar,20);


p8.Value = gltxt.Text;
cmd.Parameters.Add(p8);

SqlParameter p9 = newSqlParameter("@description", SqlDbType.VarChar,40);


p9.Value = rd2txt.Text;
cmd.Parameters.Add(p9);

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")
{

string qry = "select patientid from hospital_inpatient";


//qry = qry + " union all select '...select...' order by 1";
SqlDataAdapter da = newSqlDataAdapter(qry, cn);
DataSet ds = newDataSet();
da.Fill(ds, "hospital_inpatient");
ptntid.DataSource = ds;

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

SqlParameter p1 = newSqlParameter("@gender", SqlDbType.VarChar, 20);


p1.Value = DropDownList1.Text;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@age", SqlDbType.Int);


p2.Value = TextBox3.Text;
cmd.Parameters.Add(p2);

SqlParameter p3 = newSqlParameter("@address", SqlDbType.VarChar, 20);


p3.Value = TextBox4.Text;
cmd.Parameters.Add(p3);

SqlParameter p4 = newSqlParameter("@phoneres", SqlDbType.BigInt);


p4.Value = TextBox5.Text;
cmd.Parameters.Add(p4);

SqlParameter p5 = newSqlParameter("@phonemob", SqlDbType.BigInt);


p5.Value = TextBox6.Text;
cmd.Parameters.Add(p5);

SqlParameter p6 = newSqlParameter("@maritual", SqlDbType.VarChar, 20);


p6.Value = DropDownList2.Text;
cmd.Parameters.Add(p6);

SqlParameter p7 = newSqlParameter("@occupation", SqlDbType.VarChar, 20);


p7.Value = TextBox7.Text;
cmd.Parameters.Add(p7);

SqlParameter p8 = newSqlParameter("@admid", SqlDbType.Int);


p8.Value = TextBox8.Text;
cmd.Parameters.Add(p8);

SqlParameter p9 = newSqlParameter("@admdate", SqlDbType.DateTime);


p9.Value = TextBox9.Text;
cmd.Parameters.Add(p9);

SqlParameter p10 = newSqlParameter("@admtime", SqlDbType.DateTime);


p10.Value = TextBox10.Text;
cmd.Parameters.Add(p10);

SqlParameter p11 = newSqlParameter("@status", SqlDbType.VarChar, 20);


p11.Value = DropDownList4.Text;
cmd.Parameters.Add(p11);

SqlParameter p12 = newSqlParameter("@symtoms", SqlDbType.VarChar, 20);


p12.Value = TextBox12.Text;
cmd.Parameters.Add(p12);

SqlParameter p13 = newSqlParameter("@department", SqlDbType.VarChar, 20);


p13.Value = DropDownList3.Text;
cmd.Parameters.Add(p13);

SqlParameter p14 = newSqlParameter("@wardno", SqlDbType.Int);


p14.Value = TextBox14.Text;
cmd.Parameters.Add(p14);

Page 91 of 116
HOSPITAL MANAGEMENT SYSTEM

SqlParameter p15 = newSqlParameter("@bedno", SqlDbType.Int);


p15.Value = TextBox15.Text;
cmd.Parameters.Add(p15);

SqlParameter p16 = newSqlParameter("@doctor", SqlDbType.VarChar,20);


p16.Value = DropDownList5.Text;
cmd.Parameters.Add(p16);

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;

pid = Convert.ToInt32(newSqlCommand("select patientid from hospital_outpatient order


by 1 desc", cn).ExecuteScalar().ToString()) + 1;

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

SqlParameter p1 = newSqlParameter("@gender", SqlDbType.VarChar, 20);


p1.Value = gddl.Text;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@age", SqlDbType.Int);


p2.Value = agetxt.Text;
cmd.Parameters.Add(p2);

SqlParameter p3 = newSqlParameter("@address", SqlDbType.VarChar, 20);


p3.Value = addtxt.Text;
cmd.Parameters.Add(p3);

SqlParameter p4 = newSqlParameter("@assigndoctor", SqlDbType.VarChar, 20);


p4.Value = DropDownList5.Text;
cmd.Parameters.Add(p4);

SqlParameter p5 = newSqlParameter("@phoneres", SqlDbType.BigInt);


p5.Value = restxt.Text;
cmd.Parameters.Add(p5);

SqlParameter p6 = newSqlParameter("@phonemob", SqlDbType.BigInt);


p6.Value = mobtxt.Text;
cmd.Parameters.Add(p6);

SqlParameter p7 = newSqlParameter("@opdate", SqlDbType.DateTime);


p7.Value = optxt.Text;
cmd.Parameters.Add(p7);

SqlParameter p8 = newSqlParameter("@department", SqlDbType.VarChar,20);


p8.Value = depddl.Text;
cmd.Parameters.Add(p8);

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:

Page 100 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;

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

protectedvoid pidddl_SelectedIndexChanged(object sender, EventArgs e)


{
cn.Open();
SqlCommand cmd = newSqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_hospital_patientinfo";
cmd.Connection = cn;

SqlParameter p = newSqlParameter("@pid", SqlDbType.Int);


p.Value = pidddl.Text;
cmd.Parameters.Add(p);

SqlParameter p1 = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


p1.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@age", SqlDbType.Int);


p2.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p2);

Page 101 of 116


HOSPITAL MANAGEMENT SYSTEM

SqlParameter p3 = newSqlParameter("@department", SqlDbType.VarChar, 20);


p3.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p3);

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;

SqlParameter pd = newSqlParameter("@pid", SqlDbType.VarChar, 20);


pd.Value = pidddl.SelectedItem.Text;
cmd.Parameters.Add(pd);

SqlParameter pname = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


pname.Value = pntxt.Text;
cmd.Parameters.Add(pname);

SqlParameter age = newSqlParameter("@age", SqlDbType.Int);


age.Value = agtxt.Text;
cmd.Parameters.Add(age);

SqlParameter dep = newSqlParameter("@department", SqlDbType.VarChar, 20);


dep.Value = deptxt.Text;
cmd.Parameters.Add(dep);

SqlParameter doct = newSqlParameter("@doctor", SqlDbType.VarChar, 20);


doct.Value = doctxt.Text;
cmd.Parameters.Add(doct);

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)
{

} }

Page 102 of 116


HOSPITAL MANAGEMENT SYSTEM

Surgery information:

Page 103 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;

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;

SqlParameter p = newSqlParameter("@pid", SqlDbType.Int);


p.Value = pidddl.Text;
cmd.Parameters.Add(p);

SqlParameter p1 = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


p1.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p1);

SqlParameter p2 = newSqlParameter("@age", SqlDbType.Int);


p2.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p2);

Page 104 of 116


HOSPITAL MANAGEMENT SYSTEM

SqlParameter p3 = newSqlParameter("@department", SqlDbType.VarChar, 20);


p3.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p3);

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;

SqlParameter pd = newSqlParameter("@pid", SqlDbType.VarChar, 20);


pd.Value = pidddl.SelectedItem.Text;
cmd.Parameters.Add(pd);

SqlParameter pname = newSqlParameter("@patientname", SqlDbType.VarChar, 20);


pname.Value = pntxt.Text;
cmd.Parameters.Add(pname);

SqlParameter age = newSqlParameter("@age", SqlDbType.Int);


age.Value = agtxt.Text;
cmd.Parameters.Add(age);

SqlParameter dep = newSqlParameter("@department", SqlDbType.VarChar, 20);


dep.Value = deptxt.Text;
cmd.Parameters.Add(dep);

SqlParameter doct = newSqlParameter("@doctor", SqlDbType.VarChar, 20);


doct.Value = doctxt.Text;
cmd.Parameters.Add(doct);

SqlParameter sdate = newSqlParameter("@surgerydate", SqlDbType.DateTime);


sdate.Value = sdtxt.Text;
cmd.Parameters.Add(sdate);

cmd.ExecuteNonQuery();
cn.Close();

Response.Redirect("receptionhome.aspx");
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
Response.Redirect("receptionhome.aspx");
}
}

Page 105 of 116


HOSPITAL MANAGEMENT SYSTEM

Contact us:

Page 106 of 116


HOSPITAL MANAGEMENT SYSTEM

System Implementation

Page 107 of 116


HOSPITAL MANAGEMENT SYSTEM

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.

Adaptation of software to a new environment may involve moving


the software to a different machine. Problem correction involves modification
and revalidation of software to correct errors. The four types of maintenance
activities are described below:

 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.

Corrective maintenance is the most commonly used maintenance approach, but


it is easy to see its limitations. When equipment fails, it often leads to downtime
in production, and sometime it causes spreading of damage to other parts. In
most cases this is costly business. Also, if the equipment needs to be replaced,
the cost of replacing it alone can be substantial.

Page 108 of 116


HOSPITAL MANAGEMENT SYSTEM

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.

Page 109 of 116


HOSPITAL MANAGEMENT SYSTEM

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.

System Testing is an important phase. Testing represents an interesting anomaly


for the software. Thus a series of testing are performed for the proposed system
before the system is ready for user acceptance testing.

A good test case is one that has a high probability of finding an as


undiscovered error. A successful test is one that uncovers an as undiscovered
error.

Testing Objectives:

1. Testing is a process of executing a program with the intent of finding an


error
2. A good test case is one that has a probability of finding an as yet
undiscovered error
3. A successful test is one that uncovers an undiscovered error

Testing Principles:

 All tests should be traceable to end user requirements


 Tests should be planned long before testing begins
 Testing should begin on a small scale and progress towards
testing in large
 Exhaustive testing is not possible
 To be most effective testing should be conducted by a
independent third party

Page 110 of 116


HOSPITAL MANAGEMENT SYSTEM

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.

 Black box testing.

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:

Black box testing is designed to validate functional requirements without regard


to the internal workings of a program. Black box testing mainly focuses on the
information domain of the software, deriving test cases by partitioning input and
output in a manner that provides through test coverage. Incorrect and missing
functions, interface errors, errors in data structures, error in functional logic are
the errors falling in this category.

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

Testing is a process of executing program with the intent of finding error.


A good test case is one that has high probability of finding an undiscovered
error. If testing is conducted successfully it uncovers the errors in the software.
Testing cannot show the absence of defects, it can only show that software
defects present.

Testing Information flow:

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.

Page 112 of 116


HOSPITAL MANAGEMENT SYSTEM

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.

Tools to special importance during acceptance testing include:

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.

Page 113 of 116


HOSPITAL MANAGEMENT SYSTEM

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

 Guarantee that logical decisions on their true and false sides.


 Exercise all logical decisions on their true and false sides.
 Execute all loops at their boundaries and with in their operational bounds.
 Exercise internal data structure to assure their validity.
The test case specification for system testing has to be submitted for review
before system testing commences.

Page 114 of 116


HOSPITAL MANAGEMENT SYSTEM

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.

Connecting it to any type of database extends the development control. Any


suggestions for future development of the system are welcome.

Upgrading the system can be done without affecting the proper


functioning of system.

Page 115 of 116


HOSPITAL MANAGEMENT SYSTEM

BIBLIOGRAPHY:

For Database:
i) System Analysis and Design –By Satzinger

ii) Software Engineering—By McGraw Hill 7th Edition

For ASP.NET:

www.google.com

http://www.zedge.net/phone-index

www.w3schools.com

Page 116 of 116

Potrebbero piacerti anche