Research Data Sharing IG
1.0.0 - CI Build International flag

Research Data Sharing IG, published by IEHR-Workgroup. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/InteropEHRate-project/research-data-sharing/ and changes regularly. See the Directory of published versions

Extension: Function Extension - IEHR

Official URL: http://interopehrate.eu/fhir/StructureDefinition/FunctionExtension-IEHR Version: 1.0.0
Draft as of 2024-04-08 Computable Name: FunctionExtensionIEHR

This Extension is used to describe how requested data should be processed

Context of Use

This extension may be used on the following element(s):

  • Element ID DataRequirement

Notes about the parameter extension

The use and allowed cardinality of the parameter extension changes depending on the name of the called function.
However, if this extension contains a parameter the path specified MUST define an attribute of the resource defined in DataRequirement.type, since the function ist applied to all resources that fulfill the DataRequirement.

ageFromDate

The ageFromDate function returns the age of the resources subject, calculated from the birthdate of the subject and the date specified in the resource.
This function should only have two parameter. The first points to the Reference to the subject and the second to the creation date of the resource.
Constraint extIEHR-1 enforces that this function has exactly two parameter.

count

The count function returns only the number of resources, that fulfill the requirement.
This function does not need any parameters and constrain extIEHR-2 enforces this.

data

The data function removes the text attribute before returning the rest.
This function does not need any parameters and constrain extIEHR-3 enforces this.

summary

The summary function returns only the attributes, that are marked as summary in the target resource.
This function does not need any parameters the constrain extIEHR-4 enforces this.

element

The element function returns only the attributes specified in the parameter extensions.
This function can have any number of parameters, that point to attributes of the resource.
It needs at least one, otherwise the function would return an empty resource, and the constrain extIEHR-5 enforces this.

Usage info

Usage:

Formal Views of Extension Content

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

This structure is derived from Extension

Summary

Complex Extension: This Extension is used to describe how requested data should be processed

  • Name: Coding: An Extension
  • Parameter: string: An Extension

This structure is derived from Extension

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension C 0..1 Extension Function
extIEHR-1: The ageFromDate function should only have two parameters that points to the patient attribute in the requested resource (e.g Observation.subject) and the creation date (e.g Observation.subject).
extIEHR-2: The count function does not have parameters
extIEHR-3: The data function does not have parameters
extIEHR-4: The summary function does not have parameters
extIEHR-5: The element function must have parameter
... Slices for extension 1..* Extension Extension
Slice: Unordered, Closed by value:url
.... extension:Name 1..1 Extension Extension
..... url 1..1 uri "Name"
..... value[x] 1..1 Coding Value of extension
Binding: Function Codes ValueSet (required)
.... extension:Parameter 0..* Extension Extension
..... url 1..1 uri "Parameter"
..... value[x] 1..1 string Value of extension
... url 1..1 uri "http://interopehrate.eu/fhir/StructureDefinition/FunctionExtension-IEHR"
... value[x] 0..0

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension C 0..1 Extension Function
extIEHR-1: The ageFromDate function should only have two parameters that points to the patient attribute in the requested resource (e.g Observation.subject) and the creation date (e.g Observation.subject).
extIEHR-2: The count function does not have parameters
extIEHR-3: The data function does not have parameters
extIEHR-4: The summary function does not have parameters
extIEHR-5: The element function must have parameter
... id 0..1 string Unique id for inter-element referencing
... Slices for extension 1..* Extension Extension
Slice: Unordered, Closed by value:url
.... extension:Name 1..1 Extension Extension
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri "Name"
..... value[x] 1..1 Coding Value of extension
Binding: Function Codes ValueSet (required)
.... extension:Parameter 0..* Extension Extension
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri "Parameter"
..... value[x] 1..1 string Value of extension
... url 1..1 uri "http://interopehrate.eu/fhir/StructureDefinition/FunctionExtension-IEHR"

doco Documentation for this format

This structure is derived from Extension

Summary

Complex Extension: This Extension is used to describe how requested data should be processed

  • Name: Coding: An Extension
  • Parameter: string: An Extension

Differential View

This structure is derived from Extension

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension C 0..1 Extension Function
extIEHR-1: The ageFromDate function should only have two parameters that points to the patient attribute in the requested resource (e.g Observation.subject) and the creation date (e.g Observation.subject).
extIEHR-2: The count function does not have parameters
extIEHR-3: The data function does not have parameters
extIEHR-4: The summary function does not have parameters
extIEHR-5: The element function must have parameter
... Slices for extension 1..* Extension Extension
Slice: Unordered, Closed by value:url
.... extension:Name 1..1 Extension Extension
..... url 1..1 uri "Name"
..... value[x] 1..1 Coding Value of extension
Binding: Function Codes ValueSet (required)
.... extension:Parameter 0..* Extension Extension
..... url 1..1 uri "Parameter"
..... value[x] 1..1 string Value of extension
... url 1..1 uri "http://interopehrate.eu/fhir/StructureDefinition/FunctionExtension-IEHR"
... value[x] 0..0

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension C 0..1 Extension Function
extIEHR-1: The ageFromDate function should only have two parameters that points to the patient attribute in the requested resource (e.g Observation.subject) and the creation date (e.g Observation.subject).
extIEHR-2: The count function does not have parameters
extIEHR-3: The data function does not have parameters
extIEHR-4: The summary function does not have parameters
extIEHR-5: The element function must have parameter
... id 0..1 string Unique id for inter-element referencing
... Slices for extension 1..* Extension Extension
Slice: Unordered, Closed by value:url
.... extension:Name 1..1 Extension Extension
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri "Name"
..... value[x] 1..1 Coding Value of extension
Binding: Function Codes ValueSet (required)
.... extension:Parameter 0..* Extension Extension
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri "Parameter"
..... value[x] 1..1 string Value of extension
... url 1..1 uri "http://interopehrate.eu/fhir/StructureDefinition/FunctionExtension-IEHR"

doco Documentation for this format

 

Other representations of profile: CSV, Excel, Schematron

Terminology Bindings

PathConformanceValueSetURI
Extension.extension:Name.value[x]requiredFunctionCodesValueSet (a valid code from Possible codes for the Function Extension)
http://interopehrate.eu/fhir/ValueSet/FunctionCodesValueSet-IEHR
from this IG

Constraints

IdGradePath(s)DetailsRequirements
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
extIEHR-1errorExtensionThe ageFromDate function should only have two parameters that points to the patient attribute in the requested resource (e.g Observation.subject) and the creation date (e.g Observation.subject).
: extension('Name').value.code = 'ageFromDate' implies (extension('Parameter').count()=2)
extIEHR-2errorExtensionThe count function does not have parameters
: extension('Name').value.code = 'count' implies (extension('Parameter').empty())
extIEHR-3errorExtensionThe data function does not have parameters
: extension('Name').value.code = 'data' implies (extension('Parameter').empty())
extIEHR-4errorExtensionThe summary function does not have parameters
: extension('Name').value.code = 'summary' implies (extension('Parameter').empty())
extIEHR-5errorExtensionThe element function must have parameter
: extension('Name').value.code = 'element' implies (extension('Parameter').exists())