Hospital

You might also like

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

HOSPITAL MANAGEMENT SYSTEM

A PROJECT REPORT
Submitted in Partial Fulfillment of the requirements for the
Award of the Degree of

BACHELOR
IN
COMPUTER APPLICATION
SUBMITED BY
DIBYARANJAN PRUSTY
Exam Roll No: 9021B022
College Roll No: 21BCA-023
Under the Esteemed Guidance of
Smt. Rashmi Rekha Das
Faculty, Department of BCA

DEPARTMENT OF BACHELOR IN COMPUTER APPLICATION


BHADRAK AUTONOMOUS COLLEGE, BHADRAK
(An Autonomous Institution)
2021-2024

BHADRAK AUTONOMOUS COLLEGE, BHADRAK


(An Autonomous Institution)
BHADRAK, ODISHA

1
DEPARTMENT OF BACHELOR IN COMPUTER APPLICATION

CERTIFICATE

This is to certify that the dissertation entitled “ Hospital Management System ” is


submitted by in their partial fulfillment of the requirement of the award of the bachelor
degree, Fakir Mohan University, Balasore is a record of bonafide work carried out by
them under my guidance and supervision. The result embodied in this thesis has not been
submitted to any other university or institution for the award of any degree or diploma.

INTERNAL GUIDE: HEAD OF DEPARTMENT:


Smt. Rashmi Rekha Das Padmanava Patri
Faculty Head of Department
Bhadrak Autonomous College, Bhadrak Department of BCA

2
ACKNOWLEDGEMENT

It is indeed with a great pleasure and immense sense of gratitude that we


acknowledge the help of these individuals. We are highly indebted to our Principal
Dr.Durga Sankar Das, Bhadrak Autonomous College, Bhadrak for the facilities
provided to accomplish this main project.
We would like to thank our Sri Padmanava Patri, Head of the Department of
Information Technology and Management, Bhadrak Autonomous College, Bhadrak for
this constructive criticism throughout our project.

We feel elated in manifesting our sense of gratitude to our internal project


guide Smt. Rashmi Rekha Das, Faculty, Department of BCA, Bhadrak Autonomous
College. He has been a constant source of inspiration for us and we are very deeply
thankful to him for his support and valuable advice.

We extremely grateful to our Departmental staff members, Lab technicians and Non-
teaching staff members for their extreme help throughout our project.

Finally we express our heartful thanks to all of our friends who helped us in successful
completion of this project.

Project Associates

DIBYARANJAN PRUSTY

(9021B022)

3
DECLARATION

We hereby declare that project titled “Hospital Management System ” is a bonafide


original record done by us at Bhadrak Autonomous College, Bhadrak affiliated to FM
University,Balasore towards the partial fulfillment of requirement for the award of degree
of Bachelor in Computer Application during the period of 2021-2024 in Bhadrak
Autonomous College, Bhadrak and also we state that this project has not been submitted
anywhere in the partial fulfillment for any degree of this or any other University.

Place:-Bhadrak Signature of the student


Date:-

4
HOSPITAL
MANAGEMENT
SYSTEM

SUBMITTED BY: DIBYARANJAN PRUSTY

5
TABLE OF CONTENT

1. Preface
2. System Study
2.1. Introduction
2.2. Feasibility Study
2.3. System Overview

3. System Analysis
3.1. Importance of Computerized
HOSPITAL System
3.2. About the Project
3.3. Functional Requirements

4. System Design
4.1. System Development Cycle
4.2. Context Level DFD
4.3. DFD for HOSPITAL Management
System
4.4. Search Process

6
5. Data Dictionary
5.1. Physical Design
5.2. Source Code

6. Testing
6.1. Testing Phases
6.2. Verification & Validation
6.3. Reports

7. System Implementation

8. Post Implementation Maintenance and Review

9. User’s Manual
7.1. Operational instruction for the User
7.2. Introduction to various operations

10. Bibliography

7
OBJECTIVE
During the past several decades personnel function has been
transformed from a relatively obscure record keeping staff to
central and top level management function. There are many factors
that have influenced this transformation like technological
advances, professionalism, and general recognition of human
beings as most important resources.
A computer based management system is designed to handle all
the primary information required to calculate monthly statements
of customer account which include monthly statement of any
month. Separate database is maintained to handle all the details
required for the correct statement calculation and generation.
This project intends to introduce more user friendliness in the
various activities such as record updation, maintenance, and
searching. The searching of record has been made quite simple as
all the details of the customer can be obtained by simply keying in
the identification or account number of that customer. Similarly,
record maintenance and updation can also be accomplished by
using the account number with all the details being automatically
generated. These details are also being promptly automatically
updated in the master file thus keeping the record absolutely up-to-
date.
The entire information has maintained in the database or Files and
whoever wants to retrieve can’t retrieve, only authorization user
can retrieve the necessary information which can be easily be
accessible from the file.
The main objective of the entire activity is to automate the process
of day to day activities of Hospital like Room activities, Admission
of a New Patient, Assign a Doctor according to the patient’s
disease, Discharge of a Patient and releasing the bed entry and
finally compute the bill etc.

8
DEFINITION OF PROBLEM

1.1 INTRODUCTION TO THE PROBLEM:

This is a Project work undertaken in context of the partial


fulfillment of the Bachelor in Computer Application( BCA)of
Bhadrak Auto. College, Bhadrak. Since HOSPITAL is associated
with the lives of common people and their day-to-day routines so I
decided to work on this project.

The manual handling of the record is time consuming and highly


prone to error. The purpose of this project is to automate the
process of day-to-day activities like Room activities, Admission of
New Patient, Discharge of Patient, Assign a Doctor, and finally
compute the bill etc.

I found two main key-points to design and programmed my project


