Excerpt | ||
---|---|---|
| ||
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
|
...
Transformation | Source (XML document in FHIR DocumentReference) | Target (XML document in FHIR DocumentReference) | Comment | ||
---|---|---|---|---|---|
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. | ||
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. | ||
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 | |||
TODO: new link | Bundle of FHIR resources. The primary source of information is the FHIR Questionnaire. | QFDD v1.2 XML document | |||
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. | ||
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. | ||
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. | ||
| 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. | ||
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. | |||
Todo: new link | QFDD v1.2 XML document | The primary resource in the return bundle is the FHIR Questionnaire. | |||
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. |
...
HL7 DK CDA Profile | Description | Specification | ||
---|---|---|---|---|
PHMR v1.3 | HL7 Implementation Guide for CDA Release 2.0, Release 1.3 31. March 2014, | http://svn.medcom.dk/svn/releases/Standarder/HL7/PHMR/Dokumentation/PHMR-DK-Profile-v1.3.pdf (Note: The available v1.3 is now updated as of March 2, 2020) | ||
QRD v1.3 | HL7 Implementation Guide for CDA Release 2.0, Release 1.3 February 11th 2022 | https://svn.medcom.dk/svn/drafts/Standarder/HL7/PRO/QRD/Dokumentation/DK-QRD-v1.3.pdf | ||
QFDD v1.1 | HL7 Implementation Guide for CDA Release 2.0, Draft, | http://svn.medcom.dk/svn/releases/Standarder/HL7/PRO/QFDD/Dokumentation/DK-QFDD-v1.1.pdf (Note: The available v1.1 is now updated as of June 11, 2021)APD v2.0 | ||
QFDD v.1.2 | HL7 Implementation Guide for CDA Release 2.0, Draft for Trial Use, | https://svn.medcom.dk/svn/releasesdrafts/Standarder/HL7/PRO/AppointmentQFDD/Dokumentation/DK-QFDD-v1.2.pdf | ||
APD - v2.0.pdf |
Preparing Transformations by Assembling Required FHIR Resources
...
HL7 Implementation Guide for CDA Release 2.0, Draft for Trial Use, | http://svn.medcom.dk/svn/releases/Standarder/HL7/Appointment/Dokumentation/DK-APD-v2.0.pdf |
Preparing Transformations by Assembling Required FHIR Resources
As described above, the transformations to CDA XML documents require that the client provides all the required FHIR resources. What FHIR resources must be part of the assembled FHIR bundle depends on the transformation.
...
FHIR Questionnaire.item.type | QRD Response Pattern Observation |
---|---|
text, string, openchoice | Text Response Pattern Observation |
choice | Multiple Choice Response Pattern Observation Discrete Slider Response Pattern Observation (when |
decimal, integer | Numeric Response Pattern Observation Analog Slider Response Pattern Observation (when |
datetime | Numeric Response Pattern Observation |
...
QFDD Element | FHIR Questionnaire | Comment |
---|---|---|
Information Only Section | A A single child item | |
Question Section (with one or more Question Organizer) | A For each QFDD Question Organizer: A single child item For each question in the group/QFDD Question Organizer: A single child item | |
Not transformed as algorithms and expressions are not supported in QFDD. | A | A Calculated expression within the questionnaire, see https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1716060177/Managing+Questionnaires#Defining-a-Calculation-Expression |
...
Info |
---|
With release 2024.3 |
To QFDD Transformation
The operation $transform-to-QFDD
transforms a FHIR Questionnaire resource to a DK-HL7 Questionnaire Form Definition Document (QFDD). The section below describes the transformation in more details.
Structure
As a QFDD is structured by sections, organizers and questions, the FHIR Questionnaire must be structured in a specified way to match the QFDD definition. The table below gives a quick overview of the structure.
QFDD Element | FHIR Questionnaire | Comment |
---|---|---|
Information Only Section | A A single child item | |
Question Section (with one or more Question Organizer) | A | Root-level group |
For each QFDD Question Organizer: A single child item | Subgroup of root-level group | |
For each question in the group/QFDD Question Organizer: A single child item | Question type item in subgroup of root-level group. For subtypes of | |
Not transformed as algorithms and expressions are not supported in QFDD. | A | A Calculated expression within the FHIR Questionnaire, see https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1716060177/Managing+Questionnaires#Defining-a-Calculation-Expression |
The sub sections below describe the structure and information needed in more details.
Information Only Section
Logical Part | QFDD Document | Details |
---|---|---|
Information Only Section | /ClinicalDocument/component/structuredBody/component/section (with (./templateId | A root-level item with:
|
| …/component/section/title |
|
| …/component/section/text | A child item in the group with:
|
| /ClinicalDocument/languageCode |
|
Narrative guidelines and limitations
FHIR Questionnaire.item.text.xhtml
has type XHTML and QFDD narrative has type XML Markup. Therefore the transformation must convert XHTML to XML Markup which is performed with limitations as described below.
Limitations on conversion of formatted text from FHIR XHTML to XML Markup
The converter supports:
Paragraphs
Headings - converts to paragraphs
Bold, italics, underline
Ordered and unordered list
Line break
Table (might not support all functionality)
Anchor tag ( from a -> linkHTML)
Span (converted to content)
Subscript and superscript
Be aware:
Stylings like color are not supported.
A single root div shall be present
Sanitizer
Info |
---|
SanitizerIn some scenarios, the Questionnaire Editor in the Clinical Administration Application produces XHTML that cannot be converted to CDA XML Markup. Unclosed tags, missing root element or unsupported children elements have been encountered. During conversion, a sanitizer remedies common, encountered scenarios:
|
Note |
---|
DisclaimerUse of copy'n'paste of rich text into the rich text editor in the Questionnaire Editor increases the probability of resulting in incompatible formatted text. The sanitizer handles a limited set of the endless combinations where XHTML and CDA XML Markup do not support the same functionality and structure. |
Questionnaire Form Definition Section
Logical Part | QFDD Document | Details |
---|---|---|
Questionnaire Response Section | /ClinicalDocument/component/structuredBody/component/section | A root item on |
Title | …/component/section/title | From root item |
Narrative | …/component/section/text | The narrative text for the section is created automatically by the transformation . The narrative contains all the questions inside the section. Additional narrative content:
|
Language | languageCode |
|
Questions Organizer
Logical Part | QFDD Document | Details |
---|---|---|
Response Organizer | /ClinicalDocument/component/structuredBody/component/section/entry/organizer | An item of type Only items of type OBS: Items with calculated expression are allowed but is ignored during transformation. |
Id | …/section/entry/organizer/id |
|
Code | …/section/entry/organizer/code | Uses code from Questionnaire item Code: CodeSystem: if CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“. Display: OriginalText: Question text ( |
Precondition | …/section/entry/organizer/precondition | See Preconditions |
Numeric Question Pattern Observation
Logical Part | QFDD Document | Details |
---|---|---|
Numeric Response Pattern Observation | /ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation | An item inside a subgroup (see Questions Organizer )
Numeric Response if
|
Id | …/observation/id |
|
Code | …/observation/code | Uses code from Questionnaire item Code: CodeSystem: if CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“. Display: OriginalText: Question text ( |
Help text Image | …/observation/entryRelationship | Is added if Questionnaire item has one or more extensions: |
Feedback | …/observation/entryRelationship | Not supported |
Range | …/observation/referenceRange | If |
Precondition | See Preconditions |
Analog Slider Question Pattern Observation
Logical Part | QFDD Document | Details |
---|---|---|
Analog Slider Question Pattern Observation | /ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation | An item inside a subgroup
Analog Slider if
Properties: id, code, help text, image and precondition is the same configuration as for Numeric Question |
Feedback | …/observation/entryRelationship | Not supported |
Range | …/referenceRange/observationRange/ | Denominator: Head: Increment:
|
Text Question Pattern Observation
Logical Part | QFDD Document | Details |
---|---|---|
Text Question Pattern Observation | /ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation | An item inside a subgroup
Test Response if
|
Id | …/observation/id |
|
Code | …/observation/code | Uses code from Questionnaire item Code: CodeSystem: if CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“. Display: OriginalText: Question text ( |
Help text Image | …/observation/entryRelationship | Is added if Questionnaire item has one or more extensions: |
Precondition | See Preconditions |
Multiple Choice Question Pattern Observation
Logical Part | QFDD Document | Details |
---|---|---|
Multiple Choice Question Pattern Observation | /ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation | An item inside a subgroup
Multiple Choice if
|
Id | …/observation/id |
|
Code | …/observation/code | Uses code from Questionnaire item Code: CodeSystem: if CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“. Display: OriginalText: Question text ( |
Options |
| |
Help text Image | …/observation/entryRelationship | Is added if Questionnaire item has one or more extensions: |
Associated text question | Not supported | |
Feedback | Not supported | |
Range | …/observation/referenceRange | Range is based on
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 |
Precondition | See Preconditions |
Discrete Slider Question Pattern Observation
Logical Part | QRD Document | Details |
---|---|---|
Discrete Slider Question Pattern Observation | /ClinicalDocument/component/structuredBody/component/section/entry/organizer/component/observation | An item inside a subgroup
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( |
Code | …/observation/code | Uses code from Questionnaire item Code: CodeSystem: if CodeSystemName: is fetched from CodeSystem in Questionnaire Terminology. Value is taken in the following order: codeSystem.title, codeSystem.name, codeSystem.url or “Unknown“. Display: OriginalText: Question text ( |
Range | …/observation/entryRelationship | Range is based on 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 Document | Details |
---|---|---|
Copyright Section | /ClinicalDocument/component/structuredBody/component/section | Copyright section uses |
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 |
decimal, integer | Numeric Question Pattern Observation. Analog Slider Question Pattern Observation when |
datetime | Numeric Question Pattern Observation |
Validation
The returned Bundle from the operation can contain an OperationOutcome with warnings and errors. In case of validation errors no QFDD will be generated.
Errors
Errors can occur if for instance some mandatory information is missing or the FHIR questionnaire structure is not compatible with the QFDD structure.
Examples:
Invalid root item in questionnaire. Only items of type 'group' and calculated expression items are allowed. Type was: '%s'. LinkId: %s
NamingSystem publisher is missing. Oid: '%s'. Referenced by items with following LinkIds: %s
Item enableWhen refers to item with linkId: '%s' which is of type '%s' but the operator: '%s' is not supported. LinkId: %s
Warnings
Warnings can occur if some information is missing but not mandatory or maybe a fallback value is used instead.
Examples:
CodeSystem title is missing. Will use the first non-null value as CodeSystemName: 'NamingSystem.name', 'NamingSystem.url' or 'unknown'. CodeSystem url: '%s'. Used by items with the following linkIds: %s
CodeSystem title is missing for choice option. Will use the first non-null value as CodeSystemName: 'NamingSystem.name', 'NamingSystem.url' or 'unknown'. CodeSystem url: '%s'. LinkIds: %s
Preconditions
In some scenarios a questions should only be asked to the user based on answers given to other questions. The sections below describes the rules and limitations regarding preconditions.
Precondition rules
As the modeling of preconditions in FHIR questionnaire and QFDD is not 1 to 1 the table below describes which combination of preconditions that are supported.
Question refers to question of type | Condition | |
---|---|---|
Numeric (FHIR type: integer, decimal, timestamp) | If specifying both ">=" and "<=" to the same question then |
|
| ||
If specifying only one operator either ">=" or "<=" to the same numeric question then |
| |
if specifying "=" to a numeric question then |
| |
Choice (FHIR type: choice) | When specifying "=" to a choice question then |
|
text, string | Precondition to text or string questions are not supported. |
Precondition is only allowed on FHIR sub groups(item.item (QFDD organizer)) and questions (item.item.item (QFDD Question)).
If enablebehavior is ‘all’(AllTrue) and no condition-id is specified then the preconditions will be created as QFDD Criterion(s). If condition-id is specified and/or the boolean expression is either ‘all’(AllTrue) or ‘any’(AtLeastOneTrue) then the preconditions will be created as QFDD Precondition Extension Pattern.
Supported operators
FHIR Questionnaire (enableWhen operators) | Comments |
---|---|
exists | Not supported |
= | Supported. If numeric:
If multiple choice
|
!= | Not supported |
> | Not supported |
< | Not supported |
>= | if numeric:
If multiple choice
|
<= | if numeric:
If multiple choice
|
From QFDD Transformation
The operation $transform-from-QFDD
transforms a DK-HL7 Questionnaire Form Definition Document (QFDD) to a FHIR Questionnaire resource. The below sections describes the transformation in more details.
Structure
The transformation generates a FHIR questionnaire which structure is describes in below table. See more details regarding the structure here https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/edit-v2/2242281473#Structure.
QFDD Element | FHIR Questionnaire | Comment |
---|---|---|
Information Only Section | A A single child item | |
Question Section (with one or more Question Organizer) | A For each QFDD Question Organizer: A single child item For each question in the group/QFDD Question Organizer: A single child item | |
Not transformed as algorithms and expressions are not supported in QFDD. | A | A Calculated expression within the questionnaire, see https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1716060177/Managing+Questionnaires#Defining-a-Calculation-Expression |
Details regarding converting from CDA XML Markup to XHTML - Information Only Section
All CDA XML elements are supported but with some exceptions,
CDA XML element | FHIR XHTML |
---|---|
footnote | p, with a data attribute: data-cda-tag = "footnote" |
footnoteRef | a, with a data attribute data-cda-tag="footnoteRef" |
renderMultiMedia | Limitation: The base64 image to be inside @referencedObject attribute, and not a reference to an existing image from other section from QFDD document. We don't search the image. |
Attributes:
CDA XML attributes | Comment |
---|---|
revised | Attribute on <content> in CDA XML has no corresponding match in XHTML. A custom data attribute has been added ‘data-cda-revised’. |
name | Attribute on <linkHTML> is not supported as NarrativeBlock documentation states “DO NOT USE THIS”. |
language | Always assigned lang=”da”. |
mediaType | Omitted. From NarrativeBlock documentation: mediaType is akin to mimeType. This is a fixed value in the CDA narrative block, and so can be omitted. |
Validation
The returned Bundle from the operation can contain an OperationOutcome with information, warnings and errors. In case of validation errors no FHIR questionnaire will be generated.
Errors
Errors can occur if for instance some mandatory information is missing or QFDD content is not supported in FHIR questionnaire.
Examples:
Unsupported question type: '%s'
(safeguard against future question types supported in CDA Builder. Currently(August 2024) all question types are supported)Choice option is missing either code, codeSystem. Question id: %s
Question is missing id. Organizer id: %s
Precondition group type: '%s' is not supported. Question id: %s
Precondition group type: '%s' is not supported for conditions referring to numeric questions. Only 'AllTrue' is supported. Question id: %s
Warnings
Warnings can occur if some information is missing but not mandatory or content which will not be transformed as it is not supported.
Examples:
Numeric question has no interval. Cannot determine type. Setting item.type to 'decimal'. Question id: %s
Feedback will not be transformed to FHIR questionnaire. Question id: %s
Information
Message unrelated to the transformation success.
Examples:
Question with id: '%s' has associated text question with id: '%s'. Will be two question items in Fhir questionnaire.
Preconditions
In some scenarios a questions should only be asked to the user based on answers given to other questions. The sections below describes the rules and limitations regarding preconditions.
Precondition rules
As the modeling of preconditions in FHIR questionnaire and QFDD is not 1 to 1 the table below describes which combination of preconditions that are supported.
Condition | Rules |
---|---|
If one or more precondition refers to numeric question then | AllTrue(all) is supported. |
If no precondition refers to a numeric question then | AllTrue(all) and AtLeastOneTrue(any) is supported. |
Not supported:
The following precondition types is not supported: AllFalse, AtLeastOneFalse, OnlyOneTrue, OnlyOneFalse.
Multiple grouper (Only one grouper is supported eg. AllTrue).
Additional information
Associated text question which can be part of Multiple Choice and Discrete Slider question will be created as two items in FHIR questionnaire. The item for the associated text question will contain the preconditions specified in the QFDD.
As QFDD Numeric Question do not have a type, reference range is used to determine if it is integer, decimal or timestamp. If no reference range is specified the question item is created with
item.type
‘decimal’.Analog Slider Question is created with
item.type
‘decimal’.Feedback is not supported