You are on page 1of 52

A

PROJECT REPORT
ON
"BLOOD GROUP AUTOMATION
Using C++
SUBMITTED TO:
KURUKSHETRA UNIVERSITY KURUKSHETRA
IN THE PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE
OF
Bsc(Hons.)I.T-III
(SESSION: 2013-2014)
Under the supervision of:

Submitted by:

Ms. Surbhi Aggarwal

ARCHIT GUPTA

Lecturer

B.sc (Hons.)I.T-III

(Deptt.Comp.Sc &App.)

Roll no.111519
Univ. Roll no.1121225023
Department of Information Technology
MUKAND LAL NATIONAL COLLEGE,
YAMUNANAGAR-135003

CONTENTS

CONTENTS

INTRODUCTION TO PROJECT
HARDWARE/SOFTWARE REQUIREMENTS
INTRODUCTION OF LANGUAGE USED
EXISTING SYSTEM
SYSTEM DESIGN
INPUT DESIGN
OUTPUT DESIGN
LIMITATIONS OF EXISTING SYSTEM
PROPOSED SYSTEM
ADVANTAGES OF PROPOSED SYSTEM
CODING
OUTPUTS
MERITS OF THE PROJECT
DEMERITS OF PROJECT
FURTHER SCOPE OF THE PROJECT
CONCLUSION
BIBLIOGRAPHY

CERTIFICATE

Dated...

To Whom It May Concern


Certified that ARCHIT GUPTA S/O Sh. JEEVAN KUMAR GUPTA a student of B.Sc (Hons) I.TIIIrd year, bearing College Roll No.- 111519 & University Roll No.-1121225023 has completed the
project entitled Blood Group Automation Using C++ , under the Guidance of Ms. Surbhi Aggarawal
(Asst. prof in Deptt. of Computer Science and Computer Application), which is a compulsory part of
syllabus.
It is further certified that project work is candidate's own work and in not submitted else where for any
other purpose.
We wish him ever success in his life.

Ms.Surbhi Aggarawal
Lecturer
Dept. of Comp.Sc. & App.

Prof.G.K Sethi
Head. Dept. of IT & Elecronics

Dr.Shailesh kapoor
Principal

ACKNOWLEDGEMENT

ACKNOWLEDGEMENT
When my project is completed, at this juncture of time, I would like to thank Almighty GOD
who provided me power to complete this work and to my parents who always inspired and encouraged
me throughout my life. Regarding the project completion a lot of peoples are concerned who assist me
during the development of this project now when I look back, I still remember the day when I was
assigned this project BLOOD GROUP AUTOMATION; I would never had completed my project if
Ms.Surbhi Aggarwal , Computers Dept. had not guided me. I was very happy with her guidance. This
was a new exposure for me. I would like to convey my special thanks to Prof.G.K.Sethi Head (Deptt
I.T & Electronic), Principal Dr.Shailesh Kapoor of our college for his kind cooperation. Lastly, I
express my gratitude to my parents and friends for their full support and co-operation in the completion
of this project.
ARCHIT GUPTA
B.sc. (Hons.)I.T-III

PREFACE

PREFACE
Practical training is an important part of theoretical studies. It covers all that which remains
uncovered in the classroom. It offers all the students to explore an invaluable treasure of experience. It
offers an exposure to real practical of management in business organization.
As we know well that practical training plays an important role in future building of an
individual, one can easily overcome the fear from that life in which he has to join as a member after
sometime.
Just theoretical knowledge is not sufficient for the success of an individual so one should
have practical knowledge of each theory of general life. I have been given an opportunity to have my
practical training in Blood Group Automation.

To Store the Patient data in hospital was a difficult task and time consuming also due to
increase in technology computer has proven a boon to such organizations. Therefore, management of
Blood Group Automation has become important and must. Therefore, I have chosen this course from
Mukand Lal National College affiliated by KURUKSHETRA UNIVERSITY, KURUKSHETRA.

INTRODUCTION
TO
PROJECT

INTRODUCTION TO PROJECT

