FHIR Chat · ElementDefinition.base in combination with CanonicalResource · conformance

Stream: conformance

Topic: ElementDefinition.base in combination with CanonicalResource


view this post on Zulip Marco Visser (Sep 10 2020 at 09:30):

I am implementing R5 now for the fhir-net-api (version 2020Sep - 4.5.0), and when we are creating a snapshot, for example of Questionnaire, the base path (ElementDefinition.base) is now CanonicalResource.url for element Questionnaire.url. That is comprehensible because Questionnaire is derived from MetadataResource and MetadataResource is derived from CanonicalResource where the element url is introduced.
I know that MetadataResource and CanonicalResource are meant to be interfaces, so Questionnaire implements interface MetadataResource and does not have a is a relationship. But how should I know that?

I made now a hack so that the base.path is now Questionnaire.url for element url, because I think that is right. Do you think as well that is the right path?

view this post on Zulip Brian Postlethwaite (Sep 12 2020 at 21:13):

Not sure I follow this one?

view this post on Zulip Grahame Grieve (Sep 14 2020 at 05:48):

I'm not sure.

view this post on Zulip Grahame Grieve (Sep 14 2020 at 05:48):

Questionnaire implements interface MetadataResource and does not have a is a relationship

That's language dependent that assertion

view this post on Zulip Grahame Grieve (Sep 14 2020 at 05:48):

I'm not sure about what base should point to.

view this post on Zulip Grahame Grieve (Sep 14 2020 at 05:49):

it's certainly not an accident how it currently is

view this post on Zulip Ewout Kramer (Sep 14 2020 at 10:15):

Do you think CanonicalResource will remain a true base class for Questionnaire, or (as we have lightly touched on in some discussions) are CanonicalResource and MetadataResource more like an interface in the end?

view this post on Zulip Brian Postlethwaite (Sep 14 2020 at 10:43):

Definitely an interface.

view this post on Zulip Brian Postlethwaite (Sep 14 2020 at 10:44):

I though it was, same as metadata resource?

view this post on Zulip Grahame Grieve (Sep 14 2020 at 10:54):

well... they are a pattern. Interface... that seems to carry baggage that doesn't mean the same to all of us

view this post on Zulip Ewout Kramer (Sep 14 2020 at 13:31):

For this issue, I think it's ok that we agree it's a pattern/interface. This would mean that a class declares to be "compatible" with it. Now, do we agree that such a class needs to declare members that are part of this interface itself again in its differential?

view this post on Zulip Grahame Grieve (Sep 14 2020 at 16:46):

I think so?

view this post on Zulip Ewout Kramer (Sep 14 2020 at 18:28):

Then it makes sense that the ElementDefinition for Questionnaire.url mentions Questionnaire.url as the base, not MetadataResource.url indeed.

view this post on Zulip Grahame Grieve (Sep 14 2020 at 18:43):

I'm not sure.

view this post on Zulip Ewout Kramer (Sep 14 2020 at 20:53):

hahaha. amnesia.

view this post on Zulip Ewout Kramer (Sep 14 2020 at 20:53):

https://chat.fhir.org/#narrow/stream/179177-conformance/topic/Element.2Ebase.20on.20elements.20implemented.20from.20interface.20classes

view this post on Zulip Ewout Kramer (Sep 14 2020 at 20:54):

(ok, I was still cycling in Vietnam. Must admit I haven't read up on everything now ;-))

view this post on Zulip Grahame Grieve (Sep 14 2020 at 23:10):

slightly different question


Last updated: Apr 12 2022 at 19:14 UTC