Professional Documents
Culture Documents
RedRay
A report submitted in partial fulfillment of the requirements for the award of the degree of
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
By
SHREYA AGARWAL (IIITU18120)
SCHOOL OF COMPUTING
DECEMBER 2021
BONAFIDE CERTIFICATE
This is to certify that the project titled REDRAY is a bonafide record of the work done by
in partial fulfillment of the requirements for the award of the degree of Bachelor of
Technology in COMPUTER SCIENCE AND ENGINEERING of the INDIAN
INSTITUTE OF INFORMATION TECHNOLOGY UNA, HIMACHAL PRADESH,
during the year 2021 - 2022.
Avantika Singh
Examiner (Guide Name)
1
School of Computing, IIITU[CSL702]: 18120
ORIGINALITY / NO PLAGIARISM DECLARATION
We certify that this project report is our original report and no part of it is copied from any
published reports, papers, books, articles, etc. We certify that all the contents in this report
are based on our personal findings and research and we have cited all the relevant sources
which have been required in the preparation of this project report, whether they be books,
articles, reports, lecture notes, and any other kind of document. We also certify that this
report has not previously been submitted partially or as a whole for the award of degree in
any other university in India and/or abroad.
We hereby declare that we are fully aware of what constitutes plagiarism and understand
that if it is found at a later stage to contain any instance of plagiarism, our degrees may be
canceled.
SHREYA AGARWAL(IIITU18120)
2
School of Computing, IIITU[CSL702]: 18120
ABSTRACT
Creating a platform where people can donate and seek blood as per requirement. No
platform exists in India where a person can also raise a ticket so as to request all the
registered users to donate blood of required type. It's a platform for social causes that will
help people during difficult times.
3
School of Computing, IIITU[CSL702]: 18120
ACKNOWLEDGEMENT
I would like to thank the following people for their support and guidance without whom the
completion of this project in fruition would not be possible.
I would like to express my sincere gratitude and heartfelt thanks for their unflinching
support and guidance, valuable suggestions, and expert advice. Their words of wisdom and
expertise in subject matter were of immense help throughout the duration of this project.
I also take the opportunity to thank our Director and all the faculty of the School of
Computing, IIIT Una for helping us by providing the necessary knowledge base and
resources.
I would also like to thank my parents and friends for their constant support.
4
School of Computing, IIITU[CSL702]: 18120
TABLE OF CONTENTS
ABSTRACT iii
ACKNOWLEDGEMENT iv
TABLE OF CONTENTS v
LIST OF ACRONYMS vi
LIST OF FIGURES vii
1 Introduction 1
1.1 Problem Definition 1
1.1.1 Objectives 2
1.1.1.1 Features of the application 2
2 Preliminary Study 3
2.1 Online Available Blood Bank 2
2.1.1 Images 3
2.2 Platforms that asks location 4
2.2.1 Images 5
3 Methodology 7
3.1 System Design 7
3.1.1 Hospital panel 7
3.1.1.1 Registration 7
3.1.1.2 Update Information 7
3.1.1.3 Manage Requests 7
3.2.1 User Panel 8
3.2.1.1 Registration 8
3.2.1.2 List of Hospitals 8
3.2.1.3 Raise a ticket 8
5
School of Computing, IIITU[CSL702]: 18120
4 Experimental Results 10
4.1 Hospital Login and Signup 10
4.1.1 Images 10
4.2 User Login and Signup 11
4.2.1 Images 11
4.3 Home Page 12
4.3.1 Images 12
4.3 List of Hospital 13
4.3.1 Images 13
5 Conclusion 14
References 15
Appendices 16
LIST OF ACRONYMS
6
School of Computing, IIITU[CSL702]: 18120
LIST OF FIGURES
7
School of Computing, IIITU[CSL702]: 18120
Chapter 1
Introduction
The main aim of developing this system is to provide blood to the people who are in need of
blood. The number of persons who are in need of blood are increasing in large numbers day
by day. Using this system, the user can search for the blood group available in the city and he
can also get the contact number of the donor who has the same blood group he needs. In
order to help people who are in need of blood, this Online Blood Bank management system
can be used effectively for getting the details of available blood groups and users can also get
the contact number of the blood donors having the same blood group and within the same
city. So if the blood group is not available in the blood bank, the user can request the donor to
donate the blood to him and save someone's life. Using this bank management system people
can register who want to donate blood. To register in the system they have to enter their
contact information like address mobile number etc.
This blood bank management system is an online website so it is easily available to everyone.
When a person wants to donate blood he has to register to the system. Donor registration is
very easy, to get registered to the system he has to fill up a registration form. After submitting
the registration form he can create a username and password. Donors have to give
information like blood group, contact details etc. the donor can also change his account
information when he wants using his username and password.
Today, most medical care depends on a steady supply of blood from donors. One in seven
1
School of Computing, IIITU[CSL702]: 18120
people entering the hospital need blood.
An adequate amount of blood is needed in all health care facilities to meet the urgent need for
patients facing trauma and other lifesaving procedures, such as blood transfusions – which
saves millions of lives each year.
Donating blood is a simple procedure that can be done within an hour.
1.1.1 Objectives
To design and develop a platform that brings effective blood bank management available
online for every person.
Chapter 2
2
School of Computing, IIITU[CSL702]: 18120
Preliminary Study
There exist multiple platforms where users can find suitable donors and hospitals for blood
donation. The user first signs up on the portal. They search among the various registered
hospitals and blood camps present in the database. Users can contact them and make an
appointment as per their requirements.
2.1.1 Images
Saves life
3
School of Computing, IIITU[CSL702]: 18120
Image 2.2: Another platform for blood bank
There exist multiple platforms which ask real time location from the user in the most
effective way and with best accuracy. The person can first sign up on the portal and enter its
location for best use of the website.
2.2.1 Images
One such platform that asks location in most effective way is Zomato
4
School of Computing, IIITU[CSL702]: 18120
Image 2.3: Zomato Online Website
5
School of Computing, IIITU[CSL702]: 18120
Image 2.3: Dunzo Online Website
6
School of Computing, IIITU[CSL702]: 18120
Chapter 3
Methodology
3.1 SYSTEM DESIGN
The project will mainly have 2 subparts i.e Hospital Panel and User Panel.
Hospital will manage the request for blood donation as well as from the blood seeker .
They will have the right to appoint suitable slots and date for the same.
3.1.1.1 Registration
Hospitals have to register themselves using their name, address, contact information, their
location, and suitable ID for keeping track of frauds or misleading information.
Hospitals can update their information any time they want. They can update their location,
availability of blood.
Hospitals can manage the requests from blood donors. They can allot them a suitable slot or
reject the request if staff availability is difficult. They can allot them a slot on a different day
based upon the queue.
They can manage the requests from blood seekers. They can reject a request if the required
blood is not available or can raise a ticket for the same.
7
School of Computing, IIITU[CSL702]: 18120
3.2.1 User Panel
3.2.1.1 Registration
Hospitals have to register themselves using their name, address, contact information, their
location, and suitable ID for keeping track of frauds or misleading information.
Users can search among the registered hospitals from the database arranged according to the
location and distance. Once selected the hospital, they can request the hospital by providing
details of blood type and other necessary information.
If a Blood seeker does not find the required blood type available near his location. He can
request all the registered hospitals and users to step forward and help.
8
School of Computing, IIITU[CSL702]: 18120
Image 3.1 Diagram
Chapter 4
9
School of Computing, IIITU[CSL702]: 18120
Experimental Results
10
School of Computing, IIITU[CSL702]: 18120
Image 4.3 User Signup
11
School of Computing, IIITU[CSL702]: 18120
Image 4.4 Home Page
12
School of Computing, IIITU[CSL702]: 18120
Image 4.5 Home Page
13
School of Computing, IIITU[CSL702]: 18120
Image 4.5 Hospital List Page
Chapter 5
Conclusion
14
School of Computing, IIITU[CSL702]: 18120
This blood bank management system is an online website so it is easily available to everyone.
When a person wants to donate blood he has to register to the system. Donor registration is
very easy, to get registered to the system he has to fill up a registration form. After submitting
the registration form he can create a username and password. Donors have to give
information like blood group, contact details etc. the donor can also change his account
information when he wants using his username and password.
The platform is developed for a social cause, a non profit platform to help people during
crucial times.
References
[1] https://nodejs.org/dist/latest-v16.x/docs/api/https.html
[2] https://stackoverflow.com/
15
School of Computing, IIITU[CSL702]: 18120
[3] https://reactjs.org/
[4] https://v4.mui.com/getting-started/example-projects/
16
School of Computing, IIITU[CSL702]: 18120
Appendices
17
School of Computing, IIITU[CSL702]: 18120
Appendix A
Code Attachments
The following is the partial / subset of the code. Code of some module(s) has been wilfully
suppressed.
if(userExists){
res.status(400)
throw new Error("User Already Exists");
}
const user = await User.create({
name,
email,
password,
pic,
bloodGroup,
latitude,
longitude
});
if(user){
res.status(201).json({
_id: user._id,
name: user.name,
18
School of Computing, IIITU[CSL702]: 18120
email: user.email,
isAdmin:user.isAdmin,
pic: user.pic,
password: user.password,
bloodGroup: user.bloodGroup,
token: generateToken(user._id),
latitude: user.latitude,
longitude: user.longitude
});
}else{
res.status(400)
throw new Error('Error Occurred')
}
res.json({
name,
email
});
});
19
School of Computing, IIITU[CSL702]: 18120
throw new Error('Invalid Email or Password')
}
});
import {
Grid,
Paper,
Avatar,
TextField,
Button,
Typography,
Link,
} from "@material-ui/core";
20
School of Computing, IIITU[CSL702]: 18120
import {
fade,
ThemeProvider,
withStyles,
createMuiTheme,
} from "@material-ui/core/styles";
BackgroundHead: {
backgroundSize: "cover",
backgroundPosition: "center",
width: "70%",
[theme.breakpoints.up("md")]: {
// height: 700,
width: "40%",
marginRight: 80
},
},
extra: {
21
School of Computing, IIITU[CSL702]: 18120
display: "flex",
alignItems: "center",
justifyContent: "center",
textAlign: "center",
flexGrow: 1,
flexWrap: "wrap",
[theme.breakpoints.up("md")]: {
},
},
footer: {
backgroundColor: "#001a66",
color: "white",
textAlign: "center",
height: "50px",
},
paperStyle: {
// padding: 20,
[theme.breakpoints.up("md")]: {
fontSize: "30px",
width: 500,
},
},
22
School of Computing, IIITU[CSL702]: 18120
heading: {
fontSize: "50px",
[theme.breakpoints.down("md")]: {
fontSize: "25px",
},
fontWeight: "900",
// lineHeight: "11px",
fontSize: "40px",
// textTransform: "uppercase",
color: "#4d4d33",
// color: "#009933",
letterSpacing: ".02em",
},
field: {
// backgroundColor: "#eeb7ba",
color: "#eeb7ba",
width: "300px",
[theme.breakpoints.up("md")]: {
23
School of Computing, IIITU[CSL702]: 18120
width: "350px",
},
},
btnstyle: {
fontWeight: "700",
color: "#fff",
width: "300px",
height: 50,
[theme.breakpoints.up("md")]: {
width: "350px",
},
borderRadius: "50px",
textTransform: "none"
},
borderr:{
borderRadius: "30px",
24
School of Computing, IIITU[CSL702]: 18120
}
}));
// register state
const paperStyle = {
padding: 20,
height: "70vh",
width: 280,
25
School of Computing, IIITU[CSL702]: 18120
};
console.log("sucess");
e.preventDefault();
axios
.post("http://localhost:3000/doctor/register", {
"name":username,
"email":email,
"password":password,
"password2":confirmPassword,
"phone":contact,
"reg_num":req,
"address":address,
"specialization":speci,
"hospital_name":hos,
"achievements":achievement
})
.then((res) => {
console.log(res);
if (res.data.success) {
console.log(res.data);
26
School of Computing, IIITU[CSL702]: 18120
localStorage.setItem("token", res.data.token);
// props.history.push("/doctorlogin");
else if(res.data.email) {
history.push("/doctorlogin");
}else {
console.log(res.data);
});
return (
<div>
<div className={classes.extra}>
<div >
27
School of Computing, IIITU[CSL702]: 18120
<Grid>
<div>
<div className={classes.paperStyle}>
<Grid align="center">
</Grid>
<div className={classes.extra1}>
<TextField
id="outlined-basic"
label="Hospital Name"
variant="outlined"
className={classes.field}
/>
<TextField
id="outlined-basic"
label="Email"
variant="outlined"
className={classes.field}
/>
<TextField
id="outlined-basic"
28
School of Computing, IIITU[CSL702]: 18120
label="Address"
variant="outlined"
className={classes.field}
/>
<TextField
id="outlined-basic"
label="Contact Number"
variant="outlined"
className={classes.field}
/>
<TextField
id="outlined-basic"
label="Location"
variant="outlined"
className={classes.field}
/>
<TextField
id="outlined-basic"
label="Password"
variant="outlined"
29
School of Computing, IIITU[CSL702]: 18120
type="password"
className={classes.field}
/>
<TextField
id="outlined-basic"
label="Confirm Password"
variant="outlined"
type="password"
className={classes.field}
/>
<Button
type="submit"
variant="contained"
className={classes.btnstyle}
fullWidth
onClick= {submitHandler}
href="/"
>
Sign Up As a Hospital
</Button>
</div>
30
School of Computing, IIITU[CSL702]: 18120
<Typography>
</Typography>
</div>
</div>
</Grid>
</div>
</div>
</div>
</div>
);
};
31
School of Computing, IIITU[CSL702]: 18120