Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
names

The eHealth Infrastructure document-query and document-transformation services provide integrations to the Danish national document-sharing infrastructure.

This page describes the eHealth infrastructure capabilities for

  1. How to query and retrieve documents from NSP

  2. How to upload CDA documents to NSP

  3. Details on transformations FHIR to CDA Document

  4. Details on transformations CDA Document to FHIR

...

Transformation

Source (XML document in FHIR DocumentReference)

Target (XML document in FHIR DocumentReference)

Comment

$transform-to-PHMR

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-to-PHMR.html

Bundle of FHIR resources.

The primary source of information is a FHIR Observation.

PHMR v1.3 XML document.

Used in assembly, transformation and upload of FHIR Observation transformed to PHMR to XDS-based document sharing infrastructure as described in Sharing through Registering Documents in National Document Sharing Infrastructure.

$transform-to-QRD

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-to-QRD.html

Bundle of FHIR resources.

The primary source of information is an FHIR QuestionnaireResponse.

QRD v1.3 XML document

Used in assembly, transformation and upload of FHIR QuestionnaireResponse transformed to QRD to XDS-based document sharing infrastructure as described in Sharing through Registering Documents in National Document Sharing Infrastructure.

Info

Before release 2024.3

$transform-to-QFDD

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-to-QFDD.html

Bundle of FHIR resources.

The primary source of information is the FHIR Questionnaire.

QFDD v1.1 XML document

Info

With release 2024.3

$transform-to-QFDD

TODO: new link

Bundle of FHIR resources.

The primary source of information is the FHIR Questionnaire.

QFDD v1.2 XML document

$transform-to-APD

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-to-APD.html

Bundle of FHIR resources.

The primary source of information is a FHIR Appointment.

APD v2.0 XML document

Used in assembly, transformation and upload of FHIR Appointment transformed to APD to XDS-based document sharing infrastructure as described in Sharing through Registering Documents in National Document Sharing Infrastructure.

$transform-from-PHMR

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-from-PHMR.html

PHMR v1.3 XML document.

Bundle of FHIR resources.

The most significant information is within an FHIR Observation.

The resultingtion(s) is not guaranteed to be a valid FHIR Observation.

$transform-from-QRD

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-from-QRD.html

QRD v1.3 XML document

Bundle of FHIR resources.

The most significant information is within a FHIR QuestionnaireResponse.

The resulting QuestionnaireResponse is not guaranteed to be a valid FHIR QuestionnaireResponse.

$transform-from-QRD-based-on-questionnaire

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-from-QRD-based-on-questionnaire.html

Info

Please note that the description of the operation is valid as of v3.0.0 of the eHealth Infrastructure Implementation Guide (IG) even though the link is to the IG continuous build. Please refer to the latest released version of the IG for all other purposes.

QRD v1.3 XML document

Bundle of FHIR resources

Most significant information is within an FHIR QuestionnaireResponse with a structure matching the Questionnaire given as input. The QuestionnaireResponse will have linkIDs matching the corresponding Questionnaire.

The resulting QuestionnaireResponse is not guaranteed to be a valid FHIR QuestionnaireResponse.

Info

Before release 2024.3

$transform-from-QFDD

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-from-QFDD.html

QFDD v1.1 XML document

Bundle of FHtheR resources.

The primary source of information is the FHIR Questionnaire.

Info

With release 2024.3

$transform-from-QFDD

Todo: new link

QFDD v1.2 XML document

The primary resource in the return bundle is the FHIR Questionnaire.

$transform-from-APD

https://ehealth.sundhed.dk/fhir/OperationDefinition--s-transform-from-APD.html

APD v2.0 XML document

Bundle of FHIR resources.

The primary source of information is a FHIR Appointment.

The resulting Appointment is not guaranteed to be a valid FHIR Appointment.

...

FHIR Resource

Logical Part in Transformation

Comment

Observation (referenced from ClinicalImpression)

