Orthanc python plugin that adds a GraphQL layer to reduce REST query overhead

Hi Everyone,

I’m happy to share that I created a new python plugin for Orthanc that extends the rest API to provide a GraphQL API. This significantly reduces the overhead of the current API, allowing one to only query the specific information needed, and should bypass some of the limitations of the ‘tools/find’ endpoint with nested tags (I still need to expand the current schemas to verify this), see /tools/find able to search tags inside an array .

For now, only a simplistic definition of the patients is available, but more are on the way! Feel free to contribute!

The repo is publicly available at GitHub - Thothore/orthanc-pygraphql · GitHub, any feedback is appreciated as this is my first open-source contribution :slight_smile:

After implementation and testing, I can confirm that I reduced the time it takes to load the roi names of a dicom struct with around 32 contours from 7 seconds (on my local machine, querying the simplified tags, then extracting the roi names from the Structure Set ROI Sequence (3006,0020)) to 2 seconds thanks to the implementation of the graphql API!

You can check the code on github: Query specific instance for roi names by Thothore · Pull Request #7 · Thothore/orthanc-pygraphql · GitHub