FHIR Chat · Extensions · implementers

Stream: implementers

Topic: Extensions


view this post on Zulip Jason Walonoski (Feb 19 2016 at 14:05):

Mark Kramer (MITRE) wrote a blog post about FHIR extensions, in response to Grahame's post... http://lightmyfhir.org/2016/02/19/alternative-syntaxes-for-fhir-extensions-2/

view this post on Zulip Jason Walonoski (Feb 19 2016 at 14:05):

I believe he plans to post a few more on that topic.

view this post on Zulip Josh Mandel (Feb 19 2016 at 15:16):

Nice — I appreciate the careful framing of the problem. (But I seem unable to post a response)

view this post on Zulip Jason Walonoski (Feb 19 2016 at 16:31):

@Josh Mandel looks like you figured it out, since I see a comment that you left.

view this post on Zulip Josh Mandel (Feb 19 2016 at 16:31):

Well, I had to use a different e-mail address, because the WP password recovery was broken. But then yes.

view this post on Zulip Josh Mandel (Feb 19 2016 at 16:32):

Also I didn't a confirmation my post had worked, so I wasn't sure.

view this post on Zulip Vadim Peretokin (Feb 24 2016 at 09:07):

Is https://hl7-fhir.github.io/resource.html#implicitRules still valid? It links to https://hl7-fhir.github.io/profiling.html but that page says nothing about custom agreements

view this post on Zulip Grahame Grieve (Feb 24 2016 at 11:23):

can you make a task to correct the link. the whole page is about custom agremeents, but it never closes out the implicit rules bit

view this post on Zulip Vadim Peretokin (Feb 24 2016 at 23:40):

OK, filed as http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=9632.

view this post on Zulip David Hay (Mar 14 2016 at 03:28):

in a complex extension, should the 'child' extensions have a url starting with # - ie:

view this post on Zulip David Hay (Mar 14 2016 at 03:28):

<extension url="http://fhir.hl7.org.nz/externalidentifier">
<extension url="#source">
<valueString value="North Shore Hospital"/>
</extension>

view this post on Zulip David Hay (Mar 14 2016 at 03:28):

rather than <extension url="http://fhir.hl7.org.nz/externalidentifier">
<extension url="source">
<valueString value="North Shore Hospital"/>
</extension>

view this post on Zulip Josh Mandel (Mar 14 2016 at 03:31):

I think the latter (bare words)

view this post on Zulip Josh Mandel (Mar 14 2016 at 03:31):

Let's see if I can find evidence

view this post on Zulip Josh Mandel (Mar 14 2016 at 03:34):

Example on http://hl7-fhir.github.io/extensibility matches this at least

view this post on Zulip David Hay (Mar 14 2016 at 03:37):

gotcha! thanks...

view this post on Zulip Grahame Grieve (Mar 14 2016 at 07:16):

y. references are relative inside a complex extension

view this post on Zulip Lloyd McKenzie (Mar 14 2016 at 11:55):

Using "#someName" was the old style.

view this post on Zulip Brian Postlethwaite (Mar 15 2016 at 03:07):

So no need for that # in front then.

view this post on Zulip Brian Reinhold (Feb 03 2017 at 13:37):

I am trying to understand the phrase
"Must have either extensions or value[x]"
in the structure definition of the extension element http://hl7.org/fhir/2016Sep/extensibility.html

Does this mean I can define something like
extension
uri
extension
uri
valueCodeableConcept
valueString
extension
uri
valueCodeableConcept
valueCodeableConcept

What I would really like is
extension
uri
valueCodeableConcept where this pair is repeated
value[x]

In other words emulate the 'component' element in an Observation but in a Device Resource.

view this post on Zulip Lloyd McKenzie (Feb 03 2017 at 16:24):

You can't have multiple value repetitions within an extension index. If you want multiple values, you need to repeat the entire extension element - i.e. declare the url each time. The reason is that JSON doesn't like polymorphic arrays.

view this post on Zulip Brian Reinhold (Feb 03 2017 at 16:37):

Thanks,

But what does "Must have either extensions or value[x]" trying to say? Nesting?

