Skip to content

Vaidhya is a mental healthcare assistance platform designed to facilitate secure and seamless interactions between patients and doctors. It offers a user-friendly environment where patients can access mental health support, book appointments, and receive personalized care, while doctors can manage patient reports and appointments efficiently.

License

Notifications You must be signed in to change notification settings

k-arthik-r/Vaidhya

Repository files navigation


                                           

Vaidhya is a mental healthcare assistance platform designed to facilitate secure and seamless interactions between patients and doctors. It offers a user-friendly environment where patients can access mental health support, book appointments, and receive personalized care, while doctors can manage patient reports and appointments efficiently. Vaidhya aims to enhance the overall mental health management experience through innovative and secure solutions.

The Project Focuss on 6 Mental Abnormalities, namely:

  • Depression
  • Anxiety Disorder
  • Schizophrenia
  • Bipolar Disorder
  • Obsessive-Compulsive Disorder (OCD)
  • Post-Traumatic Stress Disorder (PTSD)

Requirments

Python 3.9.13 (Recommended)



Mongo DB Atlas Account(To Save data in cloud) or Mongo DB Compass(To Save the Data Locally)



App Password from your Google Account(To Connect and Send Mails through MIEME(SMTP))


Modules/Libraries Used

All The Modules/Libraries Used in the Project can be installed using requirements.txt

  • Flask
  • Pymongo
  • requests
  • joblib
  • smtplib
  • pandas
  • configparser
  • email.mime.text
  • email.mime.multipart
  • docx
  • datetime
  • os
  • random

Setup

Database

Use the Database Configuration File to Setup all the Collections with the name given in the Document.

  • Database Name: Vaidhya
  • Total Number of Collections: 12

You can Access the Document Here
Add your Mongo DB Connection String Here


Google App Password

create a google app password for the google account from which other rescive all mails.

  • SENDER_EMAIL -> Source Mail Address.
  • SENDER_PASSWORD -> App Password Corresponding to the Source Mail Address.
  • RECEIVER_EMAIL -> Maild ID which receives responses from contact us section in About Page.

Add all these Data Here


Coloab URLS

Add the Corresponding Chatbot, Translation, Feeing Expressor Endpoints Here


Flask Secret Key

Add a Custom made FLASK APP SECRET KEY Here


How to Run?

  • Intialize a Git Repository.
  git init
  • Clone the Current Git Repository.
  git clone https://github.com/k-arthik-r/Vaidhya.git
  • Crete a Virtual Environment named env and Activate it(PowerShell)
  python -m venv env

  .\env\Scripts\Activate.ps1
  pip install -r requirements.txt
  • Comeplete the Above setup phase and add all the required credentials in config.ini
  python app.py

Architecture

vaidhya_archetecture drawio

You can find the Editable Archetecture Copy Here


Working

The Entire Project is Divided into 2 Parts:

  • Patient's Interface
  • Doctor's Interface

Patient's Interface

Patient Login Page

Features:

  • Input fields for username and password to authenticate the patient.
  • Links for creating a new account and resetting the password.
  • Language selection dropdown to accommodate multiple languages.
  • Navigation link to the About Page.

Account Management

Create New Account:

  • Form to collect user details including name, email, password, and other necessary information.
  • Email verification step for account activation.

Reset Password:

  • Email-based password reset link or security question-based password reset option.

Patient Dashboard

Features:

  • Access to the Helpline Chatbot for immediate support and inquiries.
  • Disease Prediction section where patients can undergo tests to predict their mental state.
  • Feeling Submission section to schedule appointments based on the user's emotional state.
  • Display upcoming appointments and recent interactions with doctors.

Test Page

Features:

  • A set of 10 scenario-based questions to help predict the patient's mental state.
  • Immediate feedback or result based on the responses.

Feel Page

Features:

  • Powered by a Language Model (LLM) to classify and interpret the patient's feelings.
  • Predicts the mental state based on the submitted feelings.
  • Option to schedule an appointment with a doctor based on the assessment.


Doctor's Interface

Doctor Login Page

Features:

  • Input fields for username and password to authenticate the doctor.
  • Links for creating a new account and resetting the password.
  • Language selection dropdown to accommodate multiple languages.
  • Navigation link to the About Page.

Account Management

Create New Account:

  • Form to collect user details including name, email, password, licence, and other necessary information.
  • Email verification step for account activation.

Reset Password:

  • Email-based password reset link or security question-based password reset option.

Doctor Dashboard

Features:

  • View and manage patient reports.
  • Offer and manage appointments based on predefined slots and custom availability.
  • Access to patient interactions and historical data.

Report Page

Features:

  • Fetch patient report using patient ID and doctor access key (constructed as: doctor id + first 2 letters of doctor's name in lowercase).
  • Download patient reports in a pre-defined template for record-keeping and analysis.

Appointment Page

Features:

  • Offer appointments in predefined time slots.
  • Option to set one custom slot based on the doctor's availability.
  • View and manage scheduled appointments.

Working - Admin

Admin is a tkinter application which is made an exe file capable of being installed on a system. 3 Features of Admin:

  • Able to Delete Patient Records.
  • Able to Delete Doctor Records.
  • Maps Doctor with the Patient (Needs to be manually Done Via Admin.)

Both Patients and Doctor would not have the direct authority to delete their account, insted they need to mail admin in order to delete.


Google Colab URL's

Chatbot

The ChatBot is a RAG Model used to answer user Query. you can access the document Used to Answer User Question Here.

RAG Implementation:

  • Storage: Chroma DB
  • Framework: Langchain
  • Generative Model: TheBloke/Llama-2-13B-Chat-GPTQ
  • Embedding Model: hkunlp/instructor-large
  • Retriever: RetrievalQA
  • Server: ngrok

Multilingual System

  • Dataset: Samantara
  • Base Model: google/mt5
  • Server: ngrok

Feeling Predictor

  • Model: mistralai/Mistral-7B-Instruct-v0.2
  • Server: ngrok

You can contact us for all the Colab File @ [email protected]


Key Features

  • Mental Health Prediction and Diagnosis Based on Tests and Felling Analysis.
  • Proactive and Advance Chat-Bots to help the Users.
  • Multingual Support to Diversify the Usage of the System.
  • Doctor Appointment System.
  • Personalized Treatment Recommendations.
  • Real-time Monitoring and Updates.
  • 100% API Free Infrastructure.
  • Use of Large Language Models (LLMs).
  • The Database used to Manage the data of the Medix is MongoDB Atlas, a Cloud storage service. One of the advantage of such is that multiple users can manipulate data from different places simutaneously.

Important Notes:

  • The Website in currently PC Responsive only, contributers are invited to modify the CSS files to Make it Responsive which will be revived and accepted.
  • The Details of the Admin needs to be added manually in the mongo DB. Admin Requires the below details:
    • username
    • password
    • email through which mails are needs to be sent.
    • App Password for the mentioned email
  • Each of the endpoint in the flask application is associated with an error code located at the first line of its function definition, which are showed in the Error 500 Page to locate which function is causing the applicarion to fail. The List of Endpoints and corresponding error codes can be located Here

License

Licence


Feedback

If you have any feedback, please reach out to us at [email protected] . You are also welcomed to add new features by creating Pull Requests.

About

Vaidhya is a mental healthcare assistance platform designed to facilitate secure and seamless interactions between patients and doctors. It offers a user-friendly environment where patients can access mental health support, book appointments, and receive personalized care, while doctors can manage patient reports and appointments efficiently.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published