FHIR Chat · Using inline extensions but no URL in instances? · shorthand

Stream: shorthand

Topic: Using inline extensions but no URL in instances?


view this post on Zulip Jean Duteau (Sep 29 2020 at 18:00):

I have defined some inline extensions for simple things:
Profile: BCPractitionerRole
Parent: PractitionerRole

  • specialty MS
  • specialty.extension contains period 1..1 MS
  • specialty.extension[period].value[x] only Period

When I create the instance:
Instance: Example-AddProvider-PractitionerRole
InstanceOf: BCPractitionerRole

It generates the following:

  "specialty": [
    {
      "extension": [
        {
          "url": "period",
          "valuePeriod": {
            "start": "2000-01-01",
            "end": "2020-01-01"
          }
        }
      ],
      "coding": [
        {
          "code": "130",
          "system": "https://fhir.infoway-inforoute.ca/CodeSystem/scpqual"
        }
      ]
    }
  ],

which gives the error that the extension URL needs to be absolute. There is nothing in the language reference that says that you can't do an inline extension at this level which is probably a mistake? It does say that inline extensions don't create SDs (that should probably be spelled out as StructureDefinition), so I'm assuming that we shouldn't be using inline extensions at the top level of a resource or element.

view this post on Zulip Chris Moesel (Sep 29 2020 at 18:04):

Hey @Jean Duteau. Yeah, I think that inline extensions are only valid in the context of complex extension definitions. We missed stating that in the documentation. See this thread for a previous discussion about this: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Extension.2Eurl.20must.20be.20an.20absolute.20URL/near/208817784

view this post on Zulip Jean Duteau (Sep 29 2020 at 18:41):

ah I should have remembered that thread! sorry for the dup

view this post on Zulip Chris Moesel (Sep 29 2020 at 19:17):

No problem!


Last updated: Apr 12 2022 at 19:14 UTC