Stream: implementers
Topic: CanonicalResource
Yunwei Wang (May 21 2020 at 14:35):
Where is that CanonicalResource interface used (or planned to be used) https://build.fhir.org/canonicalresource.html#CanonicalResource
Gino Canessa (May 21 2020 at 14:58):
Based on the commit that created it, Grahame pushed it. Looking through the changes from the commit, it is used in MetadataResource.
Yunwei Wang (May 21 2020 at 15:27):
Yes. It is also shown in this diagram.
image.png
Yunwei Wang (May 21 2020 at 15:29):
My question is what is the impact/usage on the concrete Resource? For example, will some resources change their type from DomainResource to CanonicalResource?
Paul Church (May 21 2020 at 15:31):
A CanonicalResource is anything that can be the target of a canonical reference. This interface can be inherited from by everything in the list of resources in http://hl7.org/fhir/resource.html#canonical - I assume that's the plan for R5.
Yunwei Wang (May 21 2020 at 15:48):
What is the impact on StructureDefinition (base FHIR and IG), tooling, modeling, parser, implementation, validation, etc?
@Paul Church At first, I had the same thought. Then I read this "Any classes the implement the interface redeclare any attributes and associations that are on the interface, and gives them an order". So it is not inheritance.
Grahame Grieve (May 22 2020 at 01:24):
I'm not sure what you are asking. https://build.fhir.org/canonicalresource.html#bnr is the list of where it is used.
It's an interface, not a class. So all it's properties are declared on the instantiations, but they are consistent with the interface- this is pretty normal stuff.
Grahame Grieve (May 22 2020 at 01:24):
The reference implementations already implemented this in some informal way; this puts what they were doing on a sound foundation
Last updated: Apr 12 2022 at 19:14 UTC