FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cross-version/ and changes regularly. See the Directory of published versions

StructureMap: ReferralRequest Transforms: R3 to R2

Official URL: http://hl7.org/fhir/StructureMap/ReferralRequest3to2 Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: ReferralRequest3to2

ReferralRequestTransformsR3toR2

/// url = 'http://hl7.org/fhir/StructureMap/ReferralRequest3to2'
/// name = 'ReferralRequest3to2'
/// title = 'ReferralRequest Transforms: R3 to R2'
/// status = 'active'

uses "http://hl7.org/fhir/3.0/ReferralRequest" alias ReferralRequest as source
uses "http://hl7.org/fhir/1.0/ReferralRequest" alias ReferralRequestR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

group ReferralRequest(source src : ReferralRequest, target tgt : ReferralRequestR2) extends DomainResource <<type+>> {
  src.status check $this != 'entered-in-error' -> tgt.status "ReferralRequest-status";
  src.identifier -> tgt.identifier "ReferralRequest-identifier";
  src.authoredOn -> tgt.date "ReferralRequest-date";
  src.type -> tgt.type "ReferralRequest-type";
  src.specialty -> tgt.specialty "ReferralRequest-specialty";
  src.priority as v -> tgt.priority = cc('http://hl7.org/fhir/diagnostic-order-priority', v) "ReferralRequest-priority";
  src.subject -> tgt.patient "ReferralRequest-patient";
  src.requester as v then {
    v.agent -> tgt.requester "ReferralRequest-requester-inner";
  } "ReferralRequest-requester";
  src.recipient -> tgt.recipient "ReferralRequest-recipient";
  src.context -> tgt.encounter "ReferralRequest-encounter";
  src.reasonCode -> tgt.reason "ReferralRequest-reason";
  src.description -> tgt.description "ReferralRequest-description";
  src.serviceRequested -> tgt.serviceRequested "ReferralRequest-serviceRequested";
  src.supportingInfo -> tgt.supportingInformation "ReferralRequest-supportingInformation";
  src.occurrence -> tgt.fulfillmentTime "ReferralRequest-fulfillmentTime";
}