FastOMOP Evaluation and Monitoring
This project is a work in progress.
foem (FastOMOP Evaluation and Monitoring) is a Python toolkit for evaluating and monitoring OMOP (Observational Medical Outcomes Partnership) databases. It automates SQL test generation, template-based query construction, and result aggregation for clinical data analysis.
- Automated SQL test generation for OMOP databases
- Template-based query construction for common clinical questions
- PostgreSQL connection management
- Outputs results in JSON format
- Easily extensible with new tests and templates
- Python 3.8+
- PostgreSQL database
- Python packages:
psycopg2
(orpsycopg2-binary
),python-dotenv
# (Optional) create & activate a virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install dependencies
pip install psycopg2-binary python-dotenv
Create a .env file at the project root:
DB_CONNECTION_STRING=postgresql://USER:PASSWORD@HOST:PORT/DBNAME
Run the predefined SQL tests and write results to dataset.json
:
python main.py
Extend/customize:
- Add/modify tests in
validator.py
- Add/modify templates in
template.py
main.py
— Entry point for running tests and writing outputvalidator.py
— SQL test logic and database interactiontemplate.py
— Query templates for OMOP conceptsconfig.py
— Database connection setupdataset.json
— Results of executed tests
See LICENSE
for details.