Observation Details

The Observation is the primary driver of the information contained in the generated PHMR document, including observation code, measured value, reference ranges and so on.

DocumentationOf (CDA Header)

Device (referenced from Observation.device)

Medical Equipment Section

Possible details about device(s) used.

Patient (referenced from ClinicalImpression.subject)

Patient Identification

Patient identifier (CPR number), name (given & family), gender, birth date, telecom

EpisodeOfCare (referenced from ClinicalImpression.episodeOfCare)

See Author Organization below

https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-clinicalimpression-definitions.html#ClinicalImpression.extension:episodeOfCare

Organization (referenced from EpisodeOfCare.managingOrganization)

Custodian Organization

SOR ID, name, telecom, address

Practitioner (possibly referenced from ClinicalImpression.assessor)

Author, Author Individual

Organization (referenced from ClinicalImpression.assessorOrganization)

Author, Author Organization

Composition (created as part of the assembly)

Document header (CDA Header)

The FHIR Composition resource represents the document and has fixed values as follows:

  • Document identifier

    • value = randomUUID

    • system = urn:oid: + OID value from NamingSystem.uniqueId.value (where uniqueId.type is oid) from eHealthIdentifier

    • assigner = the value of NamingSystem.publisher in eHealthIdentifier

  • title = “Hjemmemonitorering for “ + <Patient’s CPR identifier valuevalue>

  • date = ClinicalImpression.effective[x] if present, else now (time of assembly)

    attester is created if episodeOfCare.caremanagerOrganization is present with:

  • mode set to Composition.CompositionAttestationMode.LEGAL,

  • the

Organization possibly referenced from Composition.attester.party

Composition.attester elements:

  • party is set to episodeOfCare.CareManagerOrganization

  • mode = legal

  • time set to

    the

    now (time of assembly)

Practitioner/Patient/RelatedPerson/Organization referenced from Observation.note.author

Author of observation note

When the Observation.note.author contains a reference, the referenced resource needs to be present in the bundle.

Practitioner (/Patient possibly referenced from Observation.performer)

Observation performer

If the observation performer is of type Practitioner it must be included in the bundle.

...

The following are prerequisites for a FHIR Questionnaire (shortened Questionnaire and covering both the ehealth-questionnaire and ehealth-questionnaire-advanced profiles) to be an approximation of a QFDD:

Info

With FUT-I Release 2024.3_RC-Medcom:

  1. At root level of the FHIR Questionnaire, the number of question groups (Questionnaire.item with item.type set to group) shall match the number of QFDD sections

  1. At root level of the FHIR Questionnaire, the number of question groups (Questionnaire.item with item.type set to group) shall match the number of QFDD sections for all but QFDD copyright section.

    • Rationale: Copyright is placed in Questionnaire.copyright.

  2. For each QFDD section except Information Only sections, the number of FHIR Questionnaire subgroups (Questionnaire.item.item with item.type set to group) shall match the number of QFDD organizers inside the section.

    • The Questionnaire.item.item.externalIdentifier (on a subgroup) shall match the QFDD organizer id.

  3. For each QFDD question within an organizer there shall be a FHIR Questionnaire question item (Questionnaire.item.item.item)

    • The Questionnaire.item.item.item.externalIdentifier shall match the QFDD question id.

    • A QFDD question with associated text shall have the associated text represented as a separate FHIR Questionnaire question item (Questionnaire.item.item.item)

  4. Calculation type Questionnaire.item at any level are allowed in the FHIR Questionnaire without counterpart in the QFDD

    • Rationale: Calculations and formulas are not represented in QFDD.

...

Logical Part

QRD Document

Details

Multiple Choice Response Pattern Observation

/ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation

An item inside a subgroup

  • Root item with type: “Group” (QRD section)

    • Sub group item with type: “Group” (QRD organizer)

      • Question item

Multiple Choice Response if

Id

…/observation/id

