Stream: implementers
Topic: Working with Extensions
Francisco Guimarães (May 15 2020 at 15:58):
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.
Jose Costa Teixeira (May 15 2020 at 16:10):
is this about hapi?
Francisco Guimarães (May 15 2020 at 16:12):
No it's about FHIR .Net API
Jose Costa Teixeira (May 15 2020 at 16:17):
there should be a dedicated thread for that, @Alexander Zautke do you know?
Jose Costa Teixeira (May 15 2020 at 16:29):
or @Ewout Kramer , isn't there a thread for .net?
Michele Mottini (May 15 2020 at 16:32):
Francisco Guimarães (May 15 2020 at 16:33):
Thank you, posted the topic there.
Last updated: Apr 12 2022 at 19:14 UTC