Skip to content

Commit

Permalink
Project Uploaded
Browse files Browse the repository at this point in the history
Daniel committed Dec 7, 2020
1 parent 33a14f1 commit d4918f3
Showing 80 changed files with 22,504 additions and 0 deletions.
97 changes: 97 additions & 0 deletions DB values/bloodbanks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[{
"_id": {
"$oid": "5fc8e874aad8b72e54b505ea"
},
"Name": "Karnataka Red Cross Blood Bank",
"Address": "#1/1,KSFC building Thimmaiah Road, Vasantha Nagar Bangalore – 560052",
"Blood-Units": {
"O+": 30,
"O-": 5,
"A+": 12,
"A-": 4,
"B+": 28,
"B-": 4,
"AB+": 7,
"AB-": 2
}
},{
"_id": {
"$oid": "5fcb15fcaec8c4438a3815f2"
},
"Name": "Dr. Shivaji Rao’s Blood Bank",
"Address": "No.1, KH Road, Lalbagh Road, Bangalore, Karnataka – 560027",
"Blood-Units": {
"O+": 29,
"O-": 6,
"A+": 10,
"A-": 1,
"B+": 20,
"B-": 7,
"AB+": 4,
"AB-": 3
}
},{
"_id": {
"$oid": "5fcb160daec8c4438a3815f3"
},
"Name": "Grace Blood Bank",
"Address": "1st Floor, Vasantappa ComplexCBI Road, Ganga Nagar, Bengaluru, Karnataka 560032",
"Blood-Units": {
"O+": 50,
"O-": 12,
"A+": 14,
"A-": 5,
"B+": 34,
"B-": 13,
"AB+": 10,
"AB-": 6
}
},{
"_id": {
"$oid": "5fcb1618aec8c4438a3815f4"
},
"Name": "Minerva Voluntary Blood Bank",
"Address": "# 163, Rajeshwari Complex, Minverva Circle, RV Road, Basavanagudi, Bangalore, 560004",
"Blood-Units": {
"O+": 23,
"O-": 12,
"A+": 34,
"A-": 6,
"B+": 43,
"B-": 18,
"AB+": 11,
"AB-": 5
}
},{
"_id": {
"$oid": "5fcb1625aec8c4438a3815f5"
},
"Name": "Navarang Blood Bank",
"Address": "2953, 1st FloorMahakavi Kuvempu Rd, Rajajinagar, Bengaluru, Karnataka 560010",
"Blood-Units": {
"O+": 62,
"O-": 12,
"A+": 26,
"A-": 10,
"B+": 31,
"B-": 9,
"AB+": 16,
"AB-": 3
}
},{
"_id": {
"$oid": "5fcb165b69f0ac7d53a92c66"
},
"Name": "Naveen Blood Bank",
"Address": "2, 4th Block, 30th Cross, Jayanagar 3rd Block, Yediyur, Bengaluru",
"Blood-Units": {
"O+": 29,
"O-": 10,
"A+": 7,
"A-": 3,
"B+": 21,
"B-": 8,
"AB+": 12,
"AB-": 3
}
}]
37 changes: 37 additions & 0 deletions DB values/donors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[{
"_id": {
"$oid": "5fcb54186fcd4906585cc424"
},
"firstName": "Daniel",
"lastName": "Saldanha",
"phoneNumber": 9513377329,
"mailAddress": "saldanha.dan@gmail.com",
"bloodType": "B+",
"dateOfBirth": "2001-07-26",
"donorType": "Blood Donor",
"__v": 0
},{
"_id": {
"$oid": "5fcb83456fcd4906585cc429"
},
"firstName": "John",
"lastName": "Oliver",
"phoneNumber": 9513377329,
"mailAddress": "john_oliver@gmail.com",
"bloodType": "B-",
"dateOfBirth": "2000-08-19",
"donorType": "Orgon Donor",
"__v": 0
},{
"_id": {
"$oid": "5fce8bc40cea3e0fe42adbdd"
},
"firstName": "Adina",
"lastName": "Fernandes",
"phoneNumber": 9578844329,
"mailAddress": "adina@gmail.com",
"bloodType": "AB+",
"dateOfBirth": "1995-06-19",
"donorType": "Blood Donor",
"__v": 0
}]
121 changes: 121 additions & 0 deletions DB values/hospitals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
[{
"_id": {
"$oid": "5fc8e1ddaad8b72e54b505e9"
},
"Name": "Manipal Hospital",
"Address": "98, Old Airport Rd, Kodihalli, Bangalore, Karnataka 560017",
"Specialities": {
"Dialysis": "Available",
"CT scan": "Available",
"Intensive Care": "UnAvailable",
"Rheumatology": "Available",
"Nephrology": "Available",
"Neuropsychology": "Available",
"OB-GYN": "Available",
"Psychiatry": "Available",
"Pulmonology": "Available",
"Vascular Medicine": "Available",
"Bariatric Surgery": "Available"
},
"Information": "Manipal Hospitals is a chain of multi-specialty hospitals in India. It is founded by Dr. Tonse Madhav Ananth Pai in 1953,It is part of the Manipal Education system and Medical Group.Its network is spread across 15 locations in India and it also holds an international presence through a branch in Malaysia named Manipal Hospitals Klang."
},{
"_id": {
"$oid": "5fca669d35d4e2f492ab31cf"
},
"Name": "Apollo Hospital",
"Address": "Plot No.154/11, Bannerghatta Road, Opposite IIM, Bangalore, Karnataka, 560076",
"Specialities": {
"Dialysis": "Available",
"CT scan": "Available",
"Intensive Care": "Available",
"Rheumatology": "Available",
"Nephrology": "UnAvailable",
"Neuropsychology": "Available",
"OB-GYN": "Available",
"Psychiatry": "UnAvailable",
"Pulmonology": "UnAvailable",
"Vascular Medicine": "Available",
"Bariatric Surgery": "Available"
},
"Information": "Apollo Hospitals has emerged as Asia’s foremost integrated healthcare services provider and has a robust presence across the healthcare ecosystem, including Hospitals, Pharmacies, Primary Care & Diagnostic Clinics and several retail health models."
},{
"_id": {
"$oid": "5fcb1549aec8c4438a3815ee"
},
"Name": "BGS Global Hospital",
"Address": "#67, Uttarahalli Road, Kengeri, Bangalore, Karnataka. Pin Code: 560060",
"Specialities": {
"Dialysis": "Available",
"CT scan": "UnAvailable",
"Intensive Care": "Available",
"Rheumatology": "UnAvailable",
"Nephrology": "Available",
"Neuropsychology": "Available",
"OB-GYN": "UnAvailable",
"Psychiatry": "Available",
"Pulmonology": "Available",
"Vascular Medicine": "Available",
"Bariatric Surgery": "UnAvailable"
},
"Information": "The BGS Global Hospitals in Bengaluru is a state-of-the-art, NABH facility with expertise in multi-disciplinary tertiary specialties. With over 500-beds, the hospital is one of the largest of its kind in Bengaluru and consists of 14-operation theatres, most advanced imaging facilities and has one of the largest liver ICUs in the country. The hospital caters to several key specialties including oncology, neurosurgery, liver diseases and various others. It brings advanced technologies that drive new and more effective treatments."
},{
"_id": {
"$oid": "5fcb1555aec8c4438a3815ef"
},
"Name": "Fortis Hospital",
"Address": "Cunningham Road, Millers Tank Bund Road, Bangalore",
"Specialities": {
"Dialysis": "UnAvailable",
"CT scan": "UnAvailable",
"Intensive Care": "Available",
"Rheumatology": "Available",
"Nephrology": "Available",
"Neuropsychology": "Available",
"OB-GYN": "UnAvailable",
"Psychiatry": "Available",
"Pulmonology": "Available",
"Vascular Medicine": "UnAvailable",
"Bariatric Surgery": "Available"
},
"Information": "Fortis Healthcare Limited is a leading integrated healthcare delivery service provider in India. The healthcare verticals of the company primarily comprise hospitals, diagnostics and day care specialty facilities. Currently, the company operates its healthcare delivery services in India, Nepal, Dubai and Sri Lanka with 36 healthcare facilities (including projects under development), approximately 4,000 operational beds and over 415 diagnostics centres."
},{
"_id": {
"$oid": "5fcb1561aec8c4438a3815f0"
},
"Name": "Bowring & Lady Curzon Hospital",
"Address": "Near Shivajinagar bus stand Cantonment area, Bangalore",
"Specialities": {
"Dialysis": "Available",
"CT scan": "Available",
"Intensive Care": "Available",
"Rheumatology": "Available",
"Nephrology": "Available",
"Neuropsychology": "Available",
"OB-GYN": "Available",
"Psychiatry": "UnAvailable",
"Pulmonology": "UnAvailable",
"Vascular Medicine": "Available",
"Bariatric Surgery": "Available"
},
"Information": "Bowring and Lady Curzon Hospital is a multispeciality hospital, located in the heart of Bangalore City, at Shivajinagar. The hospital is over 100 years old ,approx 2 kms towards east of Vidhana Soudha. The architecture of the buildings are of modern as well as that of the yester years. Bowring Hospital was established in 1867 for men and Lady Curzon Hospital was established in 1890 for women and children. Lewis Bentham Bowring was the chief commissioner of Mysore and Coorg from 1862 to 1870. Lady Victoria Curzon is the wife of Lord Curzon , who was Viceroy 1899-1905."
},{
"_id": {
"$oid": "5fcb156aaec8c4438a3815f1"
},
"Name": "Central Leprosorium",
"Address": "Near Binny Mill, 1st Cross, Magadi Road, Behind City Railway Station, Bangalore – 560023",
"Specialities": {
"Dialysis": "Available",
"CT scan": "UnAvailable",
"Intensive Care": "Available",
"Rheumatology": "UnAvailable",
"Nephrology": "Available",
"Neuropsychology": "Available",
"OB-GYN": "UnAvailable",
"Psychiatry": "UnAvailable",
"Pulmonology": "Available",
"Vascular Medicine": "Available",
"Bariatric Surgery": "Available"
},
"Information": "In Bangalore, Central Leprosorium Hospital is a recognized name in patient care. They are one of the well-known Hospitals in Magadi Road. Backed with a vision to offer the best in patient care and equipped with technologically advanced healthcare facilities, they are one of the upcoming names in the healthcare industry. Located in , this hospital is easily accessible by various means of transport. A team of well-trained medical staff, non-medical staff and experienced clinical technicians work round-the-clock to offer various services ."
}]
Binary file added OAS Presentation.pptx
Binary file not shown.
116 changes: 116 additions & 0 deletions backend/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
const express=require('express');
const router=express.Router();
const mongoose = require('mongoose');

