FHIR Extensions Pack v5.1.0-cibuild (2024-04-03)

FHIR Extensions Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 5.1.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-extensions/ and changes regularly. See the Directory of published versions

Orders and Observations Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: N/A Compartments: N/A

Following are maps for converting between the equivalent R4B resource and this R5 resource.

Maps to DiagnosticReport

FML Conversion for DiagnosticReport: R5 to R4 (Ready for Use/Trial Use)

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

conceptmap "DiagnosticReportStatus" {
  prefix s = "http://hl7.org/fhir/diagnostic-report-status"
  prefix t = "http://hl7.org/fhir/4.0/diagnostic-report-status"

  s:registered - t:registered
  s:partial - t:partial
  s:modified - t:partial
  s:preliminary - t:preliminary
  s:final - t:final
  s:amended - t:amended
  s:corrected - t:corrected
  s:appended - t:appended
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/DiagnosticReport" alias DiagnosticReportR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/DiagnosticReport" alias DiagnosticReportR4 as target

imports "http://hl7.org/fhir/StructureMap/*5to4"

group DiagnosticReport(source src : DiagnosticReportR5, target tgt : DiagnosticReportR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.status as v -> tgt.status = translate(v, '#DiagnosticReportStatus', 'code');
  src.category -> tgt.category;
  src.code -> tgt.code;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.effective : dateTime -> tgt.effective;
  src.effective : Period -> tgt.effective;
  src.issued -> tgt.issued;
  src.performer -> tgt.performer;
  src.resultsInterpreter -> tgt.resultsInterpreter;
  src.specimen -> tgt.specimen;
  src.result -> tgt.result;
  src.media as s -> tgt.media as t then DiagnosticReportMedia(s, t); // src.note -> tgt.note;
  src.conclusion -> tgt.conclusion; // src.composition -> tgt.composition;
  src.conclusionCode -> tgt.conclusionCode;
  src.presentedForm -> tgt.presentedForm;
}

// group DiagnosticReportSupportingInfo(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.reference -> tgt.reference;
// }
group DiagnosticReportMedia(source src, target tgt) extends BackboneElement {
  src.comment -> tgt.comment;
  src.link -> tgt.link;
}

FML Conversion for DiagnosticReport: R5 to R4B (Ready for Use/Trial Use)

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

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

  s:registered - t:registered
  s:partial - t:partial
  s:modified - t:partial
  s:preliminary - t:preliminary
  s:final - t:final
  s:amended - t:amended
  s:corrected - t:corrected
  s:appended - t:appended
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/DiagnosticReport" alias DiagnosticReportR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/DiagnosticReport" alias DiagnosticReportR4B as target

imports "http://hl7.org/fhir/StructureMap/*5to4B"

group DiagnosticReport(source src : DiagnosticReportR5, target tgt : DiagnosticReportR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.status as v -> tgt.status = translate(v, '#DiagnosticReportStatus', 'code');
  src.category -> tgt.category;
  src.code -> tgt.code;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.effective : dateTime -> tgt.effective;
  src.effective : Period -> tgt.effective;
  src.issued -> tgt.issued;
  src.performer -> tgt.performer;
  src.resultsInterpreter -> tgt.resultsInterpreter;
  src.specimen -> tgt.specimen;
  src.result -> tgt.result;
  src.media as s -> tgt.media as t then DiagnosticReportMedia(s, t); // src.note -> tgt.note;
  src.conclusion -> tgt.conclusion; // src.composition -> tgt.composition;
  src.conclusionCode -> tgt.conclusionCode;
  src.presentedForm -> tgt.presentedForm;
}

// group DiagnosticReportSupportingInfo(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.reference -> tgt.reference;
// }
group DiagnosticReportMedia(source src, target tgt) extends BackboneElement {
  src.comment -> tgt.comment;
  src.link -> tgt.link;
}

Maps from DiagnosticReport

FML Conversion for DiagnosticReport: R4B to R5 (Ready for Use/Trial Use)

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

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

  s:registered - t:registered
  s:partial - t:partial
  s:preliminary - t:preliminary
  s:final - t:final
  s:amended - t:amended
  s:corrected - t:corrected
  s:appended - t:appended
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/DiagnosticReport" alias DiagnosticReportR4B as source
uses "http://hl7.org/fhir/StructureDefinition/DiagnosticReport" alias DiagnosticReportR5 as target

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

group DiagnosticReport(source src : DiagnosticReportR4B, target tgt : DiagnosticReportR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.status as v -> tgt.status = translate(v, '#DiagnosticReportStatus', 'code');
  src.category -> tgt.category;
  src.code -> tgt.code;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.effective : dateTime -> tgt.effective;
  src.effective : Period -> tgt.effective;
  src.issued -> tgt.issued;
  src.performer -> tgt.performer;
  src.resultsInterpreter -> tgt.resultsInterpreter;
  src.specimen -> tgt.specimen;
  src.result -> tgt.result;
  src.media as s -> tgt.media as t then DiagnosticReportMedia(s, t); // src.note -> tgt.note;
  src.conclusion -> tgt.conclusion; // src.composition -> tgt.composition;
  src.conclusionCode -> tgt.conclusionCode;
  src.presentedForm -> tgt.presentedForm;
}

// group DiagnosticReportSupportingInfo(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.reference -> tgt.reference;
// }
group DiagnosticReportMedia(source src, target tgt) extends BackboneElement {
  src.comment -> tgt.comment;
  src.link -> tgt.link;
}

FML Conversion for DiagnosticReport: R4 to R5 (Ready for Use/Trial Use)

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

conceptmap "DiagnosticReportStatus" {
  prefix s = "http://hl7.org/fhir/4.0/diagnostic-report-status"
  prefix t = "http://hl7.org/fhir/diagnostic-report-status"

  s:registered - t:registered
  s:partial - t:partial
  s:preliminary - t:preliminary
  s:final - t:final
  s:amended - t:amended
  s:corrected - t:corrected
  s:appended - t:appended
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/DiagnosticReport" alias DiagnosticReportR4 as source
uses "http://hl7.org/fhir/StructureDefinition/DiagnosticReport" alias DiagnosticReportR5 as target

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

group DiagnosticReport(source src : DiagnosticReportR4, target tgt : DiagnosticReportR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.status as v -> tgt.status = translate(v, '#DiagnosticReportStatus', 'code');
  src.category -> tgt.category;
  src.code -> tgt.code;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.effective : dateTime -> tgt.effective;
  src.effective : Period -> tgt.effective;
  src.issued -> tgt.issued;
  src.performer -> tgt.performer;
  src.resultsInterpreter -> tgt.resultsInterpreter;
  src.specimen -> tgt.specimen;
  src.result -> tgt.result;
  src.media as s -> tgt.media as t then DiagnosticReportMedia(s, t); // src.note -> tgt.note;
  src.conclusion -> tgt.conclusion; // src.composition -> tgt.composition;
  src.conclusionCode -> tgt.conclusionCode;
  src.presentedForm -> tgt.presentedForm;
}

// group DiagnosticReportSupportingInfo(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.reference -> tgt.reference;
// }
group DiagnosticReportMedia(source src, target tgt) extends BackboneElement {
  src.comment -> tgt.comment;
  src.link -> tgt.link;
}