CH EKM (R4)
0.0.1 - ci-build Switzerland flag

CH EKM (R4), published by Federal Office of Public Health FOPH. This guide is not an authorized publication; it is the continuous build for version 0.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/ahdis/ch-ekm/ and changes regularly. See the Directory of published versions

Extension: SdcTemplateExtractExtension - Detailed Descriptions

Draft as of 2026-08-05

Definitions for the sdc-templateExtractExtension extension.

Guidance on how to interpret the contents of this table can be foundhere

0. Extension
Definition

Carrier/placeholder extension used only inside an SDC template-based $extract template to build a whole FHIR Extension via %factory.Extension at a location a value directive cannot reach (e.g. a primitive element's _element.extension). Its %factory.Extension result replaces this carrier during extraction, so it never appears in extracted output.


Optional Extension Element - found in all resources.

ShortTemplate-extract carrier that builds a whole Extension via %factory.ExtensionOptional Extensions Element
Control0..*
This element is affected by the following invariants: ele-1
Is Modifierfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
2. Extension.extension:context
Slice Namecontext
Definition

If value is of type 'string', then it is to be evaluated as a fhirpath expression. If a value of type 'Expression' is provided, only fhirpath expressions are supported, and the language MAY be omitted.

ShortFhirPath expression
Control0..1
TypeExtension(Extract Template - Context) (Extension Type: Choice of: string, Expression)
Is Modifierfalse
Summaryfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
4. Extension.extension:value
Slice Namevalue
Definition

Provides FHIRPath expression to evaluate any value(s) to replace in the given template extraction context. If no result is evaluated, the element in the templated resource will be removed, and futher processing of it's children is not required.

ShortFhirPath expression
Control0..1
TypeExtension(Extract Template - Extract value) (Extension Type: string)
Is Modifierfalse
Summaryfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
6. Extension.url
Definition

Source of the definition for the extension code - a logical name or a URL.

Shortidentifies the meaning of the extension
Comments

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.

Control1..1
Typeuri
Is Modifierfalse
XML FormatIn the XML format, this property is represented as an attribute.
Summaryfalse
Fixed Valuehttp://fhir.ch/ig/ch-ekm/StructureDefinition/sdc-templateExtractExtension
8. Extension.value[x]
Definition

Value of extension - must be one of a constrained set of the data types (see Extensibility for a list).

ShortValue of extension
Control0..01
TypeChoice of: base64Binary, boolean, canonical, code, date, dateTime, decimal, id, instant, integer, markdown, oid, positiveInt, string, time, unsignedInt, uri, url, uuid, Address, Age, Annotation, Attachment, CodeableConcept, Coding, ContactPoint, Count, Distance, Duration, HumanName, Identifier, Money, Period, Quantity, Range, Ratio, Reference, SampledData, Signature, Timing, ContactDetail, Contributor, DataRequirement, Expression, ParameterDefinition, RelatedArtifact, TriggerDefinition, UsageContext, Dosage, Meta
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summaryfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))

Guidance on how to interpret the contents of this table can be foundhere

0. Extension
Definition

Carrier/placeholder extension used only inside an SDC template-based $extract template to build a whole FHIR Extension via %factory.Extension at a location a value directive cannot reach (e.g. a primitive element's _element.extension). Its %factory.Extension result replaces this carrier during extraction, so it never appears in extracted output.

ShortTemplate-extract carrier that builds a whole Extension via %factory.Extension
2. Extension.extension:context
Slice Namecontext
Control0..1
TypeExtension(Extract Template - Context) (Extension Type: Choice of: string, Expression)
4. Extension.extension:value
Slice Namevalue
Control0..*
TypeExtension(Extract Template - Extract value) (Extension Type: string)
6. Extension.url
Fixed Valuehttp://fhir.ch/ig/ch-ekm/StructureDefinition/sdc-templateExtractExtension
8. Extension.value[x]
Control0..0

Guidance on how to interpret the contents of this table can be foundhere

0. Extension
Definition

Carrier/placeholder extension used only inside an SDC template-based $extract template to build a whole FHIR Extension via %factory.Extension at a location a value directive cannot reach (e.g. a primitive element's _element.extension). Its %factory.Extension result replaces this carrier during extraction, so it never appears in extracted output.

ShortTemplate-extract carrier that builds a whole Extension via %factory.Extension
Control0..*
This element is affected by the following invariants: ele-1
Is Modifierfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
2. Extension.id
Definition

Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

ShortUnique id for inter-element referencing
Control0..1
Typestring
Is Modifierfalse
XML FormatIn the XML format, this property is represented as an attribute.
Summaryfalse
4. Extension.extension
Definition

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 manageable, 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.

ShortAdditional content defined by implementations
Comments

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.

Control0..*
TypeExtension
Is Modifierfalse
Summaryfalse
Alternate Namesextensions, user content
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
SlicingThis element introduces a set of slices on Extension.extension. The slices areUnordered and Open, and can be differentiated using the following discriminators:
  • value @ url
  • 6. Extension.extension:context
    Slice Namecontext
    Definition

    If value is of type 'string', then it is to be evaluated as a fhirpath expression. If a value of type 'Expression' is provided, only fhirpath expressions are supported, and the language MAY be omitted.

    ShortFhirPath expression
    Control0..1
    TypeExtension(Extract Template - Context) (Extension Type: Choice of: string, Expression)
    Is Modifierfalse
    Summaryfalse
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    8. Extension.extension:value
    Slice Namevalue
    Definition

    Provides FHIRPath expression to evaluate any value(s) to replace in the given template extraction context. If no result is evaluated, the element in the templated resource will be removed, and futher processing of it's children is not required.

    ShortFhirPath expression
    Control0..1
    TypeExtension(Extract Template - Extract value) (Extension Type: string)
    Is Modifierfalse
    Summaryfalse
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
    ext-1: Must have either extensions or value[x], not both (extension.exists() != value.exists())
    10. Extension.url
    Definition

    Source of the definition for the extension code - a logical name or a URL.

    Shortidentifies the meaning of the extension
    Comments

    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.

    Control1..1
    Typeuri
    Is Modifierfalse
    XML FormatIn the XML format, this property is represented as an attribute.
    Summaryfalse
    Fixed Valuehttp://fhir.ch/ig/ch-ekm/StructureDefinition/sdc-templateExtractExtension
    12. Extension.value[x]
    Definition

    Value of extension - must be one of a constrained set of the data types (see Extensibility for a list).

    ShortValue of extension
    Control0..0
    TypeChoice of: base64Binary, boolean, canonical, code, date, dateTime, decimal, id, instant, integer, markdown, oid, positiveInt, string, time, unsignedInt, uri, url, uuid, Address, Age, Annotation, Attachment, CodeableConcept, Coding, ContactPoint, Count, Distance, Duration, HumanName, Identifier, Money, Period, Quantity, Range, Ratio, Reference, SampledData, Signature, Timing, ContactDetail, Contributor, DataRequirement, Expression, ParameterDefinition, RelatedArtifact, TriggerDefinition, UsageContext, Dosage, Meta
    Is Modifierfalse
    Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
    Summaryfalse
    Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))