// Schemas for different collections in the database
const hospitalSchema=mongoose.Schema({
Name:{
type:String,
require:true
},
Address:{
type:String,
require:true
},
Information:{
type:String,
require:true
}
});
const bloodBankSchema=mongoose.Schema({
Name:{
type:String,
require:true
},
Address:{
type:String,
require:true
}
});
const donorSchema=mongoose.Schema({
firstName:{
type:String,
require:true
},
lastName:{
type:String,
require:true
},
phoneNumber:{
type:Number,
require:true
},
mailAddress:{
type:String,
require:true
},
bloodType:{
type:String,
require:true
},
dateOfBirth:{
type:String,
require:true
},
donorType:{
type:String,
require:true
}
});

const hospitalCollection=mongoose.model('hospitals',hospitalSchema);
const bloodBankCollection=mongoose.model('bloodbanks',bloodBankSchema);
const donorCollection=mongoose.model('donors',donorSchema);

// GET Functions for all the collections
router.get('/hospitals', (req, res) => {
hospitalCollection.find({ })
.then((data) => {
console.log('Hospital Data: ', data);
res.json(data);
})
.catch((error) => {
console.log('error: ', daerrorta);
});
});

router.get('/bloodbanks', (req, res) => {
bloodBankCollection.find({ })
.then((data) => {
console.log('Hospital Data: ', data);
res.json(data);
})
.catch((error) => {
console.log('error: ', daerrorta);
});
});

router.get('/donors', (req, res) => {
donorCollection.find({ })
.then((data) => {
console.log('Hospital Data: ', data);
res.json(data);
})
.catch((error) => {
console.log('error: ', daerrorta);
});
});

// Post function for registering donors
router.post('/register', (req, res) => {
const data = req.body;

const newBlogPost = new donorCollection(data);

newBlogPost.save((error) => {
if (error) {
res.status(500).json({ msg: 'Internal server errors' });
return;
}
return res.json({
msg: 'Your data has been saved'
});
});
});

module.exports=router;
Loading

0 comments on commit d4918f3

Please sign in to comment.