0

In a StructureDefinition like

  "entry": [
    {
      "fullUrl": "http://hl7.org/fhir/StructureDefinition/condition-dueTo",
      "resource": {
        ...
        "base": "http://hl7.org/fhir/StructureDefinition/Extension",
        "differential": {
          "element": [
            {
              "path": "Extension",

, what is it "path": "Extension" points to?

I'm working on generating client code that also can handle extensions, and I'm struggling to figure out how this path should be interpreted.

As far as I understand it, the next element

            { 
              "path": "Extension.extension",
              "name": "code",    

constraints the extension property of the current extensions base (Extension). Please correct me if this is wrong.

If Extension would point to the base extension, then how is

          "min": 0,
          "max": "*",

to interpret.

So the main question again. How to interpret this path in an extension:

"path": "Extension",
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567

1 Answers1

2

StructureDefinitions define hierarchical structures with a flat list of elements in the snapshot view. The hierarchy is expressed via the hierarchy of .-separated node names in "path".

Path in differential points to a path in the snapshot. It identifies the "node" within the structural hierarchy of the resource, data type, extension, etc. In this case, "Extension" has no periods in it, so it refers to the root element of the extension. If it was Extension.extension or Extension.url or Extension.valueCodeableConcept.coding.code or something like that, it would refer to a deeper element within the hierarchy of the structure.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • I don't get what `Extension` is in this concrete case. The `base` is `Extension`. It seems to be pointing to the base "class" (with "class" using the code generation view). – Günter Zöchbauer Sep 05 '16 at 19:12
  • Extension is the type being constrained - Extension is the name of a FHIR data type. If it had been a profile on Address, then the path would have been "Address". If it had been a profile on Observation, then the path would have been "Observation". When you're profiling, the path will always be a path that was first defined in either a FHIR resource or a data type. – Lloyd McKenzie Sep 06 '16 at 02:22