FHIR Chat · Profile on existing Extension · conformance

Stream: conformance

Topic: Profile on existing Extension


view this post on Zulip Patrick Werner (Jan 17 2018 at 17:34):

We are using the usual-route extension in our medication ressources:
http://hl7.org/fhir/StructureDefinition/medication-usualRoute
We now want to constrain the Extension by slicing the coding to enforce the usage of a mandatory codeSystem for our Context.
I tried this with Forge, but the mechanism how to do it is unclear to me. Can i build derived Extension from another Extension, or create a profile for the coding inside the Extension?

view this post on Zulip Vadim Peretokin (Jan 18 2018 at 09:21):

Apply the extension in the profile and then slice it :)

view this post on Zulip Patrick Werner (Jan 18 2018 at 14:08):

Thanks Vadim. Unfortunately i can't slice it, as Forge is not displaying the Extension Contents in Forge.
I think it is a bug, as i always get the warning that the Extension can't be resolved tough it is in the same path and opened already in Forge. Or am i doing it wrong? @Michel Rutten

Steps to reproduce:
Open http://hl7.org/fhir/StructureDefinition/medication-usualRoute profile in Forge, create a new Profile for Medication, add the Extension to the Medication. -> no Elements from the Extension are shown.
If you close the Medication Profile and reopen it you get the warning: unable to resolve profile

view this post on Zulip Patrick Werner (Jan 18 2018 at 15:11):

Update: we deleted the SnapshotComponent of the Profile, now it is working again in Forge. The only left issue is that Forge adds the following Extensions by itself:

       <issue>
        <severity value="information"/>
        <code value="processing"/>
        <diagnostics value="Unknown extension http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"/>
        <location value="StructureDefinition.snapshot.element[5].binding.extension[1]"/>
    </issue>
    <issue>
        <severity value="information"/>
        <code value="processing"/>
        <diagnostics value="Unknown extension http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"/>
        <location value="StructureDefinition.snapshot.element[5].binding.extension[2]"/>
    </issue>
    <issue>
        <severity value="information"/>
        <code value="processing"/>
        <diagnostics value="Unknown extension http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"/>
        <location value="StructureDefinition.snapshot.element[5].binding.extension[3]"/>
    </issue>

view this post on Zulip Patrick Werner (Jan 18 2018 at 15:47):

Steps to reproduce:
Create Medication Profile, change something (i set the min card. of Ingridient to 1), save.

Forge adds the following Extensions in the Snapshot:
elementdefinition-maxValueSet
elementdefinition-bindingName
elementdefinition-isCommonBinding
elementdefinition-translatable

view this post on Zulip Lloyd McKenzie (Jan 18 2018 at 17:41):

It should be possible to profile an extension to further refine it and reference that profiled extension in other profiles.

view this post on Zulip Lloyd McKenzie (Jan 18 2018 at 17:42):

If Forge doesn't support this yet, it should certainly be on the list because there are lots of cases where this will be needed.

view this post on Zulip Patrick Werner (Jan 18 2018 at 18:41):

It is possible, it was only a bug related to the Snapshot Creation of Forge.

view this post on Zulip Ewout Kramer (Jan 19 2018 at 13:07):

I am pretty sure Forge supports profiling extensions, but Michel knows for sure ;-) We won't be online today I think, so we'll know after the weekend...

view this post on Zulip Patrick Werner (Jan 22 2018 at 14:11):

i got it to work. But i had to manually delete the snapshot of the profile in which i was using the extension. I've seen this behaviour several times in Forge. The Snapshot get's "corrupted". If i delete it and load only the cleaned profile, containig only the differential part, it works again.

view this post on Zulip Michel Rutten (Jan 23 2018 at 16:18):

Hi @Patrick Werner, thank you for the feedback!
Forge completely disregards existing snapshot components and always re-generates all snapshots from the ground up. However you report that sometimes an existing snapshot apparently has some effect. This is a bit unexpected? I'll try to investigate your profile and determine what's causing this when I have some time.
BTW Are you visiting the New Orleans WGM?

view this post on Zulip Stefan Lang (Aug 03 2018 at 09:49):

Any news on that one?
I'm facing the same problem right now, using Forge 19.1

view this post on Zulip Stefan Lang (Aug 03 2018 at 09:50):

Patrick's workaround doesn't work for me

view this post on Zulip Michel Rutten (Aug 03 2018 at 09:53):

Hi @Stefan Lang, as far as I am aware, Forge supports further constraining referenced extensions. Can you describe the issue and steps to reproduce?

view this post on Zulip Stefan Lang (Aug 03 2018 at 09:58):

Sure.

The issue is: extensions added to an element don't show up in the slices after slicing that element.

Steps to reproduce:
1. create an extension for the context Whateverresource.some.element
2. create a profile of Whateverresource
3. extend Whateverresource.some.element with the above created extension
4. Click "Slice" for Whateverresource.some.element
5. Click "Add Slice" for Whateverresource.some.element
6. no extensions show up in the slice just created

view this post on Zulip Maximilian Reith (Aug 03 2018 at 10:16):

Same problem here... the workaround is not working for me...using Forge 19.1 too.

view this post on Zulip Stefan Lang (Aug 03 2018 at 10:25):

Example files (extension on Patient.generalPractitioner.identifier):
DummyExtension.StructureDefinition.xml DummyPatient.StructureDefinition.xml

view this post on Zulip Michel Rutten (Aug 03 2018 at 11:05):

Ah, now I see. This is a known limitation of slicing support in Forge.
When an element is sliced, Forge hides the regular child elements of the sliced element and instead displays the associated named slices as child elements. As a result, you cannot edit constraints on regular child elements of a sliced element in Forge. This includes extensions on the sliced element.
Note that Forge will not corrupt/remove any existing constraints on regular child elements of a sliced element. The elements are not visible in the user interface and you cannot edit them. However any hidden constraints will still be included in the output when saving the resource.
To properly support this scenario, I need to completely re-design the slicing UI. This has been on the backlog for a while now. I'd definitely like to improve slicing support. But that won't be any time soon, as we are first going to improve other parts of the application.

view this post on Zulip Stefan Lang (Aug 03 2018 at 12:08):

So for now, it is either manually edit the SD XML or, if one is stuck to Forge, find a different way to represent the requirements without that kind of slices.

view this post on Zulip Michel Rutten (Aug 03 2018 at 12:32):

Alternatively, you could use Forge to create the profile with slicing, then manually hack in the extension. If you then open the profile again in Forge, you won't see the extension, but the application will not remove it.
I'll see if I can implement an (advanced) application option that will allow you to toggle element visibility.

view this post on Zulip Stefan Lang (Aug 03 2018 at 13:04):

Yes, that's what I meant. Definitely not starting the SD manually ;)

view this post on Zulip Stefan Lang (Aug 03 2018 at 13:05):

The visibility option would be great


Last updated: Apr 12 2022 at 19:14 UTC