FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

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

StructureMap: DeviceDefinition Transforms: R4 to R5

Official URL: http://hl7.org/fhir/StructureMap/DeviceDefinition4to5 Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: DeviceDefinition4to5

DeviceDefinitionTransformsR4toR5

/// url = 'http://hl7.org/fhir/StructureMap/DeviceDefinition4to5'
/// name = 'DeviceDefinition4to5'
/// title = 'DeviceDefinition Transforms: R4 to R5'
/// status = 'active'

uses "http://hl7.org/fhir/4.0/DeviceDefinition" alias DeviceDefinitionR4 as source
uses "http://hl7.org/fhir/5.0/DeviceDefinition" alias DeviceDefinitionR5 as target

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

group DeviceDefinition(source src : DeviceDefinitionR4, target tgt : DeviceDefinitionR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.udiDeviceIdentifier as s -> tgt.udiDeviceIdentifier as t then DeviceDefinitionUdiDeviceIdentifier(s, t);
  src.manufacturer : Reference -> tgt.manufacturer;
  src.deviceName as s -> tgt.deviceName as t then DeviceDefinitionDeviceName(s, t);
  src.modelNumber -> tgt.modelNumber;
  src.version as s ->  tgt.version as t,  t.value = s;
  src.safety -> tgt.safety;
  src.shelfLifeStorage -> tgt.shelfLifeStorage;
  src.languageCode -> tgt.languageCode;
  src.property as s -> tgt.property as t then DeviceDefinitionProperty(s, t);
  src.owner -> tgt.owner;
  src.contact -> tgt.contact;
  src.note -> tgt.note;
  src.material as s -> tgt.material as t then DeviceDefinitionMaterial(s, t);
}

group DeviceDefinitionUdiDeviceIdentifier(source src, target tgt) extends BackboneElement {
  src.deviceIdentifier -> tgt.deviceIdentifier;
  src.issuer -> tgt.issuer;
  src.jurisdiction -> tgt.jurisdiction;
}

// group DeviceDefinitionUdiDeviceIdentifierMarketDistribution(source src, target tgt) extends BackboneElement {
// src.marketPeriod -> tgt.marketPeriod;
// src.subJurisdiction -> tgt.subJurisdiction;
// }
// group DeviceDefinitionRegulatoryIdentifier(source src, target tgt) extends BackboneElement {
// src.type as v -> tgt.type = translate(v, '#DeviceRegulatoryIdentifierType', 'code');
// src.deviceIdentifier -> tgt.deviceIdentifier;
// src.issuer -> tgt.issuer;
// src.jurisdiction -> tgt.jurisdiction;
// }
group DeviceDefinitionDeviceName(source src, target tgt) extends BackboneElement {
  src.name -> tgt.name;
  src.type as v -> tgt.type = translate(v, 'http://hl7.org/fhir/ConceptMap/DeviceDefinition.deviceName.type-R4toR5', 'code');
}

// group DeviceDefinitionClassification(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.justification -> tgt.justification;
// }
// group DeviceDefinitionConformsTo(source src, target tgt) extends BackboneElement {
// src.category -> tgt.category;
// src.specification -> tgt.specification;
// src.version -> tgt.version;
// src.source -> tgt.source;
// }
// group DeviceDefinitionHasPart(source src, target tgt) extends BackboneElement {
// src.reference -> tgt.reference;
// src.count -> tgt.count;
// }
// group DeviceDefinitionPackaging(source src, target tgt) extends BackboneElement {
// src.identifier -> tgt.identifier;
// src.type -> tgt.type;
// src.count -> tgt.count;
// src.distributor as s -> tgt.distributor as t then DeviceDefinitionPackagingDistributor(s,t);
// }
// group DeviceDefinitionPackagingDistributor(source src, target tgt) extends BackboneElement {
// src.name -> tgt.name;
// src.organizationReference -> tgt.organizationReference;
// }
// group DeviceDefinitionVersion(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.component -> tgt.component;
// src.value -> tgt.value;
// }
group DeviceDefinitionProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.valueQuantity : Quantity -> tgt.value;
  src.valueCode : CodeableConcept -> tgt.value;
}

// group DeviceDefinitionLink(source src, target tgt) extends BackboneElement {
// src.relation -> tgt.relation;
// src.relatedDevice -> tgt.relatedDevice;
// }
group DeviceDefinitionMaterial(source src, target tgt) extends BackboneElement {
  src.substance -> tgt.substance;
  src.alternate -> tgt.alternate;
  src.allergenicIndicator -> tgt.allergenicIndicator;
}