In this project Blood Group Automation I explain how work is done in Hospital where
Patients data is stored by Computerized method. In this project when a patient is admitted first of all by
the use of this project we have to give the patient ID to every patient then stored the name of the patient
and then store the blood group and mobile number. after creating the data of patient we can view and
modify the every patient. For modifying the patient data we have to only know about his/her ID. If we
know the ID of the patient we can modify his/her name, blood group, and phone number. This is a time
consuming process whenever we need a blood of patient who was admitted in that hospital. In this
project every patient has a unique ID and by the help of his/her ID we get all information about him/her
and also if needed hospital contect that patient to check the connect number. Whenever we want to
remove the patient we can not remove his/her ID we have to modify patient name, patient ID, and
phone number if we do then that uniqe ID is assigned to the another person and we add new detail to
another patient. The main thing is that in future if Hospital has requirement of any patient it can be
search easily because of its storage.it keeps all thing safe of the patients.

HARDWARE/SOFTWARE
REQUIREMENTS

HARDWARE AND SOFTWARE REQUIREMENT


In order to run this project of BLOOD GROUP AUTOMATION developed under C++
language your computer should meet the following Hardware and Software Requirement:
Installation Guide
Hardware Requirement
At least 32 MB RAM Preferred
Hard disk of size 8 GB or Above
SVGA Card
Monitor Mono VGA\Color SVGA (Preferred)
Keyboard
CD Drive
Floppy Drive
Software Requirement
Operating System: Dos 6.22 Preferred
MS-office 97 or Above
C++ Language

INTRODUCTION
OF
LANGUAGE USED

INTRODUCTION OF LANGUAGE USED


WHAT IS C++
C++ is often called a "middle level" programming language. This is not a reflection on its lack of
programming power but more a reflection on its capability to access the system's low level functions.
Most high-level languages (e.g. Fortran) provides everything the programmer might want to do already
built into the language. A low level language (e.g. assembler) provides nothing other than access to the
machines basic instruction set. A middle level language, such as C++, probably doesn't supply all the
constructs found in high-languages - but it provides you with all the building blocks that you will need
to produce the results you want!
A BRIEF HISTORY OF C++
C++ is a general-purpose language which has been closely associated with the UNIX operating
system for which it was developed - since the system and most of the programs that run it are written in
C++.
Many of the important ideas of C++ evolve from the an old language known BCPL, developed by
Martin Richards. The influence of BCPL on C++ proceeded indirectly through the language B, which
was written by Ken Thompson in 1970 at Bell Labs, for the first UNIX system on a DEC PDP-7.
BCPL and B are "type less" languages whereas C++ provides a variety of data types.
The C++ programming language was developed in the years 1969 to 1973, although the first
published description did not appear until the book The C++ Programming Language" written by Brian
Kernighan and Dennis Ritchie was published in 1978. The early versions of the C++ language were
strongly influenced by a language called BCPL which itself was a derivative of ALGOL.
The early development of C++ was closely linked to the development of the Unix operating
system. Large portions of the code of the Unix operating system were eventually written in C++ and
problems encountered in transferring Unix to various computers were reflected into the design of the
C++ language. The modest hardware available to the Unix developers was also reflected in the
language design, most notably the use of separate library functions for operations such as input and
output. Until the early 1980s the language was almost exclusively associated with Unix.
The widespread introduction of microprocessor based computer systems in the early 1980s also
saw a rapid growth in the use of C++ on such systems. C++ compilers were known to be small and

