Stream: implementers
Topic: Address.Use.Extension
Yuri Bonanno (Dec 17 2018 at 13:34):
Hello!
I am trying to map a FHIR format Patiënt XML file to a set of java classes. When i tried to do the following ( patient.Address.getUse.getExtension ) it could not work because Use does not have extensions according to HAPI, while the option for an extension should be open seen the Use element is not primitive. (Edit: Use is a primitive datatype)
This page (https://simplifier.net/NictizSTU3-Zib2017/nl-core-address) will further elaborate my point. I need the Use.Extension to define some parameters.
I have tried using 3.5.0 and 3.6.0. but both do not contain an extension for the use element.
With kind regards,
Yuri Bonanno
Patrick Werner (Dec 17 2018 at 14:56):
i neither see an option in hapi to do this with the hapi client. Adress.use is a Enum (Java Datatype) and not a FHIR Datatype. We would need an encapsulation for these primitive datatypes to add an extension. But maybe i miss something important. @James Agnew ?
Chris Moesel (Dec 17 2018 at 16:29):
Address use is a FHIR primitive (code
) with a required value set. Are you trying to add additional meaning/data to one of the existing codes in the value set, or are you trying to use extension as a workaround to add another type (which you can't do via the value set because it's required
not extensible
)?
Chris Moesel (Dec 17 2018 at 16:31):
Either way, extensions on primitives is always tricky business in FHIR. I try to avoid it as much as possible. Are there other ways to represent what you're going for?
Yuri Bonanno (Dec 17 2018 at 16:48):
Are you trying to add additional meaning/data to one of the existing codes in the value set, or are you trying to use extension as a workaround to add another type (which you can't do via the value set because it's
required
notextensible
)?
None of the above, I am trying to extract data from an XML file which is (presumably) in FHIR format.
Here it says Use would indeed have an extension. Values in this extension should map to a (dutch) HCIM. I am trying to automate the process of data extraction and therefore I was looking for a HAPI-function which would extract specifically Address.Use.Extension . It seems no such function exists and I thought posting this here was the best course of action.
Chris Moesel (Dec 17 2018 at 17:01):
Ah. Got it. Looking at the HAPI documentation, it looks to me like you want Address.getUseElement()
. The doc says it should contain the extensions. See: http://hapifhir.io/apidocs-dstu3/org/hl7/fhir/dstu3/model/Address.html#getUseElement--
Yuri Bonanno (Dec 17 2018 at 17:09):
Wow, thanks a lot! I totally missed the element part.
Last updated: Apr 12 2022 at 19:14 UTC