using TURBO C++ and its FILES facility as database storage.
First, Because TURBO C++ compiler has the ability to debug the
project at run time and gives appropriate error messages if it found
in the project at run time. Its help is too enough to learn and study
any function of a particular header file using the keyboard Keys
(Ctrl + F1) to keep the cursor on that particular function. Second.
I have tried my best to make the complicated process of
HOSPITAL MANAGEMENT System as simple as possible using
Structured & Modular technique & Menu oriented interface. I have
tried to design the software in such a way that user may not have
any difficulty in using this package & further expansion is possible
without much effort. Even though I cannot claim that this work to
be entirely exhaustive, the main purpose of my exercise is perform
each Hospital’s activity in computerized way rather than manually
which is time consuming.

9
I am confident that this software package can be readily used by
non-programming personal avoiding human handled chance of
error.

1.2 NEED:

I have designed the given proposed system in the C++ to automate


the process of day to day activities of Hospital like Room
activities, Admission of New Patient, Discharge of Patient, Assign
a Doctor, and finally compute the bill etc.

The complete set of rules & procedures related to Hospital’s day to


day activities and generating report is called “HOSPITAL
MANAGEMENT SYSTEM”. My project gives a brief idea
regarding automated Hospital activities.

The following steps that gives the detailed information of the need
of proposed system are:

Performance: During past several decades, the hospital


management system is supposed to maintain manual handling of
all the hospital daily activities. The manual handling of the record
is time consuming and highly prone to error. To improve the
performance of the hospital management system, the computerized
hospital management system is to be undertaken. The
computerized hospital project is fully computerized and user
friendly even that any of the hospital’s members can see the
patient’s report and the doctor’s report.

Efficiency: The basic need of the project is efficiency. The


project should be efficient so that whenever a new patient is
admitted, and automatically a bed is assigned and also a doctor is
assigned to the patient according to the patient’s disease. And if

10
any patient is getting discharged, the bed assigned to him/her
should automatically freed in the computer.

Control: The complete control of the project is under the hands


of authorized person who has the password to access this project
and illegal access is not supposed to deal with. All the control is
under the administrator and the other members have the rights to
just see the records not to change any transaction or entry.

Security: Security is the main criteria for the proposed system.


Since illegal access may corrupt the database and it will affect not
only the hospital but also it also affects the patient’s life. So
security has to be given in this project.

Software: Software includes the platform where the hospital


management project is being prepared. I have done my project
using DOS based Compiler TURBO C++ platform and the
database is the FILE HANDLING MECHANISM OF TURBO
C++. But it is not necessary that we have to first install Turbo C++
to run this project.

11
12
FEASIBILITY STUDY
The feasibility study proposes one or more conceptual solution to
the problem set of the project. In fact, it is an evaluation of whether
it is worthwhile to proceed with project or not.

Feasibility analysis usually considers a number of project


alternatives, one that is chosen as the most satisfactory solution.
These alternatives also need to be evaluated in a broad way
without committing too many resources. Various steps involved in
feasibility analysis are:

1. To propose a set of solution that can realize the project goal.


These solutions are usually descriptions of what the new system
should look like.

2. Evaluation of feasibility of such solutions. Such evaluation


often indicates shortcomings in the initial goals. This step is
repeated as the goals are adjusted and the alternative solutions
are evaluated.

Four primary areas of interest in feasibility study are:

Economic Feasibility: An evaluation of development cost


weighed against the ultimate income of benefit derived from the
development system of product. In economic feasibility, cost
benefit analysis is done in which expected cost and benefits are
evaluated.

13
COST AND BENEFIT ANALYSIS
Developing an IT application is an investment. Since after
developing that application it provides the organization with
profits. Profits can be monetary or in the form of an improved
working environment. However, it carries risks, because in some
cases an estimate can be wrong. And the project might not actually
turn out to be beneficial.

Cost benefit analysis helps to give management a picture of the


cost, benefits and risks. It usually involves comparing alternate
investments.

Cost benefit determines the benefits and savings that are expected
from the system and compares them with the expected costs.

In performing cost and benefit analysis it is important to identify


cost and benefits factors. Cost and benefits can be categorized into
the following categories:

1. Development Costs – Development costs is the costs that are


incurred during the development of the system. It is one time
investment.
2. Operating Costs – Operating Costs are the expenses required
for the day to day running of the system. Examples of Operating
Costs are Wages, Supplies and Overheads.
3. Hardware/Software Costs – It includes the cost of
purchasing or leasing of computers and it’s peripherals.
Software costs involves required S/W costs.
4. Personnel Costs – It is the money spent on the people
involved in the development of the system.

14
5. Facility Costs – Expenses that are incurred during the
preparation of the physical site where the system will be
operational. These can be wiring, flooring, acoustics, lightning,
and air-conditioning.
6. Supply Costs – These are variable costs that are very
proportionately with the amount of use of paper, ribbons, disks,
and the like.

 BENEFITS

We can define benefits as

Profit or Benefit = Income – Costs

Benefits can be accrued by:

 Increasing income, or
 Decreasing costs, or
 Both

Technical Feasibility:

Technical Feasibility includes existing and new H/W and S/W


requirements that are required to operate the project on the
platform Turbo C++. The basic S/W requirement is TURBO C++
in which the front end of the hospital management project has been
done. The basic entry forms are developed in TURBO C++ and the
data is stored in the FILES.

Operational Feasibility:

Operational feasibility is mainly concerned with issues like


whether the system will be used if it is developed and

15
implemented. Whether there will be resistance from users that will
effect the possible application benefits? The essential questions
that help in testing the technical feasibility of a system are
following:

 Does management support the project?


 Are the users not happy with current business practices? Will it
reduce the time considerably? If yes, then they will welcome the
change and the new system.
 Have the users involved in the planning and development of the
