Skip to content

shruti0313/Hypertension-DB

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lang Patient Database (lang-patient-db)

This project sets up a MongoDB database containing patient datasets to analyze comorbidities between hypertension and mental health conditions, focusing on depression and anxiety. The database is designed for healthcare analytics and research.


Features

  • Preprocessed datasets for hypertension and mental health conditions.
  • Python script to automatically load datasets into MongoDB collections.
  • Instructions to verify data and use it for analysis.

Prerequisites

Before starting, ensure you have the following installed:

  • Python (version 3.8 or higher)
  • MongoDB (installed and running locally or accessible remotely)
  • Required Python libraries (see requirements.txt)

Installation and Setup

1. Clone the Repository

git clone https://github.com/your-username/lang-patient-db.git
cd lang-patient-db

2. Install Dependencies

Install the required Python libraries:

pip install -r requirements.txt

3. Load Data into MongoDB

Run the Python script to load the datasets into your MongoDB instance:

python setup_mongodb.py

4. Start MongoDB Shell

To confirm the data is loaded successfully, start the MongoDB shell and verify:

mongosh

Then run the following commands:

use health_data
show collections

You should see:

  • hypertension
  • depression_anxiety

Project Structure

lang-patient-db/
├── setup_mongodb.py         # Script to load data into MongoDB
├── requirements.txt         # List of required Python libraries
├── README.md                # Project documentation
├── .gitignore               # Git ignore file
├── data/                    # Contains the datasets
│   ├── processed_depression_anxiety.csv
│   ├── final_hypertension_dataset.csv

Datasets

1. processed_depression_anxiety.csv

  • Contains data on depression and anxiety patients.
  • Attributes: patient_id, age, gender, anxiety_level, depression_level, etc.

2. final_hypertension_dataset.csv

  • Contains data on hypertension patients.
  • Attributes: patient_id, age, gender, blood_pressure, medication_status, etc.

Usage

  1. Once the database is set up, you can access the data programmatically using MongoDB drivers for Python, such as pymongo.

  2. Example query to fetch hypertension data:

from pymongo import MongoClient

# Connect to MongoDB
client = MongoClient("mongodb://localhost:27017/")
db = client["health_data"]

# Fetch hypertension collection
hypertension_data = db["hypertension"].find()

for record in hypertension_data:
    print(record)
  1. Replace the query parameters to fit your analysis needs.

Authors

  • Aysha
  • Shruti

Contributing

Contributions, issues, and feature requests are welcome! Feel free to fork this repository and submit a pull request.


License

This project is open source and available under the MIT License. See the LICENSE file for details.


About

Creating a NOSQL Database using MongoDB to store and analyze hypertension patient data.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 80.5%
  • Python 19.5%