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

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 Device

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

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

conceptmap "DeviceNameType" {
  prefix s = "http://hl7.org/fhir/device-nametype"
  prefix t = "http://hl7.org/fhir/4.0/device-nametype"

  s:"user-friendly-name" - t:"user-friendly-name"
  s:"patient-reported-name" - t:"patient-reported-name"
}

conceptmap "FHIRDeviceStatus" {
  prefix s = "http://hl7.org/fhir/device-status"
  prefix t = "http://hl7.org/fhir/4.0/device-status"

  s:active - t:active
  s:inactive - t:inactive
  s:"entered-in-error" - t:"entered-in-error"
}

conceptmap "UDIEntryType" {
  prefix s = "http://hl7.org/fhir/udi-entry-type"
  prefix t = "http://hl7.org/fhir/4.0/udi-entry-type"

  s:barcode - t:barcode
  s:rfid - t:rfid
  s:manual - t:manual
  s:card - t:card
  s:"self-reported" - t:"self-reported"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/Device" alias DeviceR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/Device" alias DeviceR4 as target

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

group Device(source src : DeviceR5, target tgt : DeviceR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.definition -> tgt.definition; // src.displayName -> tgt.displayName;
  src.udiCarrier as s -> tgt.udiCarrier as t then DeviceUdiCarrier(s, t);
  src.status as v -> tgt.status = translate(v, '#FHIRDeviceStatus', 'code');
  src.manufacturer -> tgt.manufacturer; // src.availabilityStatus -> tgt.availabilityStatus;
  src.manufactureDate -> tgt.manufactureDate;
  src.expirationDate -> tgt.expirationDate;
  src.lotNumber -> tgt.lotNumber;
  src.serialNumber -> tgt.serialNumber;
  src.name as s -> tgt.deviceName as t then DeviceName(s, t);
  src.modelNumber -> tgt.modelNumber;
  src.partNumber -> tgt.partNumber;
  src.type -> tgt.type; // src.category -> tgt.category;
  src.version as s -> tgt.version as t then DeviceVersion(s, t);
  src.property as s -> tgt.property as t then DeviceProperty(s, t); // src.conformsTo as s -> tgt.conformsTo as t then DeviceConformsTo(s,t);
  src.owner -> tgt.owner; // src.mode -> tgt.mode;
  src.contact -> tgt.contact;
  src.location -> tgt.location;
  src.url -> tgt.url;
  src.note -> tgt.note; // src.endpoint -> tgt.endpoint;
  src.safety -> tgt.safety;
  src.parent -> tgt.parent;
}

group DeviceUdiCarrier(source src, target tgt) extends BackboneElement {
  src.deviceIdentifier -> tgt.deviceIdentifier;
  src.issuer -> tgt.issuer;
  src.jurisdiction -> tgt.jurisdiction;
  src.carrierAIDC -> tgt.carrierAIDC;
  src.carrierHRF -> tgt.carrierHRF;
  src.entryType as v -> tgt.entryType = translate(v, '#UDIEntryType', 'code');
}

group DeviceName(source src, target tgt) extends BackboneElement {
  src.value -> tgt.name;
  src.type as v -> tgt.type = translate(v, '#DeviceNameType', 'code');
}

group DeviceVersion(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.component -> tgt.component;
  src.value -> tgt.value; // src.installDate -> tgt.installDate;
}

// group DeviceConformsTo(source src, target tgt) extends BackboneElement {
// src.category -> tgt.category;
// src.specification -> tgt.specification;
// src.version -> tgt.version;
// }
group DeviceProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : Quantity -> tgt.valueQuantity;
  src.value : CodeableConcept -> tgt.valueCode;
}

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

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

conceptmap "DeviceNameType" {
  prefix s = "http://hl7.org/fhir/device-nametype"
  prefix t = "http://hl7.org/fhir/4.3/device-nametype"

  s:"user-friendly-name" - t:"user-friendly-name"
  s:"patient-reported-name" - t:"patient-reported-name"
}

conceptmap "FHIRDeviceStatus" {
  prefix s = "http://hl7.org/fhir/device-status"
  prefix t = "http://hl7.org/fhir/4.3/device-status"

  s:active - t:active
  s:inactive - t:inactive
  s:"entered-in-error" - t:"entered-in-error"
}