project? Early involvement reduced the probability of resistance
towards the new system.
 Will the proposed system really benefit the organization? Does
the overall response increase? Will accessibility of information
be lost? Will the system effect the customers in considerable
way?

Legal Feasibility:

A determination of any infringement, violation, or liability that


could result from development of the system. Legal feasibility tells
that the software used in the project should be original purchased
from the legal authorities and they have the license to use it or the
software are pirated.

Alternatives:

An evaluation of alternative approaches to the development of


system or product.

16
SYSTEM OVERVIEW
The limited time and resources have restricted us to incorporate, in
this project, only a main activities that are performed in a
HOSPITAL Management System, but utmost care has been taken
to make the system efficient and user friendly. “HOSPITAL
Management System” has been designed to computerized the
following functions that are performed by the system:

1. Room/Beds Detail Functions

a) Opening a New Room/Bed


b) Modification to bed assigned

2. Admission/Discharge Detail Functions

a) Admission of New Patient


b) Discharge of Patient
c) Doctor Assigning related to Patient’s Disease

3. Report/Details Functions

a) Statement of Patient Details


a.1) Admitted Patient
a.2) Discharged Patient
a.3) Doctor Details
b) Total number of Patients admitted in the Hospital
c) Individual Patient Report

17
18
IMPORTANCE OF COMPUTERIZED
HOSPITAL MANAGEMENT SYSTEM

There are several attributes in which the computer based


information works. Broadly the working of computer system is
divided into two main groups:
 Transaction System
 Decision Support System
Transaction System:

A transaction is a record of some well-defined single and


usually small occurrence in a system. Transactions are input
into the computer to update the database files. It checks the
entering data for its accuracy. This means that numeric data
appears in numeric field and character data in character field.
Once all the checks are made, transaction is used to update the
database. Transaction can be inputted in on-line mode or batch
mode. In on-line mode, transactions are entered and updated
into the database almost instantaneously. In batch mode,
transactions are collected into batches, which may be held for a
while and inputted later.
Decision Support System:
It assists the user to make analytical decision. It shows the
various data in organized way called analysis. This analysis can
be made to syrdy preferences and help in making decisions.
Computer system works out best with record maintenance. It
will tell you which customer would get how much
pending/reports statements. It will also help to search the
information about a particular person by simply entering his
telephone number.

19
PROJECT TECHNICAL DETAILS
The basic objective of HOSPITAL MANAGEMENT
SYSTEM is to generalize and simplify the monthly or day to
day activities of Hospital like Admission of New Patient,
Discharge of Patient, Doctor Assigning related to particular
disease of patient, Reports of Number of Patients and
Discharged Patients etc. which has to be performed repeatedly
on regular basis. To provide efficient, fast, reliable and user-
friendly system is the basic motto behind this exercise.

Let us now discuss how different functions handle the structure


and data files:

1. Function NEW_ROOM()

This is the function used to open a new room for a patient so


that he/she can assign a separate room and a bed. In that
screen, the automatic room number and bed number is
created. After opening a new room for the patient, finally a
bed is assigned to a patient and the room/bed records are
appended in the data file.

2. Function ADMISSION_PATIENT()

This function is used to admit a patient in our Hospital after


entering his all personal details like Name, Address, Phone,
Sex including his/her Disease and then he/she is assigned a
bed from NEW_ROOM() function and a doctor is assigned to
him/her related to his/her disease.

20
3. Function DISCHARGE_PATIENT()

This function is used to discharge the patient details from


database. When the user inputs his bed number, the same
account number will be checked in the database, if the bed
number is matched in the database, then the patient will be
discharged from the database and transferred the record of
the discharged patient to another table of database so that the
Hospital Management has the record of discharged patients
to fulfill his legal liabilities.

4. Function GENERATE_BILL()

When any patient is going to be discharged, his/her bill is


generated automatically by calculated discharge date minus
admission date and getting multiplied it by daily room charge
plus doctor consultation fees and the bill has to be saved in
the table of discharged patients in the database.

5. Function DISPLAY_RECORD()

This function is used to display all the transaction including


the patient name, address, phone, bed number, and doctor
assigned to him/her in the screen. This is a global report to
display all the transaction records in the screen.

21
E-R- DIAGRAM

Hospital Patients

Room information Admit

Room

Doctor record
Hospital Doctor

Patient Discharge
Room

Bill generation
Hospital
22
SYSTEM DEVELOPMENT LIFE CYCLE
User Revised Requirement
Requirement Specification

Requirement Initial Requirement


Feasibility
Determination Investigation
Analysis
Decision to
Design Information
System

Feasibility
Test Plan Study
.

Logical System Design Functional Spec.


System
Specification
System Design Analysis
System Implementation

Physical
Requirement
System Configuration
Data
Schedule Budget
System Evaluation Hardware Study

System Modification Improved System


Maintenance

23
CONTEXT LEVEL DFD
HOSPITAL MANAGEMENT SYSTEM

ROOM PATIENT

HOSPITAL
MANAGEMENT
SYSTEM

DISCHARGE PRINT
PATIENT DEVICE

24
ADD DOCTOR

Do you want to add Doctors (y/n) y

Name : SANDEEP SHARMA

S.No. Name

1 SANDEEP SHARMA

Doctor Name Added


Press any key to continue...

The above screen asks for doctor information. If we enter y then


the doctor name is added to the end of the file.

25
ADMISSION OF PATIENT

Date: 25/11/2002 Room no.: 1


Bed no. : 1
Name : JASWINDER
Address : VIKAS PURI
Phone : 5165406
Age : 24
Sex : M
Disease : CANCER

Doctor Assigned : Dr.SANDEEP SHARMA

Do you want to save (y/n)

