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. For a full list of available versions, see the Directory of published versions

Pharmacy 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 MedicationRequest

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

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

conceptmap "MedicationRequestIntent" {
  prefix s = "http://hl7.org/fhir/CodeSystem/medicationrequest-intent"
  prefix t = "http://hl7.org/fhir/4.0/CodeSystem/medicationrequest-intent"

  s:proposal - t:proposal
  s:plan - t:plan
  s:order - t:order
  s:"original-order" - t:"original-order"
  s:"reflex-order" - t:"reflex-order"
  s:"filler-order" - t:"filler-order"
  s:"instance-order" - t:"instance-order"
  s:option - t:option
}

conceptmap "MedicationRequestPriority" {
  prefix s = "http://hl7.org/fhir/request-priority"
  prefix t = "http://hl7.org/fhir/4.0/request-priority"

  s:routine - t:routine
  s:urgent - t:urgent
  s:asap - t:asap
  s:stat - t:stat
}

conceptmap "MedicationRequestStatus" {
  prefix s = "http://hl7.org/fhir/CodeSystem/medicationrequest-status"
  prefix t = "http://hl7.org/fhir/4.0/CodeSystem/medicationrequest-status"

  s:active - t:active
  s:"on-hold" - t:"on-hold"
  s:ended - t:completed
  s:stopped - t:stopped
  s:completed - t:completed
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:draft - t:draft
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/MedicationRequest" alias MedicationRequestR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/MedicationRequest" alias MedicationRequestR4 as target

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

group MedicationRequest(source src : MedicationRequestR5, target tgt : MedicationRequestR4) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.priorPrescription -> tgt.priorPrescription;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.status as v -> tgt.status = translate(v, '#MedicationRequestStatus', 'code');
  src.statusReason -> tgt.statusReason;
  src.intent as v -> tgt.intent = translate(v, '#MedicationRequestIntent', 'code'); // src.statusChanged -> tgt.statusChanged;
  src.category -> tgt.category;
  src.priority as v -> tgt.priority = translate(v, '#MedicationRequestPriority', 'code');
  src.doNotPerform -> tgt.doNotPerform;
  src.medication -> tgt.medication;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter; // src.informationSource -> tgt.informationSource;
  src.supportingInformation -> tgt.supportingInformation;
  src.authoredOn -> tgt.authoredOn;
  src.requester -> tgt.requester;
  src.performerType -> tgt.performerType; // src.reported -> tgt.reported;
  src.performer -> tgt.performer;
  src.recorder -> tgt.recorder; // src.device -> tgt.device;
  src.reason -> tgt.reasonCode;
  src.reason -> tgt.reasonReference;
  src.courseOfTherapyType -> tgt.courseOfTherapyType;
  src.insurance -> tgt.insurance;
  src.note -> tgt.note;
  src.dispenseRequest as s -> tgt.dispenseRequest as t then MedicationRequestDispenseRequest(s, t); // src.renderedDosageInstruction -> tgt.renderedDosageInstruction;
  src.substitution as s -> tgt.substitution as t then MedicationRequestSubstitution(s, t);
  src.eventHistory -> tgt.eventHistory;
}

group MedicationRequestDispenseRequest(source src, target tgt) extends BackboneElement {
  src.initialFill as s -> tgt.initialFill as t then MedicationRequestDispenseRequestInitialFill(s, t);
  src.dispenseInterval -> tgt.dispenseInterval;
  src.validityPeriod -> tgt.validityPeriod;
  src.numberOfRepeatsAllowed -> tgt.numberOfRepeatsAllowed;
  src.quantity -> tgt.quantity;
  src.expectedSupplyDuration -> tgt.expectedSupplyDuration;
  src.dispenser -> tgt.performer;
}

group MedicationRequestDispenseRequestInitialFill(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.duration -> tgt.duration;
}

group MedicationRequestSubstitution(source src, target tgt) extends BackboneElement {
  src.allowed : boolean -> tgt.allowed;
  src.allowed : CodeableConcept -> tgt.allowed;
  src.reason -> tgt.reason;
}

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

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