Uses Id from QFFD question

Validating if Questionnaire item(item.extension.externalIdentifier) matches QFDD question id

Code

…/observation/code

Uses code from Questionnaire item item.code

Code: item.code.code

CodeSystem: ifitem.code.system has prefix “urn:oid:” then item.code.system without prefix. Else lookup in Questionnaire Terminology.

CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“.

Display: item.text or else item.code.display

OriginalText: Question text (item.text) or, if not present, (item.code.display)

Answer

…/observation/value

Value: from QuestionnaireResponse.item.answer .

For Questionnaire.item.type = choice , the question answer(s) is one or more coded elements in QRD. Question answer code is from QuestionnaireResponse.item.answer.valueCoding.

Code: answer.code

CodeSystem: if answer.system has prefix “urn:oid:” then item.code.system without prefix. Else lookup in Questionnaire Terminology.

CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“.

Display: answer.display

Help text

Image

Associated text question

…/observation/entryRelationship

Is added if Questionnaire item has one or more extensions:

And if QFDD has associated text question and preconditions are fulfilled.

Structure for associated text question in FHIR Questionnaire:

  • Root item with type: “Group” (QRD section)

    • Sub group item with type: “Group” (QRD organizer)

      • Question item with type: “choice“

      • Associated text question item (The item must be right after the question)

        • Question item with either type: “string“ or “text”.

OBS: Supported precondition for Associated text question:

  • Only one precondition element

  • The precondition is only based on answers from the related multiple choice (no reference to other questions)

  • Supported groupers inside the one preconditon element

    • AllTrue

    • AllFalse

    • AtLeastOneTrue

    • AtLeaseOneFalse

    • OnlyOneTrue

    • OnlyOneFalse

External reference

…/observation/reference

The QFDD unique id. From id element and the property 'extension'

Range

…/observation/referenceRange

If Questionnaire.item has the following extension the referenceRange is assigned

...

QFDD Element

FHIR Questionnaire

Comment

Information Only Section

A Questionnaire.item at root level with Questionnaire.item.type ="group"

A single child item Questionnaire.item.item with .type = "display"

Question Section (with one or more Question Organizer)

A Questionnaire.item at root level with Questionnaire.item.type ="group"

Root-level group

For each QFDD Question Organizer:

A single child item Questionnaire.item.item with .type = "group"

Subgroup of root-level group

For each question in the group/QFDD Question Organizer:

A single child item Questionnaire.item.item.item with .type = subtype of "question" for instance "decimal"

Question type item in subgroup of root-level group.

For subtypes of "question" see http://hl7.org/fhir/R4/valueset-item-type.html Not transformed as algorithms and expressions are not supported in QFDD.

Info

With Release 2024.3_RC-Medcom

Copyright Section

A Questionnaire.item at root level with:

  • Questionnaire.item.type ="group"

  • Questionnaire.item.isCopyright = true (see isCopyright)

One or more child items Questionnaire.item.item with:

  • Questionnaire.item.item.type = "display"

  • Questionnaire.item.item.isCopyright = true

Not transformed as algorithms and expressions are not supported in QFDD.

A Questionnaire.item at any level with an .extension http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression and .readOnly = "true"

A Calculated expression within the FHIR Questionnaire, see https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1716060177/Managing+Questionnaires#Defining-a-Calculation-Expression

...

Discrete Slider Question Pattern Observation

Logical Part

QRD QFDD Document

Details

Discrete Slider Question Pattern Observation

/ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation

An item inside a subgroup

  • Root item with type: “Group” (QFDD section)

    • Sub group item with type: “Group” (QFDD organizer)

      • Question item

Multiple Choice if

Properties: id, code, help text, image and precondition is the same configuration as for Multiple Choice

Id

…/observation/id

Uses Id from QFFD question

Validating if Questionnaire item(item.extension.externalIdentifier) matches QFDD question id

Code

