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

Patient Administration 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 Location

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

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

conceptmap "LocationMode" {
  prefix s = "http://hl7.org/fhir/location-mode"
  prefix t = "http://hl7.org/fhir/4.0/location-mode"

  s:instance - t:instance
  s:kind - t:kind
}

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

  s:active - t:active
  s:suspended - t:suspended
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/StructureDefinition/Location" alias LocationR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/Location" alias LocationR4 as target

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

group Location(source src : LocationR5, target tgt : LocationR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#LocationStatus', 'code');
  src.operationalStatus -> tgt.operationalStatus;
  src.name -> tgt.name;
  src.alias -> tgt.alias;
  src.description -> tgt.description;
  src.mode as v -> tgt.mode = translate(v, '#LocationMode', 'code');
  src.type -> tgt.type;
  src.contact as s -> tgt.telecom = s.telecom;
  src.address -> tgt.address;
  src.form -> tgt.physicalType;
  src.position as s -> tgt.position as t then LocationPosition(s, t);
  src.managingOrganization -> tgt.managingOrganization;
  src.partOf -> tgt.partOf;
  src.hoursOfOperation as s ->  tgt.hoursOfOperation = create('BackboneElement') as te,  te.daysOfWeek = s.daysOfWeek,  te.allDay = s.allDay,  te.openingTime = s.availableStartTime,  te.closingTime = s.availableEndTime; // src.characteristic -> tgt.characteristic;
  src.endpoint -> tgt.endpoint; // src.virtualService -> tgt.virtualService;
}

group LocationPosition(source src, target tgt) extends BackboneElement {
  src.longitude -> tgt.longitude;
  src.latitude -> tgt.latitude;
  src.altitude -> tgt.altitude;
}

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

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

conceptmap "LocationMode" {
  prefix s = "http://hl7.org/fhir/location-mode"
  prefix t = "http://hl7.org/fhir/4.3/location-mode"

  s:instance - t:instance
  s:kind - t:kind
}

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

  s:active - t:active
  s:suspended - t:suspended
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/StructureDefinition/Location" alias LocationR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/Location" alias LocationR4B as target

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

group Location(source src : LocationR5, target tgt : LocationR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#LocationStatus', 'code');
  src.operationalStatus -> tgt.operationalStatus;
  src.name -> tgt.name;
  src.alias -> tgt.alias;
  src.description -> tgt.description;
  src.mode as v -> tgt.mode = translate(v, '#LocationMode', 'code');
  src.type -> tgt.type;
  src.contact as s -> tgt.telecom = s.telecom;
  src.address -> tgt.address;
  src.form -> tgt.physicalType;
  src.position as s -> tgt.position as t then LocationPosition(s, t);
  src.managingOrganization -> tgt.managingOrganization;
  src.partOf -> tgt.partOf;
  src.hoursOfOperation as s ->  tgt.hoursOfOperation = create('BackboneElement') as te,  te.daysOfWeek = s.daysOfWeek,  te.allDay = s.allDay,  te.openingTime = s.availableStartTime,  te.closingTime = s.availableEndTime; // src.characteristic -> tgt.characteristic;
  src.endpoint -> tgt.endpoint; // src.virtualService -> tgt.virtualService;
}

group LocationPosition(source src, target tgt) extends BackboneElement {
  src.longitude -> tgt.longitude;
  src.latitude -> tgt.latitude;
  src.altitude -> tgt.altitude;
}

Maps from Location

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

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

conceptmap "LocationMode" {
  prefix s = "http://hl7.org/fhir/4.3/location-mode"
  prefix t = "http://hl7.org/fhir/location-mode"

  s:instance - t:instance
  s:kind - t:kind
}

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

  s:active - t:active
  s:suspended - t:suspended
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/Location" alias LocationR4B as source
uses "http://hl7.org/fhir/StructureDefinition/Location" alias LocationR5 as target

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

