Stream: implementers
Topic: Value pairs (or triplets) in extension
Marko Jalonen (Nov 01 2019 at 09:05):
What is the best/simplest way to accomplish a value pair (or triplet) in extension. Eg. I need an URL for web service + related boolean values (eg. allows acting by a proxy if underage, allows acting by a proxy with a mandate). Or other similar scenarios which eg combine id and name values etc.. Can I perform this (in Forge) inside one extension as slicing is not applicable as there really is no discriminator. And the values are not relevant independent of the bunch, so I would not want to make a external sub-extension. And even if I'd use extended extension I am having problems with that in (new) Forge..
Sebastiaan Raap (Nov 01 2019 at 10:14):
Hi Marko,
If I understand you correctly, I would make a complex extension. As an extension is only allowed to contain one value (simple extension) OR multiple extension, you'll have to make a few extensions in the extension (complex extension). To do this you can use the add button, see screenshot.
pasted image
Your StructureDefinition would look like this: https://simplifier.net/snippet/sebastiaanraap1/23
An example: https://simplifier.net/snippet/sebastiaanraap1/24
Hope this helps!
Marko Jalonen (Nov 01 2019 at 11:23):
Thanks Sebastian! That is what I did actually, but did not perceive this to be a complex extension. What concerns me is that the profile xml does not seem to have this url-parameter for sub-extension anywhere - or is it fixedURI element (see attachment PNG)? fixedURI.PNG
Sebastiaan Raap (Nov 01 2019 at 11:44):
It's the fixedUri indeed. and validators would discriminate on that.
Marko Jalonen (Nov 01 2019 at 11:47):
excellent, thanks! :)
Michel Rutten (Nov 01 2019 at 12:46):
Note: Forge does allow you to slice the Extension.value[x]
element and define a type choice - should you need this. FHIR also allows you to further constrain the default extension slice discriminator (by adding additional discriminators), however this advanced technique is currently not supported by Forge.
Last updated: Apr 12 2022 at 19:14 UTC