The form accepts the information of the patient including his


name, address, phone, sex and disease etc. and also assign him/her
a doctor with a unique bed no.

26
ROOM STATUS

ROOM STATUS

Room no. Bed no. Status Room no. Bed no. Status
1 1 N 1 2 A

Press any key to continue...

ROOM STATUS

Total room : 1
Total occupied beds : 1
Total available beds : 1

The above two screen displays the room number and two bed
numbers and states the availability or non-availability of bed. And
in the last form it shows the total number of rooms, total number of
beds and total available beds.

27
PATIENT LIST

LIST OF PATIENTS

ROOM NO. BED NO. PATIENT'S NAME

1 1 JASWINDER

Press any key to continue...

PATIENT RECORD

Room no. : 1

Bed no. : 1

ENTER BED NO. OF THE PATIENT or <ENTER> FOR HELP

PATIENT RECORD Disease: CANCER

Date of Admit: 25/11/2002


Name: JASWINDER Room no.: 1
Address: VIKAS PURI Bed no.: 1
Phone: 5165406
Age: 24
Sex: M

28
Doctor Assigned: Dr.SANDEEP
Press any key to continue...

29
System Design
The design document that we will develop during this phase is the
blueprint of the software. It describes how the solution to the
customer problem is to be built. Since solution to complex
problems isn’t usually found in the first try, iterations are most
likely required. This is true for software design as well. For this
reason, any design strategy, design method, or design language
must be flexible and must easily accommodate changes due to
iterations in the design . Any technique or design needs to support
and guide the partitioning process in such a way that the resulting
sub-problems are as independent as possible from each other and
can be combined easily for the solution to the overall problem.
Sub-problem independence and easy combination of their solutions
reduces the complexity of the problem. This is the objective of the
partitioning process. Partitioning or decomposition during design
involves three types of decisions: -
Define the boundaries along which to break;
Determine into how money pieces to break; and
Identify the proper level of detail when design should stop and
implementation should start.
Basic design principles that enable the software engineer to
navigate the design process suggest a set of principles for software
design, which have been adapted and extended in the following
list:
Free from the suffer from "tunnel vision." A good designer should
consider alternative approaches, judging each based on the
requirements of the problem, the resources available to do the job.
The design should be traceable to the analysis model. Because a
single element of the design model often traces to multiple
requirements, it is necessary to have a means for tracking how
requirements have been satisfied by the design model.

30
The design should not repeat the same thing. Systems are
constructed using a set of design patterns, many of which have
likely been encountered before. These patterns should always be
chosen as an alternative to reinvention. Time is short and resources
are limited! Design time should be invested in representing truly
new ideas and integrating those patterns that already exist.
The design should "minimize the intellectual distance" between the
software and the problem as it exists in the real world. That is, the
structure of the software design should (whenever possible) mimic
the structure of the problem domain.
The design should exhibit uniformity and integration. A design is
uniform if it appears that one person developed the entire thing.
Rules of style and format should be defined for a design team
before design work begins. A design is integrated if care is taken in
defining interfaces between design components.
The design activity begins when the requirements document for the
software to be developed is available. This may be the SRS for the
complete system, as is the case if the waterfall model is being
followed or the requirements for the next "iteration" if the iterative
enhancement is being followed or the requirements for the
prototype if the prototyping is being followed. While the
requirements specification activity is entirely in the problem
domain, design is the first step in moving from the problem
domain toward the solution domain. Design is essentially the
bridge between requirements specification and the final solution
for satisfying the requirements.
The design of a system is essentially a blueprint or a plan for a
solution for the system. We consider a system to be a set of
components with clearly defined behavior that interacts with each
other in a fixed defined manner to produce some behavior or
services for its environment. A component of a system can be
considered a system, with its own components. In a software
system, a component is a software module.

31
The design process for software systems, often, has two levels. At
the first level, the focus is on deciding which modules are needed
for the system, the specifications of these modules, and how the
modules should be interconnected. This is what is called the
system design or top-level design. In the second level, the internal
design of the modules, or how the specifications of the module can
be satisfied, is decided. This design level is often called detailed
design or logic design. Detailed design essentially expands the
system design to contain a more detailed description of the
processing logic and data structures so that the design is
sufficiently complete for coding.
Because the detailed design is an extension of system design, the
system design controls the major structural characteristics of the
system. The system design has a major impact on the testability
and modifiability of a system, and it impacts its efficiency. Much
of the design effort for designing software is spent creating the
system design.
The input to the design phase is the specifications for the system to
be designed. Hence, a reasonable entry criteria can be that the
specifications are stable and have been approved, hoping that the
approval mechanism will ensure that the specifications are
complete, consistent, unambiguous, etc. The output of the top-level
design phase is the architectural design or the system design for the
software system to be built. This can be produced with or without
using a design methodology. A reasonable exit criteria for the
phase could be that the design has been verified against the input
specifications and has been evaluated and approved for quality.
A design can be object-oriented or function-oriented. In function-
oriented design, the design consists of module definitions, with
each module supporting a functional abstraction. In object-oriented
design, the modules in the design represent data abstraction (these
abstractions are discussed in more detail later). In the function-
oriented methods for design and describe one particular
methodology the structured design methodology in some detail. In

32
a function- oriented design approach, a system is viewed as a
transformation function, transforming the inputs to the desired
outputs. The purpose of the design phase is to specify the
components for this transformation function, so that each
component is also a transformation function. Hence, the basic
output of the system design phase, when a function oriented design
approach is being followed, is the definition of all the major data
structures in the system, all the major modules of the system, and
how the modules interact with each other.
Once the designer is satisfied with the design he has
produced, the design is to be precisely specified in the form of a
document. To specify the design, specification languages are used.
Producing the design specification is the ultimate objective of the
design phase. The purpose of this design document is quite
different from that of the design notation. Whereas a design
represented using the design notation is largely to be used by the
designer, a design specification has to be so precise and complete
that it can be used as a basis of further development by other
programmers. Generally, design specification uses textual
structures, with design notation helping in understanding.
SCHEDULING

