FHIR Extensions Pack v1.0.0 (2023-03-26)

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

Health Care Devices 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 DeviceMetric

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

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

conceptmap "DeviceMetricCalibrationState" {
  prefix s = "http://hl7.org/fhir/metric-calibration-state"
  prefix t = "http://hl7.org/fhir/4.0/metric-calibration-state"

  s:"not-calibrated" - t:"not-calibrated"
  s:"calibration-required" - t:"calibration-required"
  s:calibrated - t:calibrated
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricCalibrationType" {
  prefix s = "http://hl7.org/fhir/metric-calibration-type"
  prefix t = "http://hl7.org/fhir/4.0/metric-calibration-type"

  s:unspecified - t:unspecified
  s:offset - t:offset
  s:gain - t:gain
  s:"two-point" - t:"two-point"
}

conceptmap "DeviceMetricCategory" {
  prefix s = "http://hl7.org/fhir/metric-category"
  prefix t = "http://hl7.org/fhir/4.0/metric-category"

  s:measurement - t:measurement
  s:setting - t:setting
  s:calculation - t:calculation
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricColor" {
  prefix s = "http://hl7.org/fhir/color-names"
  prefix t = "http://hl7.org/fhir/4.0/metric-color"

  s:black - t:black
  s:red - t:red
  s:green - t:green
  s:yellow - t:yellow
  s:blue - t:blue
  s:magenta - t:magenta
  s:cyan - t:cyan
  s:white - t:white
}

conceptmap "DeviceMetricOperationalStatus" {
  prefix s = "http://hl7.org/fhir/metric-operational-status"
  prefix t = "http://hl7.org/fhir/4.0/metric-operational-status"

  s:on - t:on
  s:off - t:off
  s:standby - t:standby
  s:"entered-in-error" - t:"entered-in-error"
}

uses "http://hl7.org/fhir/StructureDefinition/DeviceMetric" alias DeviceMetricR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/DeviceMetric" alias DeviceMetricR4 as target

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

group DeviceMetric(source src : DeviceMetricR5, target tgt : DeviceMetricR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.type -> tgt.type;
  src.unit -> tgt.unit;
  src.device -> tgt.parent;
  src.operationalStatus as v -> tgt.operationalStatus = translate(v, '#DeviceMetricOperationalStatus', 'code');
  src.color as v -> tgt.color = translate(v, '#DeviceMetricColor', 'code');
  src.category as v -> tgt.category = translate(v, '#DeviceMetricCategory', 'code');
  src.calibration as s -> tgt.calibration as t then DeviceMetricCalibration(s, t); // src.measurementFrequency -> tgt.measurementFrequency;
}

group DeviceMetricCalibration(source src, target tgt) extends BackboneElement {
  src.type as v -> tgt.type = translate(v, '#DeviceMetricCalibrationType', 'code');
  src.state as v -> tgt.state = translate(v, '#DeviceMetricCalibrationState', 'code');
  src.time -> tgt.time;
}

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

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

conceptmap "DeviceMetricCalibrationState" {
  prefix s = "http://hl7.org/fhir/metric-calibration-state"
  prefix t = "http://hl7.org/fhir/4.3/metric-calibration-state"

  s:"not-calibrated" - t:"not-calibrated"
  s:"calibration-required" - t:"calibration-required"
  s:calibrated - t:calibrated
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricCalibrationType" {
  prefix s = "http://hl7.org/fhir/metric-calibration-type"
  prefix t = "http://hl7.org/fhir/4.3/metric-calibration-type"

  s:unspecified - t:unspecified
  s:offset - t:offset
  s:gain - t:gain
  s:"two-point" - t:"two-point"
}

conceptmap "DeviceMetricCategory" {
  prefix s = "http://hl7.org/fhir/metric-category"
  prefix t = "http://hl7.org/fhir/4.3/metric-category"

  s:measurement - t:measurement
  s:setting - t:setting
  s:calculation - t:calculation
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricColor" {
  prefix s = "http://hl7.org/fhir/color-names"
  prefix t = "http://hl7.org/fhir/4.3/metric-color"

  s:black - t:black
  s:red - t:red
  s:green - t:green
  s:yellow - t:yellow
  s:blue - t:blue
  s:magenta - t:magenta
  s:cyan - t:cyan
  s:white - t:white
}

conceptmap "DeviceMetricOperationalStatus" {
  prefix s = "http://hl7.org/fhir/metric-operational-status"
  prefix t = "http://hl7.org/fhir/4.3/metric-operational-status"

  s:on - t:on
  s:off - t:off
  s:standby - t:standby
  s:"entered-in-error" - t:"entered-in-error"
}

uses "http://hl7.org/fhir/StructureDefinition/DeviceMetric" alias DeviceMetricR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/DeviceMetric" alias DeviceMetricR4B as target

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

group DeviceMetric(source src : DeviceMetricR5, target tgt : DeviceMetricR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.type -> tgt.type;
  src.unit -> tgt.unit;
  src.device -> tgt.parent;
  src.operationalStatus as v -> tgt.operationalStatus = translate(v, '#DeviceMetricOperationalStatus', 'code');
  src.color as v -> tgt.color = translate(v, '#DeviceMetricColor', 'code');
  src.category as v -> tgt.category = translate(v, '#DeviceMetricCategory', 'code');
  src.calibration as s -> tgt.calibration as t then DeviceMetricCalibration(s, t); // src.measurementFrequency -> tgt.measurementFrequency;
}

group DeviceMetricCalibration(source src, target tgt) extends BackboneElement {
  src.type as v -> tgt.type = translate(v, '#DeviceMetricCalibrationType', 'code');
  src.state as v -> tgt.state = translate(v, '#DeviceMetricCalibrationState', 'code');
  src.time -> tgt.time;
}

