End-to-end clinical data pipeline with ingestion, cleaning, transformation, analytics, visualization, and CI/CD.
This project implements a complete data engineering pipeline for multi-source clinical datasets, including:
- Patient records from multiple hospital systems
- Lab results
- Diagnoses (ICD-10)
- Medications
- Genomic variants
The pipeline standardizes heterogeneous data, enriches it using reference datasets, and produces analytics-ready outputs.
The pipeline follows a medallion architecture:
- Raw Layer → original unmodified data
- Refined Layer → cleaned and standardized datasets
- Consumption Layer → analytics-ready outputs
Pipeline stages:
- Ingestion
- Cleaning
- Transformation
- Integration
- Analytics
- Visualization
All file paths are relative to ensure portability across environments (local, Docker, CI).
Separated into raw, refined, and consumption layers to maintain traceability and reproducibility.
Different source formats (CSV, JSON, Parquet) are normalized early in the pipeline.
Lab data is partitioned by year to improve scalability and query performance.
Clinical labels (e.g., pathogenic variants) are used only for analysis, not feature engineering.
Pipeline tolerates missing cross-domain data (patients may not exist in all datasets).
- Patient IDs are consistent across datasets after cleaning
- Reference files (ICD, lab ranges, gene reference) are accurate
- Missing cross-domain records are allowed and handled gracefully
Generated outputs:
- Patient demographics summary
- Lab statistics (mean, median, std)
- Diagnosis frequency by ICD chapter
- Variant hotspots (top genes)
- High-risk patient cohort
- Anomaly detection flags
Generated plots:
- Age distribution histogram
- Gender distribution
- Diagnosis frequency bar chart
- Genomics scatter plot
- High-risk patient summary
- Data quality overview
All plots are saved in: datalake/consumption/plots/
The pipeline is containerized using Docker.
Run:
docker-compose up --build
This executes the full pipeline end-to-end.
Outputs are stored in a mounted volume: datalake/
GitHub Actions workflow includes:
- Linting using Ruff
- Docker build validation
CI runs on every push to main branch.
python run_pipeline.py
docker-compose up --build