Scheduling of a software project does not differ greatly from


scheduling of any multi- task engineering effort. Therefore,
generalized project scheduling tools and techniques can be applied
with little modification to software projects.
Program evaluation and review technique (PERT) and critical path
method (CPM) are two project scheduling methods that can be
applied to software development. Both techniques are driven by
information already developed in earlier project planning activities.

Estimates of Effort
 A decomposition of the product function.

33
 The selection of the appropriate process model and task set.
 Decomposition of tasks.
Interdependencies among tasks may be defined using a task
network. Tasks, sometimes called the project Work Breakdown
Structure (WBS) are defined for the product as a whole or for
individual functions.
Both PERT and CPM provide quantitative tools that allow the
software planner to (1) determine the critical path-the chain of
tasks that determines the duration of the project; (2) establish
"most likely" time estimates for individual tasks by applying
statistical models; and (3) calculate "boundary times" that define a
time window" for a particular task.
Boundary time calculations can be very useful in software project
scheduling. Slippage in the design of one function, for example,
can retard further development of other functions. It describes
important boundary times that may be discerned from a PERT or
CPM network: (I) the earliest time that a task can begin when
preceding tasks are completed in the shortest possible time, (2) the
latest time for task initiation before the minimum project
completion time is delayed, (3) the earliest finish-the sum of the
earliest start and the task duration, (4) the latest finish- the latest
start time added to task duration, and (5) the total float-the amount
of surplus time or leeway allowed in scheduling tasks so that the
network critical path maintained on schedule. Boundary time
calculations lead to a determination of critical path and provide the
manager with a quantitative method for evaluating progress as
tasks are completed.
Both PERT and CPM have been implemented in a wide variety of
automated tools that are available for the personal computer. Such
tools are easy to use and take the scheduling methods described
previously available to every software project manager.

34
35
//Designed by Sunil Kumar to fulfill Hospital Requirements.
/*
Language: C++
Category: Database\Files

//****************************************
// PROJECT HOSPITAL MANAGEMENT
//****************************************

//****************************************
// INCLUDED HEADER FILES
//****************************************

#include <fstream.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <ctype.h>

ofstream print("PRN");
void print_title();
void print_dashline();
void print_date();
void print_time();
/////////////////////////
void title();
void dashline();
void date();
void time();

void print_dashline()
{
for(int a=0;a<80;a++)
print<<'-';

}
void print_time()
{
struct dostime_t t;
_dos_gettime(&t);

int hour=t.hour;
int minute=t.minute;

print<<"\t\t\t\t\t\t Time: "<<hour<<":"<<minute<<"\n";


}
void print_date()
{
struct dosdate_t d;
_dos_getdate(&d);

int day=d.day;
int month=d.month;
int year=d.year;

print<<" Date: "<<day<<"/"<<month<<"/"<<year;


}

void print_title()

36
{
print<<"\n\t\t\t GANGA RAM HOSPITAL \n";

print_date();
print_time();
print_dashline();
}

void title()
// gotoxy(30,2);
cout<<"\t\t\t\tGANGA RAM HOSPITAL";
cout<<"\n";

date();cout<<"\t\t\t\t\t\t";
time(); cout<<"\n";
dashline();
}

//GETS AND DISPLAYS THE CURRENT DATE


void date()
{
struct dosdate_t d;
_dos_getdate(&d);
gotoxy(5,2);
printf("Date: %d/%d/%d", d.day,d.month,d.year);
}

//GETS AND DISPLAYS THE CURRENT TIME


void time()
{
struct dostime_t t;
_dos_gettime(&t);
// gotoxy(68,3);
printf("Time: %2d:%02d\n", t.hour, t.minute);
}
void dashline()
{
for(int a=0;a<80;a++)
cout<<'-';
}
//****************************************// THIS CLASS CONTAINS ALL THE DRAWING FUNCTIONS
//****************************************
class LINES
{
public :
void LINE_HOR(int, int, int, char) ;
void LINE_VER(int, int, int, char) ;
void BOX(int, int, int, int, char) ;
void CLEARUP(int, int) ;
void CLEARDOWN(int, int) ;
};

//****************************************
// THIS CLASS CONTROL ALL THE FUNCTIONS IN THE MENU
//****************************************
class MENU
{
public :
void MAIN_MENU(void) ;

37
private :
void EDIT_MENU(void) ;
int CREATE_MENU(char*[], int, int, int) ;
int st1, st2 ;
};
//****************************************// THIS CLASS CONTROL ALL THE FUNCTIONS RELATED
TO PATIENTS
//****************************************
class PATIENT
{
public :
void ADMIT(void) ;
void DISCHARGE(void) ;
void MODIFY(void) ;
void LIST(void) ;
void DISPLAY(void) ;

friend BILL;
private :

void DISPLAY_RECORD1(int,int);
void DISPLAY_RECORD(int, int) ;
// void DISPLAY_RECORD1() ; //****MY DIFINE
void DELETE_RECORD(int, int) ;
void PRINT_BILL(void);
int roomno, bedno, age, dd, mm, yy ,deposite;
char name[26], address[36], phone[15], sex, disease[16], doctor[26] ;
};

//****************************************// THIS CLASS CONTROL ALL THE FUNCTIONS RELATED


