Skip to content

MedHub is one-stop-shop destination for healthcare. Our mission is to make healthcare experience easy, regardless of your specific need. It is designed to simplify the healthcare experience, connecting patients with qualified doctors, enabling doctors to meet with patients effectively on their schedule, and helping pharmacists deliver quality care.

Notifications You must be signed in to change notification settings

Keval-Gandevia/MedHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo MedHub

MedHub is a one-stop-shop destination for healthcare. Our mission is to make your healthcare experience easy, regardless of your specific needs. Our platform is designed to simplify the healthcare experience, connecting patients with qualified doctors, enabling doctors to meet with patients effectively and on their own schedule, and helping pharmacists deliver quality care.

Table of Contents

Overview

MedHub is designed to simplify the healthcare process for everyone involved - patients, doctors, and pharmacists.

Code Coverage

Static Badge Static Badge Static Badge Static Badge
Test Coverage

Code Smell Statistics

Smell Type Total Smells True Positive False Positive
Implementation Smells 130 55 75
Design Smells 189 14 175
Architecture Smells 13 2 11
Test Smells 36 18 18
Total Smells 368 89 279

See the MedHub code smells summary file for justifications of smells in the case of false positives, and explanations of how we refactored in the case of true positives.

CI/CD for MedHub

The information below details the steps in the MedHub CI/CD pipeline used for building and deploying the application.

Build Stage

  • Builds the backend using the command mvn clean package and creates the jar file in the target directory.

Test Stage

  • Runs all test cases in the project using the command mvn test.

Code Quality Stage

  • Uses DesigniteJava to run a report on code smells and saves the resulting artifacts in the code_smells directory with the command java -jar DesigniteJava.jar -i ASDC -o code_smells.

Publish Stage

  • Logs into Docker Hub and builds the Docker images for the backend and frontend code, tags them with a unique identifier and pushes these to Docker Hub.

Deployment Stage

  • Deploys the backend and frontend Docker containers to the VM URL.

Build and Deployment Information

MedHub is a Maven-based project using the Spring framework for the backend and React for frontend.

To deploy this project on your local machine, follow the steps below

Backend

  • Download the Java Development Kit (JDK) from the Oracle JDK website: https://www.oracle.com/ca-en/java/technologies/downloads/. Select the most recent version for your operating system and follow the installation instructions.
  • Download the latest version of Apache Maven from the Apache Maven website: https://maven.apache.org/download.cgi. Follow installation instructions.
  • Modify the application.properties file found in the Backend folder to configure the project to your local database.
  • Navigate to the project directory in your terminal and run mvn clean install to build the code.
  • Once the build is successful, navigate to the target directory of the project directory and run java -jar ASDC.jar.

Frontend

  • Install Node.js from https://nodejs.org/en/download. Select the most recent version for your operating system. Follow the installation instructions to install Node.js and npm (Node Package Manager).
  • Open your terminal and navigate to the project directory.
  • Install project dependencies by running npm install.
  • Start the development server by running npm start.
  • Navigate to http://localhost:3000/ in your browser to view the application.

Dependencies

The following is a list of dependencies and libraries used in this application, along with their purpose in the application:

No Library Version Description
1 Spring Boot Starter Data JPA 3.2.2 Used for data access and management with the database.
2 Spring Boot Starter Web 3.2.2 Enables setting up the application with web functionalities such as RESTful services and web controllers.
3 Spring Boot Starter Validation 3.2.2 Used for defining validation rules within the application.
4 Spring Boot Starter Mail 3.2.2 Provides capabilities for sending emails, used for user registration and password reset in MedHub.
5 Spring Boot Devtools 3.2.2 Includes general tools that aid developers during the development phase of the application.
6 JJWT API 0.12.5 Used for implementing authentication and authorization mechanisms in the application.
7 JJWT Impl 0.12.5 Used for performing JWT authentication operations.
8 MySQL Connector J 8.3.0 Allows the application to connect to the MySQL database.
9 Spring Boot Configuration Processor 3.2.2 Helps in configuring the application during compilation.
10 Lombok 1.18.32 Automatically generates boilerplate code such as getters and setters, reducing manual coding efforts.
11 Spring Boot Starter Security 3.2.2 Provides features for authorization and authentication within the application.
12 Commons Codec 1.16.0 Includes encoding algorithms useful for tasks like profile picture uploads.
13 Jakarta Validation API 3.0.2 Utilized for built-in constraint validation in the application.
14 JUnit Vintage Engine 5.10.2 Enables running tests using JUnit and ensures compatibility with older versions of JUnit.

