Skip to content
A Ruby on Rails API that supplies personal medical data to help patients work with their healthcare providers. Uses improved database normalization and error-handling.
Branch: master
Clone or download
Pull request Compare This branch is 3 commits behind mmbensalah:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib/tasks
log
public
spec
storage
test
tmp
vendor
.gitignore
.rspec
.ruby-version
.travis.yml
1 POST :users.png
10 POST :appointments.png
11 GET :appointments.png
12 DELETE :appointments.png
13 POST :prescriptions.png
14 GET :prescriptions.png
15 DELETE :prescription.png
2 GET :users.png
3 POST :providers.png
4 GET :providers.png
5 POST :profiles.png
6 GET :profiles.png
7 PATCH :profiles.png
8 POST :insurances.png
9 GET :insurances.png
9.1 DELETE :insurances.png
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru
pull_request_template.md

README.md

📱 DocUWell

Project Objective

This project was created for the 4th module of the backend program at Turing School of Software & Design. This app uses TDD and Ruby on Rails to create API endpoints for a frontend app "DocUWell" to use. The frontend app in production can be found at https://myhealthnavigator.herokuapp.com/. The app was designed to take in and store a user's medical data i.e their appointments, providers, insurance information and prescriptions.

⚙️ Initial Setup

Running the code locally

  1. Clone the git repository
  2. Run bundle from the project directory
  3. Run bundle exec rake db:{create,migrate,seed}
  4. run rails s and visit localhost:3000/api/v1 to begin interacting with API endpoints

Backend Production url

https://my-health-tracker.herokuapp.com/api/v1

🕹 How to Use

Create a User
  • URI:
    /users
  • METHOD:
    POST
  • DATA PARAMS:
    email=[string] password=[string]
  • DATA RESPONSE:
    alt text
Retrieve a User's API key
  • URI:
    /users
  • METHOD:
    GET
  • DATA PARAMS:
    email=[string] password=[string]
  • DATA RESPONSE:
    alt text
Create a Provider
  • URI:
    /providers
  • METHOD:
    POST
  • DATA PARAMS:
    api_key=[string] given_name=[string] surname=[string] street_address=[string] city=[string] state=[string] zip=[string] phone=[string] speciality=[enum]
    enum = allergist, anesthesiologist, cardiologist, dentist, dermatologist, endocrinologist, general_practitioner, gastroenterologist, geneticist, geriatric_specialist, gynecologist, hematologist, internist, massage_therapist, naturopath, nephrologist, neurologist, obstetrician, oncologist, ophthalmologist, optometrist, osteopath, palliative, pediatrician, podiatrist, psychiatrist, pulmonologist, radiologist, rheumatologist, surgeon, urologist
  • DATA RESPONSE:
    alt text
Retrieve all Providers
  • URI:
    /providers
  • METHOD:
    GET
  • DATA PARAMS:
    none
  • DATA RESPONSE:
    alt text
Create a Profile for User
  • URI:
    /profiles
  • METHOD:
    POST
  • DATA PARAMS:
    api_key=[string] user_id=[integer] given_name=[string] surname=[string] dob=[unix time] height=[integer] weight=[integer] bp_systolic=[integer] bp_diastolic=[integer] heart_rate=[integer] blood_type=[enum]
    enum = o_negative, o_positive, a_negative, a_positive, b_negative, b_positive, ab_negative, ab_positive
  • DATA RESPONSE:
    alt text
Retrieve a Profile
  • URI:
    /profiles
  • METHOD:
    GET
  • DATA PARAMS:
    api_key=[string]
  • DATA RESPONSE:
    alt text
Edit a Profile
  • URI:
    /profiles
  • METHOD:
    PATCH
  • DATA PARAMS:
    api_key=[string] profile_id=[integer] the profile param to be modified
  • DATA RESPONSE:
    alt text
Create an Insurance
  • URI:
    /insurances

  • METHOD:
    POST

  • DATA PARAMS:
    api_key=[string] profile_id=[integer] carrier=[string] group_number=[string] id_number=[string] phone_number=[string] insurance_type=[enum]
    enum = medical, dental, vision, supplemental

  • DATA RESPONSE:
    alt text

Retrieve an Insurance
  • URI:
    /insurances

  • METHOD:
    GET

  • DATA PARAMS:
    api_key=[string] profile_id=[integer]

  • DATA RESPONSE:
    alt text

Delete an Insurance
  • URI:
    /insurances

  • METHOD:
    DELETE

  • DATA PARAMS:
    api_key=[string] insurance_id=[integer]

  • DATA RESPONSE:
    alt text

Create an Appointment
  • URI:
    /appointments
  • METHOD:
    POST
  • DATA PARAMS:
    api_key=[string] profile_id=[integer] provider_id=[integer] datetime=[unix]
  • DATA RESPONSE:
    alt text
Retrieve an Appointment
  • URI:
    /appointments

  • METHOD:
    GET

  • DATA PARAMS:
    api_key=[string] profile_id=[integer]

  • DATA RESPONSE:
    alt text

Delete an Appointment
  • URI:
    /appointments
  • METHOD:
    DELETE
  • DATA PARAMS:
    api_key=[string] profile_id=[integer] appointment_id=[integer]
  • DATA RESPONSE:
    alt text
Create a Prescription
  • URI:
    /prescriptions

  • METHOD:
    POST

  • DATA PARAMS:
    api_key=[string] profile_id=[integer] provider_id=[integer] name=[string] date=[unix] directions=[string] refill=[boolean] dose_units=[enum]

  • DATA RESPONSE:
    alt text

Retrieve a Prescription
  • URI:
    /prescriptions

  • METHOD:
    POST

  • DATA PARAMS:
    api_key=[string] profile_id=[integer]

  • DATA RESPONSE:
    alt text

Delete a Prescription
  • URI:
    /prescriptions

  • METHOD:
    DELETE

  • DATA PARAMS:
    api_key=[string] profile_id=[integer] provider_id=[integer] prescription_id=[integer]

  • DATA RESPONSE:
    alt text

📊 How to Run Tests

  1. from the terminal and the project root, run bundle exec rspec

🏗 Tech Stack List

  • Ruby v 2.4.1
  • Rails 5.2.2
  • Postgresql
  • RSpec
  • UPS API
  • Travis CI

📥 How To Contribute

  1. Fork this repo
  2. Create your feature branch (git checkout -b feature/thingamajig)
  3. Commit your changes (git commit -am 'Added a cool doodad!')
  4. Push to the branch (git push origin feature/thingamajig)
  5. Create a new Pull Request

🚀 Core Contributors

Miriam Bensalah Github:https://github.com/mmbensalah

Norm Schultz Twitter:@normanrs Github:https://github.com/normanrs Web:http://www.normanrschultz.com

You can’t perform that action at this time.