Stream: implementers
Topic: Adding complex type to resource
Peter Bernhardt (Jun 28 2017 at 23:06):
I'm working through an exercise in modelling custom data for use in FHIR and I have a case where I'd like to add a new complex type (it has three properties). I've created structure definitions for each of the properties. From here, would I create a new type by extending Basic? Or would it be best to just add each of these three extensions to a profile on the targetted resource (in this case, Encounter). I've looked through the FHIR documentation and can't find an example of creating a complex-type and then using it in a resource.
Eric Haas (Jun 29 2017 at 00:29):
do you mean adding a complex extension with thee subextensions. That is the only way I know how to add a complex element to an existing resource?
Peter Bernhardt (Jun 29 2017 at 00:46):
That's right, Eric. That's the idea. Do you know of an example of this that I can reference?
Lloyd McKenzie (Jun 29 2017 at 00:54):
Just search for "complex" in the extension registry
Peter Bernhardt (Jun 29 2017 at 00:56):
thanks
Eric Haas (Jun 29 2017 at 00:57):
or here where I use the ig-pub to create....
Peter Bernhardt (Jun 29 2017 at 14:05):
@Eric Haas and @Lloyd McKenzie thanks again. After reviewing the resources you referenced, I used the Forge tool to create the extension and profile on Encounter that will use it. I published both to Furore's FHIR registry (e.g. https://simplifier.net/PerformanceAnalytics/pa-tumor-registry). I gotta say I'm very impressed with the Forge tool - it's been significantly enhanced since I first tried it out back in the early days of FHIR. Kudos to guys at Furore for providing these tools to the community!
Isabelle GIBAUD (Jul 13 2017 at 09:42):
I have almost the same issue. I'd like to replace the complex address datatype in the Patient resource by a new complex type (fr-address-type). I've created the new complex type as you've described but I don't find how to profile the patient resource in Forge (how to replace address datatype by the new address datatype extended. Could you help me?
Isabelle GIBAUD (Jul 13 2017 at 14:26):
I got it. I've created a new profile of the address datatype and then I've been able to reference this new profile of datatype in my Patient resource profile.
Last updated: Apr 12 2022 at 19:14 UTC