Build FHIR-based GraphQL graph using Hasura and Postgres

Job ID: 33836409

Budget: $25 – $50 USD

The goal of this project is to implement all FHIR concepts in GraphQL to enable performant queries, mutations and subscriptions.

Recommended approach:
Hasura https://hasura.io/ built a library that takes a Postgres database and exposes it as GraphQL complete with db optimizations, queries, mutations and subscriptions. Fhirbase https://github.com/fhirbase/fhirbase is a Postgres schema for FHIR but the FHIR resource contents (the substance) is stuffed into a single column as a jsonb field which is not compatible with Hasura relationship creation and graph traversal. Hasura expects a relatively flat table structure to build the graph. The challenge for this project is generating a Postgres schema from one of the FHIR schema files https://build.fhir.org/downloads.html that can be meaningfully utilized by Hasura to generate the graph and mutations.

Open to alternate approaches but builtin database query optimization for graph-based queries is hard to find outside of Hasura.

What does success look like?
Take the patient FHIR resource https://www.hl7.org/fhir/patient.html#resource. I should be able to query for a patient node and traverse through the telecom field to 0 to many ContactPoint nodes to retrieve related ContactPoint data. In addition to related types, I should also be able to traverse the graph through references i.e. managingOrganization in the patient resource.