TO ROOMS
//****************************************
class ROOM
{
public :
void ADD_ROOMS(void) ;
int AVAILABLE(int, int) ;
int EMPTY(int) ;
void CHANGE_STATUS(int, int, char) ;
void LIST(void) ;
int ROOMNO() ;
int BEDNO(int) ;
int LAST_ROOMNO(void) ;
friend BILL;
private :
int RECORDNO(int, int) ;
int roomno, bedno ;
char status ;
};

//****************************************// THIS CLASS CONTROL ALL THE FUNCTIONS RELATED


TO DOCTORS
//****************************************
class DOCTOR
{
public :
void ADD(void) ;
void DELETE(void) ;
void LIST(void) ;

38
char *DOCTOR_NAME(int) ;
int RECORDS(void) ;
void DEFAULT(void) ;
//friend BILL;

private :
char name[26] ;
};
//****************************************
// THIS FUNCTION DRAWS THE HORRIZONTAL LINE
//****************************************
void LINES :: LINE_HOR(int column1, int column2, int row, char c)
{
for ( column1; column1<=column2; column1++ )
{
gotoxy(column1,row) ;
cout <<c ;
}
}

//****************************************
// THIS FUNCTION DRAWS THE VERTICAL LINE
//****************************************
void LINES :: LINE_VER(int row1, int row2, int column, char c)
{
for ( row1; row1<=row2; row1++ )
{
gotoxy(column,row1) ;
cout <<c ;
}
}

//****************************************// THIS FUNCTION DRAWS THE BOX


//****************************************
void LINES :: BOX(int column1, int row1, int column2, int row2, char c)
{
char ch=218 ;
char c1, c2, c3, c4 ;
char l1=196, l2=179 ;

if (c == ch)
{
c1=218 ;
c2=191 ;
c3=192 ;
c4=217 ;
l1 = 196 ;
l2 = 179 ;
}
else
{
c1=c ;
c2=c ;
c3=c ;
c4=c ;
l1 = c ;
l2 = c ;
}

39
clrscr() ;
char t1[5], ch ;
int rno, bno, valid, t2 ;
ROOM r ;
do
{
valid = 1 ;
gotoxy(5,5) ;
cout <<"Room no. : " ;
gotoxy(5,7) ;
cout <<"Bed no. : " ;
gotoxy(5,25) ; clreol() ;
cout <<"ENTER ROOM NO. OF THE PATIENT or <ENTER> FOR HELP" ;
gotoxy(16,5) ; clreol() ;
gets(t1) ;
t2 = atof(t1) ;
rno = t2 ;
if (t1[0] == '0')
return ;
if (strlen(t1) == 0)
{
valid = 0 ;
r.LIST() ;
clrscr() ;
}
if ((rno < 1 || rno > r.LAST_ROOMNO()) && valid)
{
valid = 0 ;
gotoxy(5,25) ; clreol() ;
cout <<"\7ENTER CORRECTLY" ;
getch() ;
}
} while (!valid) ;
do
{
valid = 1 ;
gotoxy(5,5) ;
cout <<"Room no. : " <<rno ;
gotoxy(5,7) ;
cout <<"Bed no. : " ;
gotoxy(5,25) ; clreol() ;
cout <<"ENTER BED NO. OF THE PATIENT or <ENTER> FOR HELP" ;
gotoxy(16,7) ; clreol() ;
gets(t1) ;
t2 = atof(t1) ;
bno = t2 ;
if (t1[0] == '0')
return ;
if (strlen(t1) == 0)
{
valid = 0 ;
r.LIST() ;
clrscr() ;
}
if ((bno < 1 || bno > 2) && valid)
{
valid = 0 ;
gotoxy(5,25) ; clreol() ;
cout <<"\7ENTER CORRECTLY" ;
getch() ;
}

40
} while (!valid) ;
gotoxy(5,25) ; clreol() ;
if (r.AVAILABLE(rno,bno))
{
gotoxy(5,20) ;
cout <<"\7Sorry, there is no. Patient in this Room no." ;
getch() ;
return ;
}
clrscr() ;
DISPLAY_RECORD(rno,bno);
do
{
gotoxy(5,13) ; clreol() ;
cout <<"Modify this Patient Record (y/n) " ;
ch = getche() ;
ch = toupper(ch) ;

} while (ch != 'Y' && ch != 'N') ;


if (ch == 'N')
return ;

do
{
valid = 1 ;
clrscr() ;
gotoxy(29,1) ;
cout <<"MODIFY PATIENT RECORD" ;
gotoxy(29,2) ;
cout <<"~~~~~~~~~~~~~~~~~~~~~" ;
gotoxy(5,4) ;
cout <<"Room no. : " ;
gotoxy(5,6) ;
cout <<"Bed no. : " ;
do
{
valid = 1 ;
gotoxy(5,25) ; clreol() ;
cout <<"ENTER ROOM NO. OF THE PATIENT" ;
gotoxy(16,4) ; clreol() ;
gets(t1) ;
t2 = atof(t1) ;
rno = t2 ;
if (t1[0] == '0')
return ;
if (rno < 1 || rno > r.LAST_ROOMNO())
{
valid = 0 ;
gotoxy(5,25) ; clreol() ;
cout <<"\7ENTER CORRECTLY" ;
getch() ;
}
} while (!valid) ;
do
{
valid = 1 ;
gotoxy(5,25) ; clreol() ;
cout <<"ENTER BED NO. OF THE PATIENT" ;
gotoxy(16,6) ; clreol() ;
gets(t1) ;
valid = 0 ;

41
gotoxy(5,25) ; clreol() ;
cout <<"\7ENTER CORRECTLY" ;
getch() ;
}
} while (!valid) ;
gotoxy(5,25) ; clreol() ;
if (!r.AVAILABLE(rno,bno) && (rno != rno || bno != bno))
{
valid = 0 ;
gotoxy(5,20) ;
cout <<"\7Sorry, there is already a Patient in this Room no." ;
getch() ;
}
} while (!valid) ;
DOCTOR dr ;
dr.LIST() ;
do
{
valid = 1 ;
gotoxy(5,25) ; clreol() ;
gotoxy(5,24) ; clreol() ;
cout <<"ENTER S.No. OF THE DOCTOR " ;
gets(t1) ;
t2 = atof(t1) ;
int pd;
char pdoctor[15];
pd = t2 ;
if (t1[0] == '0')
return ;
if (pd < 1 || pd > dr.RECORDS())
{
valid = 0 ;
gotoxy(5,25) ; clreol() ;
cout <<"\7ENTER CORRECTLY" ;
getch() ;
}
} while (!valid) ;
char pdoctor[15];
int pd;
strcpy(pdoctor,dr.DOCTOR_NAME(pd)) ;
LINES line ;
line.CLEARUP(25,10) ;
gotoxy(5,8) ;
cout <<"Doctor Assigned : Dr." <<pdoctor ;
r.CHANGE_STATUS(rno,bno,'A') ;
r.CHANGE_STATUS(rno,bno,'N') ;
// MODIFY_RECORD(rno,bno,rno,bno,pdoctor) ;
gotoxy(5,23) ;
cout <<"\7Record Modified" ;
gotoxy(5,25) ;
cout <<"Press any key to continue..." ;
getch() ;
}

