The Specific Endpoints for Research Integration Events, or SERIE, is a FastAPI application which defines the business logic of event-driven ChRIS use cases. E.g. it handles use cases such as "for every DICOM series received with the description 'Hips to Ankles' create a new feed and run the leg length discrepancy (LLD) analysis pipeline."
SERIE should be called on by an instance of Hasura via its "events" feature, listening to the PostgreSQL database of the ChRIS backend (CUBE).
The LLD pipeline works like this:
- PACS --[DICOM image data]--> oxidicom
- oxidicom --[registers file to]--> PostgreSQL
- PostgreSQL --[event detected by]--> Hasura
- Hasura --[HTTP request: handle event]--> SERIE
- SERIE --[HTTP request: run workflow]--> CUBE
Install rye and run
rye sync
For local testing, run ChRIS locally with Hasura.
cd
git clone https://github.com/FNNDSC/miniChRIS-docker.git
cd miniChRIS-docker
docker compose --profile hasura up -d
Run unit tests on-the-metal:
rye run pytest
Integration and end-to-end tests require SERIE to run in the same docker network as CUBE and Hasura. First, run miniChRIS-docker to get CUBE and Hasura up, then run pytest and SERIE using Docker Compose:
docker compose run --rm --use-aliases test
- The only environment variable needed by SERIE is
CHRIS_HOST
, which should be set to the API host of CUBE, e.g.https://cube.chrisproject.org/
- The configuration of SERIE happens in Hasura. You can use the Hasura console to edit the configuration, or use hasura-cli configure SERIE via Hasura metadata YAML files. See the example in hasura/.../public_pacsfiles_pacsseries.yaml.