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 Appointment

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

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

conceptmap "AppointmentStatus" {
  prefix s = "http://hl7.org/fhir/appointmentstatus"
  prefix t = "http://hl7.org/fhir/4.0/appointmentstatus"

  s:proposed - t:proposed
  s:pending - t:pending
  s:booked - t:booked
  s:arrived - t:arrived
  s:fulfilled - t:fulfilled
  s:cancelled - t:cancelled
  s:noshow - t:noshow
  s:"entered-in-error" - t:"entered-in-error"
  s:"checked-in" - t:"checked-in"
  s:waitlist - t:waitlist
}

conceptmap "ParticipationStatus" {
  prefix s = "http://hl7.org/fhir/participationstatus"
  prefix t = "http://hl7.org/fhir/4.0/participationstatus"

  s:accepted - t:accepted
  s:declined - t:declined
  s:tentative - t:tentative
  s:"needs-action" - t:"needs-action"
}

uses "http://hl7.org/fhir/StructureDefinition/Appointment" alias AppointmentR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/Appointment" alias AppointmentR4 as target

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

group Appointment(source src : AppointmentR5, target tgt : AppointmentR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#AppointmentStatus', 'code');
  src.cancellationReason -> tgt.cancelationReason;
  src.serviceCategory -> tgt.serviceCategory; // src.class -> tgt.class;
  src.serviceType -> tgt.serviceType;
  src.specialty -> tgt.specialty;
  src.appointmentType -> tgt.appointmentType;
  src.reason -> tgt.reasonCode;
  src.description -> tgt.description; // src.priority -> tgt.priority; // CodeableConcept.text -> unsignedInt ??
  src.supportingInformation -> tgt.supportingInformation; // src.replaces -> tgt.replaces;
  src.start -> tgt.start; // src.previousAppointment -> tgt.previousAppointment;
  src.end -> tgt.end;
  src.minutesDuration -> tgt.minutesDuration;
  src.requestedPeriod -> tgt.requestedPeriod;
  src.slot -> tgt.slot;
  src.created -> tgt.created; // src.account -> tgt.account;
  src.note -> tgt.comment; // src.cancellationDate -> tgt.cancellationDate;
  src.patientInstruction -> tgt.patientInstruction;
  src.basedOn -> tgt.basedOn;
  src.participant as s -> tgt.participant as t then AppointmentParticipant(s, t); // src.subject -> tgt.subject;
}

group AppointmentParticipant(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.period -> tgt.period;
  src.actor -> tgt.actor;
  src.required as s where required = 'true' ->  tgt.required as t,  t.value = 'required';
  src.required as s where required = 'false' ->  tgt.required as t,  t.value = 'optional';
  src.status as v -> tgt.status = translate(v, '#ParticipationStatus', 'code');
}

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

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

conceptmap "AppointmentStatus" {
  prefix s = "http://hl7.org/fhir/appointmentstatus"
  prefix t = "http://hl7.org/fhir/4.3/appointmentstatus"

  s:proposed - t:proposed
  s:pending - t:pending
  s:booked - t:booked
  s:arrived - t:arrived
  s:fulfilled - t:fulfilled
  s:cancelled - t:cancelled
  s:noshow - t:noshow
  s:"entered-in-error" - t:"entered-in-error"
  s:"checked-in" - t:"checked-in"
  s:waitlist - t:waitlist
}

conceptmap "ParticipationStatus" {
  prefix s = "http://hl7.org/fhir/participationstatus"
  prefix t = "http://hl7.org/fhir/4.3/participationstatus"

  s:accepted - t:accepted
  s:declined - t:declined
  s:tentative - t:tentative
  s:"needs-action" - t:"needs-action"
}

uses "http://hl7.org/fhir/StructureDefinition/Appointment" alias AppointmentR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/Appointment" alias AppointmentR4B as target

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

group Appointment(source src : AppointmentR5, target tgt : AppointmentR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#AppointmentStatus', 'code');
  src.cancellationReason -> tgt.cancelationReason;
  src.serviceCategory -> tgt.serviceCategory; // src.class -> tgt.class;
  src.serviceType -> tgt.serviceType;
  src.specialty -> tgt.specialty;
  src.appointmentType -> tgt.appointmentType;
  src.reason -> tgt.reasonCode;
  src.description -> tgt.description; // src.priority -> tgt.priority; // CodeableConcept.text -> unsignedInt ??
  src.supportingInformation -> tgt.supportingInformation; // src.replaces -> tgt.replaces;
  src.start -> tgt.start; // src.previousAppointment -> tgt.previousAppointment;
  src.end -> tgt.end;
  src.minutesDuration -> tgt.minutesDuration;
  src.requestedPeriod -> tgt.requestedPeriod;
  src.slot -> tgt.slot;
  src.created -> tgt.created; // src.account -> tgt.account;
  src.note -> tgt.comment; // src.cancellationDate -> tgt.cancellationDate;
  src.patientInstruction -> tgt.patientInstruction;
  src.basedOn -> tgt.basedOn;
  src.participant as s -> tgt.participant as t then AppointmentParticipant(s, t); // src.subject -> tgt.subject;
}

group AppointmentParticipant(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.period -> tgt.period;
  src.actor -> tgt.actor;
  src.required as s where required = 'true' ->  tgt.required as t,  t.value = 'required';
  src.required as s where required = 'false' ->  tgt.required as t,  t.value = 'optional';
  src.status as v -> tgt.status = translate(v, '#ParticipationStatus', 'code');
}

Maps from Appointment

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

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