void main(void)
{
MENU menu ;
menu.MAIN_MENU() ;
}
***END***

42
43
TESTING
In a software development project, errors can be injected at any
stage during development. There are different techniques for
detecting and eliminating errors that originate in that phase.
However, no technique is perfect, and it is expected that some of
the errors of the earlier phases will finally manifest themselves in
the code. This is particularly true because in the earlier phases and
most of the verification techniques are manual because no
executable code exists. Ultimately, these remaining errors will be
reflected in the code. Hence, the code developed during the coding
activity is likely to have some requirement errors and design
errors, in addition to errors introduced during the coding activity.
Behavior can be observed, testing is the phase where the errors
remaining from all the previous phases must be detected. Hence,
testing performs a very critical role for quality assurance and for
ensuring the reliability of software.

During testing, the program to be tested is executed with a set of


test cases, and the output of the program for the test cases is
evaluated to determine if the program is performing as expected.
Due to its approach, dynamic testing can only ascertain the
presence of errors in the program; the exact nature of the errors is
not usually decided by testing. Testing forms the first step in
determining the errors in a program. Clearly, the success of testing
in revealing errors in programs depends critically on the test cases.

Testing a large system is a very complex activity, and like any


complex activity it has to be broken into smaller activities. Due to
this, for a project, incremental testing is generally performed, in
which components and subsystems of the system are tested
separately before integrating them to form the system for system
testing. This form of testing, though necessary to ensure quality for

44
a large system, introduces new issues of how to select components
for testing and how to combine them to form subsystems and
systems.

ADMISSION OF PATIENT

Date: 26/11/2002 Room no.: 1


Bed no. : 2
Name : JASWINDER
Address : VIKAS PURI
Phone : DGVSS
Age :
Sex :
Deposite:1000

Enter correctly

The message shown below explains that if you entered wrong


phone number in the phone field, the message displays “Enter
correctly” and the record written will be cleared and ready for
accepting new phone number. And the sex field does not accept
any other values except ‘m’ or ‘f’.

45
ADMISSION OF PATIENT

Date: 26/11/2002 Room no.: 1


Bed no. : 2
Name : JASWINDER
Address : VIKAS PURI
Phone : 5165406
Age : 23
Sex : m
Disease : CANCER

S.No. Name

1 SANDEEP KUMAR

ENTER S.No. OF THE DOCTOR 2

ENTER CORRECTLY

The form will not accept the doctor to be assigned whose record is
not present in the database. That means how a patient is assigned a
doctor that is not available in the hospital.

46
PATIENT RECORD

Room no. : 1

Bed no. : 1

Sorry, there is no. Patient in this Room no.

The form asks for the room number and bed number of a patient.
And it will not accept the bed number or room number that is not
present in the database. That is, if there is no patient in particular
bed or room, then how it will show the record of a particular
patient.

DOCTOR DELETED

Enter S.No. of the Doctor to be Deleted 2

S.No. Name

1 SANDEEP KUMAR

The form accepts the serial number of doctor, which has to be


deleted. But if we enter the serial number that is not shown above
or not present in the database, then it will not delete the doctor
record.

47
Verification and Validation (V&V)
The objectives of verification, validity activities are to assess and
improve the quality of the work products generated during
development and modification of the software. Quality depends
upon the various attributes like correctness, completeness,
consistency, reliability, usefulness, usability, efficiency and
conformance to standards.
The terms verification and validation are used synonymously.
These are defined as under: -
Verification: “Are we building the product right?”
Validation: “Are we building the right product?”
Verification activities include proving, testing, and reviews.
Validation is the process of evaluating software at the end of the
software development to ensure compliance with the software
requirements. Testing is a common method of validation. Clearly,
for high reliability we need to perform both activities. Together,
they are often called V&V activities.
The major V&V activities for software development are
inspection, reviews, and testing (both static and dynamic). The
V&V plan identifies the different V&V tasks for the different
phases and specifies how these tasks contribute to the project V&V
goals. The methods to be used for performing these V&V
activities, the responsibilities and milestones for each of these
activities, inputs and outputs for each V&V task, and criteria for
evaluating the outputs are also specified.
The two major V&V approaches are testing and inspections.
Testing is an activity that can be generally performed only on code.
It is an important activity and is discussed in detail in a later
chapter. Inspection is a more general activity that can be applied to
any work product, including code. Many of the V&V tasks are
such that for them, an inspection type of activity is the only
possible way to perform the tasks.