many of the start-up operations that produced the early microprocessor based computer systems were
staffed by ex-students who had encountered the language whilst at university.
As early as 1982 it became clear that the informal description of the language in Kernighan &
Ritchie's book was not good enough. ANSI established a committee known as X3J11 in 1983. This
committee produced a report defining the language at the end of 1989. The report was known as
X3.159 but the standard was soon taken over by ISO with the designation ISO/IEC 9899-1990. This
version of the language is known as ANSI-C++ to distinguish it from the earlier version of the
language described in Kernighan and Ritchie's book. The earlier version of the language is known as
K&R C. C++ and Objective-C are different languages developed from C. The GNU C++ compiler,
often known by the command that invokes it, gcc , is public domain software available for both Unix
and MSDOS based systems. It supports a version of the language close to the ANSI standard.
All the code presented in these notes, unless specifically indicated otherwise, confirms to the
ANSI standard. Many compiler writers and vendors produce C++ compilers that will compile code
conforming to the ANSI standard but they also provide a variety of extensions to suit the particular
target environment. Such extensions are usually extra library routines for functions such as PC screen
handling and interfacing direct to MSDOS system functions. Sometimes the extensions include extra
features introduced into the language, usually to cope with some of the problems of memory
management on MSDOS based systems. In the Unix environment such extensions are less common,
Unix systems are normally supplied with a compiler and the extensions appear as extra libraries for
functions such as driving X-Windows displays or network communications.
All C++ programmers ought to be aware of what is and what isn't standard in their particular
environment. The better compiler writers usually make this fairly clear in their manuals.
It is also often possible to obtain further special purpose application specific libraries for use with
C++ compilers to provide facilities such as database handling, graphics, numerical analysis etc.
USES OF C++
C++ has been successfully used for every type of programming problem imaginable from
operating systems to spreadsheets to expert systems - and efficient compilers are available for machines
ranging in power from the Apple Macintosh to the Cray supercomputers.
C++ was initially used for system development work, in particular the programs that make-up the
operating system. Why use C++? Mainly because it produces code that runs nearly as fast as code
written in assembly language. Some examples of the use of C++ might be:
Operating Systems
Language Compilers

Assemblers
Text Editors
Print Spoolers
Network Drivers
Modern Programs
Data Bases
Language Interpreters
Utilities
In recent years C++ has been used as a general-purpose language because of its popularity with
programmers. It is not the world's easiest language to learn and you will certainly benefit if you are not
learning C++ as your first programming language! C++ is sexy - many well established programmers
are switching to C++ for all sorts of reasons, but mainly because of the portability that writing standard
C++ programs can offer.

SYSTEM DESIGN

SYSTEM DESIGN
System design is the foundation for all program implementation. It is the most important
phase of software development. It requires a careful planning, logical thinking on the part of the system
designer. Designing a software means to plan and decide how the various components of software are
going to achieve their desired goals. It is a detail concentration or solution of how to approach to
creation of new system. In other words, it translates user oriented document
specification into programmer oriented document. System design for the proposed system is composed
of several steps :
1. Input design
2. Output design
Input Design :
The Input in the Proposed System of Computerized Mall Shopping are in the following form :CREATE NEW PATIENT DATABASE
Output Design:
Computer output is the most important and direct source of information to the user. Outputs
are required are primarily to produce the result of processing to the user. They are also used to provide
a permanent copy of their result for latest consultation. In other words, output designing is concerned
with planning how the output will be put forward for the users. The output may have defined during the
logical design stage. The normal procedure is to design the outputs in detail first and then to work back
to the inputs. In the proposed system, output will be in the form of a screen where different options will
be displayed.

VIEWING PATIENT DATABASE

EXISTING SYSTEM

EXISTING SYSTEM
Existing system means the current system on which all calculation are performed manually
new item is added. How the patients is added in the existing system. How it is maintained in the
registers and what problems are occurred to make this system.
How different types are generate what are the difficulties in making different types of reports.
Existing system is manual, which is time-consuming, inefficient, tedious and ineffective. It has several
disadvantages.
The techniques for gaining this information include observation of problem task and actual
performance of task by the planner. The key requirements of the system and software are identified.

LIMITATIONS OF
EXISTING SYSTEM

LIMITATION OF EXISTING SYSTEM


In existing system, different problem have to face because of manual work and work on registers.
In the existing system, data of customer are entered into various long registers that is customer register,
etc. which results into slow access to the desired information. The inaccuracy, which is caused, is due
to manual storage of data.
In the existing system, if user wants to see what is the current position of his record about item etc. that
is what the current position according to record number is. Wise than it is difficult to see this manually.
Presently the system is not aware of the duplication of data, they are maintaining the record manually
which results in the total being in excess of what it should be. In such situation, the data is said to be
inconsistent, which supplies incorrectly information.
In the existing system, all the data is maintained in different files and registers. This often leads to data
duplication and redundancy in the stored data, thus leading to wastage of storage of space.
In existing system, Various things are maintained in the paper so it is very inconvenient to modify the
data, in case of manual error, if the number of mistakes are high, then the whole set of records may
have to be written again, to avoid any possible error occurring therefore.