conceptmap "AppointmentStatus" {
  prefix s = "http://hl7.org/fhir/4.3/appointmentstatus"
  prefix t = "http://hl7.org/fhir/appointmentstatus"

  s:proposed - t:proposed
  s:pending - t:pending
  s:booked - t:booked
  s:arrived - t:arrived
  s:fulfilled - t:fulfilled
  s:cancelled - t:cancelled
  s:noshow - t:noshow
  s:"entered-in-error" - t:"entered-in-error"
  s:"checked-in" - t:"checked-in"
  s:waitlist - t:waitlist
}

conceptmap "ParticipationStatus" {
  prefix s = "http://hl7.org/fhir/4.3/participationstatus"
  prefix t = "http://hl7.org/fhir/participationstatus"

  s:accepted - t:accepted
  s:declined - t:declined
  s:tentative - t:tentative
  s:"needs-action" - t:"needs-action"
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/Appointment" alias AppointmentR4B as source
uses "http://hl7.org/fhir/StructureDefinition/Appointment" alias AppointmentR5 as target

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

group Appointment(source src : AppointmentR4B, target tgt : AppointmentR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#AppointmentStatus', 'code');
  src.cancelationReason -> tgt.cancellationReason;
  src.serviceCategory -> tgt.serviceCategory; // src.class -> tgt.class;
  src.serviceType -> tgt.serviceType;
  src.specialty -> tgt.specialty;
  src.appointmentType -> tgt.appointmentType;
  src.reasonCode -> tgt.reason;
  src.description -> tgt.description; // src.priority -> tgt.priority; // unsignedInt -> CodeableConcept.text ??
  src.supportingInformation -> tgt.supportingInformation; // src.replaces -> tgt.replaces;
  src.start -> tgt.start; // src.previousAppointment -> tgt.previousAppointment;
  src.end -> tgt.end;
  src.minutesDuration -> tgt.minutesDuration;
  src.requestedPeriod -> tgt.requestedPeriod;
  src.slot -> tgt.slot;
  src.created -> tgt.created; // src.account -> tgt.account;
  src.comment -> tgt.note; // src.cancellationDate -> tgt.cancellationDate;
  src.patientInstruction -> tgt.patientInstruction;
  src.basedOn -> tgt.basedOn;
  src.participant as s -> tgt.participant as t then AppointmentParticipant(s, t); // src.subject -> tgt.subject;
}

group AppointmentParticipant(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.period -> tgt.period;
  src.actor -> tgt.actor;
  src.required as s where required = 'required' ->  tgt.required as t,  t.value = create('boolean') as c,  c.value = 'true';
  src.required as s where required = 'optional' ->  tgt.required as t,  t.value = create('boolean') as c,  c.value = 'false';
  src.required as s where required = 'information-only' ->  tgt.required as t,  t.value = create('boolean') as c,  c.value = 'false';
  src.status as v -> tgt.status = translate(v, '#ParticipationStatus', 'code');
}

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

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

conceptmap "AppointmentStatus" {
  prefix s = "http://hl7.org/fhir/4.0/appointmentstatus"
  prefix t = "http://hl7.org/fhir/appointmentstatus"

  s:proposed - t:proposed
  s:pending - t:pending
  s:booked - t:booked
  s:arrived - t:arrived
  s:fulfilled - t:fulfilled
  s:cancelled - t:cancelled
  s:noshow - t:noshow
  s:"entered-in-error" - t:"entered-in-error"
  s:"checked-in" - t:"checked-in"
  s:waitlist - t:waitlist
}

conceptmap "ParticipationStatus" {
  prefix s = "http://hl7.org/fhir/4.0/participationstatus"
  prefix t = "http://hl7.org/fhir/participationstatus"

  s:accepted - t:accepted
  s:declined - t:declined
  s:tentative - t:tentative
  s:"needs-action" - t:"needs-action"
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/Appointment" alias AppointmentR4 as source
uses "http://hl7.org/fhir/StructureDefinition/Appointment" alias AppointmentR5 as target

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

group Appointment(source src : AppointmentR4, target tgt : AppointmentR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#AppointmentStatus', 'code');
  src.cancelationReason -> tgt.cancellationReason;
  src.serviceCategory -> tgt.serviceCategory; // src.class -> tgt.class;
  src.serviceType -> tgt.serviceType;
  src.specialty -> tgt.specialty;
  src.appointmentType -> tgt.appointmentType;
  src.reasonCode -> tgt.reason;
  src.description -> tgt.description; // src.priority -> tgt.priority; // unsignedInt -> CodeableConcept.text ??
  src.supportingInformation -> tgt.supportingInformation; // src.replaces -> tgt.replaces;
  src.start -> tgt.start; // src.previousAppointment -> tgt.previousAppointment;
  src.end -> tgt.end;
  src.minutesDuration -> tgt.minutesDuration;
  src.requestedPeriod -> tgt.requestedPeriod;
  src.slot -> tgt.slot;
  src.created -> tgt.created; // src.account -> tgt.account;
  src.comment -> tgt.note; // src.cancellationDate -> tgt.cancellationDate;
  src.patientInstruction -> tgt.patientInstruction;
  src.basedOn -> tgt.basedOn;
  src.participant as s -> tgt.participant as t then AppointmentParticipant(s, t); // src.subject -> tgt.subject;
}

group AppointmentParticipant(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.period -> tgt.period;
  src.actor -> tgt.actor;
  src.required as s where required = 'required' ->  tgt.required as t,  t.value = create('boolean') as c,  c.value = 'true';
  src.required as s where required = 'optional' ->  tgt.required as t,  t.value = create('boolean') as c,  c.value = 'false';
  src.required as s where required = 'information-only' ->  tgt.required as t,  t.value = create('boolean') as c,  c.value = 'false';
  src.status as v -> tgt.status = translate(v, '#ParticipationStatus', 'code');
}