FHIR Extensions Pack v5.1.0-cibuild (2024-02-16)

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

Biomedical Research and Regulation 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 PackagedProductDefinition

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

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

uses "http://hl7.org/fhir/StructureDefinition/PackagedProductDefinition" alias PackagedProductDefinitionR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/PackagedProductDefinition" alias PackagedProductDefinitionR4B as target

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

group PackagedProductDefinition(source src : PackagedProductDefinitionR5, target tgt : PackagedProductDefinitionR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.name -> tgt.name;
  src.type -> tgt.type;
  src.packageFor -> tgt.packageFor;
  src.status -> tgt.status;
  src.statusDate -> tgt.statusDate;
  src.containedItemQuantity -> tgt.containedItemQuantity;
  src.description -> tgt.description;
  src.legalStatusOfSupply as s -> tgt.legalStatusOfSupply as t then PackagedProductDefinitionLegalStatusOfSupply(s, t);
  src.marketingStatus -> tgt.marketingStatus;
  src.copackagedIndicator -> tgt.copackagedIndicator;
  src.manufacturer -> tgt.manufacturer;
  src.packaging as s -> tgt.package as t then PackagedProductDefinitionPackaging(s, t); // src.attachedDocument -> tgt.attachedDocument;
}

group PackagedProductDefinitionLegalStatusOfSupply(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.jurisdiction -> tgt.jurisdiction;
}

group PackagedProductDefinitionPackaging(source src, target tgt) extends BackboneElement {
  src.identifier -> tgt.identifier;
  src.type -> tgt.type;
  src.quantity -> tgt.quantity; // src.componentPart -> tgt.componentPart;
  src.material -> tgt.material;
  src.alternateMaterial -> tgt.alternateMaterial;
  src.shelfLifeStorage as s -> tgt.shelfLifeStorage as t then {
    s.type -> t.type;
    s.period : Duration -> t.period;
    s.period : string -> t.period;
    s.specialPrecautionsForStorage -> t.specialPrecautionsForStorage;
  };
  src.manufacturer -> tgt.manufacturer;
  src.property as s -> tgt.property as t then PackagedProductDefinitionPackagingProperty(s, t);
  src.containedItem as s -> tgt.containedItem as t then PackagedProductDefinitionPackagingContainedItem(s, t);
}

group PackagedProductDefinitionPackagingProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : CodeableConcept -> tgt.value;
  src.value : Quantity -> tgt.value;
  src.value : date -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : Attachment -> tgt.value;
}

group PackagedProductDefinitionPackagingContainedItem(source src, target tgt) extends BackboneElement {
  src.item -> tgt.item;
  src.amount -> tgt.amount;
}

Maps from PackagedProductDefinition

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

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

uses "http://hl7.org/fhir/4.3/StructureDefinition/PackagedProductDefinition" alias PackagedProductDefinitionR4B as source
uses "http://hl7.org/fhir/StructureDefinition/PackagedProductDefinition" alias PackagedProductDefinitionR5 as target

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

group PackagedProductDefinition(source src : PackagedProductDefinitionR4B, target tgt : PackagedProductDefinitionR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.name -> tgt.name;
  src.type -> tgt.type;
  src.packageFor -> tgt.packageFor;
  src.status -> tgt.status;
  src.statusDate -> tgt.statusDate;
  src.containedItemQuantity -> tgt.containedItemQuantity;
  src.description -> tgt.description;
  src.legalStatusOfSupply as s -> tgt.legalStatusOfSupply as t then PackagedProductDefinitionLegalStatusOfSupply(s, t);
  src.marketingStatus -> tgt.marketingStatus;
  src.copackagedIndicator -> tgt.copackagedIndicator;
  src.manufacturer -> tgt.manufacturer;
  src.package as s -> tgt.packaging as t then PackagedProductDefinitionPackaging(s, t); // src.attachedDocument -> tgt.attachedDocument;
}

group PackagedProductDefinitionLegalStatusOfSupply(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.jurisdiction -> tgt.jurisdiction;
}

group PackagedProductDefinitionPackaging(source src, target tgt) extends BackboneElement {
  src.identifier -> tgt.identifier;
  src.type -> tgt.type;
  src.quantity -> tgt.quantity; // src.componentPart -> tgt.componentPart;
  src.material -> tgt.material;
  src.alternateMaterial -> tgt.alternateMaterial;
  src.shelfLifeStorage as s -> tgt.shelfLifeStorage = create('ProductShelfLife') as t then {
    s.type -> t.type;
    s.period : Duration -> t.period;
    s.period : string -> t.period;
    s.specialPrecautionsForStorage -> t.specialPrecautionsForStorage;
  };
  src.manufacturer -> tgt.manufacturer;
  src.property as s -> tgt.property as t then PackagedProductDefinitionPackagingProperty(s, t);
  src.containedItem as s -> tgt.containedItem as t then PackagedProductDefinitionPackagingContainedItem(s, t);
}

group PackagedProductDefinitionPackagingProperty(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : CodeableConcept -> tgt.value;
  src.value : Quantity -> tgt.value;
  src.value : date -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : Attachment -> tgt.value;
}

group PackagedProductDefinitionPackagingContainedItem(source src, target tgt) extends BackboneElement {
  src.item -> tgt.item;
  src.amount -> tgt.amount;
}