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
{
"resourceType" : "StructureMap",
"id" : "CdaToFhirTypes",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>map "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes" = "CdaToFhirTypes"\n\n// Adapted from https://github.com/HL7/ccda-to-fhir/tree/master/mappings\n// CDA: http://build.fhir.org/ig/ahdis/cda-core-2.0/branches/master/index.html\n// FHIR: http://hl7.org/fhir/r4/\n\nconceptmap "addressUse" {\n prefix s = "http://terminology.hl7.org/ValueSet/v3-AddressUse"\n prefix t = "http://hl7.org/fhir/valueset-address-use.html"\n\n s:H == t:home\n s:HP == t:home\n s:HV == t:home\n s:WP == t:work\n s:DIR == t:work\n s:PUB == t:work\n s:TMP == t:temp\n s:OLD == t:old\n s:BAD == t:old\n}\n\nuses "http://hl7.org/fhir/cda/StructureDefinition/ED" alias ED as source\nuses "http://hl7.org/fhir/cda/StructureDefinition/II" as source\nuses "http://hl7.org/fhir/StructureDefinition/Identifier" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/TS" as source\nuses "http://hl7.org/fhir/StructureDefinition/instant" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/CS" as source\nuses "http://hl7.org/fhir/StructureDefinition/code" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/CE" as source\nuses "http://hl7.org/fhir/StructureDefinition/CodeableConcept" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/ST" as source\nuses "http://hl7.org/fhir/StructureDefinition/string" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/EN" as source\nuses "http://hl7.org/fhir/StructureDefinition/HumanName" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/AD" as source\nuses "http://hl7.org/fhir/StructureDefinition/Address" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/TEL" as source\nuses "http://hl7.org/fhir/StructureDefinition/ContactPoint" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/BL" as source\nuses "http://hl7.org/fhir/StructureDefinition/boolean" as target\nuses "http://hl7.org/fhir/cda/StructureDefinition/IVL_TS" as source\nuses "http://hl7.org/fhir/StructureDefinition/Period" as target\n\ngroup Any(source src, target tgt) {\n}\n\ngroup II(source src : II, target tgt : Identifier) extends Any <<types>> {\n src.root as r where src.extension.exists() -> tgt.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";\n src.root as r where src.extension.empty() and src.root.matches('[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}') -> tgt.system = 'urn:ietf:rfc:3986', tgt.value = ('urn:uuid:' + r.lower()) "rootuuid";\n src.root as r where src.extension.empty() and src.root.contains('.') -> tgt.system = 'urn:ietf:rfc:3986', tgt.value = append('urn:oid:', r) "rootoid";\n src.extension as e -> tgt.value = e;\n src.assigningAuthorityName as s -> tgt.assigner as a, a.display = s;\n // there's no equivalent for displayable in FHIR - and it probably will never matter, but if it does, it might map to Identifier.use.\n src.displayable as displayable -> tgt.extension as ext then {\n displayable -> ext.url = 'http://hl7.org/fhir/cdaStructureDefinition/extension-displayable' "url";\n displayable.value as v -> ext.value = cast(v, 'string');\n } "extension";\n}\n\ngroup INT(source src : INT, target tgt : integer) extends Any <<types>> {\n src.value as v -> tgt.value = v "integer";\n}\n\ngroup TemplateID(source template : II, target tgt) {\n template -> tgt.extension as ext then {\n template -> ext.url = 'http://hl7.org/fhir/cda/StructureDefinition/templateID' "url";\n template -> ext.value = create('Identifier') as value then II(template, value) "value";\n } "templateId";\n}\n\ngroup Negation(source negation : BL, target tgt) {\n negation -> tgt.modifierExtension as ext then {\n negation -> ext.url = 'http://hl7.org/fhir/cda/StructureDefinition/negationIndicator' "url";\n negation as neg -> ext.value = create('boolean'), ext.value = neg "value";\n } "negation";\n}\n\ngroup TSInstant(source src : TS, target tgt : instant) extends Any <<types>> {\n src.value as v -> tgt.value = cast(v, 'string');\n}\n\ngroup TSDateTime(source src : TS, target tgt : dateTime) extends TSInstant <<types>> {\n}\n\ngroup TSDate(source src : TS, target tgt : date) extends TSInstant <<types>> {\n}\n\ngroup IVLTSPeriod(source src : IVL_TS, target tgt : Period) extends Any <<types>> {\n src.low -> tgt.start;\n src.high -> tgt.end;\n}\n\ngroup IVLTSDateTime(source src : IVL_TS, target tgt : dateTime) extends Any <<types>> {\n src.low as s then TSDateTime(s, tgt);\n}\n\ngroup STstring(source src : ST, target tgt : string) extends Any <<types>> {\n src as v -> tgt.value = cast(v, 'string') "value";\n}\n\ngroup EDstring(source src : ED, target tgt : string) extends STstring <<types>> {\n}\n\ngroup ONstring(source src : ON, target tgt : string) extends STstring <<types>> {\n}\n\ngroup CSCode(source src : CS, target tgt : code) extends Any <<types>> {\n src.code as c -> tgt.value = cast(c, 'string');\n}\n\ngroup CECode(source src : CE, target tgt : code) extends CSCode <<types>> {\n}\n\ngroup CDCode(source src : CD, target tgt : code) extends CSCode <<types>> {\n}\n\ngroup CECodeableConcept(source src : CE, target tgt : CodeableConcept) extends Any <<types>> {\n src.originalText -> tgt.text;\n src -> tgt.coding as coding then {\n src.code as code -> coding.code = cast(code, 'string');\n src.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n src.displayName as display -> coding.display = cast(display, 'string');\n } "code";\n src.translation as translation -> tgt.coding as coding then {\n translation.code as code -> coding.code = cast(code, 'string');\n translation.codeSystem as system -> coding.system = translate(system, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri');\n translation.displayName as display -> coding.display = cast(display, 'string');\n };\n}\n\ngroup CSCodeableConcept(source src : CS, target tgt : CodeableConcept) extends CECodeableConcept <<types>> {\n}\n\ngroup CDCodeableConcept(source src : CD, target tgt : CodeableConcept) extends CECodeableConcept <<types>> {\n}\n\ngroup ENHumanName(source src : EN, target tgt : HumanName) extends Any <<types>> {\n src.family as v -> tgt.family = (v.dataString);\n src.given as v -> tgt.given = (v.dataString);\n src.prefix as v -> tgt.prefix = (v.dataString);\n src.suffix as v -> tgt.suffix = (v.dataString);\n // src.use as c -> tgt.use = translate(c, 'http://hl7.org/fhir/ConceptMap/cm-name-use-v3', 'code');\n src.validTime -> tgt.period;\n}\n\ngroup ADAddress(source src : AD, target tgt : Address) extends Any <<types>> {\n src.country as v -> tgt.country = (v.dataString);\n src.state as v -> tgt.state = (v.dataString);\n src.county as v -> tgt.district = (v.dataString);\n src.city as v -> tgt.city = (v.dataString);\n src.postalCode as v -> tgt.postalCode = (v.dataString);\n src.streetAddressLine as v -> tgt.line = (v.dataString) "streetAddress";\n src.streetName as v -> tgt.line = (v.dataString);\n src.houseNumber as v -> tgt.line = (v.dataString);\n src.use as c -> tgt.use = translate(c, '#addressUse', 'code') "addressUse";\n src.useablePeriod -> tgt.period;\n}\n\ngroup TELContactPoint(source src : TEL, target tgt : ContactPoint) extends Any <<types>> {\n src.value as v where (src.value.startsWith('tel:')) -> tgt.value = (v.substring(4)), tgt.system = 'phone' "valuetel";\n src.value as v where (src.value.startsWith('fax:')) -> tgt.value = (v.substring(4)), tgt.system = 'fax' "valuefax";\n src.value as v where (src.value.startsWith('mailto:')) -> tgt.value = (v.substring(7)), tgt.system = 'email' "valuemail";\n src.value as v where (src.value.startsWith('http:')) -> tgt.value = (v.substring(5)), tgt.system = 'url' "valuehttp";\n src.use where (src.use.startsWith('H')) -> tgt.use = 'home' "usehome";\n src.use where ((src.use = 'WP') or (src.use = 'DIR') or (src.use = 'PUB')) -> tgt.use = 'work' "usework";\n src.use where (src.use = 'BAD') -> tgt.use = 'old' "usebad";\n src.use where (src.use = 'TMP') -> tgt.use = 'temp' "usetmp";\n src.use where (src.use = 'MC') -> tgt.use = 'mobile' "usemobile";\n src.useablePeriod -> tgt.period;\n}\n\ngroup PQQuantity(source src : PQ, target tgt : Quantity) extends Any <<types>> {\n // src.unit as unit -> tgt.code = unit;\n src.unit as unit -> tgt.unit = unit;\n src.value as value -> tgt.value = value;\n}\n\ngroup RTOPQPQRatio(source src : RTO_PQ_PQ, target tgt : Ratio) extends Any <<types>> {\n src.numerator as numerator -> tgt.numerator as targetNumerator then PQQuantity(numerator, targetNumerator);\n src.denominator as denominator -> tgt.denominator as targetDenominator then PQQuantity(denominator, targetDenominator);\n}\n\n</pre>\n </div>"
},
"contained" : [
{
"resourceType" : "ConceptMap",
"id" : "addressUse",
"status" : "draft",
"group" : [
{
"source" : "http://terminology.hl7.org/ValueSet/v3-AddressUse",
"target" : "http://hl7.org/fhir/valueset-address-use.html",
"element" : [
{
"code" : "H",
"target" : [
{
"code" : "home",
"equivalence" : "equivalent",
"comment" : "home address -> home"
}
]
},
{
"code" : "HP",
"target" : [
{
"code" : "home",
"equivalence" : "equivalent",
"comment" : "primary home -> home, http://hl7.org/fhir/v3/AddressUse/cs.html"
}
]
},
{
"code" : "HV",
"target" : [
{
"code" : "home",
"equivalence" : "equivalent",
"comment" : "vacation home -> home, http://hl7.org/fhir/v3/AddressUse/cs.html"
}
]
},
{
"code" : "WP",
"target" : [
{
"code" : "work",
"equivalence" : "equivalent",
"comment" : "work place -> work"
}
]
},
{
"code" : "DIR",
"target" : [
{
"code" : "work",
"equivalence" : "equivalent",
"comment" : "direct -> work, http://hl7.org/fhir/v3/AddressUse/cs.html"
}
]
},
{
"code" : "PUB",
"target" : [
{
"code" : "work",
"equivalence" : "equivalent",
"comment" : "public -> work, http://hl7.org/fhir/v3/AddressUse/cs.html"
}
]
},
{
"code" : "TMP",
"target" : [
{
"code" : "temp",
"equivalence" : "equivalent",
"comment" : "temporary address -> Temporary"
}
]
},
{
"code" : "OLD",
"target" : [
{
"code" : "old",
"equivalence" : "equivalent",
"comment" : "no longer in use -> Old / Incorrect"
}
]
},
{
"code" : "BAD",
"target" : [
{
"code" : "old",
"equivalence" : "equivalent",
"comment" : "bad address -> Old / Incorrect"
}
]
}
]
}
]
}
],
"extension" : [
{
"url" : "http://fhir.ch/reference",
"valueReference" : {
"reference" : "#addressUse"
}
}
],
"url" : "http://fhir.ch/ig/cda-fhir-maps/StructureMap/CdaToFhirTypes",
"version" : "0.3.0",
"name" : "CdaToFhirTypes",
"status" : "draft",
"date" : "2022-02-11T11:14:39+01:00",
"publisher" : "ahdis",
"contact" : [
{
"name" : "ahdis",
"telecom" : [
{
"system" : "url",
"value" : "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" : "http://hl7.org/fhir/cda/StructureDefinition/ED",
"mode" : "source",
"alias" : "ED"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/II",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Identifier",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/TS",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/instant",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/CS",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/code",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/CE",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/CodeableConcept",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/ST",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/string",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/EN",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/HumanName",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/AD",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Address",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/TEL",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/ContactPoint",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/BL",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/boolean",
"mode" : "target"
},
{
"url" : "http://hl7.org/fhir/cda/StructureDefinition/IVL_TS",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Period",
"mode" : "target"
}
],
"group" : [
{
"name" : "Any",
"typeMode" : "none",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
]
},
{
"name" : "II",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "II",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Identifier",
"mode" : "target"
}
],
"rule" : [
{
"name" : "root1",
"source" : [
{
"context" : "src",
"element" : "root",
"variable" : "r",
"condition" : "src.extension.exists()"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "r"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
},
{
"valueString" : "uri"
}
]
}
]
},
{
"name" : "rootuuid",
"source" : [
{
"context" : "src",
"element" : "root",
"variable" : "r",
"condition" : "src.extension.empty() and src.root.matches('[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}')"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "urn:ietf:rfc:3986"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "'urn:uuid:' + r.lower()"
}
]
}
]
},
{
"name" : "rootoid",
"source" : [
{
"context" : "src",
"element" : "root",
"variable" : "r",
"condition" : "src.extension.empty() and src.root.contains('.')"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "urn:ietf:rfc:3986"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "append",
"parameter" : [
{
"valueString" : "urn:oid:"
},
{
"valueId" : "r"
}
]
}
]
},
{
"name" : "extension",
"source" : [
{
"context" : "src",
"element" : "extension",
"variable" : "e"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "e"
}
]
}
]
},
{
"name" : "assigningAuthorityName",
"source" : [
{
"context" : "src",
"element" : "assigningAuthorityName",
"variable" : "s"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "assigner",
"variable" : "a"
},
{
"context" : "a",
"contextType" : "variable",
"element" : "display",
"transform" : "copy",
"parameter" : [
{
"valueId" : "s"
}
]
}
]
},
{
"name" : "extension",
"source" : [
{
"context" : "src",
"element" : "displayable",
"variable" : "displayable"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "extension",
"variable" : "ext"
}
],
"rule" : [
{
"name" : "url",
"source" : [
{
"context" : "displayable"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/cdaStructureDefinition/extension-displayable"
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "displayable",
"element" : "value",
"variable" : "v"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"transform" : "cast",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "string"
}
]
}
]
}
],
"documentation" : "there's no equivalent for displayable in FHIR - and it probably will never matter, but if it does, it might map to Identifier.use."
}
]
},
{
"name" : "INT",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "INT",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "integer",
"mode" : "target"
}
],
"rule" : [
{
"name" : "integer",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "v"
}
]
}
]
}
]
},
{
"name" : "TemplateID",
"typeMode" : "none",
"input" : [
{
"name" : "template",
"type" : "II",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "templateId",
"source" : [
{
"context" : "template"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "extension",
"variable" : "ext"
}
],
"rule" : [
{
"name" : "url",
"source" : [
{
"context" : "template"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/cda/StructureDefinition/templateID"
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "template"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"variable" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "Identifier"
}
]
}
],
"dependent" : [
{
"name" : "II",
"variable" : [
"template",
"value"
]
}
]
}
]
}
]
},
{
"name" : "Negation",
"typeMode" : "none",
"input" : [
{
"name" : "negation",
"type" : "BL",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "negation",
"source" : [
{
"context" : "negation"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "modifierExtension",
"variable" : "ext"
}
],
"rule" : [
{
"name" : "url",
"source" : [
{
"context" : "negation"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/cda/StructureDefinition/negationIndicator"
}
]
}
]
},
{
"name" : "value",
"source" : [
{
"context" : "negation",
"variable" : "neg"
}
],
"target" : [
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "ext",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "neg"
}
]
}
]
}
]
}
]
},
{
"name" : "TSInstant",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "TS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "instant",
"mode" : "target"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "cast",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "TSDateTime",
"extends" : "TSInstant",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "TS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "dateTime",
"mode" : "target"
}
]
},
{
"name" : "TSDate",
"extends" : "TSInstant",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "TS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "date",
"mode" : "target"
}
]
},
{
"name" : "IVLTSPeriod",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "IVL_TS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Period",
"mode" : "target"
}
],
"rule" : [
{
"name" : "low",
"source" : [
{
"context" : "src",
"element" : "low",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "start",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "high",
"source" : [
{
"context" : "src",
"element" : "high",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "end",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
},
{
"name" : "IVLTSDateTime",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "IVL_TS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "dateTime",
"mode" : "target"
}
],
"rule" : [
{
"name" : "low",
"source" : [
{
"context" : "src",
"element" : "low",
"variable" : "s"
}
],
"dependent" : [
{
"name" : "TSDateTime",
"variable" : [
"s",
"tgt"
]
}
]
}
]
},
{
"name" : "STstring",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "ST",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "string",
"mode" : "target"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "src",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "cast",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "EDstring",
"extends" : "STstring",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "ED",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "string",
"mode" : "target"
}
]
},
{
"name" : "ONstring",
"extends" : "STstring",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "ON",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "string",
"mode" : "target"
}
]
},
{
"name" : "CSCode",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "CS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "code",
"mode" : "target"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "c"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "cast",
"parameter" : [
{
"valueId" : "c"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "CECode",
"extends" : "CSCode",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "CE",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "code",
"mode" : "target"
}
]
},
{
"name" : "CDCode",
"extends" : "CSCode",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "CD",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "code",
"mode" : "target"
}
]
},
{
"name" : "CECodeableConcept",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "CE",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "CodeableConcept",
"mode" : "target"
}
],
"rule" : [
{
"name" : "originalText",
"source" : [
{
"context" : "src",
"element" : "originalText",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "text",
"variable" : "vvv",
"transform" : "create"
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "src",
"element" : "codeSystem",
"variable" : "system"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "system"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
},
{
"valueString" : "uri"
}
]
}
]
},
{
"name" : "displayName",
"source" : [
{
"context" : "src",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
}
]
},
{
"name" : "translation",
"source" : [
{
"context" : "src",
"element" : "translation",
"variable" : "translation"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "translation",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "code",
"transform" : "cast",
"parameter" : [
{
"valueId" : "code"
},
{
"valueString" : "string"
}
]
}
]
},
{
"name" : "codeSystem",
"source" : [
{
"context" : "translation",
"element" : "codeSystem",
"variable" : "system"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "system",
"transform" : "translate",
"parameter" : [
{
"valueId" : "system"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/special-oid2uri"
},
{
"valueString" : "uri"
}
]
}
]
},
{
"name" : "displayName",
"source" : [
{
"context" : "translation",
"element" : "displayName",
"variable" : "display"
}
],
"target" : [
{
"context" : "coding",
"contextType" : "variable",
"element" : "display",
"transform" : "cast",
"parameter" : [
{
"valueId" : "display"
},
{
"valueString" : "string"
}
]
}
]
}
]
}
]
},
{
"name" : "CSCodeableConcept",
"extends" : "CECodeableConcept",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "CS",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "CodeableConcept",
"mode" : "target"
}
]
},
{
"name" : "CDCodeableConcept",
"extends" : "CECodeableConcept",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "CD",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "CodeableConcept",
"mode" : "target"
}
]
},
{
"name" : "ENHumanName",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "EN",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "HumanName",
"mode" : "target"
}
],
"rule" : [
{
"name" : "family",
"source" : [
{
"context" : "src",
"element" : "family",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "family",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "given",
"source" : [
{
"context" : "src",
"element" : "given",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "given",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "prefix",
"source" : [
{
"context" : "src",
"element" : "prefix",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "prefix",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "suffix",
"source" : [
{
"context" : "src",
"element" : "suffix",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "suffix",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "validTime",
"source" : [
{
"context" : "src",
"element" : "validTime",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "period",
"variable" : "vvv",
"transform" : "create"
}
],
"documentation" : "src.use as c -> tgt.use = translate(c, 'http://hl7.org/fhir/ConceptMap/cm-name-use-v3', 'code');"
}
]
},
{
"name" : "ADAddress",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "AD",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Address",
"mode" : "target"
}
],
"rule" : [
{
"name" : "country",
"source" : [
{
"context" : "src",
"element" : "country",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "country",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "state",
"source" : [
{
"context" : "src",
"element" : "state",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "state",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "county",
"source" : [
{
"context" : "src",
"element" : "county",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "district",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "city",
"source" : [
{
"context" : "src",
"element" : "city",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "city",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "postalCode",
"source" : [
{
"context" : "src",
"element" : "postalCode",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "postalCode",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "streetAddress",
"source" : [
{
"context" : "src",
"element" : "streetAddressLine",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "line",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "streetName",
"source" : [
{
"context" : "src",
"element" : "streetName",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "line",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "houseNumber",
"source" : [
{
"context" : "src",
"element" : "houseNumber",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "line",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.dataString"
}
]
}
]
},
{
"name" : "addressUse",
"source" : [
{
"context" : "src",
"element" : "use",
"variable" : "c"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "use",
"transform" : "translate",
"parameter" : [
{
"valueId" : "c"
},
{
"valueString" : "#addressUse"
},
{
"valueString" : "code"
}
]
}
]
},
{
"name" : "useablePeriod",
"source" : [
{
"context" : "src",
"element" : "useablePeriod",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "period",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
},
{
"name" : "TELContactPoint",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "TEL",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "ContactPoint",
"mode" : "target"
}
],
"rule" : [
{
"name" : "valuetel",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "v",
"condition" : "(src.value.startsWith('tel:'))"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.substring(4)"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "phone"
}
]
}
]
},
{
"name" : "valuefax",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "v",
"condition" : "(src.value.startsWith('fax:'))"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.substring(4)"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "fax"
}
]
}
]
},
{
"name" : "valuemail",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "v",
"condition" : "(src.value.startsWith('mailto:'))"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.substring(7)"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "email"
}
]
}
]
},
{
"name" : "valuehttp",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "v",
"condition" : "(src.value.startsWith('http:'))"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "v.substring(5)"
}
]
},
{
"context" : "tgt",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "url"
}
]
}
]
},
{
"name" : "usehome",
"source" : [
{
"context" : "src",
"element" : "use",
"condition" : "(src.use.startsWith('H'))"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "use",
"transform" : "copy",
"parameter" : [
{
"valueString" : "home"
}
]
}
]
},
{
"name" : "usework",
"source" : [
{
"context" : "src",
"element" : "use",
"condition" : "((src.use = 'WP') or (src.use = 'DIR') or (src.use = 'PUB'))"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "use",
"transform" : "copy",
"parameter" : [
{
"valueString" : "work"
}
]
}
]
},
{
"name" : "usebad",
"source" : [
{
"context" : "src",
"element" : "use",
"condition" : "(src.use = 'BAD')"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "use",
"transform" : "copy",
"parameter" : [
{
"valueString" : "old"
}
]
}
]
},
{
"name" : "usetmp",
"source" : [
{
"context" : "src",
"element" : "use",
"condition" : "(src.use = 'TMP')"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "use",
"transform" : "copy",
"parameter" : [
{
"valueString" : "temp"
}
]
}
]
},
{
"name" : "usemobile",
"source" : [
{
"context" : "src",
"element" : "use",
"condition" : "(src.use = 'MC')"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "use",
"transform" : "copy",
"parameter" : [
{
"valueString" : "mobile"
}
]
}
]
},
{
"name" : "useablePeriod",
"source" : [
{
"context" : "src",
"element" : "useablePeriod",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "period",
"variable" : "vvv",
"transform" : "create"
}
]
}
]
},
{
"name" : "PQQuantity",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "PQ",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Quantity",
"mode" : "target"
}
],
"rule" : [
{
"name" : "unit",
"source" : [
{
"context" : "src",
"element" : "unit",
"variable" : "unit"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "unit",
"transform" : "copy",
"parameter" : [
{
"valueId" : "unit"
}
]
}
],
"documentation" : "src.unit as unit -> tgt.code = unit;"
},
{
"name" : "value",
"source" : [
{
"context" : "src",
"element" : "value",
"variable" : "value"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "value"
}
]
}
]
}
]
},
{
"name" : "RTOPQPQRatio",
"extends" : "Any",
"typeMode" : "types",
"input" : [
{
"name" : "src",
"type" : "RTO_PQ_PQ",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Ratio",
"mode" : "target"
}
],
"rule" : [
{
"name" : "numerator",
"source" : [
{
"context" : "src",
"element" : "numerator",
"variable" : "numerator"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "numerator",
"variable" : "targetNumerator"
}
],
"dependent" : [
{
"name" : "PQQuantity",
"variable" : [
"numerator",
"targetNumerator"
]
}
]
},
{
"name" : "denominator",
"source" : [
{
"context" : "src",
"element" : "denominator",
"variable" : "denominator"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "denominator",
"variable" : "targetDenominator"
}
],
"dependent" : [
{
"name" : "PQQuantity",
"variable" : [
"denominator",
"targetDenominator"
]
}
]
}
]
}
]
}