Sign inSign up

fnndsc/serie

By fnndsc

•Updated 5 months ago

Specific Endpoints for Research Integration Events

Image
0

7.9K

fnndsc/serie repository overview

⁠SERIE -- ChRIS

Version Tests codecov

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⁠."

⁠How It Works

SERIE should be called on by an instance of Hasura⁠ via its "events" feature, listening to the PostgreSQL database of the ChRIS backend (CUBE).

Architecture Diagram

The LLD pipeline works like this:

  1. PACS --[DICOM image data]--> oxidicom⁠
  2. oxidicom --[registers file to]--> PostgreSQL
  3. PostgreSQL --[event detected by]--> Hasura
  4. Hasura --[HTTP request: handle event]--> SERIE
  5. SERIE --[HTTP request: run workflow]--> CUBE

⁠Development

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
⁠Testing

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
⁠Deployment Notes
  • 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/ (trailing slash optional, leave out the api/v1/ path prefix.)
  • 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⁠.

Tag summary

Content type

Image

Digest

sha256:c4fe0bdd7…

Size

36.9 MB

Last updated

5 months ago

docker pull fnndsc/serie