Search code examples
hl7-fhirhapi-fhir

Generate structure classes from StructureDefintion with HAPI


Is it possible to generate structure classes from a custom StructureDefintion in a similar fashion as HAPI generates official DSTU2/3 structure classes?

I want to implement some local StructureDefinition from simplifier.net (For example: https://simplifier.net/NictizSTU3/nl-core-address/).

The documentation of HAPI wasn't helping me either, am i suppose to use the hapi-tinder-plugin?

It seems tedious and error prone to hand write custom structures as specified in http://hapifhir.io/doc_custom_structures.html

For me the ideal workflow is something like:

  • Fetch StructureDefinition from simplifier
  • Generate models for the StructureDefinition
  • Register generated models in HAPI and fill the models accordingly

Solution

  • Generating classes from profiles is on our list of things to do, but doing it well (particularly when there's slicing involved) isn't super-easy, so most of the reference implementations have been holding off until there's funding support to get it done.