group Location(source src : LocationR4B, target tgt : LocationR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#LocationStatus', 'code');
  src.operationalStatus -> tgt.operationalStatus;
  src.name -> tgt.name;
  src.alias -> tgt.alias;
  src.description -> tgt.description;
  src.mode as v -> tgt.mode = translate(v, '#LocationMode', 'code');
  src.type -> tgt.type;
  src.telecom : ContactPoint as s ->  tgt.contact = create('ExtendedContactDetail') as t,  t.telecom = s;
  src.address -> tgt.address;
  src.physicalType -> tgt.form;
  src.position as s -> tgt.position as t then LocationPosition(s, t);
  src.managingOrganization -> tgt.managingOrganization;
  src.partOf -> tgt.partOf;
  src.hoursOfOperation : BackboneElement as s -> tgt.hoursOfOperation as t then LocationAvailabilityAvailableTime(s, t) "availableTime"; // src.characteristic -> tgt.characteristic;
  src.endpoint -> tgt.endpoint; // src.virtualService -> tgt.virtualService;
}

group LocationPosition(source src, target tgt) extends BackboneElement {
  src.longitude -> tgt.longitude;
  src.latitude -> tgt.latitude;
  src.altitude -> tgt.altitude;
}

group LocationAvailabilityAvailableTime(source src, target tgt) extends BackboneElement {
  src.daysOfWeek as s ->  tgt.availableTime as t,  t.daysOfWeek = s;
  src.allDay as s ->  tgt.availableTime as t,  t.allDay = s;
  src.openingTime : time as s ->  tgt.availableTime as t,  t.availableStartTime = s;
  src.closingTime : time as s ->  tgt.availableTime as t,  t.availableEndTime = s;
}

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

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

conceptmap "LocationMode" {
  prefix s = "http://hl7.org/fhir/4.0/location-mode"
  prefix t = "http://hl7.org/fhir/location-mode"

  s:instance - t:instance
  s:kind - t:kind
}

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

  s:active - t:active
  s:suspended - t:suspended
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/Location" alias LocationR4 as source
uses "http://hl7.org/fhir/StructureDefinition/Location" alias LocationR5 as target

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

group Location(source src : LocationR4, target tgt : LocationR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#LocationStatus', 'code');
  src.operationalStatus -> tgt.operationalStatus;
  src.name -> tgt.name;
  src.alias -> tgt.alias;
  src.description -> tgt.description;
  src.mode as v -> tgt.mode = translate(v, '#LocationMode', 'code');
  src.type -> tgt.type;
  src.telecom : ContactPoint as s ->  tgt.contact = create('ExtendedContactDetail') as t,  t.telecom = s;
  src.address -> tgt.address;
  src.physicalType -> tgt.form;
  src.position as s -> tgt.position as t then LocationPosition(s, t);
  src.managingOrganization -> tgt.managingOrganization;
  src.partOf -> tgt.partOf;
  src.hoursOfOperation : BackboneElement as s -> tgt.hoursOfOperation as t then LocationAvailabilityAvailableTime(s, t) "availableTime"; // src.characteristic -> tgt.characteristic;
  src.endpoint -> tgt.endpoint; // src.virtualService -> tgt.virtualService;
}

group LocationPosition(source src, target tgt) extends BackboneElement {
  src.longitude -> tgt.longitude;
  src.latitude -> tgt.latitude;
  src.altitude -> tgt.altitude;
}

group LocationAvailabilityAvailableTime(source src, target tgt) extends BackboneElement {
  src.daysOfWeek as s ->  tgt.availableTime as t,  t.daysOfWeek = s;
  src.allDay as s ->  tgt.availableTime as t,  t.allDay = s;
  src.openingTime : time as s ->  tgt.availableTime as t,  t.availableStartTime = s;
  src.closingTime : time as s ->  tgt.availableTime as t,  t.availableEndTime = s;
}