HL7 FHIR DevDays 2020, Virtual Edition, November 17–20, 2020 | @FirelyTeam | #fhirdevdays | www.devdays.com/november-2020 HL7®, FHIR® and the flame Design mark are the registered trademarks of Health Level Seven International and are used with permission. MAP CDA to FHIR and Back Oliver Egger, ahdis ag
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
• Relation between CDA and FHIR documents• Approaches to map CDA to FHIR and back• Validate CDA with the FHIR CDA Logical Model• Using FHIRPath to extract information from CDA• Using FHIR Mapping Language to convert from CDA to FHIR
3
Document Characteristics
• Persistence• Stewardship• Authentication• Wholeness• Human readable
4
CDA – Clinical Document Architecture
5
CDA projects in Europe?
• Austria: ELGA with 7 IG’s• Denmark: UPO, DK APD, PHRM-DK, DKQFDD, DK-QRD• Italy: 5 IG’s published, 4 IG’s in ballot• Switzerland: eHealth Suisse 3 IG’s• Europe: CDA IPS, Electronic Health Record Exchange Format
and many more in Finland, Netherlands, Germany, Norway …
• CDA has a XSD Schema (not normative and allows extensions), todays programming languages can work with it• in Europe CDA projects are often developed with ART-DECOR (Output
Website, Schematron rules and HL7 ITS Templates) • MDHT: Model-Driven Health Tools (MDHT) open source project, UML
model-driven tools to create computable models• eHealth Connector, Swiss open source project: first using MDHT now
directly working with CDA Schema and ART-DECOR templates• Simple approach: templating for creating CDA’s and query language
• FHIR is fast for implementers, why?• Community and based on modern IT standards• Licensing issues / web-based standard which is searchable with examples• Reference implementations• Test servers• Validation Tools• Publishing Tools
• How this can be applied to implement CDA with FHIR tool stack?
8
FHIR Documents
• FHIR resources can be used to build documents that represent a composition: a coherent set of information that is a statement of healthcare information.• First entry is a Composition Resource
• Equivalent to CDA header and narrative• Can be signed, authenticated, etc.• A FHIR document has the same basic principles as a CDA document
• CDA Level 1: (Just metadata and text), map to Bundle/Composition• CDA Level 2: Coded sections, map to Bundle/Composition• CDA Level 3: Structured entries, map to entries in Bundle
Level 1, Level 2 can be done maybe 70% generic, there are some different or missing concepts or too general to mapLevel 3 general mapping hardly possible, can only be done on a profiled CDA (template), like C-CDA or a specific exchange format
Mappings should be done at the CDA template level rather than at the CDA specification
• CDA as FHIR Binary with DocumentReference for Metadatea• XSLT• Argonaut: CCDA on FHIR Project (April 2018, STU3)• CCDA to FHIR Project (September 2018)• CDA Logical Model with FHIR Mapping Language• Microsoft CDA Mapping• Google
FHIR documents can represent the same information as a CDA (see limitations of this approach from Marten Smits et al in:A comparison of two Detailed Clinical Model representations: FHIR and CDA
• Introduction FHIR Logical Model• CDA Logical Model• Validating CDA• Conversion to JSON• Querying via FHIRPath• CDA Narrative conversion form xhtml and back with the Java Validator
23
StructureDefinition
• The StructureDefinition resource describes a structure - a set of data element definitions, and their associated rules of usage. These structure definitions are used to describe both the content defined in the FHIR specification itself - Resources, data types, the underlying infrastructural types, and also are used to describe how these structures are used in implementations.• Note that as part of the specification itself, a
full set of structure definitions for all resources and data types is published.
• StructureDefinitions can also be used to define any arbitrary structures that are a directed acyclic graph with typed nodes, where the primitive types are those defined by the FHIR specification.• This technique has many uses• Describing any arbitrary content model• Describing existing HL7 content models (e.g. v2, CDA) using FHIR• Describing common design patterns used in FHIR• Defining a content model to support the mapping language
• supports the CCDA on FHIR guide, and other CDA/FHIR mapping projects• Presented by Grahame at FHIR DevDays in 2016• https://github.com/HL7/cda-core-2.0• IG Publisher generates then the model: • http://build.fhir.org/ig/HL7/cda-core-
2.0/branches/master/index.html• Note: no official release yet
• attributes• type attributes in xml• text in xml elements• CDA narrative vs xhtml• V3 classes with id element and extension attribute • foreign namespaces• choice elements from CDA schema• granularity of model (e.g. EntryRelationship as Element and not as
only type)
31
cda xml attributes
32
text in xml elements: ST datatype
title.dataString
33
CDA narrative vs xhtml
validator: internal conversion
34
Summary CDA Logical Model
• Logical Model is a description of CDA• no API • datatypes are equivalent to FHIR • no FHIR resources • no query possibilities
• Logical Model can be used with the FHIR Mapping Language
35
CDA and FHIR Validation
The HL7 FHIR Validator can validate with logical models, you need to provide the packagename (package.tgz instead of hl7.fhir.cda#current)
• FHIRPath is a path based navigation and extraction language, somewhat like XPath. • Operations are expressed in terms of the logical content of
hierarchical data models, and support traversal, selection and filtering of data. • Its design was influenced by the needs for path navigation, selection
and formulation of invariants in both HL7 Fast Healthcare Interoperability Resources (FHIR) and HL7 Clinical Quality Language (CQL).
• Relation between CDA and FHIR documents• Approaches to map CDA to FHIR and back• Validate CDA with the FHIR CDA Logical Model• Using FHIRPath to extract information from CDA• Using FHIR Mapping Language to convert from CDA to FHIR
Joint the Let’s build tomorrow to perform above steps yourself, same time as today!https://github.com/ahdis/cda-core-2.0/blob/develop/tutorial.md