/MDP

MDP is a portal application targeted for hospital staff allowing quick markup for patients information and reports. Created for ease of use and to quickly access correct Information.

Primary LanguagePython

Medical Dashboard Portal(MDP)

MDP is a portal created for hospital staff use. This app was tailored for ease of use and access for important hospital information consisting of patient and report information.

Wiki

API routes that will be used by our frontend server

Schema of how MDP's database will be set up using PostgreSQL.

List of features needed for the Minimum Viable Product (MVP) and its CRUD features.

Screenshots

Image from Gyazo

Announcement:

image

Reports:

image

Staff and Patients:

image image

Departments:

image

Messages:

image

Many to Many Relationships:

image

Technical Difficulties

The most difficult challenge was finishing the Many to Many relationship feature. Because I wanted many to many relationships to be edited when a staff clicked on save, I had to keep in mind the current state so I can accurately pass in the correct data to my REST API to whether add or delete a relationship. Not only was this a challenge for the front-end but also the backend. I have to accurently parse the information making sure that the relationship must exist before deleteting and that the relationship must not exsist before deleting. I know there could be duplicates of relationships that can cause errors and break the server.

Screenshots

image

image

Features

  • Full CRUD for Reports
  • Full CRUD for Patients
  • Full CRUD for Departments
  • Full CRUD for Messages
  • Full CRUD for Many to Many relationships between, Reports, Patients, Departments, Staffs
  • Setup AWS S3 to allow staffs to upload profile picture for themselves or patients.
  • Setup WebSockets to allow messaging between staff in real time.

Future Features

  • Canvas to allow highlight when hovering over department buildings

Technologies Used

  • React.js
  • Python
  • Flask
  • Render
  • Docker
  • PostgreSQL
  • AWS
  • WebSocket

Local Installation

  1. Clone this repo

    https://github.com/vernfongchao/MDP.git
  2. Install dependencies for the back end

    pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt
  3. Install dependencies for the react front end

    cd react-app
    npm install
  4. Create PostgreSQL user

    CREATE USER mdp_app_dev WITH CREATEDB PASSWORD 'any_password'
  5. Create PostgreSQL Database

    CREATE DATABASE mdp_app WITH OWNER dp_app_dev
  6. Create a .env file in the root directory with the same variables as .env.example and change the value of DATABASE_URL and SECRET_KEY

    • Replace 'password' with any that you see fit and make sure its the same password when creating database User
    DATABASE_URL=postgresql://mdp_app_dev:any_password_here@localhost/mdp_app
    • Replace the value of SECRET_KEY to any secure encripted string of characters
    SECRET_KEY=Thisistotallynotawellkeptsecretkey,makesureyouchangeit
    • Go setup your AWS account and bucket (Please follow this guide for setup)
    S3_BUCKET='bucket name'
    S3_KEY='AWS User Key'
    S3_SECRET='Any secret key of your choosing'
  7. Flask backend, Migrate, Upgrade, and Seed! In the root directory run

    pipenv shell
    flask db upgrade
    flask seedall
  8. Start back end server while in root directory

    flask run
  9. In a new terminal, enter react frontend directory and run

    npm start
  10. If a new broswer tab does not open, navigate to localhost:3000 in your browser

  11. Start using Stay The Night!, Demo user is set up in the Login form. Please Enjoy!