Search code examples
hapi-fhirhl7-fhir

How to interpret the `path` attribute in `ElementDefinition`


I'm working on generating FHIR client code and am currently working on generating code for extensions.

I have trouble understanding paths in ElementDefinition that contain more than one . like for example

"path": "Extension.extension.id",

from http://hl7.org/fhir/StructureDefinition/qicore-adverseevent-cause

or

"path": "Extension.extension.extension.id",

from http://hl7.org/fhir/StructureDefinition/valueset-history

How should such paths be interpreted?


Solution

  • Hierarchy in FHIR models is represented using the dot notation. So Extension.extension.id corresponds to Extension/extension/id from an xpath perspective (or Extension.extension.id from a JSON object navigation perspective). Every time you see a new period in the path, you're nesting one level deeper.