48
TEST REPORTS
Cause-effect graphing is a technique that aids in selecting
combinations of input conditions in a systematic way, such that the
number of test cases does not become unmanageably large. The
technique starts with identifying causes and effects of the system
under testing. A cause is a distinct input condition, and an effect is
a distinct output condition. Each condition forms a node in the
cause-effect graph. The conditions should be stated such that they
can be set to either true or false. For example, an input condition
can be "file is empty," which can be set to true by having an empty
input file, and false by a nonempty file. After identifying the
causes and effects, for each effect we identify the causes that can
produce that effect and how the conditions have to be combined to
make the effect true. Conditions are combined using the Boolean
operators "and," "or," and "not," which are represented in the graph
by &, I, and ""'. Then, for each effect, all combinations of the
causes that the effect depends on which will make the effect true,
are generated (the causes that the effect does not depend on are
essentially "don't care"). By doing this, we identify the
combinations of conditions that make different effects true. A test
case is then generated for each combination of conditions, which
make some effect true.

49
50
The platform is the hardware and software combination that the
Client/Server runs on. While hardware systems vary widely in
features and capabilities, certain common features are needed for
the operating system software.

Hardware Specifications

Hardware is a set of physical components, which performs the


functions of applying appropriate, predefined instructions. In other
words, one can say that electronic and mechanical parts of
computer constitute hardware.

This package is designed on a powerful programming language


Visual Basic. It is a powerful Graphical User Interface. The
backend is ACCESS, which is used to maintain database. It can
run on almost all the popular microcomputers. The following are
the minimum hardware specifications to run this package: -

 Processors and memory


The best system to start with is one based on Pentium II with a
minimum 32 MB of RAM. Adequate performance requires at
least 64 MB of RAM. But for a database server at least 64 to
128 MB of RAM is required.

 Video displays
Earlier, the IBM-compatible computers had a simple text-only
monochrome for the video display. Now, they use the advanced
high-resolution color displays. For Client/Server systems one
should have VGA or better video display.

In the following table TLA stands for the various types of


adapters that can be used with IBM compatible PCs and the
standard resolution for each one of them.

51
ADAPTER TYPE TLA STANDARD RESOLUTION
Monochrome Display Adapter MDA Text only (80 characters by 25 lines)
Color Graphics Adapter CGA 640  200
Enhanced Graphics Adapter EGA 640 350
Video Graphics Array VGA 640  480
Super VGA SVGA 800 600 or 1024 768

 Disk Drives
Each client computer must have enough disk space available to
store the client portion of the software and any data files that
needs to be stored locally.

It is best to provide a local disk drive for each client computer.


However Client/Server applications can use the “diskless
workstations” for which the only disk access is the disk storage
located on a network file server. The hard disk drive at database
server should be at least of the capacity 4.1 GB. But it is
recommended to have one of capacity 8.2 GB.

 Mouse
A mouse is a must for the client software running under
Windows OS or any other graphical environment.
 Keyboard
Each client must have a 104 keys extended keyboard.
Software Requirements
The software is a set of procedures of coded information or
a program which when fed into the computer hardware,
enables the computer to perform the various tasks. Software
is like a current inside the wire, which cannot be seen but
its effect can be felt.

Application software : TURBO C++ [Dos Based]

52
53
Maintenance
After the installation phase is completed and the user staff is
adjusted to the changes created by the candidate system, evaluation
and maintenance begin. Like any system, there is an aging process
that requires periodic maintenance of hardware and software. If the
new information is inconsistent with the design specifications, then
changes have to be made. Hardware also requires periodic
maintenance to keep in tune with design specifications. The
importance of maintenance is to continue to bring the new system
to standards.

User priorities, changes in organizational requirements, or


environmental factors also call for system enhancements.

TO contrast maintenance with enhancement, if a bank decided to


increase its service charges on checking accounts from $ 3.00 to $
4.50 for a minimum balance of # 300, it is maintenance. However,
if the same bank decided to create a personal loan on negative
balances when customers overdraw their account, it is
enhancement. This change requires evaluation, program
modifications, and further testing.

Project Termination
A system project may be dropped at any time prior to
implementation although it becomes more difficult (and costly)
when it goes past the design phase. Generally projects are dropped
if after a review process, it is learned that:

 Changing objectives or requirements of the user cannot be met


by the existing design.

54
Scope of Future Application

This project can be used in the bank after adding some more useful
modules in the project for which hospitals are providing services.

Utmost care and back-up procedures must be established to ensure


100% successful implementation of the computerized banking
system. In case of system failure, the organization should be in a
position to process the transaction with another organization or if
the worst comes to the worst, it should be in a position to complete
it manually.

Scope of Improvement

Now a days banks are providing many other facilities, this project
can also be improved with the improvement in the Hospitals.

Utmost care and back-up procedures must be established to ensure


100% successful implementation of the computerized banking
system. In case of system failure, the organization should be in a
position to process the transaction with another organization or if
the worst comes to the worst, it should be in a position to complete
it manually.

55
CONCLUSION

This project is designed to meet the requirements of Hospital


Management. It has been developed in C++, keeping in mind the
specifications of the system.

For designing the system we have used simple data flow diagrams.

Overall the project teaches us the essential skills like:

 Using system analysis and design techniques like data flow


diagram in designing the system.
 Understanding the database handling and query processing
using Access.

56
BIBLIOGRAPHY

1. The C++ COMPLETE of G.S. BALUJA of Khanna


Publications

2. The C++ PROGRAM DESIGN of DIETEL & DIETEL.

3. The TURBO C++ of ROBERT LAFORE.

4. The C++ PROGRAM DESIGN & PROGRAMMING of


BALAGURUSWAMY.

57

You might also like