FHIR Extensions Pack
5.1.0-cibuild - Working Copy International flag

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

StructureMap: FML Conversion for DeviceDefinition: R5 to R4

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

FMLConversionforDeviceDefinitionR5toR4

/// url = 'http://hl7.org/fhir/StructureMap/DeviceDefinition5to4'
/// name = 'DeviceDefinition5to4'
/// title = 'FML Conversion for DeviceDefinition: 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"
}

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

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

group DeviceDefinition(source src : DeviceDefinitionR5, target tgt : DeviceDefinitionR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier; // src.description -> tgt.description;
  src.udiDeviceIdentifier as s -> tgt.udiDeviceIdentifier as t then DeviceDefinitionUdiDeviceIdentifier(s, t);
  src.manufacturer -> tgt.manufacturer; // src.regulatoryIdentifier as s -> tgt.regulatoryIdentifier as t then DeviceDefinitionRegulatoryIdentifier(s,t);
  src.deviceName as s -> tgt.deviceName as t then DeviceDefinitionDeviceName(s, t);
  src.modelNumber -> tgt.modelNumber;
  src.version as s -> tgt then {
    s.value -> tgt.version;
  }; // src.classification as s -> tgt.classification as t then DeviceDefinitionClassification(s,t);
  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.link as s -> tgt.link as t then DeviceDefinitionLink(s,t);
  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, '#DeviceNameType', '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.value : Quantity -> tgt.valueQuantity;
  src.value : CodeableConcept -> tgt.valueCode;
}

// 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;
}