A full-stack Patient Management System built with FastAPI and Streamlit.
Built as a learning project to explore Python backend and frontend development.
This project allows users to create, view, update, delete, and sort patient records through an interactive web interface.
- Create new patient records
- Retrieve patient details using Patient ID
- Update existing patient information
- Delete patient records
- Sort patients by Height, Weight, or BMI
- Automatic BMI calculation
- BMI health verdict generation
- Request validation using Pydantic
- Interactive API documentation
- Patient search with ID format guidance
- Create patient form
- Update patient records
- Delete patient records
- Sort and analyze patient data
- Backend status monitoring
- Responsive and user-friendly layout
- Python
- FastAPI
- Pydantic
- Uvicorn
- Streamlit
- Pandas
git clone https://github.com/PIYUSH-NEXTGEN/Patient-API.git
cd Patient-APIpython -m venv myenvWindows:
myenv\Scripts\activatepip install -r requirements.txtStart the FastAPI server:
uvicorn main:app --reloadBackend URL:
http://127.0.0.1:8000
Swagger Documentation:
http://127.0.0.1:8000/docs
In a new terminal:
streamlit run frontend.pyFrontend URL:
Make sure the FastAPI backend is running before launching the frontend.
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Welcome message |
| GET | /about |
API information |
| GET | /patients/{patient_id} |
View patient details |
| GET | /sort |
Sort patient records |
| POST | /create |
Create patient |
| PUT | /edit/{patient_id} |
Update patient |
| DELETE | /delete/{patient_id} |
Delete patient |
Each patient record contains:
- Patient ID
- Name
- City
- Age
- Gender
- Height
- Weight
- BMI
- Health Verdict
BMI and health verdicts are automatically calculated using patient height and weight.