view this post on Zulip Lloyd McKenzie (Feb 03 2017 at 16:39):

It's saying you can either have a value or child extensions but not both. I.e. you can't have a complex extension that also has a value.

view this post on Zulip Lloyd McKenzie (Feb 03 2017 at 16:39):

Note that you can have a value where the value itself is extended.

view this post on Zulip Brian Reinhold (Feb 03 2017 at 19:24):

Lloyd, does this implementation look correct to you (aside from the phony uri)?

"extension":[  
           {  
              "url":"http://pcha.org/phd/documents/fhir/extensions/device-property",
              "valueCodeableConcept":{  
                 "extension":[  
                    {  
                       "url":"http://pcha.org/phd/documents/fhir/extensions/device-property-value",
                       "valueString":"162502000528"
                    }
                 ],
                 "coding":[  
                    {  
                       "system":"urn:iso:std:iso:11073:10101",
                       "code":"531972",
                       "display":"MDC_ID_PROD_SPEC_SERIAL: serial number"
                    }
                 ]
              }
           },

For example?

view this post on Zulip Lloyd McKenzie (Feb 03 2017 at 22:03):

Looks ok to me. Though in general, extension URLs should end with StructureDefinition/[id] so that they can be hosted as a propper FHIR server on their endpoint.

view this post on Zulip Lloyd McKenzie (Feb 03 2017 at 22:03):

i.e. http://pcha.org/phd/documents/fhir/extensions/StructureDefinition/device-property-value or something like that.

view this post on Zulip Brian Reinhold (Feb 11 2017 at 22:17):

Lloyd,
understood; right now the URL is just a placeholder until PCHA agrees on the approach.

view this post on Zulip Кирилл Казаченко (Mar 18 2017 at 07:30):

hello. Is there an extension for patient's work place and his position? Or... where i can save it?

view this post on Zulip Alexander Henket (Mar 18 2017 at 07:39):

There isn't one that I know of or at least not here: http://build.fhir.org/patient-profiles.html
.
My expectation for this type of info is something along the lines of (social) anamnesis. So you would not extend patient for it, but rather associate it to the patient using an observation.

view this post on Zulip Alexander Henket (Mar 18 2017 at 07:43):

Otherwise you'd need extensions for students, scholars, groups like who they live with (part of family X) and then some too. If someone doesn't have a job he might do volunteer work in a petting zoo (health risks) etc. Social anamnesis is better suited I think than pulling all those bits and pieces into patient.

view this post on Zulip Alexander Henket (Mar 18 2017 at 07:45):

If it's for financial purposes then I guess you'd find that info in/through Contract and or Coverage

view this post on Zulip Кирилл Казаченко (Mar 18 2017 at 07:54):

ok, thank you

view this post on Zulip Paul Knapp (Mar 19 2017 at 11:12):

There is a small group working on adding occupational health concerns, they would be developing models for this, I'm not positive but I think they are working through the O&O WG.

view this post on Zulip Lauren Wolejsza (Mar 20 2017 at 11:39):

Hi! I asked the same question a while ago. Search for the this thread: stream:implementers topic:Patient+Occupational+History. Hopefully the responses will help you. For our project, we are using a combination of Observations and Questionnaire to address our needs.

view this post on Zulip Eric Haas (Mar 20 2017 at 22:57):

The people working on it working on it are through the HL7 PHER WG.

view this post on Zulip Jayashree Surnar (Mar 27 2017 at 12:34):

hello all, in our UI we want to display these info along with admission info. so can we add these elements(from appointment) as extensions to Encounter Resource? or create a profile by remove all the elements from Appointment except these. and then use. which one is the correct way? please help me. Thank you.

view this post on Zulip Rik Smithies (Jul 28 2017 at 11:13):

Extension.uri says "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. " So it can be text or computable. Then it says "The definition SHALL be a URI for the Structure Definition defining the extension." That sounds computable only. Is the intention to say "If computable, the definition SHALL...."? Or is the StructureDefinition intended to cover human readable too?

view this post on Zulip Lloyd McKenzie (Jul 28 2017 at 16:01):

I think we tightened it to require it to be a StructureDefinition. Please submit a change request for us to clean up the looser wording.

view this post on Zulip Rik Smithies (Jul 29 2017 at 10:17):

If that is the case, should this not be a reference? What other way would there be to host a StructureDefinition? It seems to me that allowing a human readable, non-StructureDefinition, would make the barrier to using extensions a lot lower.

view this post on Zulip Lloyd McKenzie (Jul 29 2017 at 19:08):

But it means it's impossible to retrieve a computable definition of what they are. Creating extensions isn't that hard and ensuring there's a computable definition means that the extension is actually fully defined, sharable in registries, includable in implementation guides, etc.

view this post on Zulip Rik Smithies (Jul 29 2017 at 21:52):

Well it would still be possible, just optional. We can't say that extensions are not hard if it is tied 100% to creating a working StructureDefinition. For most non-FHIR experts that is hard. I can see that computable is better but I think that extension+StructureDefnition is an order of magnitude more difficult than extension+html description. But if it is StructureDefinition only, then why is this a URI and not a reference? Surely that is a hangover from the old human readable version.

view this post on Zulip Lloyd McKenzie (Jul 30 2017 at 03:32):

It's a URI because we don't need a full-blown reference data type here and we want to optimize the syntax to make using extensions in instances less painful.

view this post on Zulip Lloyd McKenzie (Jul 30 2017 at 03:34):

There are oodles of extension definitions available to use as examples. Modifying an existing one and checking it with a validator isn't an unreasonable ask for people who have the skills to manage sending and receiving FHIR instances in general. (And extension definitions are extremely simple StructureDefinitions - it's not like they need to understand slicing or any of the other craziness of profiles.) Plus there are tools like Forge that make it even easier.