conceptmap "UDIEntryType" {
  prefix s = "http://hl7.org/fhir/udi-entry-type"
  prefix t = "http://hl7.org/fhir/4.3/udi-entry-type"

  s:barcode - t:barcode
  s:rfid - t:rfid
  s:manual - t:manual
  s:card - t:card
  s:"self-reported" - t:"self-reported"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/Device" alias DeviceR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/Device" alias DeviceR4B as target

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

group Device(source src : DeviceR5, target tgt : DeviceR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.definition -> tgt.definition; // src.displayName -> tgt.displayName;
  src.udiCarrier as s -> tgt.udiCarrier as t then DeviceUdiCarrier(s, t);
  src.status as v -> tgt.status = translate(v, '#FHIRDeviceStatus', 'code');
  src.manufacturer -> tgt.manufacturer; // src.availabilityStatus -> tgt.availabilityStatus;
  src.manufactureDate -> tgt.manufactureDate;
  src.expirationDate -> tgt.expirationDate;
  src.lotNumber -> tgt.lotNumber;
  src.serialNumber -> tgt.serialNumber;
  src.name as s -> tgt.deviceName as t then DeviceName(s, t);
  src.modelNumber -> tgt.modelNumber;
  src.partNumber -> tgt.partNumber;
  src.type -> tgt.type; // src.category -> tgt.category;
  src.version as s -> tgt.version as t then DeviceVersion(s, t);
  src.property as s -> tgt.property as t then DeviceProperty(s, t); // src.conformsTo as s -> tgt.conformsTo as t then DeviceConformsTo(s,t);
  src.owner -> tgt.owner; // src.mode -> tgt.mode;
  src.contact -> tgt.contact;
  src.location -> tgt.location;
  src.url -> tgt.url;
  src.note -> tgt.note; // src.endpoint -> tgt.endpoint;
  src.safety -> tgt.safety;
  src.parent -> tgt.parent;
}

group DeviceUdiCarrier(source src, target tgt) extends BackboneElement {
  src.deviceIdentifier -> tgt.deviceIdentifier;
  src.issuer -> tgt.issuer;
  src.jurisdiction -> tgt.jurisdiction;
  src.carrierAIDC -> tgt.carrierAIDC;
  src.carrierHRF -> tgt.carrierHRF;
  src.entryType as v -> tgt.entryType = translate(v, '#UDIEntryType', 'code');
}

group DeviceName(source src, target tgt) extends BackboneElement {
  src.value -> tgt.name;
  src.type as v -> tgt.type = translate(v, '#DeviceNameType', 'code');
}

group DeviceVersion(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.component -> tgt.component;
  src.value -> tgt.value; // src.installDate -> tgt.installDate;
}

// group DeviceConformsTo(source src, target tgt) extends BackboneElement {
// src.category -> tgt.category;
// src.specification -> tgt.specification;
// src.version -> tgt.version;
// }
group DeviceProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : Quantity -> tgt.valueQuantity;
  src.value : CodeableConcept -> tgt.valueCode;
}

Maps from Device

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

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

conceptmap "DeviceNameType" {
  prefix s = "http://hl7.org/fhir/4.3/device-nametype"
  prefix t = "http://hl7.org/fhir/device-nametype"

  s:"udi-label-name" - t:"registered-name"
  s:"user-friendly-name" - t:"user-friendly-name"
  s:"patient-reported-name" - t:"patient-reported-name"
  s:"manufacturer-name" - t:"registered-name"
  s:"model-name" - t:"registered-name"
  s:other - t:"registered-name"
}

conceptmap "FHIRDeviceStatus" {
  prefix s = "http://hl7.org/fhir/4.3/device-status"
  prefix t = "http://hl7.org/fhir/device-status"

  s:active - t:active
  s:inactive - t:inactive
  s:"entered-in-error" - t:"entered-in-error"
}

conceptmap "UDIEntryType" {
  prefix s = "http://hl7.org/fhir/4.3/udi-entry-type"
  prefix t = "http://hl7.org/fhir/udi-entry-type"

  s:barcode - t:barcode
  s:rfid - t:rfid
  s:manual - t:manual
  s:card - t:card
  s:"self-reported" - t:"self-reported"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/Device" alias DeviceR4B as source
uses "http://hl7.org/fhir/StructureDefinition/Device" alias DeviceR5 as target

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

group Device(source src : DeviceR4B, target tgt : DeviceR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.definition -> tgt.definition; // src.displayName -> tgt.displayName;
  src.udiCarrier as s -> tgt.udiCarrier as t then DeviceUdiCarrier(s, t);
  src.status as v -> tgt.status = translate(v, '#FHIRDeviceStatus', 'code');
  src.manufacturer -> tgt.manufacturer; // src.availabilityStatus -> tgt.availabilityStatus;
  src.manufactureDate -> tgt.manufactureDate;
  src.expirationDate -> tgt.expirationDate;
  src.lotNumber -> tgt.lotNumber;
  src.serialNumber -> tgt.serialNumber;
  src.deviceName as s -> tgt.name as t then DeviceName(s, t);
  src.modelNumber -> tgt.modelNumber;
  src.partNumber -> tgt.partNumber;
  src.type -> tgt.type; // src.category -> tgt.category;
  src.version as s -> tgt.version as t then DeviceVersion(s, t);
  src.property as s -> tgt.property as t then DeviceProperty(s, t); // src.conformsTo as s -> tgt.conformsTo as t then DeviceConformsTo(s,t);
  src.owner -> tgt.owner; // src.mode -> tgt.mode;
  src.contact -> tgt.contact;
  src.location -> tgt.location;
  src.url -> tgt.url;
  src.note -> tgt.note; // src.endpoint -> tgt.endpoint;
  src.safety -> tgt.safety;
  src.parent -> tgt.parent;
}

group DeviceUdiCarrier(source src, target tgt) extends BackboneElement {
  src.deviceIdentifier -> tgt.deviceIdentifier;
  src.issuer -> tgt.issuer;
  src.jurisdiction -> tgt.jurisdiction;
  src.carrierAIDC -> tgt.carrierAIDC;
  src.carrierHRF -> tgt.carrierHRF;
  src.entryType as v -> tgt.entryType = translate(v, '#UDIEntryType', 'code');
}

group DeviceName(source src, target tgt) extends BackboneElement {
  src.name -> tgt.value;
  src.type as v -> tgt.type = translate(v, '#DeviceNameType', 'code');
}

group DeviceVersion(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.component -> tgt.component;
  src.value -> tgt.value; // src.installDate -> tgt.installDate;
}

// group DeviceConformsTo(source src, target tgt) extends BackboneElement {
// src.category -> tgt.category;
// src.specification -> tgt.specification;
// src.version -> tgt.version;
// }
group DeviceProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.valueQuantity : Quantity -> tgt.value;
  src.valueCode : CodeableConcept -> tgt.value;
}

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

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