Use case scenarios

Homepage

  • Upon accessing the MedHub website, users can see key information about what MedHub offers, with options to register and sign in to the site.
    MedHub Homepage

Doctor and Pharmacy Registration

  • Doctors and pharmacists can sign up by providing their name, email address, home or practice address, medical license number and creating a password.
  • Upon registration, doctor and pharmacists will not be able to access their MedHub account until the admin verifies them.
    Doctor Registration

Patient Sign Up

  • Patients can sign up for a MedHub account by providing their name, email address, and creating a password.
    Patient Signup

Authentication

  • All users can sign in to their account using the SIGN IN button on the homepage and entering their email address and password.
    User Signin

Patient Dashboard

Upon logging in, patients will be brought to their dashboard which will display all the key functionalities they can access.
Patient Dashboard

  1. Profile: Patients can view and modify their personal details
    Patient Profile
  2. Doctor Catalog: Patients can view all the doctors in the system and filter based on specialty when they are looking for a particular doctor. The doctor catalog page displays the option to book an appointment with the doctor
    Doctor Catalog
  3. Chat: Patients can chat in real-time with the doctor to clarify questions or ask about upcoming and past appointments, as well as send multimedia documents back and forth.
    Patient Chat
    Patient Blogs
  4. Appointments: After selecting "book an appointment" for a doctor found in the doctor catalog, patients can select a date and time for their appointment based on the doctor's real availability. They can also leave ratings and feedback for completed appointments.
    Patient Appointment
    Patient Feedback
  5. Blogs: Patients can view articles written by doctors about health tips, trends, or essential health information. The patient can filter by doctor to see the blogs that are most relevant to them.
    Patient Blogs

Doctor Dashboard

Upon logging in, doctors will be brought to their dashboard which will display all the key functionalities they can access.
Doctor Dashboard

  1. Personal Details: Doctors can view and modify their personal details
    Doctor Profile
  2. Availability: Doctors can update their availability for appointment bookings.
    Doctor Availability
  3. Appointment: Doctors can view all their upcoming appointments and add prescriptions for appointments that have been completed
    Doctor Appointments
    Adding prescriptions
  4. Consultation: Doctors can view all their past consultations
    Doctor Consultation
  5. Pharmacy: Doctors can view the prescriptions they have given to their patients
    Doctor Pharmacy
  6. Blog: Doctors can see all the blogs they have written and write new blogs posts
    Doctor Blogs
  7. Chat: Doctors can chat with their patients to clarify questions or discuss upcoming and past appointments, as well as send multimedia documents back and forth.
    Doctor Chat
  8. Feedback: Doctors can see their overall feedback rating and view comments left by their patients
    Doctor Availability
  9. Notification preferences: Doctors can update their preferences to receive notifications
    Doctor Preferences
  10. Change password: Doctors can change the password for their account
    Doctor Change Password

Pharmacy Dashboard

Upon logging in, pharmacists will be brought to their dashboard which will display all the key functionalities they can access.

  1. Personal Details: Pharmacist can view and modify their personal details
    Pharmacist Personal Details
  2. Prescriptions: Pharmacists can view all prescription orders that have been placed by the doctor
    Pharmacist Prescriptions
  3. Change password: Pharmacists can change the password for their account
    Doctor Change Password

Admin Dashboard

