A web application for medical researchers to evaluate the feasibility of clinical studies by analyzing OMOP CDM (Common Data Model) concepts and data availability across healthcare databases.
Concept Browser streamlines the study feasibility assessment process by:
- Searching and managing medical concepts from OMOP CDM
- Creating and organizing concept sets for study definitions
- Analyzing data availability across multiple data sources
- Building complex concept relationships using AND/OR/EXCLUDE operators
- Generating comprehensive feasibility reports with record counts and statistical analysis
- Full-text search across OMOP CDM vocabulary
- Concept hierarchy navigation with ancestor/descendant relationships
- Support for multiple domains (medications, conditions, procedures, etc.)
- Quick concept filtering and organization
- Create and manage multiple clinical studies
- Define inclusion/exclusion criteria using concept sets
- Track study metadata and specifications
- Version history and study tracking
- Real-time record count estimates across data sources
- Statistical summaries (min/max/mean records)
- Data source-specific analysis and comparison
- Achilles analysis integration for aggregated statistics
- Concept distribution charts and visualizations
- Build complex concept combinations with logical operators:
- AND (Intersection): Find records matching all concepts
- OR (Union): Find records matching any concept
- EXCLUDE: Subtract excluded concepts from base set
- Validate relationship logic before feasibility calculation
- Save drafts and activate relationships
- Clean, intuitive interface for researchers
- Dark mode support
- Mobile-friendly design
- Real-time data updates
Frontend:
- Next.js 16+ (React 19)
- TypeScript
- TailwindCSS + shadcn/ui
- React Query for data fetching
- Recharts for visualizations
- React Hook Form for forms
Backend:
- FastAPI (Python 3.12+)
- SQLModel (SQLAlchemy ORM)
- PostgreSQL 17
- Uvicorn ASGI server
Infrastructure:
- Docker & Docker Compose for containerization
- PostgreSQL for data persistence
- Automated data loading pipeline
- Docker and Docker Compose
- Git
-
Clone the repository
git clone https://github.com/yourusername/concept-browser.git cd concept-browser -
Configure environment variables
cp .env.example .env # Edit .env with your database credentials and settings -
Start with Docker Compose
docker-compose -f docker-compose.dev.yaml up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
Backend:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .
uvicorn app.main:app --reloadFrontend:
cd frontend
npm install
npm run devconcept-browser/
βββ backend/ # FastAPI backend application
β βββ app/
β β βββ routers/ # API endpoints (concepts, studies, feasibility)
β β βββ services/ # Business logic layer
β β βββ repositories/ # Database queries
β β βββ models/ # SQLModel database models
β β βββ schemas/ # Pydantic request/response schemas
β β βββ core/ # Configuration, database, dependencies
β βββ docker/
βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/ # Next.js app directory (pages)
β β βββ components/ # Reusable React components
β β βββ hooks/ # Custom React hooks
β β βββ types/ # TypeScript type definitions
β β βββ lib/ # Utilities and helpers
β βββ docker/
βββ data_loader/ # Data loading pipeline
βββ data/ # OMOP CDM concept data files
βββ docker-compose.dev.yaml
GET /concepts/search- Search concepts with filtersGET /concepts/{concept_id}- Get concept detailsGET /concepts/{concept_id}/ancestors- Get ancestor conceptsGET /concepts/{concept_id}/descendants- Get descendant concepts
GET /studies- List all studiesPOST /studies- Create new studyGET /studies/{study_id}- Get study detailsPUT /studies/{study_id}- Update studyDELETE /studies/{study_id}- Delete study
POST /studies/{study_id}/feasibility- Run feasibility analysisGET /studies/{study_id}/feasibility- Get feasibility resultsGET /studies/{study_id}/feasibility/data-sources- Data source analysis
POST /studies/{study_id}/relationships- Create relationshipGET /studies/{study_id}/relationships- List relationshipsPUT /studies/{study_id}/relationships/{relationship_id}- Update relationshipDELETE /studies/{study_id}/relationships/{relationship_id}- Delete relationship
For complete API documentation, see Backend README or visit /docs endpoint.
Key environment variables:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/concept_browser
# Backend
BACKEND_PORT=8000
# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8000See .env.example for all available configuration options.
# Backend
cd backend
pytest
# Frontend
cd frontend
npm run test# Backend linting
cd backend
pylint app/
# Frontend linting
cd frontend
npm run lint
npm run format- Ensure PostgreSQL is running and accessible
- Check
DATABASE_URLin.envis correct - Verify database user has necessary permissions
- Change ports in
docker-compose.dev.yamlor environment - Kill existing processes:
lsof -i :PORT | grep LISTEN | awk '{print $2}' | xargs kill -9
- Verify backend is running (
http://localhost:8000/health) - Check
NEXT_PUBLIC_API_URLin frontend environment - Check CORS settings in
backend/app/main.py
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or issues:
- Create an issue on GitHub
- Check existing issues and documentation
- Review the API documentation at
/docsendpoint