…/observation/code

Uses code from Questionnaire item item.code.

Code: item.code.code

CodeSystem: ifitem.code.system has prefix “urn:oid:” then item.code.system without prefix. Else lookup in Questionnaire Terminology.

CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“.

Display: item.text or else item.code.display

OriginalText: Question text (item.text) or, if not present, (item.code.display)

Range

…/observation/entryRelationship

Range is based on item and the fields item.required , item.repeats and the following extensions.

Low: http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs

High: http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs always 1 (1 only allowed value for Discrete Slider type)

See more regarding min and max: https://docs.ehealth.sundhed.dk/latest-released/ig/StructureDefinition-ehealth-questionnaire.html#setting-minimal-and-maximal-number-of-permitted-choices

Copyright Section

Logical Part

QRD

QFDD Document

Details

Copyright Section

/ClinicalDocument/component/structuredBody/component/section

Copyright section uses Questionnaire.copyright

Supported types

...

FHIR Questionnaire.item.type

...

QRD Response Pattern Observation

...

text, string

...

Text Question Pattern Observation.

...

choice

Multiple Choice Question Pattern Observation.

...

Info

With Release 2024.3_RC-Medcom

Logical Part

QFDD Document

Details

Copyright Section

/ClinicalDocument/component/structuredBody/component/section

(with (./templateId root = "2.16.840.1.113883.10.20.32.2.2")

A root-level item with:

  • Questionnaire.item.type = "group"

  • Questionnaire.item.isCopyright = true

Title

…/component/section/title

  • Questionnaire.item.text containing the group title

Narrative

…/component/section/text

The narrative is automatically generated by the transformation and contains the plain text from each copyright text(entry) separated by three <br/>.

Note: When transforming from QFDD to FHIR Questionnaire the narrative is not transformed.

Entry

../entry/observation/value

One or more child items in the group with:

  • Questionnaire.item.item.type = "display"

  • Questionnaire.item.item.text.xhtml = formatted text

  • (Questionnaire.item.item.text contains the unformatted equivalent)

  • Questionnaire.item.item.isCopyright = true

Note: When transforming from QFDD the display items will contain the plain text.

  • Language

/ClinicalDocument/languageCode

Questionnaire.language

...

Supported types

FHIR Questionnaire.item.type

QRD Response Pattern Observation

text, string

Text Question Pattern Observation.

choice

Multiple Choice Question Pattern Observation.

Discrete Slider Question Pattern Observation when Questionnaire.item.extension.itemControl has value 'slider'.

decimal, integer

Numeric Question Pattern Observation.

Analog Slider Question Pattern Observation when Questionnaire.item.extension.itemControl has value 'slider'.

datetime

Numeric Question Pattern Observation

...

QFDD Element

FHIR Questionnaire

Comment

Information Only Section

A Questionnaire.item at root level with Questionnaire.item.type ="group"

A single child item Questionnaire.item.item with .type = "display"

Question Section (with one or more Question Organizer)

A Questionnaire.item at root level with Questionnaire.item.type ="group"

For each QFDD Question Organizer:

A single child item Questionnaire.item.item with .type = "group"

For each question in the group/QFDD Question Organizer:

A single child item Questionnaire.item.item.item with .type = subtype of "question" eg. ‘decimal’

Info

With Release 2024.3_RC-Medcom

Copyright Section

A Questionnaire.item at root level with:

  • Questionnaire.item.type ="group"

  • Questionnaire.item.isCopyright = true (See isCopyright)

One or more child items Questionnaire.item.item with:

  • Questionnaire.item.item.type = "display"

  • Questionnaire.item.item.isCopyright = true

Not transformed as algorithms and expressions are not supported in QFDD.

A Questionnaire.item at any level with an .extension http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression and .readOnly = "true"

A Calculated expression within the questionnaire, see https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1716060177/Managing+Questionnaires#Defining-a-Calculation-Expression

...