PROPOSED SYSTEM

PROPOSED SYSTEM

My Project Blood Group Automation is a modern project. It ease the work of Hospital Employees as
well as the Patients.
The Blood Group Automation System includes the following modules :Main Menu
ENTER PATIENT DATABASE
VIEW PATIENT DATABASE
MODIFY PATIENT DATABASE
SEARCH PATIENT DATABASE
EXIT

ENTER PATIENT DATABASE


This module is used to add the record of a new Patient.
VIEW PATIENT DATABASE

This module is used to view the record of an existing patient.


MODIFY PATIENT DATABASE
This module is used to modify the existing patient record.
SEARCH PATIENT DATABASE
This module is used to search the existing patient record
EXIT
This module is used to come out of the project.

ADVANTAGES OF PROPOSED
SYSTEM

ADVANTAGES OF PROPOSED SYSTEM

Due to the computerization following advantages can be achieved:


Enquiry related to the patient can be obtained in no time with the help of computers.
Reports are easier to be obtained with the help of computers.
These include extracting information from the existing one. It is very easy and takes no time to obtain
this information and prepare reports.
The process of delivered patients and keeping track of undelivered patients can be accurately
maintained with the help of computers.
As the number of records related to the patients increases, the process of maintaining their records with
computers becomes much easier than manual.
In case modification is to be performed in any of the existing information, it is very easy in
computerized process. The changes in data can be like name of the patient, phone number and blood
group..
management system is fast and requires a few numbers of operators to perform the required process.

SOURCE CODE

SOURCE CODE

//

//

Blood Group Automation

//------------------------------------------------------------------//

Header Files Included

//------------------------------------------------------------------#include<stdio.h>
#include<conio.h>
#include<fstream.h>
#include<stdlib.h>
#include<string.h>
#include<iomanip.h>
//*******************************************************
//

CLASS NAME : patient

//*******************************************************
class patient
{
public:
char name[30];
char blood_group[5];
int pat_id;
char phn[20];
int a;
void patientdata();
void showdata();
};
//*******************************************************
//

FUNCTIONS TO GET AND SHOW DATA