conceptmap "DeviceNameType" {
  prefix s = "http://hl7.org/fhir/4.0/device-nametype"
  prefix t = "http://hl7.org/fhir/device-nametype"

  s:"udi-label-name" - t:"registered-name"
  s:"user-friendly-name" - t:"user-friendly-name"
  s:"patient-reported-name" - t:"patient-reported-name"
  s:"manufacturer-name" - t:"registered-name"
  s:"model-name" - t:"registered-name"
  s:other - t:"registered-name"
}

conceptmap "FHIRDeviceStatus" {
  prefix s = "http://hl7.org/fhir/4.0/device-status"
  prefix t = "http://hl7.org/fhir/device-status"

  s:active - t:active
  s:inactive - t:inactive
  s:"entered-in-error" - t:"entered-in-error"
}

conceptmap "UDIEntryType" {
  prefix s = "http://hl7.org/fhir/4.0/udi-entry-type"
  prefix t = "http://hl7.org/fhir/udi-entry-type"

  s:barcode - t:barcode
  s:rfid - t:rfid
  s:manual - t:manual
  s:card - t:card
  s:"self-reported" - t:"self-reported"
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/Device" alias DeviceR4 as source
uses "http://hl7.org/fhir/StructureDefinition/Device" alias DeviceR5 as target

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

group Device(source src : DeviceR4, target tgt : DeviceR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.definition -> tgt.definition; // src.displayName -> tgt.displayName;
  src.udiCarrier as s -> tgt.udiCarrier as t then DeviceUdiCarrier(s, t);
  src.status as v -> tgt.status = translate(v, '#FHIRDeviceStatus', 'code');
  src.manufacturer -> tgt.manufacturer; // src.availabilityStatus -> tgt.availabilityStatus;
  src.manufactureDate -> tgt.manufactureDate;
  src.expirationDate -> tgt.expirationDate;
  src.lotNumber -> tgt.lotNumber;
  src.serialNumber -> tgt.serialNumber;
  src.deviceName as s -> tgt.name as t then DeviceName(s, t);
  src.modelNumber -> tgt.modelNumber;
  src.partNumber -> tgt.partNumber;
  src.type -> tgt.type; // src.category -> tgt.category;
  src.version as s -> tgt.version as t then DeviceVersion(s, t);
  src.property as s -> tgt.property as t then DeviceProperty(s, t); // src.conformsTo as s -> tgt.conformsTo as t then DeviceConformsTo(s,t);
  src.owner -> tgt.owner; // src.mode -> tgt.mode;
  src.contact -> tgt.contact;
  src.location -> tgt.location;
  src.url -> tgt.url;
  src.note -> tgt.note; // src.endpoint -> tgt.endpoint;
  src.safety -> tgt.safety;
  src.parent -> tgt.parent;
}

group DeviceUdiCarrier(source src, target tgt) extends BackboneElement {
  src.deviceIdentifier -> tgt.deviceIdentifier;
  src.issuer -> tgt.issuer;
  src.jurisdiction -> tgt.jurisdiction;
  src.carrierAIDC -> tgt.carrierAIDC;
  src.carrierHRF -> tgt.carrierHRF;
  src.entryType as v -> tgt.entryType = translate(v, '#UDIEntryType', 'code');
}

group DeviceName(source src, target tgt) extends BackboneElement {
  src.name -> tgt.value;
  src.type as v -> tgt.type = translate(v, '#DeviceNameType', 'code');
}

group DeviceVersion(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.component -> tgt.component;
  src.value -> tgt.value; // src.installDate -> tgt.installDate;
}

// group DeviceConformsTo(source src, target tgt) extends BackboneElement {
// src.category -> tgt.category;
// src.specification -> tgt.specification;
// src.version -> tgt.version;
// }
group DeviceProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.valueQuantity : Quantity -> tgt.value;
  src.valueCode : CodeableConcept -> tgt.value;
}