view this post on Zulip Rik Smithies (Jul 30 2017 at 19:14):

Is this the only place in FHIR where a reference to another resource is not an actual reference?

view this post on Zulip Grahame Grieve (Jul 30 2017 at 20:13):

no. there's other places where we use URL.

view this post on Zulip Joel Francis (Aug 30 2017 at 16:55):

Hi,

Looking at the example 2.5.2.1.1 in the Specification (Patient Consent for Record Sharing), the instance specifies the <kind value="datatype"> but according to StructureDefinition, this element can have only the following values: primitive-type | complex-type | resource | logical. Can anyone explain why this is so in the example and from where did datatype come from?

Also on the notion of <context>; this happens to be of type String but the value for this in the example is "Patient" which also happens to be a resource. Just want to confirm that the context can be a any meaningful string and not a resource.

thanks,

Joel

view this post on Zulip Grahame Grieve (Aug 30 2017 at 20:25):

you got a URL for this?

view this post on Zulip Joel Francis (Aug 30 2017 at 22:17):

Yes @Grahame Grieve - https://www.hl7.org/fhir/extensibility-examples.html

view this post on Zulip Grahame Grieve (Aug 30 2017 at 23:31):

ok so the example is wrong - I don't know why the tooling hasn't picked up that this is wrong

view this post on Zulip Grahame Grieve (Aug 30 2017 at 23:32):

the conext can be any meaningful string, where meaning is specified by the contextType

view this post on Zulip Joel Francis (Aug 31 2017 at 02:27):

ok so the example is wrong - I don't know why the tooling hasn't picked up that this is wrong

@Grahame Grieve @Lloyd McKenzie . I think both the examples on the page have errors and have been very difficult to follow. Please also note that the notion of context is different in both your explanations.

view this post on Zulip Lloyd McKenzie (Aug 31 2017 at 02:35):

If contextType is "resource", then the context must be a resource name or path. If contextType is "datatype" then the context must be a data type name or path. If contextType is extension, then the context must be the extension URL. I'm actually not sure how to refer to a sub-element within a complex extension. And looking at the documentation, it appears the description of "context" could use a little work. So please submit a change request asking us to beef it up a bit...

view this post on Zulip Eric Haas (Aug 31 2017 at 15:38):

I have benefited from never having seen this page before. It would have confused me as well.

view this post on Zulip Ewout Kramer (Sep 15 2017 at 01:14):

ok so the example is wrong - I don't know why the tooling hasn't picked up that this is wrong