Maps from DeviceMetric

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

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

conceptmap "DeviceMetricCalibrationState" {
  prefix s = "http://hl7.org/fhir/4.3/metric-calibration-state"
  prefix t = "http://hl7.org/fhir/metric-calibration-state"

  s:"not-calibrated" - t:"not-calibrated"
  s:"calibration-required" - t:"calibration-required"
  s:calibrated - t:calibrated
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricCalibrationType" {
  prefix s = "http://hl7.org/fhir/4.3/metric-calibration-type"
  prefix t = "http://hl7.org/fhir/metric-calibration-type"

  s:unspecified - t:unspecified
  s:offset - t:offset
  s:gain - t:gain
  s:"two-point" - t:"two-point"
}

conceptmap "DeviceMetricCategory" {
  prefix s = "http://hl7.org/fhir/4.3/metric-category"
  prefix t = "http://hl7.org/fhir/metric-category"

  s:measurement - t:measurement
  s:setting - t:setting
  s:calculation - t:calculation
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricColor" {
  prefix s = "http://hl7.org/fhir/4.3/metric-color"
  prefix t = "http://hl7.org/fhir/color-names"

  s:black - t:black
  s:red - t:red
  s:green - t:green
  s:yellow - t:yellow
  s:blue - t:blue
  s:magenta - t:magenta
  s:cyan - t:cyan
  s:white - t:white
}

conceptmap "DeviceMetricOperationalStatus" {
  prefix s = "http://hl7.org/fhir/4.3/metric-operational-status"
  prefix t = "http://hl7.org/fhir/metric-operational-status"

  s:on - t:on
  s:off - t:off
  s:standby - t:standby
  s:"entered-in-error" - t:"entered-in-error"
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/DeviceMetric" alias DeviceMetricR4B as source
uses "http://hl7.org/fhir/StructureDefinition/DeviceMetric" alias DeviceMetricR5 as target

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

group DeviceMetric(source src : DeviceMetricR4B, target tgt : DeviceMetricR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.type -> tgt.type;
  src.unit -> tgt.unit;
  src.parent -> tgt.device;
  src.operationalStatus as v -> tgt.operationalStatus = translate(v, '#DeviceMetricOperationalStatus', 'code');
  src.color as v -> tgt.color = translate(v, '#DeviceMetricColor', 'code');
  src.category as v -> tgt.category = translate(v, '#DeviceMetricCategory', 'code');
  src.calibration as s -> tgt.calibration as t then DeviceMetricCalibration(s, t); // src.measurementFrequency -> tgt.measurementFrequency;
}

group DeviceMetricCalibration(source src, target tgt) extends BackboneElement {
  src.type as v -> tgt.type = translate(v, '#DeviceMetricCalibrationType', 'code');
  src.state as v -> tgt.state = translate(v, '#DeviceMetricCalibrationState', 'code');
  src.time -> tgt.time;
}

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

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

conceptmap "DeviceMetricCalibrationState" {
  prefix s = "http://hl7.org/fhir/4.0/metric-calibration-state"
  prefix t = "http://hl7.org/fhir/metric-calibration-state"

  s:"not-calibrated" - t:"not-calibrated"
  s:"calibration-required" - t:"calibration-required"
  s:calibrated - t:calibrated
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricCalibrationType" {
  prefix s = "http://hl7.org/fhir/4.0/metric-calibration-type"
  prefix t = "http://hl7.org/fhir/metric-calibration-type"

  s:unspecified - t:unspecified
  s:offset - t:offset
  s:gain - t:gain
  s:"two-point" - t:"two-point"
}

conceptmap "DeviceMetricCategory" {
  prefix s = "http://hl7.org/fhir/4.0/metric-category"
  prefix t = "http://hl7.org/fhir/metric-category"

  s:measurement - t:measurement
  s:setting - t:setting
  s:calculation - t:calculation
  s:unspecified - t:unspecified
}

conceptmap "DeviceMetricColor" {
  prefix s = "http://hl7.org/fhir/4.0/metric-color"
  prefix t = "http://hl7.org/fhir/color-names"

  s:black - t:black
  s:red - t:red
  s:green - t:green
  s:yellow - t:yellow
  s:blue - t:blue
  s:magenta - t:magenta
  s:cyan - t:cyan
  s:white - t:white
}

conceptmap "DeviceMetricOperationalStatus" {
  prefix s = "http://hl7.org/fhir/4.0/metric-operational-status"
  prefix t = "http://hl7.org/fhir/metric-operational-status"

  s:on - t:on
  s:off - t:off
  s:standby - t:standby
  s:"entered-in-error" - t:"entered-in-error"
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/DeviceMetric" alias DeviceMetricR4 as source
uses "http://hl7.org/fhir/StructureDefinition/DeviceMetric" alias DeviceMetricR5 as target

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

group DeviceMetric(source src : DeviceMetricR4, target tgt : DeviceMetricR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.type -> tgt.type;
  src.unit -> tgt.unit;
  src.parent -> tgt.device;
  src.operationalStatus as v -> tgt.operationalStatus = translate(v, '#DeviceMetricOperationalStatus', 'code');
  src.color as v -> tgt.color = translate(v, '#DeviceMetricColor', 'code');
  src.category as v -> tgt.category = translate(v, '#DeviceMetricCategory', 'code');
  src.calibration as s -> tgt.calibration as t then DeviceMetricCalibration(s, t); // src.measurementFrequency -> tgt.measurementFrequency;
}

group DeviceMetricCalibration(source src, target tgt) extends BackboneElement {
  src.type as v -> tgt.type = translate(v, '#DeviceMetricCalibrationType', 'code');
  src.state as v -> tgt.state = translate(v, '#DeviceMetricCalibrationState', 'code');
  src.time -> tgt.time;
}