Stream: Profiling Academy
Topic: Custom complex types
Kristof Taveirne (Apr 21 2021 at 09:08):
Hi,
We are looking to define an extension to be used in a Questionnaire.
The value of what we want to document there has a specific structure. We have a JSON Schema for it, but don't know how we can capture this in the profile.
There is no such thing as valueObject to store free form objects (which is probably a good thing) so we were thinking about valueString.
We could just stringify the JSON and put it there, but this feels a bit hacky.
I think this comes down to the need for a custom complex type and then use valueOurCustomType in the extension.
This does feel like diving into a rabbit hole ... so it's worth verifying our approach here before we try this.
Any advise on how to tackle this?
PS: We're pretty new to profiling (tbh this is the first one we are creating), so forgive me if i'm missing the obvious. :-)
Thanks!
Lin Zhang (Dec 17 2021 at 23:19):
Your stringfying approach is simple and would work, I think. Maybe the structure with it explicitly known schema could also be split into an extension that consists of elements of FHIR-specified datatypes.
Last updated: Apr 12 2022 at 19:14 UTC