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

FHIR Infrastructure 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 CompartmentDefinition

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

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

conceptmap "CompartmentType" {
  prefix s = "http://hl7.org/fhir/compartment-type"
  prefix t = "http://hl7.org/fhir/4.0/compartment-type"

  s:Patient - t:Patient
  s:Encounter - t:Encounter
  s:RelatedPerson - t:RelatedPerson
  s:Practitioner - t:Practitioner
  s:Device - t:Device
}

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

  s:draft - t:draft
  s:active - t:active
  s:retired - t:retired
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR4 as target

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

group CompartmentDefinition(source src : CompartmentDefinitionR5, target tgt : CompartmentDefinitionR4) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm;
  src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); // src.title -> tgt.title;
  src.experimental -> tgt.experimental;
  src.date -> tgt.date;
  src.publisher -> tgt.publisher;
  src.contact -> tgt.contact;
  src.description -> tgt.description;
  src.useContext -> tgt.useContext;
  src.purpose -> tgt.purpose;
  src.code as v -> tgt.code = translate(v, '#CompartmentType', 'code');
  src.search -> tgt.search;
  src.resource as s -> tgt.resource as t then CompartmentDefinitionResource(s, t);
}

group CompartmentDefinitionResource(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.param -> tgt.param;
  src.documentation -> tgt.documentation;
}

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

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

conceptmap "CompartmentType" {
  prefix s = "http://hl7.org/fhir/compartment-type"
  prefix t = "http://hl7.org/fhir/4.3/compartment-type"

  s:Patient - t:Patient
  s:Encounter - t:Encounter
  s:RelatedPerson - t:RelatedPerson
  s:Practitioner - t:Practitioner
  s:Device - t:Device
}

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

  s:draft - t:draft
  s:active - t:active
  s:retired - t:retired
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR4B as target

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

group CompartmentDefinition(source src : CompartmentDefinitionR5, target tgt : CompartmentDefinitionR4B) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm;
  src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); // src.title -> tgt.title;
  src.experimental -> tgt.experimental;
  src.date -> tgt.date;
  src.publisher -> tgt.publisher;
  src.contact -> tgt.contact;
  src.description -> tgt.description;
  src.useContext -> tgt.useContext;
  src.purpose -> tgt.purpose;
  src.code as v -> tgt.code = translate(v, '#CompartmentType', 'code');
  src.search -> tgt.search;
  src.resource as s -> tgt.resource as t then CompartmentDefinitionResource(s, t);
}

group CompartmentDefinitionResource(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.param -> tgt.param;
  src.documentation -> tgt.documentation;
}

Maps from CompartmentDefinition

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

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

conceptmap "CompartmentType" {
  prefix s = "http://hl7.org/fhir/4.3/compartment-type"
  prefix t = "http://hl7.org/fhir/compartment-type"

  s:Patient - t:Patient
  s:Encounter - t:Encounter
  s:RelatedPerson - t:RelatedPerson
  s:Practitioner - t:Practitioner
  s:Device - t:Device
}

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

  s:draft - t:draft
  s:active - t:active
  s:retired - t:retired
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR4B as source
uses "http://hl7.org/fhir/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR5 as target

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

group CompartmentDefinition(source src : CompartmentDefinitionR4B, target tgt : CompartmentDefinitionR5) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm;
  src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); // src.title -> tgt.title;
  src.experimental -> tgt.experimental;
  src.date -> tgt.date;
  src.publisher -> tgt.publisher;
  src.contact -> tgt.contact;
  src.description -> tgt.description;
  src.useContext -> tgt.useContext;
  src.purpose -> tgt.purpose;
  src.code as v -> tgt.code = translate(v, '#CompartmentType', 'code');
  src.search -> tgt.search;
  src.resource as s -> tgt.resource as t then CompartmentDefinitionResource(s, t);
}

group CompartmentDefinitionResource(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.param -> tgt.param;
  src.documentation -> tgt.documentation;
}

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

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

conceptmap "CompartmentType" {
  prefix s = "http://hl7.org/fhir/4.0/compartment-type"
  prefix t = "http://hl7.org/fhir/compartment-type"

  s:Patient - t:Patient
  s:Encounter - t:Encounter
  s:RelatedPerson - t:RelatedPerson
  s:Practitioner - t:Practitioner
  s:Device - t:Device
}

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

  s:draft - t:draft
  s:active - t:active
  s:retired - t:retired
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR4 as source
uses "http://hl7.org/fhir/StructureDefinition/CompartmentDefinition" alias CompartmentDefinitionR5 as target

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

group CompartmentDefinition(source src : CompartmentDefinitionR4, target tgt : CompartmentDefinitionR5) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.version -> tgt.version;
  src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm;
  src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code'); // src.title -> tgt.title;
  src.experimental -> tgt.experimental;
  src.date -> tgt.date;
  src.publisher -> tgt.publisher;
  src.contact -> tgt.contact;
  src.description -> tgt.description;
  src.useContext -> tgt.useContext;
  src.purpose -> tgt.purpose;
  src.code as v -> tgt.code = translate(v, '#CompartmentType', 'code');
  src.search -> tgt.search;
  src.resource as s -> tgt.resource as t then CompartmentDefinitionResource(s, t);
}

group CompartmentDefinitionResource(source src, target tgt) extends BackboneElement {
  src.code -> tgt.code;
  src.param -> tgt.param;
  src.documentation -> tgt.documentation;
}