API documentation
https://avenue-angelhack.herokuapp.com
-
POST /authenticate/doctor/register : Parameters (name, email, password, contact)
-
Response : {success: true, message: "Doctor registered successfully"}
unirest.post('https://avenue-angelhack.herokuapp.com/authenticate/doctor/register')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json'})
.send(resp)
.end(function (response) {
console.log(response.body);
if (response.body.success === true)
res.render('registered.hbs', { code: 'Congratulations! You have successfully registered'});
else
res.render('registered.hbs', { code: 'Sorry! There was some problem, please try again!'});
});
-
POST /authenticate/doctor/login : Parameters (email, password)
-
Response : {success: true, message: "Doctor logged in successfully", doctor: }
unirest.post('https://avenue-angelhack.herokuapp.com/authenticate/doctor/login')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json'})
.send(resp)
.end(function (response) {
console.log(response.body.doctor.patients);
// res.render('docPat.hbs',{ patData: response.body.doctor.patients });
console.log(response.body._id);
res.redirect(`fetchAll/${response.body.doctor._id}`);
});
-
POST /authenticate/disease/register : Parameters (name, description)
-
Response : {success: true, message: "Disease registered successfully"}
POST /authenticate/user/register : Parameters (name, address, geoaddress, email, password, contact)
Response : {success: true, message: "User registered successfully"}
POST /authenticate/user/login : Parameters (email, password)
Response : {success: true, message: "User logged in successfully", user: <user object>}
- POST /doctor/closeCase/:patId/:docId : URL Parameters (patientId, doctorId)
- Response : {success: true, message: "Case closed successfully"}
- POST /doctor/fetchAllPatients/:id : URL Parameters (doctorId)
- Response: {success: true, message: "Fetched all the patients", patients: <Array of patient objects>}
- GET /doctor/fetchAllCoordiantes
- Response: {success: true, message: "Coordinates fetched successfully", coordinates: <Array of filtered objects containing the geocoordinates>}
-
POST /doctor/openCase/:docId : URL Parameters (doctorId), Parameters (name, address, geoaddress, email, contact, disease_name, disease_desc, img_url)
-
Reponse: {success: true, message: "Patient registered successfully"}
Locate all the open cases within 4km of current location
- POST /doctor/nearbyCases : Parameters (current_lat, current_long)
- Response: {success: true, message: "Fetched the cases within 4km", cases: <Array of cases within 4km>}
unirest.post(`https://avenue-angelhack.herokuapp.com/doctor/openCase/${objId}`)
.headers({'Accept': 'application/json', 'Content-Type': 'application/json'})
.send(sendObj)
.end(function (response) {
res.redirect(`/createdPat/${objId}`);
// res.redirect(`fetchAll/${}`)
});
-
Clone the repo (Either
git clone
or download the repo) -
npm install
-
npm start
-
Sell as a product
-
Sell as a service