FHIR Extensions Pack
1.0.0 - Working Copy International flag

This page is part of the FHIR Core Extensions Registry (v1.0.0: Releases) based on FHIR v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

StructureMap: FML Conversion for MeasureReport: R4B to R5

Official URL: http://hl7.org/fhir/StructureMap/MeasureReport4Bto5 Version: 1.0.0
Standards status: Trial-use Maturity Level: 1 Computable Name: MeasureReport4Bto5

FMLConversionforMeasureReportR4BtoR5

/// url = 'http://hl7.org/fhir/StructureMap/MeasureReport4Bto5'
/// name = 'MeasureReport4Bto5'
/// title = 'FML Conversion for MeasureReport: R4B to R5'
/// status = 'active'

conceptmap "MeasureReportStatus" {
  prefix s = "http://hl7.org/fhir/4.3/measure-report-status"
  prefix t = "http://hl7.org/fhir/measure-report-status"

  s:complete - t:complete
  s:pending - t:pending
  s:error - t:error
}

conceptmap "MeasureReportType" {
  prefix s = "http://hl7.org/fhir/4.3/measure-report-type"
  prefix t = "http://hl7.org/fhir/measure-report-type"

  s:individual - t:individual
  s:"subject-list" - t:"subject-list"
  s:summary - t:summary
  s:"data-collection" - t:"data-exchange"
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/MeasureReport" alias MeasureReportR4B as source
uses "http://hl7.org/fhir/StructureDefinition/MeasureReport" alias MeasureReportR5 as target

imports "http://hl7.org/fhir/StructureMap/*4Bto5"

group MeasureReport(source src : MeasureReportR4B, target tgt : MeasureReportR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#MeasureReportStatus', 'code');
  src.type as v -> tgt.type = translate(v, '#MeasureReportType', 'code');
  src.measure -> tgt.measure; // src.dataUpdateType as v -> tgt.dataUpdateType = translate(v, '#SubmitDataUpdateType', 'code');
  src.subject -> tgt.subject;
  src.date -> tgt.date;
  src.reporter -> tgt.reporter;
  src.period -> tgt.period; // src.reportingVendor -> tgt.reportingVendor;
  src.improvementNotation -> tgt.improvementNotation; // src.inputParameters -> tgt.inputParameters;
  src.group as s -> tgt.group as t then MeasureReportGroup(s, t);
  src.evaluatedResource -> tgt.evaluatedResource; // src.supplementalData -> tgt.supplementalData;
}

group MeasureReportGroup(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code; // src.linkId -> tgt.linkId;
  src.population as s -> tgt.population as t then MeasureReportGroupPopulation(s, t); // src.subject -> tgt.subject;
  src.measureScore : Quantity -> tgt.measureScore;
  src.stratifier as s -> tgt.stratifier as t then MeasureReportGroupStratifier(s, t); // src.measureScore : dateTime -> tgt.measureScore;
}

group MeasureReportGroupPopulation(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code; // src.linkId -> tgt.linkId;
  src.count -> tgt.count;
  src.subjectResults -> tgt.subjectResults;
}

group MeasureReportGroupStratifier(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code; // src.linkId -> tgt.linkId;
  src.stratum as s -> tgt.stratum as t then MeasureReportGroupStratifierStratum(s, t);
}

group MeasureReportGroupStratifierStratum(source src, target tgt) extends BackboneElement {
  src.value : CodeableConcept -> tgt.value;
  src.component as s -> tgt.component as t then MeasureReportGroupStratifierStratumComponent(s, t); // src.value : boolean -> tgt.value;
  src.population as s -> tgt.population as t then MeasureReportGroupStratifierStratumPopulation(s, t);
  src.measureScore : Quantity -> tgt.measureScore;
}

group MeasureReportGroupStratifierStratumComponent(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code; // src.linkId -> tgt.linkId;
  src.value : CodeableConcept -> tgt.value;
}

group MeasureReportGroupStratifierStratumPopulation(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code; // src.linkId -> tgt.linkId;
  src.count -> tgt.count;
  src.subjectResults -> tgt.subjectResults;
}