I have had a gforge item to correct this for some time. I think we've blockvoted on it today.

view this post on Zulip Thomas Tveit Rosenlund (Sep 15 2017 at 10:24):

Hi
I am currently trying to build some examples for using profiles with complex extensions, but they all fail to validate on SIMPLIFIER.
I got a simple profile https://simplifier.net/Velferd-test-og-lek/test-flag/~overview
This one has two timestamps, and one of them is mandatory.
When I try to implement it like this (https://simplifier.net/Velferd-test-og-lek/Flag-example-2/~xml)
<Flag>
<meta>
<profile value="http://ehelse.no/fhir/vft/STU3/StructureDefinition/test-flag" />
</meta>
<extension url="kodeverdi">
<extension url="http://ehelse.no/fhir/vft/STU3/StructureDefinition/vft-timestamp">
<valueDateTime value="2017-05-09T10:00:00.936+02:00" />
</extension>
</extension>
<extension url="kodeverdi-obligatorisk">
<extension url="http://ehelse.no/fhir/vft/STU3/StructureDefinition/vft-timestamp">
<valueDateTime value="2017-05-09T11:00:00.936+02:00" />
</extension>
</extension>
<identifier>
<value value="test-id" />
</identifier>
<status value="active" />
<code>
<text value="Bruker utenfor Geofence" />
</code>
<subject>
<identifier>
<system value="http://ehelse.no/fhir/identifiertypes/FNR" />
<value value="05073500186" />
</identifier>
</subject>
</Flag>

The example fails to validate because it supposedly don't contain a "kodeverdi-obligatorisk" element.
ERROR on SIMPLIFIER: Instance count for 'Flag.extension:kodeverdi-obligatorisk' is 0, which is not within the specified cardinality of 1..1

Any help is appreciated.
Thomas

view this post on Zulip Michel Rutten (Sep 18 2017 at 12:46):

Hi @Thomas Tveit Rosenlund, the published vtf-timestamp extension definition on Simplifier has no snapshot component:
https://simplifier.net/Velferdsteknologi2/vft-timestamp
This seems to trigger the incorrect validation warning. After repeating the validation, Simplifier now correctly reports "no issues" ( possibly because the system has now generated an in-memory snapshot).
I'll report the issue to our team. The validator should report missing required information, instead of generating improper warnings.
As a workaround, I suggest you re-upload the extension definition with a snapshot component (i.e. using Forge).
We are planning to integrate snapshot generation into Simplifier in the near future, so authors don't need to explicitly perform this step manually.

view this post on Zulip Thomas Tveit Rosenlund (Sep 18 2017 at 12:58):

Thanks @Michel Rutten

I did actually start to upload the complete snapshots and it seems that this helped. Altough my profiles (from Forge) does not validate correctly on SIMPLIFIER.

There are missing/old examples of how to use this kind of extensions in profiles and, then how to use this in actual instances. The examples in the doc seems to be old (does not validate) and instance example of profile using extensions are completely missing unfortunately, had me confused.

view this post on Zulip Michel Rutten (Sep 18 2017 at 13:04):

Hi @Thomas Tveit Rosenlund, FYI I've submitted an issue to the FHIR .NET API repository on GitHub:
https://github.com/ewoutkramer/fhir-net-api/issues/427

Concerning the incorrect examples that you mention, did you find them on the official hl7.org/fhir website? If so, could you please submit an issue to the gGorge FHIR issue tracker to correct the invalid examples?

view this post on Zulip Thomas Tveit Rosenlund (Sep 19 2017 at 06:41):

Hi @Michel Rutten that looks great. It's a little confusing with a lot of errors that should not be reported from the tools at all :-)

One example of broken example here: https://www.hl7.org/fhir/extensibility-examples.html
The first example is broken by snipping off two lines of mandatory metadata then there is the code value in element <kind> that is not correct and the mandatory <abstract> is missing. I think it would be a great idea if the complete examples from the online documentation could be downloaded directrly from the documentation pages. Then the users could test it in their own test environment without too much bugfixing first.

Yes I can take this on gForge FHIR.

view this post on Zulip Michel Rutten (Sep 20 2017 at 11:37):

Hi @Thomas Tveit Rosenlund, I understand your confusion and frustration with broken examples in the spec. I can only encourage you - and everybody else - to report all errors you discover via gForge. It would also be useful if the official build tool would validate all the included examples...

view this post on Zulip Lloyd McKenzie (Sep 20 2017 at 14:43):

The challenge with validating example fragments is that they're fragments - so not technically valid. The other challenge is extracting them from the HTML for validation.

view this post on Zulip Lloyd McKenzie (Sep 20 2017 at 14:43):

That said, anyone who has a strategy is welcome to enhance the build tool.

view this post on Zulip Grahame Grieve (Sep 20 2017 at 23:20):

actually, those things are all done. These examples are not complete enough, and not hooked up

view this post on Zulip Mike (Nov 21 2017 at 13:07):

How can I add GUI data in the form of extensions to a resource. Is it sensible to group extension, and how would you do it?

What if i want to add 10 integers into one extension, would I have to encode this as a string or is there a better way to do this?

Is it possible to search for an extension by URI on a resource?

view this post on Zulip Lloyd McKenzie (Nov 21 2017 at 16:07):

It's possible to define complex extensions which contain other extensions, but that's generally used for elements that must appear as a group or have other co-occurrence relationships. When defining the extension, you just profile the required child extensions rather than the value. Certainly allowing multiple distinctly identified integers as child extensions would be better than requiring string parsing. To search a resource by an extension, you need to define a custom SearchParameter instance and then declare support for that search using your CapabilityStatement.

view this post on Zulip Mounika (Dec 07 2017 at 12:58):

Hi all, how can I create an extension which will support multiple coding systems? Thank you.

view this post on Zulip John Moehrke (Dec 07 2017 at 13:19):

You don't need extensions for that, you just group the coding systems in a valueset and declare that any code from that valueset is supported.

view this post on Zulip Mounika (Dec 07 2017 at 13:22):

@John Moehrke Can you elaborate?

view this post on Zulip John Moehrke (Dec 07 2017 at 13:26):

without more information about what you are trying to do... your problem statement was around supporting multiple coding systems, well that is what a valueset can do. a valueset can pull in many coding systems, just as well as it can subset coding systems. That is what it does. My personal experience is with the Security tags http://build.fhir.org/valueset-security-labels.html which is many valuesets grouped which each have many codesystems and subsets.

view this post on Zulip Mounika (Dec 07 2017 at 13:37):

But what if we have many coding systems? For example RxNorm, NDC, NDFRT...etc

view this post on Zulip Lloyd McKenzie (Dec 07 2017 at 15:56):

If you want the instance to include a single code drawn from a choice of multiple code systems, just define a value set that includes codes from whatever code systems are relevant and bind that to the element or extension. If you want to require that multiple codes be present, each from a different code system, you'll need to slice the CodeableConcept.coding element with a separate binding to a code-system specific value set for each slice.

view this post on Zulip Mounika (Dec 08 2017 at 06:08):

Yes @Lloyd McKenzie But our problem is RxClasss has many codes also does NDC, NDFRT etc. So how can I create valuesets for all the coding systems?

view this post on Zulip Lloyd McKenzie (Dec 09 2017 at 00:12):

I'm not understanding the question. You don't need to list all of the codes to define a value set. You can simply define a value set that says "All NDC codes".

view this post on Zulip Yunwei Wang (Dec 09 2017 at 20:05):

@Mounika You need to clarify your question. Do you mean all codes from all medication related code system? You can have multiple code systems in Valueset.compose.include

view this post on Zulip Mounika (Dec 11 2017 at 06:59):

I'm not understanding the question. You don't need to list all of the codes to define a value set. You can simply define a value set that says "All NDC codes".

@Lloyd McKenzie Can you suggest me how to define the value set?

view this post on Zulip Vadim Peretokin (Dec 11 2017 at 07:43):

@Mounika you can use Valueset.compose.include.system without anything else:

If a system is specified, the following rules apply:
no concept or filter: All codes in the system are included

See example: http://hl7.org/fhir/valueset-cpt-all.json.html

view this post on Zulip Mounika (Dec 11 2017 at 08:41):

Okay @Vadim Peretokin How can I refer Valueset to the Medication resource?

view this post on Zulip Vadim Peretokin (Dec 11 2017 at 09:03):

Do you mean use a valueset in a medication resource?

view this post on Zulip Mounika (Dec 11 2017 at 09:12):

Yes. How can I refer Valueset.compose.include.system to Medication resource?

view this post on Zulip Grahame Grieve (Dec 11 2017 at 13:07):

you don't need to do that. think there's no clarity here about what you're trying to do

view this post on Zulip Yunwei Wang (Dec 11 2017 at 14:47):

That's right. I am totally confused.

view this post on Zulip Lloyd McKenzie (Dec 11 2017 at 15:52):

I think what you're trying to do is to define a profile on the MedicationResource and indicate the set of allowed codes. In that case, the valueSet will be declared as the binding on the Medication.code element.

view this post on Zulip Pritpal (Jan 10 2018 at 06:57):

Hi All..
I want to add extensions for patient entity. I am not able to find the url for Race & Ethnicity while adding extension for the same in fhir for a patient.
The old url (i.e. http://hl7.org/fhir/StructureDefinition/us-core-race ) is not working. Pls help

view this post on Zulip Lloyd McKenzie (Jan 10 2018 at 14:45):

Those are now part of the us-core IG. E.g. http://hl7.org/fhir/us/core/StructureDefinition-us-core-race.html

view this post on Zulip Al Buchala (Oct 14 2019 at 18:11):

Hi everyone. I need to add 2 date fields as extensions to the Patient resource. I've read the documentation on extensibility, but I am unclear on whether the dates can be on the same level? or if one of the dates needs to be an extension of the first date (also an extension)?

view this post on Zulip Lloyd McKenzie (Oct 14 2019 at 18:41):

You can have numerous extensions on any level. Are your dates patient demographic information?

view this post on Zulip Al Buchala (Oct 14 2019 at 18:54):

They're related to intake. Referral and Enrollment date. To provide some context, this is for PACE. When adding a new patient, it needs to include the Referral date and optionally, the patient may already be enrolled. In which case it needs to include the Enrollment date as well.

view this post on Zulip Lloyd McKenzie (Oct 14 2019 at 21:07):

Have you looked at EnrollmentResponse - that's where enrollment is typically tracked.

view this post on Zulip Al Buchala (Oct 14 2019 at 21:54):

I had initially looked into the EnrollmentRequest, but not the EnrollmentResponse. I will look at that message.

view this post on Zulip PS (Feb 12 2020 at 08:32):

Hi,
I have created slicing on extensions and below is the structure definition of the sliced part:

<element id="Patient.extension">
<path value="Patient.extension" />
<slicing>
<discriminator>
<type value="value" />
<path value="url" />
</discriminator>
<description value="Extensions are always sliced by (at least) url" />
<rules value="open" />
</slicing>

    <min value="0" />
    <max value="*" />
    <base>
        <path value="DomainResource.extension" />
        <min value="0" />
        <max value="*" />
    </base>
    <type>
        <code value="Extension" />
    </type>

</element>
<element id="Patient.extension:dhb">
    <path value="Patient.extension" />
    <sliceName value="dhb" />

    <min value="0" />
    <max value="1" />
    <base>
        <path value="DomainResource.extension" />
        <min value="0" />
        <max value="*" />
    </base>
    <type>
        <code value="Extension" />
        <profile value="http://somevalue/dhb" />
    </type>

</element>

The slicing was done to create dhb(which is of the type CodableConcept) but in the above structure definition there is no where mentioned that it is of type Codeable concept and type is mentioned as Extension.
How does validation works in these case ?

view this post on Zulip Lloyd McKenzie (Feb 12 2020 at 15:12):

The validator tries to retrieve the profile http://somevalue/dhb or find it declared within the current or dependency ig. That profile should have declared a fixed URL (or possibly a value set of allowed URL values - though that wouldn't make much sense for extensions). If it can't find the extension's profile, the validator will complain.

view this post on Zulip Ludvig Eek Hofmann (Feb 16 2021 at 08:23):

We have created an extension which is supposed to be mandatory. Therefore the cardinality in forge is set to mandatory for the extension. The problem however is that I can make the extension mandatory(1..1) but when uploding the profile to simplifier the extension I created lies within the extension element. This extension element has the cardinality 0..* and I have not managed to change this cardinality.
The problem is that we now have a problem when validating the profile because we do not get an error if the extension is missing since the extension element is not mandatory even if the actual extension I profiled is mandatory.

I hope I have made it understandable

view this post on Zulip Ward Weistra (Feb 16 2021 at 11:20):

Hi @Ludvig Eek Hofmann, we recently noticed this issue. When making an extension mandatory (or any other mandatory slicing, since adding extensions is under the hood just slicing the extensions array) Forge does not update the cardinality of the extension element itself. We'll start auto-calculating that extensions cardinality for you soon in Forge.

Do you have a link to an example where the validator does not complain about the missing mandatory extension? Because in my understanding the validator basically ignores the cardinality of the extension element and treats those slices as mandatory, even if cardinality of extension is 0..*. For instance, with this Patient example, which is based on this Patient profile having the 0..* on extensions.

view this post on Zulip Rashed omar (Feb 16 2021 at 12:01):

dose any one have mysql schema for FHIR ?

view this post on Zulip Rashed omar (Feb 16 2021 at 12:23):

Hi !

view this post on Zulip René Spronk (Feb 16 2021 at 14:32):

Hi @Rashed omar , please don't raise a question multiple times - all participants on this forum are volunteers, you should give them an opportunity to respond (let's say 24 hours) befoire attempting to raise the issue again. Your question is unrelated to the topic of this discussion, please raise a new topic. Please read https://wiki.hl7.org/FHIR_Rules_for_asking_questions as well. Thank you, and welcome!

view this post on Zulip Rath Panyowat (Jul 15 2021 at 16:38):

Hi, I'm a bit confused on what is the best practices on where to put an extension. Suppose I have 3 data elements that I want to extend from a particular resource. It seems like I have 3 options.

1) Add 3 elements as resource level extensions.
2) Add 1 complex element (with 3 children) as a resource level extension.
3) Add 1 element in 3 separate elements (element level extensions).