//*******************************************************
void patient::patientdata()
{
cout<<"\n***************************************************************************
*****\n";
cout<<" \n\n\t\t\tCREATE NEW PATIENT DATABASE ";

cout<<"\n***************************************************************************
*****\n";
cout<<"\n\tEnter Patient ID : ";
cin>>pat_id;
cout<<endl;
cout<<"\n\tEnter Patient Name : ";
cin>>name;
cout<<endl;
cout<<"\n\tEnter Patient Blood Group : ";
cin>>blood_group;
cout<<endl;
fflush(stdin);
cout<<"\n\tEnter Patient Phone : ";
cin>>phn;
cout<<endl;
}
void patient::showdata()
{
cout<<"\n\n\tPatient ID\t: "<<pat_id;
cout<<"\n\n\tPatient Name\t: "<<name;
cout<<"\n\n\tBlood Group\t: "<<blood_group;
cout<<"\n\n\tPatient Phone\t: "<<phn;
cout<<"\n\n";
}
/***************************************************************************
Main Function
*************************************************************************/
void main()
{
clrscr();
gotoxy(16,18);
cout<<"\tPROJECT REPORT ON BLOOD GROUP AUTOMATION";
gotoxy(16,22);

cout<<"\tDEVELOPED BY :- ARCHIT GUPTA";


gotoxy(21,26);
cout<<"\tMUKAND LAL NATIONAL COLLAGE(YNR)";
gotoxy(24,31);
cout<<"Press Any Key to Continue";
getch();
clrscr();
char s;
patient obj;
z:
fstream f;
f.open("patient",ios::in|ios::out|ios::app|ios::ate|ios::binary);
cout<<"\n
=========================================================================
====\n";
cout<<"\n\t\t\t WELCOME TO SOFTWARE CITY HOSPITAL\n";
cout<<"\n
=========================================================================
====\n";
cout<<"\n\t 1 . ENTER PATIENT DATABASE\n";
cout<<"\n\t 2 . VIEW PATIENT DATABASE\n";
cout<<"\n\t 3 . MODIFY PATIENT DATABASE\n";
cout<<"\n\t 4 . SEARCH PATIENT DATABASE\n";
cout<<"\n\t 5 . EXIT\n ";
int a;
cout<<"\n\n\n\tEnter your Choice:";
f.seekg(0);
cin>>a;
char x;
clrscr();
switch (a)
{
//*******************************************************

//

ADD A PATIENT RECORD

//*******************************************************
case 1:
clrscr();
fstream f;
f.open("patient",ios::in|ios::out|ios::ate|ios::app|ios::binary);
char ans;
obj.patientdata();
f.write((char *)&obj,sizeof(obj));
getch();
cout<<"

Do You Want To Continue? y/n :";

ans=getchar();
if(ans=='Y' || ans=='y')
goto z;
else
break;
//*******************************************************
//

CASE

//

DETAILS

:2
: TO SHOW ALL patient RECORDS

//*******************************************************
case 2:
{
cout<<"\n\n";
fstream f;
f.open("patient",ios::in|ios::out|ios::ate|ios::app|ios::binary);
// cout<<"\n\n";
char ans;
f.seekg(0);
int ctr=0;
while(f.read((char *)&obj,sizeof(obj)) )
{
ctr=ctr+1;
if(ctr==8)

{
getchar();
clrscr();
ctr=0;
}
obj.showdata();
if(f.eof()==1)
{
break;
}
}
f.close();
cout<<"

Do You Want To Continue? y/n :";

cin>>ans;
if(ans=='y'|| ans=='Y')
goto z;
else
{
exit(1);
}
}
break;
//===========================================================
//

Case 3

//============================================================
case 3:
{
clrscr();
// char ans;
fstream f;
patient obj;
char name[30];
char blood_group[5];

char phn[20];
int pat_id;
f.open("patient",ios::in|ios::binary);
cout<<"\n";
cout<<"\n
******************************************************************************\n";
cout<<"\n

MODIFY PATIENT DATABASE

\n";

cout<<"\n
******************************************************************************\n";
cout<<"\n Enter Patient ID :";
cin>>pat_id;
do
{
f.read((char *)&obj,sizeof(obj));
if(f.eof()==1)
{
break;
}
if(obj.pat_id==pat_id)
{
cout<<"\n\tPatient Name :"<<obj.name;
cout<<"\n\tPatient ID : "<<obj.pat_id;
cout<<"\n\tBlood Group :"<<obj.blood_group;
cout<<"\n\tPatient Phone :" <<obj.phn;
getchar();
cout<<endl;
cout<<endl;
cout<<"\n \t

Enter New Database" ;

cout<<"\n\n\tEnter Patient name : ";


cin>>name;
cout<<"\n\tBlood Group : ";
cin>>blood_group;
cout<<"\n\tEnter Patient Phone :";

cin>>phn;
cout<<"\n\n";
strcpy(obj.name,name);
strcpy(obj.blood_group,blood_group);
strcpy(obj.phn,phn);
obj.a=a;
int l=f.tellg();
f.close();
f.open("patient",ios::out|ios::binary|ios::ate);
f.seekg(l-sizeof(obj));
f.write((char *)&obj,sizeof(obj));
}
}
while(f);
f.close();
cout<<"Do You Want To Continue?y/n :";
ans=getchar();
if(ans=='Y'||ans=='y')
{
goto z;
}
else
break;
}
//******************************************************
//

Case 4

Searching The Patient From Database

//******************************************************
case 4:
{
clrscr();
// char ans;
fstream f;
patient obj;

char name[30];
char blood_group[5];
char phn[20];
int pat_id;
f.open("patient",ios::in|ios::binary);
cout<<"\n";
cout<<"\n
******************************************************************************\n";
cout<<"\n\t\t

SEARCH PATIENT DATABASE

\n";

cout<<"\n
******************************************************************************\n";
cout<<"\n Enter Patient ID :";
cin>>pat_id;
while(f)
{
f.read((char *)&obj,sizeof(obj));
if(f.eof()==1)
{
break;
}
if(obj.pat_id==pat_id)
{
cout<<"\n\tPatient Name :"<<obj.name<<endl;
cout<<"\n\tPatient ID : "<<obj.pat_id<<endl;
cout<<"\n\tBlood Group :"<<obj.blood_group<<endl;
cout<<"\n\tPatient Phone :" <<obj.phn<<endl;
getchar();
cout<<endl;
strcpy(obj.name,name);
strcpy(obj.blood_group,blood_group);
strcpy(obj.phn,phn);
obj.a=a;
int l=f.tellg();

f.close();
f.open("patient",ios::out|ios::binary|ios::ate);
f.seekg(l-sizeof(obj));
//f.write((char *)&obj,sizeof(obj));
}
/* else
{
cout<<"\n\n\Patient Does Not Exist\n\n\n";
}*/
}
//while(f);
f.close();
cout<<"\n\nDo You Want To Continue?y/n :";
ans=getchar();
if(ans=='Y'||ans=='y')
{
goto z;
}
else
break;
}
/*

Exit */

case 5:
{
exit(1);
}
default:
{
cout<<"\n\tWrong input \n";
}
cout<<"\n\tDo You Want To Continue?y/n :";
ans=getchar();
clrscr();

if(ans=='Y'||ans=='y')
{
goto z;
}
else
break;
}
getch();
}

