Stream: implementers
Topic: Java org.hl7.fhir.r4.model Help
Benjamin Langley (May 25 2021 at 17:46):
Hi all. I'm using the java org.hl7.fhir.model classes. The profile I am working with redefines a property called criteria
. The JSON file this includes a criteria
and a _criteria
property. Is there a way to get the _criteria
property without using a generic Java JSON parser? Thanks!
Michele Mottini (May 25 2021 at 17:59):
That's just the way extra properties of primitive type element are represented in JSON. The standard library will load that fine.
Oliver Egger (May 25 2021 at 17:59):
the _criteria property is indicating the extension on criteria. you can read the extension directly with criteria.getExtension() from the org.hl7.fhir.model classes.
Oliver Egger (May 25 2021 at 18:02):
:+1: @Michele Mottini I did not know that here are other properties in addition to extensions ...
Gino Canessa (May 25 2021 at 18:04):
I believe it's restricted to fields from the Element type (id and extension). Details are on the JSON page.
Last updated: Apr 12 2022 at 19:14 UTC