This repository contains the implementation of a Full Stack Patient Feedback System built with the Flask Framework. The system allows healthcare institutions to collect feedback from patients, analyze the results, and improve the quality of their services.
The Patient Feedback System is designed to simplify the collection and analysis of feedback from patients. Built with Flask, it provides a user-friendly web interface where patients can submit their feedback about the healthcare services they received. The system is structured to scale and is easy to deploy, making it suitable for both small clinics and large hospitals.
- Patient Feedback Form: Allows patients to submit their experiences.
- Admin Dashboard: Provides insights into collected feedback.
- Secure Communication: Ensures that all data is transmitted securely.
- Feedback Analysis: Provides a mechanism to analyze patient feedback.
- User Authentication: Secure login for admin and users.
- Responsive Design: Optimized for mobile and desktop usage.
Follow these steps to get your environment set up:
git clone https://github.com/your-username/Full_stack_Patient_feedback_system_Using_Flask_Framework.git
cd Full_stack_Patient_feedback_system_Using_Flask_FrameworkIt is recommended to use a Python virtual environment to manage dependencies.
python -m venv venv
source venv/bin/activate # For Linux/macOS
venv\Scripts\activate # For WindowsInstall the necessary dependencies by running the following:
pip install -r requirements-dev.txt # It will install all the dependencies needed for the project Go to Usage section Usage to set up the Flask Server and Run application properly
This is a quick overview of the repository structure:
Full_stack_Patient_feedback_system_Using_Flask_Framework/
│
├── securitycheck/
│ ├── connection.py # Database connection handler
│ └── main.py # Security features implementation
│
├── templates/ # HTML templates for the application
│
├── .gitignore # Git ignore file to exclude unnecessary files
├── .pre-commit-config.yaml # Pre-commit hooks configuration
├── README.md # Project documentation (this file)
├── app.py # Main Flask app entry point
├── main.py # Core application logic
├── metadata.txt # Metadata for the project
├── requirements-ci.txt # CI-related dependencies
├── requirements-dev.txt # Development dependencies
├── requirements.txt # Production dependencies
├── ruff.toml # Configuration for Ruff (static analysis tool)
└── test.ipynb # Jupyter Notebook for testing and exploration
-
Step to Run the Flask app: Start the application by running the following command:
Make sure MongoDB connection is established. Create a free MongoDB account. Copy your connection key and set the env variable for password. connection string looks like this:
"mongodb+srv://{encoded_username}:{encoded_password}@cluster1.somestring.mongodb.net/?appName=yourClusterName"Set the envionment variable for MongoDB and Redis in your .env file and load them using python-dotenv
from dotenv import load_dotenv # Load the .env file load_dotenv()
brew services list
brew services start redis
brew services stop redis
Finally after successfully connecting to both Mongo DB and Redis
install all requirements from requirements.txt
pip install -r requirements.txt
Run the Flask Server
python app.py
-
Access the Application: Open your browser and go to
http://127.0.0.1:5000to access the system. -
Admin Dashboard: Log in as an admin to manage feedback and view analytics.
-
Feedback Form: Patients can visit the homepage and submit their feedback on the services provided.
To run the tests, follow these steps:
-
Install testing dependencies:
pip install -r requirements-dev.txt
-
Run tests: You can run unit tests using
pytestor run the Jupyter notebook (test.ipynb) for interactive testing.pytest
We welcome contributions to improve the project! If you'd like to contribute, follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Submit a pull request.
Please ensure that your code follows the project style and passes all tests.
This project is licensed under the MIT License - see the LICENSE file for details.