NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition INDomainResourceStructural Definition
+ In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element)
+ Custom types can only be used in logical models
+ All element definitions must have unique ids (snapshot)
+ Context Invariants can only be used for extensions
+ All element definitions must have unique ids (diff)
+ element.base cannot appear if there is no base on the structure definition
+ If there's a type, its content must match the path name in the first element of a snapshot
+ All element definitions must have an id
+ Element paths must be unique unless the structure is a constraint
+ Default values can only be specified on logical models
+ If the structure describes a base Resource or Type, the URL has to start with "http://hl7.org/fhir/StructureDefinition/" and the tail must match the id
+ A structure must have either a differential, or a snapshot (or both)
+ If the structure defines an extension then the structure must have context information
+ If the structure is not abstract, then there SHALL be a baseDefinition
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriCanonical identifier for this structure definition, represented as a URI (globally unique)
... identifier Σ0..*IdentifierAdditional identifier for the structure definition
... version Σ0..1stringBusiness version of the structure definition
... name Σ1..1stringName for this structure definition (computer friendly)
... title Σ0..1stringName for this structure definition (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
PublicationStatus (Required)
... experimental ?!Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..1markdownNatural language description of the structure definition
... useContext ΣTU0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for structure definition (if applicable)
Jurisdiction ValueSet (Extensible)
... purpose 0..1markdownWhy this structure definition is defined
... copyright 0..1markdownUse and/or publishing restrictions
... keyword Σ0..*CodingAssist with indexing and finding
Structure Definition Codes (Example)
... fhirVersion Σ0..1idFHIR Version this StructureDefinition targets
All Published FHIR versions (Required)
... mapping I0..*BackboneElementExternal specification that the content is mapped to
+ Must have at least a name or a uri (or both)
.... identity 1..1idInternal id when this mapping is used
.... uri I0..1uriIdentifies what this mapping refers to
.... name I0..1stringNames what this mapping refers to
.... comment 0..1stringVersions, Issues, Scope limitations etc.
... kind Σ1..1codeprimitive-type | complex-type | resource | logical
StructureDefinitionKind (Required)
... abstract Σ1..1booleanWhether the structure is abstract
... context ΣI0..*BackboneElementIf an extension, where it can be used in instances
.... type Σ1..1codefhirpath | element | extension
ExtensionContextType (Required)
.... expression Σ1..1stringWhere the extension can be used in instances
... contextInvariant ΣI0..*stringFHIRPath invariants - when the extension can be used
... type ΣI1..1uriType defined or constrained by this structure
FHIRDefinedType (Extensible)
... baseDefinition ΣI0..1canonicalDefinition that this type is constrained/specialized from
... derivation Σ0..1codespecialization | constraint - How relates to base definition
TypeDerivationRule (Required)
... snapshot I0..1BackboneElementSnapshot view of the structure
+ The first element in a snapshot has no type
+ In any snapshot, all the elements must be in the specified type, and must have a base definition
+ Each element definition in a snapshot must have a formal definition and cardinalities
.... element I1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)
+ provide either a binding reference or a description (or both)
... differential I0..1BackboneElementDifferential view of the structure
+ If the first element in a differential has no "." in the path, it has no type
+ No slicing on the root element
+ In any differential, all the elements must be in the specified type
.... element 1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)

doco Documentation for this format