OUTPUTS

CREATE NEW PATIENT DATABASE


VIEW PATIENT DATABASE

MODIFY PATIENT DATABASE


AFTER MODIFING VIEW PATIENT DATABASE

SEARCH PATIENT DATABASE

CONCLUSION

CONCLUSION
Everything which we make is not perfect. In any project, specially in
the project of computer science, there is always a scope of enhancement. One can make a system a bit
more better. Like any
other system this system also has a scope of further enhancement.
It can also help us in maintaining the analytic information.
It can also include the city wise date.
It can also be connected with the GUI for better looks.
Unexpected rates can be given because it is manual.

MERITS OF THE PROJECT

MERITS OF THE PROJECT

The project is identified by the merits of the system offered to the user. The merits are as follows.
This project offer administrator to enter data through simple and interactive forms. This is very helpful
for the patient desired information through so much simplicity.
The user is mainly more concerned about the validity of the data, whatever he is entering. There are
checks in every stage of new creation, data entry of updating. So the user can not enter invalid data,
which can cause further problems.
Some time user find the later stages using the project that he need to update some of information that
he entered earlier. These are option for him by which he can update the records.
User is provided the option of monitoring the records entered earlier. He can see the desired records
with the help of patient ID.

DEMERITS OF PROJECT

DEMERITS OF PROJECT

No system is said to be perfect on its own. Similarly, my project Blood Group Automation is
not an exception. On this topic, number of limitations may be obvious but it may be removed. These
limitations came to surface partially due to limited time at present.
Following are the demerits of this project:

Computer knowledge is very important especially the language C++ etc.


No security of data, any hacker can hack the system and may misuse.
Illiterate persons cannot operate through the system..

FURTHER SCOPE OF THE PROJECT

FURTHER SCOPE OF THE PROJECT


One thing we know that the scope of the project depends upon the need. Everything whatever is
being made or has already been made is just because of need. When we face a situation in which we
require something which is not available with us, we try to invent that thing. Similar in case with our
BLOOD GROUP AUTOMATION. Before the advent of computer we know that each and every
task is being performed under manual system. It is tedious to work in the manual system as than of
computer system. One can handle his work very efficiently, speedily and timely with the help of
computer. If the manual system were continued today then a person would always be busy with
entering, deleting and updating the records. A computerized manage this problem.
In short a computerized management System offers a great deal of comfort. Everything is
revolving around the keys of keyboard with in the second. No need to maintain heavy registers. There
is no requirement of keeping big records, everything is automatic.

Now we can easily say that the future of the project is quite bright in time to time to come and some
new features. Future plan is that We will use the same database in networking also. And also upgrade
the software with more features and good looks.

BIBLIOGRAPHY

BIBLIOGRAPHY

While making this project, I have referred the following books for getting an idea to make this
project and also for understanding the C++ language. The names of the authors of the books referred by
me are as follows:
Turbo C++

Robert Lafore

Object Oriented Programming

E. Balaguruswami

Computer Science C++

Sumita Arora

Complete Reference To C++

Hebert Shiled

New Style Book For C++

Rohit Publication

C++ Programming

Yashwant Kanitkar

You might also like