Never forget your medical supplies again! MediMindeRx is an application designed to help users create reminders for their medical supplies based on time or geolocation.
The MediMinderx-API-v1 is the backend application used by all of MediMinderx's applications. The application builds out RESTful API endpoints with full CRUD functionality for users and their reminders.
The most difficult and rewarding thing about building this application was picking up a brand new tech stack. We were able to learn python and develop this application in flask in a matter of 14 days.
Check out our deployed site! MediMindeRx Check out our demo video! MediMindeRx Demo
Follow the steps below to get this database up and running on your local environment:
-
PostgreSQL installed
-
Postico Installed
-
Python3 Installed
-
Clone down this repo
git clone [email protected]:MediMindeRx/MediMindeRx-API-v1.git
cd
into directoryMediMindeRx-API-v1
-
Initialize database for first time with
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt
createdb mediminderx
export DATABASE_URL==postgresql://<YOUR USERNAME>:<YOUR PASSWORD>@localhost:5432/mediminderx
python migrate.py db init (this creates a db, so make sure you don’t have one already in postico)
python migrate.py db migrate
python migrate.py db upgrade
python run.py
to start the server
-
How to run test suite
createdb mediminderx_test
export DATABASE_URL==postgresql://<YOUR USERNAME>:<YOUR PASSWORD>@localhost:5432/mediminderx_test
python migrate.py db upgrade
pytest
- Python3
- Flask
- PostgreSQL
- Postico
- Testing Software
- Testing Software
- Option to send texts to family members via Twilio api
- Users can find all the nearest emergency centers (i.e. hostpitals, police stations)
- Users can get notifications based off heart rate or step count sourced off health application such as thorugh fitbit or apple's health app
Body:
json {"name": "John"}
Response:
{
"data": {
"type": "users",
"id": 1,
"attributes": {
"name": "John"
}
}
}
Response:
{
"data": [
{
"type": "users",
"id": 1,
"attributes": {
"name": "John"
}
}
]
}
Response:
{
"data": [
{
"type": "users",
"id": 1,
"attributes": {
"name": "John"
}
},
{
"type": "users",
"id": 2,
"attributes": {
"name": "Jane"
}
}
]
}
Body:
{
"name": "Jake",
"id": "1"
}
Response:
{
"data": {
"type": "users",
"attributes": {
"name": "Jake"
},
"id": 1
}
}
Body:
NO BODY
Response:
{
"message": "User has been successfully deleted"
}
Body:
{
"user_id": "1",
"title": "Soccer Practice",
"supplies": "inhaler",
"show_supplies": "false"
}
Response:
{
"data": {
"type": "reminders",
"id": 3,
"attributes": {
"user_id": 1,
"location_reminder": null,
"creation_date": "2020-10-26T20:17:36.207302",
"schedule_reminder": null,
"supplies": "inhaler",
"show_supplies": false,
"title": "Soccer Practice"
}
}
}
Body:
{
"id": "1",
"title": "Dance Practice",
"supplies": "inhaler",
"show_supplies": "false"
}
Response:
{
"data": {
"type": "reminders",
"attributes": {
"supplies": "inhaler",
"user_id": 1,
"show_supplies": false,
"location_reminder": null,
"title": "Dance Practice",
"creation_date": "2020-10-26T20:17:36.207302",
"schedule_reminder": null
},
"id": 3
}
}
Body:
NO BODY
Response:
{
"message": "Reminder successfully deleted"
}
Response:
{
"data": [
{
"type": "reminders",
"id": 4,
"attributes": {
"supplies": "inhaler",
"title": "Soccer Practice",
"location_reminder": null,
"schedule_reminder": {
"data": {
"type": "schedule",
"id": 6,
"attributes": {
"days": "Tuesday, Wednesday",
"unix_time": "1603767106",
"creation_date": "2020-10-26T20:54:48.401702",
"repeating": false
"times": "10:30"
}
}
},
"creation_date": "2020-10-26T20:46:35.589353",
"user_id": 1,
"show_supplies": false
}
},
{
"type": "reminders",
"id": 5,
"attributes": {
"supplies": "Knee Brace",
"title": "Hockey Game",
"location_reminder": {
"data": {
"type": "location",
"id": 5,
"attributes": {
"location_name": "Home",
"longitude": "-77.0364",
"address": "123 Address Lane"
"creation_date": "2020-10-26T20:56:33.014708",
"latitude": "38.8951"
}
}
},
"schedule_reminder": null,
"creation_date": "2020-10-26T20:47:04.818274",
"user_id": 1,
"show_supplies": false
}
}
]
}
Body:
{
"reminder_id": "1",
"schedule_name": "Soccer reminder",
"unix_time": "1603767106",
"repeating": "false",
"days": "Tuesday, Wednesday",
"times": "10:30"
}
Response:
{
"data": {
"type": "schedule",
"attributes": {
"id": 6,
"days": "Tuesday, Wednesday",
"unix_time": "1603767106",
"schedule_name": "Schedule 1",
"repeating": false
"creation_date": "2020-10-26T20:54:48.401702",
"times": "10:30"
}
}
}
Body:
{
"reminder_id": "5",
"location_name": "Home",
"latitude": "38.8951",
"longitude": "-77.0364",
"address": "123 Address Lane"
}
Response:
{
"data": {
"type": "location",
"id": 5,
"attributes": {
"location_name": "Home",
"longitude": "-77.0364",
"creation_date": "2020-10-26T20:56:33.014708",
"latitude": "38.8951",
"address": "123 Address Lane"
}
}
}