FHIR Extensions Pack
5.1.0-ballot1 - Ballot for Release 5.1.0 International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0-ballot: Releases Ballot 4) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions

StructureMap: FML Conversion for MeasureReport: R4 to R5

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

FMLConversionforMeasureReportR4toR5

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

conceptmap "MeasureReportStatus" {
  prefix s = "http://hl7.org/fhir/4.0/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.0/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.0/StructureDefinition/MeasureReport" alias MeasureReportR4 as source
uses "http://hl7.org/fhir/StructureDefinition/MeasureReport" alias MeasureReportR5 as target

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

group MeasureReport(source src : MeasureReportR4, 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;
}