CDA-FHIR-Maps (R4)
0.3.0 - DSTU 1
This page is part of the CDA-FHIR-Maps (R4) (v0.3.0: DSTU 1) based on FHIR R4. . For a full list of available versions, see the Directory of published versions
Generated Narrative
Resource "FhirToCdaTypes" Version "2" Updated "2021-11-03T11:16:56.175+01:00"
url: http://fhir.ch/ig/cda-fhir-maps/StructureMap/FhirToCdaTypes
version: 0.3.0
name: FhirToCdaTypes
status: draft
date: 2022-02-11T11:14:39+01:00
publisher: ahdis
contact: ahdis: http://www.ahdis.ch/
description: Adapted from https://github.com/HL7/ccda-to-fhir/tree/master/mappings CDA: http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html FHIR: http://hl7.org/fhir/r4/
copyright: CC-BY-SA-4.0
structure
url: Identifier
mode: source
structure
url: II: InstanceIdentifier (V3 Data Type)
mode: target
group
name: Any
typeMode: none
input
name: src
mode: source
input
name: tgt
mode: target
rule
name: extension
Sources
- Context Element Variable Condition * src extension extension $this.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor' Targets
- Context ContextType Element Variable * tgt variable nullFlavor nullFlavor rule
name: nullFlavor
group
name: IdentifierII
extends: Any
typeMode: types
input
name: src
type: Identifier
mode: source
input
name: tgt
type: II
mode: target
rule
name: idAsUuid
Sources
- Context Element Variable Condition * src value value src.system.empty() and src.value.startsWith('urn:uuid:') target
context: tgt
contextType: variable
element: root
transform: evaluate
Parameters
- Value[x] * value.substring(9).upper() rule
name: idAsUuid
Sources
- Context Element Variable Condition * src value value src.system = 'urn:ietf:rfc:3986' target
context: tgt
contextType: variable
element: root
transform: evaluate
Parameters
- Value[x] * value.substring(9).upper() rule
name: system
Sources
- Context Element Variable Condition * src value value src.system.startsWith('urn:oid:') rule
name: oidident
group
name: IntegerINT
extends: Any
typeMode: types
input
name: src
type: integer
mode: source
input
name: tgt
type: INT
mode: target
rule
name: integer
Sources
- Context Element Variable * src value v target
context: tgt
contextType: variable
element: value
transform: copy
Parameters
- Value[x] * v
group
name: InstantTS
extends: Any
typeMode: types
documentation: group Identifier(source src : Identifier, target tgt : II) extends Any <<types>> { src.system as system then { src.value as value then { value.value as v where system.value = 'urn:ietf:rfc:3986' -> tgt.root = cast(v, 'string') "noExtension"; system.value as v where system.value != 'urn:ietf:rfc:3986' -> tgt.root = v then { value.value as val -> tgt.extension = cast(val, 'string') "extension"; } "withExtension"; } "rootValue"; } "root"; src.value as value -> tgt.root = '123' "test"; src -> tgt.root = '123' "test"; src.assigner as a then { a.display as display then { display.value as val -> tgt.assigningAuthorityName = cast(val, 'string'); } "display"; } "assigner"; src.extension as ext where ext.url = 'http://hl7.org/fhir/cdaStructureDefinition/extension-displayable' -> tgt.displayable as displayable then { ext.value as v -> displayable.value = cast(v, 'string'); } "displayable"; }
input
name: src
type: instant
mode: source
input
name: tgt
type: TS
mode: target
rule
name: copy
Sources
- Context Element Variable * src value v target
context: tgt
contextType: variable
element: value
transform: copy
Parameters
- Value[x] * v
group
name: DateTimeTS
extends: InstantTS
typeMode: types
input
name: src
type: dateTime
mode: source
input
name: tgt
type: TS
mode: target
group
name: DateTS
extends: InstantTS
typeMode: types
input
name: src
type: date
mode: source
input
name: tgt
type: TS
mode: target
group
name: CodeCS
extends: Any
typeMode: types
input
name: src
type: code
mode: source
input
name: tgt
type: CS
mode: target
rule
name: code
Sources
- Context Element Variable * src code c target
context: tgt
contextType: variable
element: value
transform: cast
parameter
value: c
parameter
value: string
group
name: CodeCE
extends: CodeCS
typeMode: types
input
name: src
type: code
mode: source
input
name: tgt
type: CE
mode: target
group
name: CodeCD
extends: CodeCS
typeMode: types
input
name: src
type: code
mode: source
input
name: tgt
type: CD
mode: target
group
name: CodingCE
extends: Any
typeMode: types
input
name: src
type: Coding
mode: source
input
name: tgt
type: CE
mode: target
rule
name: code
Sources
- Context Element Variable * src code code target
context: tgt
contextType: variable
element: code
transform: copy
Parameters
- Value[x] * code rule
name: system
Sources
- Context Element Variable Condition * src system system $this.startsWith('http:') target
context: tgt
contextType: variable
element: codeSystem
transform: translate
parameter
value: system
parameter
value: #uri2oid
parameter
value: code
rule
name: system
Sources
- Context Element Variable Condition * src system system $this.startsWith('urn:oid:') rule
name: oidident
rule
name: systemName1
Sources
- Context Element Variable Condition * src system system $this.startsWith('http:') target
context: tgt
contextType: variable
element: codeSystemName
transform: translate
parameter
value: system
parameter
value: #uri2system
parameter
value: code
rule
name: systemName2
Sources
- Context Element Variable Condition * src system system $this.startsWith('urn:oid:') target
context: tgt
contextType: variable
element: codeSystemName
transform: translate
parameter
value: system
parameter
value: #oid2system
parameter
value: code
rule
name: display
Sources
- Context Element Variable * src display display target
context: tgt
contextType: variable
element: displayName
transform: copy
Parameters
- Value[x] * display
group
name: CodeableConceptCE
extends: Any
typeMode: types
input
name: src
type: CodeableConcept
mode: source
input
name: tgt
type: CE
mode: target
rule
name: text
Sources
- Context Element Variable * src text text target
context: tgt
contextType: variable
element: orginialText
variable: originalText
target
context: originalText
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * text rule
name: first
Sources
- Context Element ListMode Variable * src coding first coding Dependents
- Name Variable * CodingCE coding, tgt rule
name: translation
Sources
- Context Element ListMode Variable * src coding not_first coding Targets
- Context ContextType Element Variable * tgt variable translation translation Dependents
- Name Variable * CodingCE coding, translation
group
name: AddressAD
extends: Any
typeMode: types
documentation: group CECodeableConcept(source src : CE, target tgt : CodeableConcept) extends Any <<types>> { src.originalText -> tgt.text; src -> tgt.coding as coding then { src.code as code -> coding.code = cast(code, 'string'); src.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri'); src.displayName as display -> coding.display = cast(display, 'string'); } "code"; src.translation as translation -> tgt.coding as coding then { translation.code as code -> coding.code = cast(code, 'string'); translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri'); translation.displayName as display -> coding.display = cast(display, 'string'); } "translation"; } group CSCodeableConcept(source src : CS, target tgt : CodeableConcept) extends CECodeableConcept <<types>> { } group CDCodeableConcept(source src : CD, target tgt : CodeableConcept) extends CECodeableConcept <<types>> { }
input
name: src
type: Address
mode: source
input
name: tgt
type: AD
mode: target
rule
name: streetAddress
Sources
- Context Element Variable * src line v target
context: tgt
contextType: variable
element: streetAddressLine
variable: line
target
context: line
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: postalCode
Sources
- Context Element Variable * src postalCode v target
context: tgt
contextType: variable
element: postalCode
variable: postalCode
target
context: postalCode
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: nullFlavor
Sources
- Context Condition * src $this.postalCode.exists() = false target
context: tgt
contextType: variable
element: postalCode
variable: postalCode
target
context: postalCode
contextType: variable
element: nullFlavor
transform: copy
Parameters
- Value[x] * NI rule
name: city
Sources
- Context Element Variable * src city v target
context: tgt
contextType: variable
element: city
variable: city
target
context: city
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: nullFlavor
Sources
- Context Condition * src $this.city.exists() = false target
context: tgt
contextType: variable
element: city
variable: city
target
context: city
contextType: variable
element: nullFlavor
transform: copy
Parameters
- Value[x] * NI rule
name: state
Sources
- Context Element Variable * src state v target
context: tgt
contextType: variable
element: state
variable: state
target
context: state
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: district
Sources
- Context Element Variable * src district v target
context: tgt
contextType: variable
element: county
variable: county
target
context: county
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: country
Sources
- Context Element Variable * src country v target
context: tgt
contextType: variable
element: country
variable: country
target
context: country
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: nullFlavor
Sources
- Context Condition * src $this.country.exists() = false target
context: tgt
contextType: variable
element: country
variable: country
target
context: country
contextType: variable
element: nullFlavor
transform: copy
Parameters
- Value[x] * NI rule
name: addressUse
Sources
- Context Element Variable * src use c target
context: tgt
contextType: variable
element: use
transform: translate
parameter
value: c
parameter
value: #addressUse
parameter
value: code
group
name: ContactPointTEL
extends: Any
typeMode: types
input
name: src
type: ContactPoint
mode: source
input
name: tgt
type: TEL
mode: target
rule
name: value
Sources
- Context Element Variable * src value value target
context: tgt
contextType: variable
element: value
transform: evaluate
Parameters
- Value[x] * iif(%src.system = 'phone', 'tel:', '') + iif(%src.system = 'fax', 'fax:', '') + iif(%src.system = 'email', 'mailto:', '') + iif(%src.system = 'url', 'http:', '') + value rule
name: use
Sources
- Context Element Variable Condition * src use use $this = 'home' target
context: tgt
contextType: variable
element: use
transform: copy
Parameters
- Value[x] * HP rule
name: use
Sources
- Context Element Variable Condition * src use use $this = 'work' target
context: tgt
contextType: variable
element: use
transform: copy
Parameters
- Value[x] * WP rule
name: use
Sources
- Context Element Variable Condition * src use use $this = 'old' target
context: tgt
contextType: variable
element: use
transform: copy
Parameters
- Value[x] * BAD rule
name: use
Sources
- Context Element Variable Condition * src use use $this = 'temp' target
context: tgt
contextType: variable
element: use
transform: copy
Parameters
- Value[x] * TMP rule
name: use
Sources
- Context Element Variable Condition * src use use $this = 'mobile' target
context: tgt
contextType: variable
element: use
transform: copy
Parameters
- Value[x] * MC
group
name: HumanNameEN
extends: Any
typeMode: types
input
name: src
type: HumanName
mode: source
input
name: tgt
type: EN
mode: target
rule
name: family
Sources
- Context Element Variable * src family v target
context: tgt
contextType: variable
element: family
variable: family
target
context: family
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: given
Sources
- Context Element Variable * src given v target
context: tgt
contextType: variable
element: given
variable: given
target
context: given
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: prefix
Sources
- Context Element Variable * src prefix v target
context: tgt
contextType: variable
element: prefix
variable: prefix
target
context: prefix
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v rule
name: suffix
Sources
- Context Element Variable * src suffix v target
context: tgt
contextType: variable
element: suffix
variable: suffix
target
context: suffix
contextType: variable
element: data
transform: copy
Parameters
- Value[x] * v
group
name: QuantityPQ
extends: Any
typeMode: types
input
name: src
type: Quantity
mode: source
input
name: tgt
type: PQ
mode: target
rule
name: code
Sources
- Context Element Variable * src code code target
context: tgt
contextType: variable
element: unit
transform: copy
Parameters
- Value[x] * code rule
name: value
Sources
- Context Element Variable * src value value target
context: tgt
contextType: variable
element: value
transform: copy
Parameters
- Value[x] * value
group
name: RatioRTOPQPQ
extends: Any
typeMode: types
input
name: src
type: Ratio
mode: source
input
name: tgt
type: RTO_PQ_PQ
mode: target
rule
name: numerator
Sources
- Context Element Variable * src numerator numerator Targets
- Context ContextType Element Variable * tgt variable numerator targetNumerator Dependents
- Name Variable * QuantityPQ numerator, targetNumerator rule
name: denominator
Sources
- Context Element Variable * src denominator denominator Targets
- Context ContextType Element Variable * tgt variable denominator targetDenominator Dependents
- Name Variable * QuantityPQ denominator, targetDenominator