Search code examples
hl7-fhirhapihapi-fhir

Custom Resources in FHIR on run time generation


I am looking for guidance on how to model and create FHIR like resources (custom resources) that are not defined with FHIR( not published resources) - the reasoning is to have all FHIR and non FHIR data in a single persistence storage rather than having them in two separate data stores - I know that I can use the domain resource to create these resources via means of inheritance but this will require compilation / deployment for each new data model. The question is there a way to do the above during runtime by using (POST of a structure definition)


Solution

  • Hapi doesn't support custom resources "on-the-fly" out of the box. You would need to create model classes, DAOs, and Resource Providers during runtime and register these.