I wonder which option is appropriate for which situation?

I looked at some IGs. It seems like most of the time they go for option 1. And I feel like it's the most flexible one. Maybe I can re-use that extension in other extension. It also make all extension elements stay inside the same place (unlike option 3).

view this post on Zulip Lloyd McKenzie (Jul 15 2021 at 17:08):

Only use a complex extension if the three elements are intertwined and will generally always go together or will have interdependencies. As a general rule, you want extension definitions as shallow as possible. Also, when you add extensions, you should nest them inside the relevant element if they're tied to an element. Only put things at the resource root if they're not directly tied to one of the elements.

view this post on Zulip Eric Haas (Jul 15 2021 at 18:10):

practically speaking three extension are easier to manage than complex one unless they are interdependent.

view this post on Zulip Rath Panyowat (Jul 15 2021 at 18:29):

@Lloyd McKenzie @Eric Haas Thank you very much. Your comment make it more clear for me :big_smile:

view this post on Zulip Naji Naser (Aug 02 2021 at 14:32):

https://www.hl7.org/fhir/extensibility.html#Extension
We're trying to create new extensions in our project, so I'd like to ask if anyone knows what the naming convention of the URL field is?

view this post on Zulip Naji Naser (Aug 02 2021 at 14:37):

For example, {BaseUrl}/{extentionName}/{resource} ?!

view this post on Zulip Lloyd McKenzie (Aug 02 2021 at 15:07):

In most cases, the URLs follow the RESTful FHIR convention as that allows the extension definitions to be hosted on a regular server - e.g. "[base]/StructureDefinition/some-id". I personally start all of my extension ids with "ext-" because that makes them sort nicely in my source folders when developing IGs. But there's no formal rule to do that - and the extensions defined in the core spec don't follow any particular pattern.


Last updated: Apr 12 2022 at 19:14 UTC