The inspiration for this application came from attending the Analytics on FHIR conference. After watching several presentations, I realized there was a need for a practical environment to experience how SQL on FHIR simplifies healthcare data analytics. This project provides a containerized environment that, with a simple docker compose up command, gives you access to:
- A playground for experimenting with ViewDefinition and examining the generated results
- A DuckDB database for running analytical queries
- Superset integration for easy visualization of your results
- Define analytical use cases and create specific ViewDefinitions within them
- Preview SQL queries generated from individual ViewDefinitions (currently supporting FlatQuack runner for translating ViewDefinitions to DuckDB queries)
- View query results directly in the application
- Export defined queries as views to a DuckDB database, which is shared between the Rails App and Superset
- SQL-on-FHIR Enthusiasts: While there is a playground on the official page, it doesn't allow you to run queries on your own FHIR export data or create views to combine data
- Data Analysts: Easily visualize FHIR analytics data - with the app and Superset in one container, you can get started quickly
SUPERSET_ADMIN_USERNAME=*********
SUPERSET_ADMIN_PASSWORD=*********
SUPERSET_ADMIN_EMAIL=*********
SUPERSET_INTERNAL_URL="http://superset:8088"
SUPERSET_PUBLIC_URL="http://localhost:8088"
docker-compose up --build # running for first time to build images
docker-compose up # up compose
To populate your database with initial sample data, run:
docker compose exec app bundle exec rails db:seed
This command creates:
- one analytical case with two view definitions (link)
- a connection with the database in Superset
- macros in a DuckDB database which is shareable between the Rails app and Superset
After running above command, you will have:
- One analytical case with two example ViewDefinitions
- A persistent DuckDB database that can be accessed from both the app and Superset
All set! By default, the directory containing the exported FHIR data is set to /app/fhir-export
- thanks to the configuration in docker-compose, it is shared between the FHIRboard application and Superset, making the dataset accessible in both locations.
To use your own dataset, simply place your export files in the designated directory. Future releases will support direct upload of FHIR export data and potential integration with FHIR servers using bulk export API endpoints.
Below is a short video demonstrating the capabilities of this tool.
demo.mov
Tests are written in RSpec and can be run with following command:
docker compose exec app bundle exec rspec
We welcome contributions! Here's how you can help:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Please review our contribution guidelines before submitting changes.
- Open an issue for bug reports or feature requests
- Contact us at hello@themomentum.ai for direct support
FHIRboard is available under the MIT License.
Built with ❤️ by Momentum