FHIR Chat · Class Inheritance · implementers

Stream: implementers

Topic: Class Inheritance


view this post on Zulip Rodney Collins (Jun 12 2019 at 00:51):

Something that has puzzled me for a while are the class 'types' listed in a Resource's Structure. Take Composition.attester for example, which shows a type or 'BackboneElement'. My thinking is that 'attester' should be of type 'Attester' and that the 'Attester' class EXTENDS 'BackboneElement' (which EXTENDS 'Element').

if 'attester' is of type 'BackboneElement' then where do the 'mode', 'time', and 'party' sub-elements come from. I suggest they come from the 'Attester' class. Looking at another so-called 'BackboneElement' class 'relatesTo' one will see that it has different sub-elements suggesting that is is of type 'RelatesTo' that EXTENDS 'BackboneElement'.

The same thinking applies to Composition.section. My thinking is that they are of type 'Section' that EXTENDS 'BackboneElement.

The Composition 'Structure' lists these elements as type 'BackboneElement' but a look at the Class Diagram (in the UML tab) would contradict this where it can be see (for example) that 'attester' is of type 'Attester' and we know that because 'attester' is a component part of Composition that 'Attester' would EXTEND the 'BackboneElement' class.

I have added some diagrams to demonstrate this and I ask" Is my thinking correct?
compositionClasses.png attester.png composition.svg
(composition svg doesn't show but you can see it if you click the link above)

view this post on Zulip Lloyd McKenzie (Jun 12 2019 at 01:10):

Yes. Everything that references BackboneElement is in fact extending it. To a lesser extent items that reference CodeableConcept and declare a binding are also "based on" CodeableConcept but could be treated as separate types.

view this post on Zulip Grahame Grieve (Jun 12 2019 at 13:34):

well, separate elements


Last updated: Apr 12 2022 at 19:14 UTC