Generated Narrative: StructureDefinition targetConstraint Name Flags Card. Type Description & Constraints Extension 0..* Extension A constraint on the target resource #xD; Slices for extension Content/Rules for all slices #xD; extension:key 1..1 Extension Unique identifier #xD; extension 0..0 Extension #xD; url 1..1 uri "key" #xD; value[x] 1..1 id Value of extension #xD; extension:requirements 0..1 Extension Why the constraint is defined #xD; extension 0..0 Extension #xD; url 1..1 uri "requirements" #xD; value[x] 1..1 markdown Value of extension #xD; extension:severity 1..1 Extension error | warning #xD; extension 0..0 Extension #xD; url 1..1 uri "severity" #xD; value[x] 1..1 code Value of extension Binding: ConstraintSeverity (required) #xD; extension:expression 1..1 Extension The invariant expression #xD; extension 0..0 Extension #xD; url 1..1 uri "expression" #xD; value[x] 1..1 Expression Value of extension #xD; language 0..1 code text/cql | text/fhirpath | application/x-fhir-query | etc. Fixed Value: text/fhirpath #xD; extension:human 1..1 Extension Human-readable rule #xD; extension 0..0 Extension #xD; url 1..1 uri "human" #xD; value[x] 1..1 string Value of extension #xD; extension:location 0..* Extension Relative path to elements #xD; extension 0..0 Extension #xD; url 1..1 uri "location" #xD; value[x] 1..1 string Value of extension #xD; url 1..1 uri "http://hl7.org/fhir/StructureDefinition/targetConstraint" #xD; value[x] 0..0 Value of extension #xD; Documentation for this format
HL7 International / Clinical Decision Support
Specifies a constraint that is enforced on instantiated (or target) resources. This extension can be applied to definitional resources (such as ActivityDefinition or Measure) and indicates that the constraint should be enforced on resources that are instantiated from the definition. For example, this extension can be used to define a constraint such as `numerator count must be less than or equal to denominator count`.
This extension allows constraints to be specified as part of definitional resources as an alternative to having to define a profile to enforce the constraint.
Specifies a constraint that is enforced on instantiated (or target) resources. This extension can be applied to definitional resources (such as ActivityDefinition or Measure) and indicates that the constraint should be enforced on resources that are instantiated from the definition.
Can be used on any definitional artifact to define a constraint that is enforced in the context of an instantiated resource. The constraint expression will have access to `%target` and `%definition` variables, where target is the instantiated resource, and definition is the definition used to instantiate.
All FHIR elements must have a @value or children
hasValue() or (children().count() > id.count())
Must have either extensions or value[x], not both
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Extensions are always sliced by (at least) url
Additional content defined by implementations
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
A unique identifier for the invariant (unique in the context of the resource).
Any error or outcome messages or warnings should include this id to allow the source of the message to be determined.
Source of the definition for the extension code - a logical name or a URL.
The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.
Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R5/extensibility.html) for a list).
A brief description of why the constraint is necessary or appropriate.
Whether the constraint indicates an error condition or a warning.
SHALL applications comply with this constraint?
An expression providing a formal representation of the invariant condition.
The expression will have access to `%target` (the resource that was instantiated) and `%definition` (the definition for the instantiated resource). This expression is expected to evaluate to a boolean. If it evaluates to an empty collection, it is treated as false. Any other non-boolean value is considered an error in the profile including the extension.
Natural language description of the condition
A brief, natural language description of the condition that effectively communicates the intended semantics.
Short name assigned to expression for reuse
A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.
text/cql | text/fhirpath | application/x-fhir-query | etc.
The media type of the language for the expression.
The cardinality of this element is optional to allow text only as part of the authoring process. However, in order to be executable, the expression element must be specified.
The media type of the expression language.
An expression in the specified language that returns a value.
If Expression.expression and Expression.reference are both present, the Expression.expression might just be a name pointing something within the referenced content.
A URI that defines where the expression is found.
If both a reference and an expression is found, the reference SHALL point to the same expression.
A free text expression of the rule to display to the user if the rule is violated.
Relative paths to the elements this rule is enforced against.