FHIR Chat · Working with Extensions · dotnet

Stream: dotnet

Topic: Working with Extensions


view this post on Zulip Francisco Guimarães (May 15 2020 at 16:32):

Hello everyone,

I'm currently working with a custom profile that has quite heavily extended the base MedicationStatement.
What is the recommended approach to handle extension navigation:

[FhirType("Extension", IsResource = true)]
public class ChildExtension : Extension
{
// Custom properties
// Other Child Extensions
}

[FhirType("Extension", IsResource = true)]
public class ParentExtension : Extension
{
public ChildExtension AnotherExtension
{
get
{
return this.GetExtension("ChildExtension") as ChildExtension;
}
}
}

Do you see any problem with this approach?
From reading the other topics in this group it seems inheriting from the base model is not recommended...

Thank you.

view this post on Zulip Michele Mottini (May 15 2020 at 16:33):

No, you cannot do that. Use the built-in Extension class

view this post on Zulip Jeena a (Mar 30 2021 at 17:11):

Hi,

I am using the .net firely library to validate my bundle resource and I get an error on the extenisons - {Text="Unable to resolve reference to profile 'http://XXX/patient-code'"} this is expected in my case as the extensions haven't been published yet. Is there a way to treat these as just warnings. and not error to be able to validate the bundle.

view this post on Zulip Ward Weistra (Mar 31 2021 at 18:44):

@Jeena a Please see the FHIR rules for asking questions:

Please don't ask the same question on multiple forums at once.

This question was already answered here on Zulip and here on GitHub.


Last updated: Apr 12 2022 at 19:14 UTC