The pseudo-datatype ElementDefinition is used both in StructureDefinition and ExtensionDefinition, and even within those resources, the way its elements are to be used and interpreted depend on the context where ElementDefinition used.
short,formal,comments,requirements,synonymcan be used in any context to convey a change to the interpretation of the constrained element as compared to the base definition.conditionandconstraintmay be used in all contextsmappingmay be used in all contexts
pathis equal to the name of the type indicated in Structure.typerepresentationmay not be usednameassociates a nameslicingmay not be usedminandmaxmay not be usedtypeis set to "Resource" for constraints on Resources, "Element" for constraints on data typesnameReferencemay not be usedfixed,patternindicate a value that an instance of a while complex type constrained by this structure must match. May be used instead of applying constraints to the nested elements of the datatype.exampleexample value for a complex type in an instance that complies to the structuremaxLengthmay not be usedmustSupportmay not be usedisModifiermay not be usedisSummarymay not be usedbindingmay not be used
representationmay only be used on elements of a primitive type (and currently only on the "value" element of FHIR primitive types and "url" element of Extension)slicingcan only be used on the first repeat of an element, this element is considered the slicing entrymustSupportmay be used, but if it is not present it defaults to "false"isModifiermust be the same as the base definition for the datatype or ResourceisSummarymust be the same as the base definition for the datatype or Resource
The ElementDefinition is understood to be the set of constraints to be used for the "open" slice, i.e. when the slice is open, this definition is used as a constraint on elements in the instance that are not part of a slice and belong to the open portion of the slice. Its use follows the "normal case", except:
representationmay not be usednamemay not be used?slicingmust be presentminandmaxare considered to govern the number of total occurrences of the sliced element including the number of occurrences in the open portion of the slice.isModifiermust be the same as the base definition for the datatype or ResourceisSummarymust be the same as the base definition for the datatype or Resource
pathis equal to ExtensionDefinition.namerepresentationmay not be usednamemay not be usedslicingmay be used to express constraints on the use of specific types when the element allows a choice of type (name ends in [x])min,maxdefines the allowed number of occurrences of this extension in an instance. Actual use in the target context of an extension may governed by slicing the (modifier)extension element of the target and must be compatible with this number. Note that having a min > 0 can only be guaranteed where such slicing rules are in place in the target.typeindicates the (choice of) types of the extension's valuenameReferencemay not be usedmustSupportmay be used, but if it is not present it defaults to "false"isModifierindicates whether the extension appears in the of element in the instance. If it is not present it defaults to "false"isSummaryindicates whether the extension will appear in a summary
pathis equal to ExtensionDefinition.namerepresentationmay not be usednamemay not be usedslicingmay not be usedmin,maxdefines the allowed number of occurrences of this extension in an instance. Actual use in the target context of an extension may governed by slicing the (modifier)extension element of the target and must be compatible with this number. Note that having a min > 0 can only be guaranteed where such slicing rules are in place in the target.typeis set toExtensionnameReferencemay not be usedfixed,patternmay not be used. (Lloyd may describe a usecase)exampleexample value for the complex extension in an instancemaxLengthmay not be usedmustSupportmay not be usedisModifierindicates whether the extension appears in the of element in the instance. If it is not present it defaults to "false"isSummaryindicates whether the extension will appear in a summary (depends on modifierExtension?)bindingmay not be used
representationmay not be usedslicingmay be used to express constraints on the use of specific types when the element allows a choice of type (name ends in [x])mustSupportmay be used, but if it is not present it defaults to "false"isModifiermay be used, but if it is not present it defaults to "false"