Admins control who can use MedHub, in order to ensure only verified medical professionals can represent themselves. On their dashboard, Admins will see the option to accept or reject pending Doctor and Pharmacist approvals.
Admin Dashboard
You will receive an email informing you of the decision of the admin after validating your medical license.

ER Diagram

The MedHub project uses a relational database to store and access data. The ER Diagram below details the key relationships and attributes found in the MedHub entities.
MedHub ERD

API Table

API HTTP Usage
/admin/dashboard/unverified_doctors GET This API is used to fetch the unverfied doctors
/admin/dashboard/unverified_pharmacists GET This API is used to fetch the unverfied pharmacists
/admin/dashboard/unverified_doctors/details GET This API is used to fetch details of an individual unverified doctor
/admin/dashboard/unverified_pharmacists/details GET This API is used to fetch details of an individual unverified pharmacist
/admin/dashboard/approve POST This API is used to approve users by admin
/admin/dashboard/reject POST This API is used to reject users by admin
/auth/register/doctor POST This API is used to handle registration request for doctors
/auth/register/patient POST This API is used to handle registration request for patients
/auth/register/pharmacist POST This API is used to handle registration request for pharmacists
/auth/signin POST This API is used to handle signing request for any user
/auth/forgot-password POST This API is used to handle the forgot password request. Generates and sends a password reset link to the provided email address.
/auth/reset-password POST This API is used to handle the reset password request. Resets the password for the user associated with the provided email address and token.
/auth/verify-email POST This API is used to handle Handles the email verification for the user
/auth/search-specializations GET This API is used to search in specializations table for given string like entry
/blogs/create-blog POST This API is used to create a new blog post
/blogs/get-blogs GET This API is used to retrieve all blog posts
/blogs/get-patient-blogs GET This API is used to retrieve blog posts for patients
/chat/conversation GET This API is used to retrieve the conversation between the current user and another user
/chat/partners GET This API is used to retrieve the chat partners for the current user
/chat/get_username GET This API is used to retrieve the username of the current authenticated user
/doctor/details GET This API is used to retrieve the profile of the authenticated doctor
/doctor/details/edit PATCH This API is used to edit the profile of the authenticated doctor
/doctor/details/upload_profile_picture POST This API is used to upload a profile picture for a doctor
/doctor/set_notification_preference POST This API is used to set email notification preference of doctor
/doctor/change_password POST This API is used to change password of doctor
/doctor/appointments GET This API is used to retrieve all the appointment of doctor
/doctor/get-filtered-pharmacist-list GET This API is used to retrieve all verified pharmacists filtered by pharmacy name
/doctor/appointment/update PATCH This API is used to update appointment
/doctor/feedback GET This API is used to retrieve all the Feedback of doctor
/patient/profile GET This API is used to fetch details of an individual patient
/patient/profile/edit PATCH This API is used to edit details of an individual patient
/patient/get-filtered-doctor-list GET This API is used to retrieve doctor details with applied filter
/patient/search-specializations GET This API is used to search in specializations table for given string like entry
/patient/appointment/create POST This API is used to book an appointment with doctor
/patient/get-doctor-availability GET This API is used to retrieve list of timeslots weekday wise
/patient/get-doctor-details GET This API is used to retrieve details about doctor from id
/patient/appointments GET This API is used to retrieve list of appointments of patient
/patient/appointment/saveFeedback PATCH This API is used to save feedback in to database
/pharmacist/profile GET This API is used to fetch pharmacist profile for current logged in pharmacist
/pharmacist/profile PATCH This API is used to update the details of the pharmacist
/pharmacist/filtered-appointments GET This API is used to fetch appointments/prescription for pharmacist based on patient name
/pharmacist/change-password POST This API is used to change password of pharmacist
/chat/send WEB SOCKET This API is used to handle sending a private chat message via WebSocket

About

MedHub is one-stop-shop destination for healthcare. Our mission is to make healthcare experience easy, regardless of your specific need. It is designed to simplify the healthcare experience, connecting patients with qualified doctors, enabling doctors to meet with patients effectively on their schedule, and helping pharmacists deliver quality care.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages