FHIR Infrastructure Work Group | Maturity Level: Normative | Standards Status: Normative |
This page has been approved as part of an ANSI standard. See the Infrastructure Package for further details. |
The UML diagrams represent the Resource and Type defined in this specification in UML.
Each type is represented as a class with a name and an ancestor class (except for Element and Resource, which have no ancestor). In addition, types may be marked as abstract, aor assigned stereotypes that describe how they used.
Classes also have a zero or more attributes defined, where each attribute has the following properties:
name
: the name of the attributetype
: the type of the attribute - either another type defined in the speification, or (for primitive types) a type from XML Schema[cardinality]
: [min..max] control over the attribute cardinality. Attributes with Max cardinality >1 (usually *
) are ordered, though
the meaning of the order might not be known or defined« stereotypes »
: these provide additional detail about the element - see belowIn addition, classes have zero or more associations, which are always aggregations, and have the following properties:
name
: the name of the association (which is the name of the element that represents it in XML/JSON)[cardinality]
: [min..max] control over the association cardinality. Associations with Max cardinality >1 (usually *
) are ordered, though
the meaning of the order might not be known or definedThe elements and the data types are hyperlinks to the formal definitions of the parts.
Note that the order of elements in XML (the only serialization where order is required to be correct) cannot be inferred from the UML diagram - the attributes will be in the order presented, but the order in which the associations are serialized, which are interspersed with the attributes, cannotbe determined. Also, it cannot be determined whether a UML property becomes an element or an attribute in the XML representation.
This specification uses a number of stereotypes to further define the types and resources. The following stereotypes are used on classes.
Some of the abstract types are labeled with the stereotype «Interface»
. This indicates that in addition
to being abstract, the definitions associated with the class have no implementation. As such:
Notes for implementers:
Some of types are labeled with the stereotype «Pattern»
. This indicates that in addition
to being abstract, and an interface, classes that follow the interface do so loosely. As such:
Notes for implementers:
There are three stereotypes for attributes, both of which constrain the value domain of the assigned data type. These three stereotypes can be differentiated by examining the contents of the stereotype.
Note that where these stereotypes are allowed, they are usually present and populated.
If the data type assigned to an attribute is abstract, then a stereotype may be provided that indicates which concrete sub-types are allowed to be used for this particular element. If this stereotype is provided, only the specified types are allowed. Note: as such, this is equivalent to an OCL constraint on the attribute.
The format of this stereotype is a list of types defined within this specification (concrete specializations of Type)
separated by the |
character.
If the data type assigned to an attribute is a reference to another resource (one of Reference, canonical or CodeableReference), then a stereotype may be provided that indicates which kinds of resources the references are allowed to refer to. If this stereotype is provided, only the specified resources are allowed to be referenced. Note: as such, this is conceptually equivalent to an OCL constraint on the attribute, but the rules can only be evaluated by fetching the target of the reference from the specified URL and examining it's content.
The format of this stereotype is a list of resource types defined within this specification (concrete specializations of Resource)
separated by the |
character.
If the data type associated with the attribute is one of the data types that can be bound to a value set, then a stereotype may be provided that restricts the codes that may be present in the attribute. If this stereotype is provided, the rules as defined by the binding must be followed. Note: there is no OCL equivalent for this stereotype.
This stereotype has two parts: the value set name (which is a link to the value set), and a symbol that denotes the strength of the binding: