| Abigail White | Ben Ayzenberg | Enrique Rico | Kayla Asay |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
"Rest Insured" is an iOS app that connects users with health care facilities based on their preferred location and health insurance provider. The code for iOS front-end development can be accessed in the Rest Insured repository. This current repository provides the back-end code for the application, created using JavaScript and Node.js.
This application is intended for educational purposes only. This project does not maintain user medical records with respect to health care needs or preferences. This app does not persist records of previous health care appointments or illness.
- Connect users with medical facilities that accept their insurance, based on user input of location and insurance provider.
- Utilize registered user functionality to access app functionality
- This app was structured using MVC (Model-View-Controller) architecture.
- This project is deployed on Heroku using staging and production environments.
- The primary resources utilized in this project are Node.js, Mongo DB, Mocha/ Chai, and Express Middleware.
- Registered user takes in full name, email, location, provider, password info
- Password hashed so the password is never stored in plain text
- Input of provider info and location
- User location
- Range of query
- Insurance provider name
- Output of medical institutions (dental, pharmacy, doctors) that accept insurance.
- Visualization: interactive pins on a map AND listed information beneath map
- Provided info includes:
- Doctor
- Phone number
- Name
- Practice
- Practice name
- Insurance providers accepted (list)
- Practice phone number
- Specialty
- Location
- Filter requests to api by “specialty”
- Book appointments functionality
- Calendar notifications of appointment
- Unregistered user functionality to access query and map functionality
-
BetterDoctor API: Retrieve insurance information
-
Node.js: Server-side JavaScript environment
-
Mongo DataBase: Maintain user registration data
-
Heroku: Deployment (Staging and Production Environments)
-
Express: Middleware functionality
-
Mongoose: Manage asynchronous environment
-
JSON Web Token: Secure data transmission
-
Bluebird: Promise rendering
-
Body parser: Middleware development
-
Debug: Debugging code process
-
Cors: Provides Express middleware
-
Error Handler: Create error status
-
Multer: Handle middleware form data
-
Bcrypt: Utilized in password hashing processes
-
Request: Utilized in making http calls
-
Request-Promise: Utilize Request and Bluebird in making http calls
-
Developer only:
- GitHub Projects/ Organization
- Google Docs for larger overview, daily stand-ups
- Slack for basic communication
Deployed endpoint: https://rest-insured-production.herokuapp.com
Note: Application requests will be unsuccessful without essential environment variables.
- First,
npm ito download all resources onto the local machine. - In terminal, run files using
nodemon server.
Objective: Create, retrieve, modify, and delete user account info from MongoDB.
Enter into terminal window:
- Create Account:
- Template:
http POST https://rest-insured-production.herokuapp.com/signup <fullName>=<input> <email>=<input> <password>=<input> <insurance>=<input> - Example:
http POST https://rest-insured-production.herokuapp.com/api/signin fullName=abigail email=abs@white.com password=1234 insurance=aetna
- Fetch Account:
- Template:
http GET https://rest-insured-production.herokuapp.com/signin -a <email>:<password> - Example:
http GET https://rest-insured-production.herokuapp.com/api/signin -a abswhite:1234
- Update Account:
- Template:
http PUT https://rest-insured-production.herokuapp.com/update/<user-id> <key>:<changed value> 'Authorization:Bearer <token>' - Example:
http PUT https://rest-insured-production.herokuapp.com/update/1093982398738957329857 <fullName>:<abbi> 'Authorization:Bearer <token>'
- Delete Account:
- Template:
http DELETE https://rest-insured-production.herokuapp.com/delete/<user-id> 'Authorization:Bearer <token>' - Example:
http DELETE https://rest-insured-production.herokuapp.com/update/1093982398738957329857 'Authorization:Bearer <token>'
Objective: Fetch provider information based on Location and Insurance Provider input.
- Further documentation found at Better Doctor API:
- Utilize
http://api.betterdoctor.comas basis for request endpoints.
- API URL Request Retrieved from External API:
http GET https://api.betterdoctor.com/2016-03-01/doctors?insurance_uid=${req.query.insurance}&location=${req.query.lat}%2C${req.query.lon}%2C${req.query.range}&limit=5&user_key=${process.env.user_key}
- API URL Sent to iOS Front-End (example):
http GET https://rest-insured-staging.herokuapp.com/ext/doctors?lat=47.606&lon=-122.332&range=10&insurance=regenceblueshieldofwashinton-regencewapreferredprovidernetwork 'Authorization:Bearer <token>'
Example of data output from API request
{
"Providers": [
{
"Practice" : {
"Name" : "Good Doctors",
"phone" : "1111111111",
"uid" : "1234uiid576851234",
"lat" : 47.635867,
"long" : -122.281694,
"state": "WA",
"state_long": "Washington",
"street": "821 Saint Helena Hwy S",
"zip": "98116",
"accepts_new_patients": true,
"Doctors" : [
{
"Doctor Name" : "Adam Scott",
"Specialty" : "cardiologist"
}
]
}
}
]
}
This project is licensed under the MIT License - see the LICENSE file for details
Thank you to Adam Wallraff, Scott Schmidt, Thomas Martinez, Devon Hackley, Erica Winberry, and many others for guidance and assistance throughout the project.




