FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagehl7.fhir.it.cda2fhir
Resource TypeStructureMap
IdStructureMap-cda2fhirDataTypes.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/hl7-it/cda2fhir/StructureMap-cda2fhirDataTypes.html
URLhttp://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes
Version0.1.0
Statusdraft
Date2026-05-21T10:21:02+00:00
Namecda2fhirDataTypes
Realmit
Authorityhl7

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

map "http://hl7.it/fhir/cda2fhir/StructureMap/cda2fhirDataTypes" = "cda2fhirDataTypes"

conceptmap "addressUse" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-AddressUse"
  prefix t = "http://hl7.org/fhir/address-use"

  s:H == t:home
  s:HP == t:home
  s:HV == t:home
  s:WP == t:work
  s:DIR == t:work
  s:PUB == t:work
  s:TMP == t:temp
  s:OLD == t:old
  s:BAD == t:old
}

conceptmap "OBSstatus" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-statusCode"
  prefix t = "http://hl7.org/fhir/event-status"

  s:completed == t:final
  s:active == t:registered
  s:aborted == t:cancelled
}

conceptmap "EventStatus" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-statusCode"
  prefix t = "http://hl7.org/fhir/ValueSet/fm-status"

  s:completed == t:completed
  s:active == t:"in-progress"
  s:aborted == t:stopped
  s:suspended == t:"on-hold"
}

conceptmap "FinancialStatus" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-statusCode"
  prefix t = "http://hl7.org/fhir/ValueSet/fm-status"

  s:active == t:active
  s:aborted == t:cancelled
  s:suspended == t:draft
}

conceptmap "MedicationStatusMap" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-statusCode"
  prefix t = "http://hl7.org/fhir/ValueSet/medicationrequest-status"

  s:completed == t:completed
  s:active == t:active
  s:aborted == t:cancelled
  s:suspended == t:"on-hold"
}

conceptmap "cm-v3-administrative-gender" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-AdministrativeGender"
  prefix t = "http://hl7.org/fhir/ValueSet/administrative-gender"

  s:M == t:male
  s:F == t:female
}

conceptmap "AllergyTypeMap" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-type"
  prefix t = "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical"

  s:OINT == t:intolerance
  s:ALG == t:allergy
  s:DALG == t:allergy
  s:EALG == t:allergy
  s:FALG == t:allergy
  s:NAINT == t:intolerance
  s:FNAINT == t:intolerance
  s:DNAINT == t:intolerance
  s:ENAINT == t:intolerance
  s:FINT == t:intolerance
  s:DINT == t:intolerance
  s:EINT == t:intolerance
}

conceptmap "AllergyCategoryMap" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-type"
  prefix t = "http://hl7.org/fhir/ValueSet/allergyintolerance-clinical"

  s:DALG == t:medication
  s:EALG == t:enviroment
  s:FALG == t:food
  s:FNAINT == t:intolerance
  s:DNAINT == t:medication
  s:ENAINT == t:enviroment
  s:FINT == t:food
  s:DINT == t:medication
  s:EINT == t:enviroment
}

conceptmap "CricalityMap" {
  prefix s = "http://terminology.hl7.org/CodeSystem/v3-ObservationValue"
  prefix t = "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality"

  s:M == t:low
  s:H == t:high
  s:L == t:low
}

conceptmap "ClinicalStatusMap" {
  prefix s = "https://loinc.org/99493-9/"
  prefix t = "http://hl7.org/fhir/ValueSet/condition-clinical"

  s:"LA16666-2" == t:active
  s:"LA18632-2" == t:inactive
  s:"LA9041-0" == t:resolved
}

conceptmap "priority" {
  prefix s = "http://terminology.hl7.org/ValueSet/v3-ActPriority"
  prefix t = "http://hl7.org/fhir/ValueSet/request-priority"

  s:R == t:routine
  s:P == t:asap
  s:UR == t:urgent
  s:EM == t:stat
  s:S == t:stat
  s:A == t:asap
  s:CR == t:routine
  s:EL == t:routine
  s:p == t:stat
  s:PRN == t:routine
  s:RR == t:asap
  s:T == t:urgent
  s:UD == t:routine
}

conceptmap "AllergyCriticality" {
  prefix s = "https://art-decor.org/art-decor/decor-valuesets--hl7it-?id=2.16.840.1.113883.2.9.77.22.11.6"
  prefix t = "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality"

  s:L == t:low
  s:H == t:high
  s:M == t:unable_to_assess
}

uses "http://hl7.org/fhir/cda/StructureDefinition/ED" alias ED as source
uses "http://hl7.org/fhir/cda/StructureDefinition/INT" alias INT as source
uses "http://hl7.org/fhir/cda/StructureDefinition/II" as source
uses "http://hl7.org/fhir/StructureDefinition/Identifier" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/TS" as source
uses "http://hl7.org/fhir/StructureDefinition/instant" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/CS" as source
uses "http://hl7.org/fhir/StructureDefinition/code" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/CE" as source
uses "http://hl7.org/fhir/StructureDefinition/CodeableConcept" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/ST" as source
uses "http://hl7.org/fhir/StructureDefinition/string" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/EN" as source
uses "http://hl7.org/fhir/StructureDefinition/HumanName" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/AD" as source
uses "http://hl7.org/fhir/StructureDefinition/Address" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/TEL" as source
uses "http://hl7.org/fhir/StructureDefinition/ContactPoint" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/BL" as source
uses "http://hl7.org/fhir/StructureDefinition/boolean" as target
uses "http://hl7.org/fhir/cda/StructureDefinition/IVL-TS" as source
uses "http://hl7.org/fhir/StructureDefinition/Period" as target

group Any(source src, target tgt) {
  src -> tgt "simple";
}

group II(source src : II, target tgt : Identifier) extends Any <<types>> {
  src.root as r where src.extension.exists() -> tgt.system = translate(r, 'http://hl7.org/fhir/ConceptMap/special-oid2uri', 'uri') "root1";
  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";
  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";
  src.extension as e -> tgt.value = e;
  src.assigningAuthorityName as s ->  tgt.assigner as a,  a.display = s;
}

group INT(source src : INT, target tgt : integer) extends Any <<types>> {
  src.value as v -> tgt.value = cast(v, 'string');
}

group TemplateID(source template : II, target tgt) {
  template -> tgt.extension as ext then {
    template -> ext.url = 'http://hl7.org/fhir/cda/StructureDefinition/templateID' "url";
    template -> ext.value = create('Identifier') as value then II(template, value) "value";
  } "templateId";
}

group Negation(source negation : BL, target tgt) {
  negation -> tgt.modifierExtension as ext then {
    negation -> ext.url = 'http://hl7.org/fhir/cda/StructureDefinition/negationIndicator' "url";
    negation as neg ->  ext.value = create('boolean'),  ext.value = neg "value";
  } "negation";
}

group TSInstant(source src : TS, target tgt : instant) extends Any <<types>> {
  src.value as v -> tgt.value = cast(v, 'string');
}

group TSDateTime(source src : TS, target tgt : dateTime) extends TSInstant <<types>> {
  src where (value.contains('+')) then {
    src.value as v -> tgt.value = cast(v, 'string');
  } "eff";
  src where (value.contains('-')) then {
    src.value as v -> tgt.value = cast(v, 'string');
  } "eff";
  src.value where (value.matches('^\\d{4}(\\-\\d{2}){2}T\\d{2}(:\\d{2}){2}