conceptmap "MedicationRequestIntent" {
  prefix s = "http://hl7.org/fhir/CodeSystem/medicationrequest-intent"
  prefix t = "http://hl7.org/fhir/4.3/CodeSystem/medicationrequest-intent"

  s:proposal - t:proposal
  s:plan - t:plan
  s:order - t:order
  s:"original-order" - t:"original-order"
  s:"reflex-order" - t:"reflex-order"
  s:"filler-order" - t:"filler-order"
  s:"instance-order" - t:"instance-order"
  s:option - t:option
}

conceptmap "MedicationRequestPriority" {
  prefix s = "http://hl7.org/fhir/request-priority"
  prefix t = "http://hl7.org/fhir/4.3/request-priority"

  s:routine - t:routine
  s:urgent - t:urgent
  s:asap - t:asap
  s:stat - t:stat
}

conceptmap "MedicationRequestStatus" {
  prefix s = "http://hl7.org/fhir/CodeSystem/medicationrequest-status"
  prefix t = "http://hl7.org/fhir/4.3/CodeSystem/medicationrequest-status"

  s:active - t:active
  s:"on-hold" - t:"on-hold"
  s:ended - t:completed
  s:stopped - t:stopped
  s:completed - t:completed
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:draft - t:draft
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/StructureDefinition/MedicationRequest" alias MedicationRequestR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/MedicationRequest" alias MedicationRequestR4B as target

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

group MedicationRequest(source src : MedicationRequestR5, target tgt : MedicationRequestR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.priorPrescription -> tgt.priorPrescription;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.status as v -> tgt.status = translate(v, '#MedicationRequestStatus', 'code');
  src.statusReason -> tgt.statusReason;
  src.intent as v -> tgt.intent = translate(v, '#MedicationRequestIntent', 'code'); // src.statusChanged -> tgt.statusChanged;
  src.category -> tgt.category;
  src.priority as v -> tgt.priority = translate(v, '#MedicationRequestPriority', 'code');
  src.doNotPerform -> tgt.doNotPerform;
  src.medication -> tgt.medication;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter; // src.informationSource -> tgt.informationSource;
  src.supportingInformation -> tgt.supportingInformation;
  src.authoredOn -> tgt.authoredOn;
  src.requester -> tgt.requester;
  src.performerType -> tgt.performerType; // src.reported -> tgt.reported;
  src.performer -> tgt.performer;
  src.recorder -> tgt.recorder; // src.device -> tgt.device;
  src.reason -> tgt.reasonCode;
  src.reason -> tgt.reasonReference;
  src.courseOfTherapyType -> tgt.courseOfTherapyType;
  src.insurance -> tgt.insurance;
  src.note -> tgt.note;
  src.dispenseRequest as s -> tgt.dispenseRequest as t then MedicationRequestDispenseRequest(s, t); // src.renderedDosageInstruction -> tgt.renderedDosageInstruction;
  src.substitution as s -> tgt.substitution as t then MedicationRequestSubstitution(s, t);
  src.eventHistory -> tgt.eventHistory;
}

group MedicationRequestDispenseRequest(source src, target tgt) extends BackboneElement {
  src.initialFill as s -> tgt.initialFill as t then MedicationRequestDispenseRequestInitialFill(s, t);
  src.dispenseInterval -> tgt.dispenseInterval;
  src.validityPeriod -> tgt.validityPeriod;
  src.numberOfRepeatsAllowed -> tgt.numberOfRepeatsAllowed;
  src.quantity -> tgt.quantity;
  src.expectedSupplyDuration -> tgt.expectedSupplyDuration;
  src.dispenser -> tgt.performer;
}

group MedicationRequestDispenseRequestInitialFill(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.duration -> tgt.duration;
}

group MedicationRequestSubstitution(source src, target tgt) extends BackboneElement {
  src.allowed : boolean -> tgt.allowed;
  src.allowed : CodeableConcept -> tgt.allowed;
  src.reason -> tgt.reason;
}

Maps from MedicationRequest

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

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

conceptmap "MedicationRequestIntent" {
  prefix s = "http://hl7.org/fhir/4.3/CodeSystem/medicationrequest-intent"
  prefix t = "http://hl7.org/fhir/CodeSystem/medicationrequest-intent"

  s:proposal - t:proposal
  s:plan - t:plan
  s:order - t:order
  s:"original-order" - t:"original-order"
  s:"reflex-order" - t:"reflex-order"
  s:"filler-order" - t:"filler-order"
  s:"instance-order" - t:"instance-order"
  s:option - t:option
}

conceptmap "MedicationRequestPriority" {
  prefix s = "http://hl7.org/fhir/4.3/request-priority"
  prefix t = "http://hl7.org/fhir/request-priority"

  s:routine - t:routine
  s:urgent - t:urgent
  s:asap - t:asap
  s:stat - t:stat
}

conceptmap "MedicationRequestStatus" {
  prefix s = "http://hl7.org/fhir/4.3/CodeSystem/medicationrequest-status"
  prefix t = "http://hl7.org/fhir/CodeSystem/medicationrequest-status"

  s:active - t:active
  s:"on-hold" - t:"on-hold"
  s:stopped - t:stopped
  s:completed - t:completed
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:draft - t:draft
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/MedicationRequest" alias MedicationRequestR4B as source
uses "http://hl7.org/fhir/StructureDefinition/MedicationRequest" alias MedicationRequestR5 as target

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

group MedicationRequest(source src : MedicationRequestR4B, target tgt : MedicationRequestR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.priorPrescription -> tgt.priorPrescription;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.status as v -> tgt.status = translate(v, '#MedicationRequestStatus', 'code');
  src.statusReason -> tgt.statusReason;
  src.intent as v -> tgt.intent = translate(v, '#MedicationRequestIntent', 'code'); // src.statusChanged -> tgt.statusChanged;
  src.category -> tgt.category;
  src.priority as v -> tgt.priority = translate(v, '#MedicationRequestPriority', 'code');
  src.doNotPerform -> tgt.doNotPerform;
  src.medication : CodeableConcept -> tgt.medication;
  src.medication : Reference -> tgt.medication;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter; // src.informationSource -> tgt.informationSource;
  src.supportingInformation -> tgt.supportingInformation;
  src.authoredOn -> tgt.authoredOn;
  src.requester -> tgt.requester;
  src.performerType -> tgt.performerType; // src.reported -> tgt.reported;
  src.performer -> tgt.performer;
  src.recorder -> tgt.recorder; // src.device -> tgt.device;
  src.reasonCode -> tgt.reason;
  src.reasonReference -> tgt.reason;
  src.courseOfTherapyType -> tgt.courseOfTherapyType;
  src.insurance -> tgt.insurance;
  src.note -> tgt.note;
  src.dispenseRequest as s -> tgt.dispenseRequest as t then MedicationRequestDispenseRequest(s, t); // src.renderedDosageInstruction -> tgt.renderedDosageInstruction;
  src.substitution as s -> tgt.substitution as t then MedicationRequestSubstitution(s, t);
  src.eventHistory -> tgt.eventHistory;
}

group MedicationRequestDispenseRequest(source src, target tgt) extends BackboneElement {
  src.initialFill as s -> tgt.initialFill as t then MedicationRequestDispenseRequestInitialFill(s, t);
  src.dispenseInterval -> tgt.dispenseInterval;
  src.validityPeriod -> tgt.validityPeriod;
  src.numberOfRepeatsAllowed -> tgt.numberOfRepeatsAllowed;
  src.quantity -> tgt.quantity;
  src.expectedSupplyDuration -> tgt.expectedSupplyDuration;
  src.performer -> tgt.dispenser;
}

group MedicationRequestDispenseRequestInitialFill(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.duration -> tgt.duration;
}

group MedicationRequestSubstitution(source src, target tgt) extends BackboneElement {
  src.allowed : boolean -> tgt.allowed;
  src.allowed : CodeableConcept -> tgt.allowed;
  src.reason -> tgt.reason;
}

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

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

conceptmap "MedicationRequestIntent" {
  prefix s = "http://hl7.org/fhir/4.0/CodeSystem/medicationrequest-intent"
  prefix t = "http://hl7.org/fhir/CodeSystem/medicationrequest-intent"

  s:proposal - t:proposal
  s:plan - t:plan
  s:order - t:order
  s:"original-order" - t:"original-order"
  s:"reflex-order" - t:"reflex-order"
  s:"filler-order" - t:"filler-order"
  s:"instance-order" - t:"instance-order"
  s:option - t:option
}

conceptmap "MedicationRequestPriority" {
  prefix s = "http://hl7.org/fhir/4.0/request-priority"
  prefix t = "http://hl7.org/fhir/request-priority"

  s:routine - t:routine
  s:urgent - t:urgent
  s:asap - t:asap
  s:stat - t:stat
}

conceptmap "MedicationRequestStatus" {
  prefix s = "http://hl7.org/fhir/4.0/CodeSystem/medicationrequest-status"
  prefix t = "http://hl7.org/fhir/CodeSystem/medicationrequest-status"

  s:active - t:active
  s:"on-hold" - t:"on-hold"
  s:stopped - t:stopped
  s:completed - t:completed
  s:cancelled - t:cancelled
  s:"entered-in-error" - t:"entered-in-error"
  s:draft - t:draft
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/MedicationRequest" alias MedicationRequestR4 as source
uses "http://hl7.org/fhir/StructureDefinition/MedicationRequest" alias MedicationRequestR5 as target

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

group MedicationRequest(source src : MedicationRequestR4, target tgt : MedicationRequestR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.priorPrescription -> tgt.priorPrescription;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.status as v -> tgt.status = translate(v, '#MedicationRequestStatus', 'code');
  src.statusReason -> tgt.statusReason;
  src.intent as v -> tgt.intent = translate(v, '#MedicationRequestIntent', 'code'); // src.statusChanged -> tgt.statusChanged;
  src.category -> tgt.category;
  src.priority as v -> tgt.priority = translate(v, '#MedicationRequestPriority', 'code');
  src.doNotPerform -> tgt.doNotPerform;
  src.medication : CodeableConcept -> tgt.medication;
  src.medication : Reference -> tgt.medication;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter; // src.informationSource -> tgt.informationSource;
  src.supportingInformation -> tgt.supportingInformation;
  src.authoredOn -> tgt.authoredOn;
  src.requester -> tgt.requester;
  src.performerType -> tgt.performerType; // src.reported -> tgt.reported;
  src.performer -> tgt.performer;
  src.recorder -> tgt.recorder; // src.device -> tgt.device;
  src.reasonCode -> tgt.reason;
  src.reasonReference -> tgt.reason;
  src.courseOfTherapyType -> tgt.courseOfTherapyType;
  src.insurance -> tgt.insurance;
  src.note -> tgt.note;
  src.dispenseRequest as s -> tgt.dispenseRequest as t then MedicationRequestDispenseRequest(s, t); // src.renderedDosageInstruction -> tgt.renderedDosageInstruction;
  src.substitution as s -> tgt.substitution as t then MedicationRequestSubstitution(s, t);
  src.eventHistory -> tgt.eventHistory;
}

group MedicationRequestDispenseRequest(source src, target tgt) extends BackboneElement {
  src.initialFill as s -> tgt.initialFill as t then MedicationRequestDispenseRequestInitialFill(s, t);
  src.dispenseInterval -> tgt.dispenseInterval;
  src.validityPeriod -> tgt.validityPeriod;
  src.numberOfRepeatsAllowed -> tgt.numberOfRepeatsAllowed;
  src.quantity -> tgt.quantity;
  src.expectedSupplyDuration -> tgt.expectedSupplyDuration;
  src.performer -> tgt.dispenser;
}

group MedicationRequestDispenseRequestInitialFill(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.duration -> tgt.duration;
}

group MedicationRequestSubstitution(source src, target tgt) extends BackboneElement {
  src.allowed : boolean -> tgt.allowed;
  src.allowed : CodeableConcept -> tgt.allowed;
  src.reason -> tgt.reason;
}