profile-ServiceRequest-for-ReferralRequest
type: StructureDefinition
node role: treeRoot
id:
  v: profile-ServiceRequest-for-ReferralRequest
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition profile-ServiceRequest-for-ReferralRequest Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> ReferralRequest 0..* ReferralRequest A request for referral or transfer of care #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:instantiatesUri 0..* uri R5: Instantiates external protocol or definition (new) URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesUri #xD; extension:code 0..1 Reference(Cross-version Profile for R5.ActivityDefinition for use in FHIR STU3(0.1.0) | ActivityDefinition | Cross-version Profile for R5.PlanDefinition for use in FHIR STU3(0.1.0) | PlanDefinition) R5: What is being requested/ordered additional types URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.code #xD; extension:quantity 0..1 Quantity, Ratio, Range R5: Service amount (new) URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.quantity #xD; extension:focus 0..* Reference(Cross-version Profile for R5.Resource for use in FHIR STU3(0.1.0) | Resource) R5: What the service request is about, when it is not about the subject of record (new) URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.focus #xD; extension:location 0..* (Complex) R5: Requested location (new) URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.location #xD; extension:reason 0..* (Complex) R5: Explanation/Justification for procedure or service additional types URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.reason #xD; extension:insurance 0..* Reference(Cross-version Profile for R5.Coverage for use in FHIR STU3(0.1.0) | Coverage | Cross-version Profile for R5.ClaimResponse for use in FHIR STU3(0.1.0) | ClaimResponse) R5: Associated insurance coverage (new) URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-Servi…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
    l: structuredefinition-wg
  value: Code
    v: fhir
extension:
  extension:
    url:
      v: packageId
      l: packageId
    value: Id
      v: hl7.fhir.uv.xver-r5.r3
  extension:
    url:
      v: version
      l: version
    value: String
      v: 0.1.0
  url:
    v: http://hl7.org/fhir/StructureDefinition/package-source
    l: package-source
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
    l: structuredefinition-fmm
  value: Integer
    v: 0
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
        l: structuredefinition-conformance-derivedFrom
      value: Uri
        v: http://hl7.org/fhir/uv/xver/ImplementationGuide/hl7.fhir.uv.xver-r5.r3
        l: hl7.fhir.uv.xver-r5.r3
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: trial-use
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
        l: structuredefinition-conformance-derivedFrom
      value: Uri
        v: http://hl7.org/fhir/uv/xver/ImplementationGuide/hl7.fhir.uv.xver-r5.r3
        l: hl7.fhir.uv.xver-r5.r3
url:
  v: http://hl7.org/fhir/5.0/StructureDefinition/profile-ServiceRequest-for-ReferralRequest
  l: profile-ServiceRequest-for-ReferralRequest
version:
  v: 0.1.0
name:
  v: Profile_R5_ServiceRequest_R3_ReferralRequest
title:
  v: Cross-version Profile for R5.ServiceRequest for use in FHIR STU3
status:
  v: active
experimental:
  v: false
date:
  v: 2026-03-17T16:05:13.1478903-05:00
publisher:
  v: FHIR Infrastructure
contact:
  name:
    v: FHIR Infrastructure
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fiwg
description:
  v: This cross-version profile allows R5 ServiceRequest content to be represented via FHIR STU3 ReferralRequest resources.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
    display:
      v: World
fhir version:
  v: 3.0.2
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/w5
    l: w5
  name:
    v: W5 Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
    l: v2
  name:
    v: HL7 v2 Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: ReferralRequest
base definition:
  v: http://hl7.org/fhir/StructureDefinition/ReferralRequest
  l: ReferralRequest
derivation:
  v: constraint
snapshot:
  element:
    id:
      v: ReferralRequest
    path:
      v: ReferralRequest
    short:
      v: A request for referral or transfer of care
    definition:
      v: Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.
    alias:
      v: ReferralRequest TransferOfCare Request
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: ReferralRequest
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-1
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain any narrative
      expression:
        v: contained.text.empty()
      xpath:
        v: not(parent::f:contained and f:text)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource
      expression:
        v: contained.where(('#'+id in %resource.descendants().reference).not()).empty()

v: not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))

identity:
  v: rim
map:
  v: Entity. Role, or Act

identity:
  v: w5
map:
  v: clinical.careprovision

id:
  v: ReferralRequest.id
path:
  v: ReferralRequest.id
short:
  v: Logical id of this artifact
definition:
  v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
comment:
  v: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: id
    l: id
is summary:
  v: true

id:
  v: ReferralRequest.meta
path:
  v: ReferralRequest.meta
short:
  v: Metadata about the resource
definition:
  v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
    l: Meta
is summary:
  v: true

id:
  v: ReferralRequest.implicitRules
path:
  v: ReferralRequest.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.
comment:
  v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
is modifier:
  v: true
is summary:
  v: true

id:
  v: ReferralRequest.language
path:
  v: ReferralRequest.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
      l: elementdefinition-maxValueSet
    value: Reference
      l: 3.0
      l: .2
      reference:
        v: http://hl7.org/fhir/ValueSet/all-languages|3.0.2
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: extensible
  description:
    v: A human language.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/languages|3.0.2

id:
  v: ReferralRequest.text
path:
  v: ReferralRequest.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
comment:
  v: Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded in formation is added later.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
condition:
  v: dom-1
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: ReferralRequest.contained
path:
  v: ReferralRequest.contained
short:
  v: Contained, inline Resources
definition:
  v: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
comment:
  v: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.extension
path:
  v: ReferralRequest.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.extension:instantiatesUri
path:
  v: ReferralRequest.extension
slice name:
  v: instantiatesUri
short:
  v: R5: Instantiates external protocol or definition (new)
definition:
  v: R5: `ServiceRequest.instantiatesUri` (new:uri)
comment:
  v: Element `ServiceRequest.instantiatesUri` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.instantiatesUri` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.instantiatesUri` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element). This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesUri|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesUri
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:code
path:
  v: ReferralRequest.extension
slice name:
  v: code
short:
  v: R5: What is being requested/ordered additional types
definition:
  v: R5: `ServiceRequest.code` additional types (CodeableReference(http://hl7.org/fhir/StructureDefinition/ActivityDefinition), CodeableReference(http://hl7.org/fhir/StructureDefinition/PlanDefinition)) additional types from child elements (reference)
comment:
  v: Element `ServiceRequest.code` is mapped to FHIR STU3 element `ProcedureRequest.code` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.code` is mapped to FHIR STU3 element `ReferralRequest.type` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.code` is mapped to FHIR STU3 element `ReferralRequest.serviceRequested` as `RelatedTo`. The mappings for `ServiceRequest.code` do not cover the following types: CodeableReference. The mappings for `ServiceRequest.code` do not cover the following types based on type expansion: reference. Many laboratory and radiology procedure codes embed the specimen/organ system in the test order name, for example, serum or serum/plasma glucose, or a chest x-ray. The specimen might not be recorded separately from the test code.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.code|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.code
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:quantity
path:
  v: ReferralRequest.extension
slice name:
  v: quantity
short:
  v: R5: Service amount (new)
definition:
  v: R5: `ServiceRequest.quantity[x]` (new:Quantity, Range, Ratio)
comment:
  v: Element `ServiceRequest.quantity[x]` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.quantity[x]` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.quantity[x]` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.quantity|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.quantity
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:focus
path:
  v: ReferralRequest.extension
slice name:
  v: focus
short:
  v: R5: What the service request is about, when it is not about the subject of record (new)
definition:
  v: R5: `ServiceRequest.focus` (new:Reference(Resource))
comment:
  v: Element `ServiceRequest.focus` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.focus` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.focus` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.focus|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.focus
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:location
path:
  v: ReferralRequest.extension
slice name:
  v: location
short:
  v: R5: Requested location (new)
definition:
  v: R5: `ServiceRequest.location` (new:CodeableReference(Location))
comment:
  v: Element `ServiceRequest.location` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.location` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.location` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.location|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.location
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:reason
path:
  v: ReferralRequest.extension
slice name:
  v: reason
short:
  v: R5: Explanation/Justification for procedure or service additional types
definition:
  v: R5: `ServiceRequest.reason` additional types (CodeableReference(http://hl7.org/fhir/StructureDefinition/Condition), CodeableReference(http://hl7.org/fhir/StructureDefinition/Observation), CodeableReference(http://hl7.org/fhir/StructureDefinition/DiagnosticReport), CodeableReference(http://hl7.org/fhir/StructureDefinition/DocumentReference), CodeableReference(http://hl7.org/fhir/StructureDefinition/DetectedIssue))
comment:
  v: Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ProcedureRequest.reasonCode` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ProcedureRequest.reasonReference` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ReferralRequest.reasonCode` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ReferralRequest.reasonReference` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.reason` do not cover the following types: CodeableReference. This element represents why the referral is being made and may be used to decide how the service will be performed, or even if it will be performed at all. To be as specific as possible, a reference to *Observation* or *Condition* should be used if available. Otherwise, use `concept.text` element if the data is free (uncoded) text as shown in the [CT Scan example](https://hl7.org/fhir/servicerequest-example-di.html).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.reason|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.reason
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:insurance
path:
  v: ReferralRequest.extension
slice name:
  v: insurance
short:
  v: R5: Associated insurance coverage (new)
definition:
  v: R5: `ServiceRequest.insurance` (new:Reference(Coverage,ClaimResponse))
comment:
  v: Element `ServiceRequest.insurance` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.insurance` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.insurance` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.insurance|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.insurance
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.extension:bodyStructure
path:
  v: ReferralRequest.extension
slice name:
  v: bodyStructure
short:
  v: R5: BodyStructure-based location on the body (new)
definition:
  v: R5: `ServiceRequest.bodyStructure` (new:Reference(BodyStructure))
comment:
  v: Element `ServiceRequest.bodyStructure` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.bodyStructure` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.bodyStructure` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element). An externally-defined extension that has been mapped as the representation of FHIR R5 element `ServiceRequest.bodyStructure`: `http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure`.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure
    l: procedure-targetBodyStructure

id:
  v: ReferralRequest.extension:patientInstruction
path:
  v: ReferralRequest.extension
slice name:
  v: patientInstruction
short:
  v: R5: Patient or consumer-oriented instructions (new)
definition:
  v: R5: `ServiceRequest.patientInstruction` (new:BackboneElement)
comment:
  v: Element `ServiceRequest.patientInstruction` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.patientInstruction` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.patientInstruction` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.patientInstruction|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.patientInstruction
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.modifierExtension
path:
  v: ReferralRequest.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.identifier
path:
  v: ReferralRequest.identifier
short:
  v: Business identifier
definition:
  v: Business identifier that uniquely identifies the referral/care transfer request instance.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RF1-6 / RF1-11
mapping:
  identity:
    v: w5
  map:
    v: id

id:
  v: ReferralRequest.definition
path:
  v: ReferralRequest.definition
short:
  v: Instantiates protocol or definition
definition:
  v: A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.definition
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ActivityDefinition
    l: ActivityDefinition
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PlanDefinition
    l: PlanDefinition
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=DEFN].target

id:
  v: ReferralRequest.definition.id
path:
  v: ReferralRequest.definition.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.definition.extension
path:
  v: ReferralRequest.definition.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.definition.extension:instantiatesCanonical
path:
  v: ReferralRequest.definition.extension
slice name:
  v: instantiatesCanonical
short:
  v: R5: Instantiates FHIR protocol or definition additional types
definition:
  v: R5: `ServiceRequest.instantiatesCanonical` additional types (canonical(http://hl7.org/fhir/StructureDefinition/ActivityDefinition), canonical(http://hl7.org/fhir/StructureDefinition/PlanDefinition)) additional types from child elements (value)
comment:
  v: Element `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ProcedureRequest.definition` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ReferralRequest.definition` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types: canonical. The mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types based on type expansion: value. The PlanDefinition resource is used to describe series, sequences, or groups of actions to be taken, while the ActivityDefinition resource is used to define each specific step or activity to be performed. More information can be found in the [Boundaries and Relationships](https://hl7.org/fhir/plandefi.html#12.23.2) section for PlanDefinition.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical

id:
  v: ReferralRequest.definition.reference
path:
  v: ReferralRequest.definition.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.definition.identifier
path:
  v: ReferralRequest.definition.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.definition.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.definition.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.basedOn
path:
  v: ReferralRequest.basedOn
short:
  v: Request fulfilled by this request
definition:
  v: Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.
alias:
  v: fulfills
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.basedOn
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ReferralRequest
    l: ReferralRequest
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CarePlan
    l: CarePlan
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ProcedureRequest
    l: ProcedureRequest
is modifier:
  v: false
is summary:
  v: true

id:
  v: ReferralRequest.basedOn.id
path:
  v: ReferralRequest.basedOn.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.basedOn.extension
path:
  v: ReferralRequest.basedOn.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.basedOn.extension:basedOn
path:
  v: ReferralRequest.basedOn.extension
slice name:
  v: basedOn
short:
  v: R5: What request fulfills
definition:
  v: R5: `ServiceRequest.basedOn`
comment:
  v: Element `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ProcedureRequest.basedOn` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ReferralRequest.basedOn` as `SourceIsBroaderThanTarget`. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.basedOn` with unmapped reference targets: CarePlan, MedicationRequest, ServiceRequest.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.basedOn.reference
path:
  v: ReferralRequest.basedOn.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.basedOn.identifier
path:
  v: ReferralRequest.basedOn.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.basedOn.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.basedOn.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.replaces
path:
  v: ReferralRequest.replaces
short:
  v: Request(s) replaced by this request
definition:
  v: Completed or terminated request(s) whose function is taken by this new request.
comment:
  v: The replacement could be because the initial request was immediately rejected (due to an issue) or because the previous request was completed, but the need for the action described by the request remains ongoing.
requirements:
  v: Allows tracing the continuation of a therapy or administrative process instantiated through multiple requests.
alias:
  v: supersedes
alias:
  v: prior
alias:
  v: renewed order
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.replaces
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ReferralRequest
    l: ReferralRequest
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=RPLC].target

id:
  v: ReferralRequest.replaces.id
path:
  v: ReferralRequest.replaces.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.replaces.extension
path:
  v: ReferralRequest.replaces.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.replaces.extension:replaces
path:
  v: ReferralRequest.replaces.extension
slice name:
  v: replaces
short:
  v: R5: What request replaces additional types
definition:
  v: R5: `ServiceRequest.replaces` additional types from child elements (display, identifier, reference, type)
comment:
  v: Element `ServiceRequest.replaces` is mapped to FHIR STU3 element `ProcedureRequest.replaces` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.replaces` is mapped to FHIR STU3 element `ReferralRequest.replaces` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.replaces` do not cover the following types based on type expansion: display, identifier, reference, type. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.replaces` with unmapped reference targets: ServiceRequest.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.replaces.reference
path:
  v: ReferralRequest.replaces.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.replaces.identifier
path:
  v: ReferralRequest.replaces.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.replaces.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.replaces.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.groupIdentifier
path:
  v: ReferralRequest.groupIdentifier
short:
  v: Composite request this is part of
definition:
  v: The business identifier of the logical "grouping" request/order that this referral is a part of.
requirements:
  v: Allows multiple orders to be collected as part of a single requisition.
alias:
  v: grouperId
alias:
  v: requisition
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.groupIdentifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is modifier:
  v: false
is summary:
  v: true

id:
  v: ReferralRequest.status
path:
  v: ReferralRequest.status
short:
  v: draft | active | suspended | cancelled | completed | entered-in-error | unknown
definition:
  v: The status of the authorization/intention reflected by the referral request record.
comment:
  v: This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.
requirements:
  v: Workflow status is handled by the Task resource.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: ReferralRequest.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is modifier:
  v: true
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ReferralRequestStatus
  strength:
    v: required
  description:
    v: The status of the referral.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/request-status|3.0.2
mapping:
  identity:
    v: v2
  map:
    v: RF1-1
mapping:
  identity:
    v: w5
  map:
    v: status

id:
  v: ReferralRequest.intent
path:
  v: ReferralRequest.intent
short:
  v: proposal | plan | order
definition:
  v: Distinguishes the "level" of authorization/demand implicit in this request.
requirements:
  v: The same resource structure is used when capturing proposals/recommendations, plans and actual requests.
alias:
  v: category
min:
  v: 1
max:
  v: 1
base:
  path:
    v: ReferralRequest.intent
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is modifier:
  v: true
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ReferralCategory
  strength:
    v: required
  description:
    v: Codes identifying the stage lifecycle stage of a request
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/request-intent|3.0.2
mapping:
  identity:
    v: w5
  map:
    v: class

id:
  v: ReferralRequest.intent.id
path:
  v: ReferralRequest.intent.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references)
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string

id:
  v: ReferralRequest.intent.extension
path:
  v: ReferralRequest.intent.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.intent.extension:intent
path:
  v: ReferralRequest.intent.extension
slice name:
  v: intent
short:
  v: R5: proposal | plan | directive | order +
definition:
  v: R5: `ServiceRequest.intent`
comment:
  v: Element `ServiceRequest.intent` is mapped to FHIR STU3 element `ProcedureRequest.intent` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.intent` is mapped to FHIR STU3 element `ReferralRequest.intent` as `SourceIsBroaderThanTarget`. The target context `ProcedureRequest.intent` is a modifier element, so this extension does not need to be defined as a modifier. This element is labeled as a modifier because the intent alters when and how the resource is actually applicable.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.intent|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.intent
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false

id:
  v: ReferralRequest.intent.value
path:
  v: ReferralRequest.intent.value
representation:
  v: xmlAttr
short:
  v: Primitive value for code
definition:
  v: Primitive value for code
min:
  v: 0
max:
  v: 1
base:
  path:
    v: string.value
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-regex
      l: structuredefinition-regex
    value: String
      v: [^\s]+([\s]?[^\s]+)*
  code:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type
        l: structuredefinition-json-type
      value: String
        v: string
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type
        l: structuredefinition-xml-type
      value: String
        v: xsd:token
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-rdf-type
        l: structuredefinition-rdf-type
      value: String
        v: xsd:token

id:
  v: ReferralRequest.type
path:
  v: ReferralRequest.type
short:
  v: Referral/Transition of care request type
definition:
  v: An indication of the type of referral (or where applicable the type of transfer of care) request.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ReferralType
  strength:
    v: example
  description:
    v: Codes for types of referral; e.g. consult, transfer, temporary transfer.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/referral-type|3.0.2
mapping:
  identity:
    v: v2
  map:
    v: RF1-10
mapping:
  identity:
    v: w5
  map:
    v: class

id:
  v: ReferralRequest.priority
path:
  v: ReferralRequest.priority
short:
  v: Urgency of referral / transfer of care request
definition:
  v: An indication of the urgency of referral (or where applicable the type of transfer of care) request.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.priority
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ReferralPriority
  strength:
    v: required
  description:
    v: Codes indicating the relative priority of the referral.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/request-priority|3.0.2
mapping:
  identity:
    v: v2
  map:
    v: RF1-2
mapping:
  identity:
    v: w5
  map:
    v: grade

id:
  v: ReferralRequest.serviceRequested
path:
  v: ReferralRequest.serviceRequested
short:
  v: Actions requested as part of the referral
definition:
  v: The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.serviceRequested
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: RequestedService
  strength:
    v: example
  description:
    v: Codes indicating the types of services that might be requested as part of a referral.
  value set: Reference
    l: 20091109
    reference:
      v: http://hl7.org/fhir/ValueSet/c80-practice-codes|20091109
mapping:
  identity:
    v: v2
  map:
    v: PR1-3 / OBR-4
mapping:
  identity:
    v: w5
  map:
    v: what

id:
  v: ReferralRequest.serviceRequested.id
path:
  v: ReferralRequest.serviceRequested.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.serviceRequested.extension
path:
  v: ReferralRequest.serviceRequested.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 1
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.serviceRequested.extension:parameterFocus
path:
  v: ReferralRequest.serviceRequested.extension
slice name:
  v: parameterFocus
short:
  v: R5: The context of the order details by reference (new)
definition:
  v: R5: `ServiceRequest.orderDetail.parameterFocus` (new:CodeableReference(Device,DeviceDefinition,DeviceRequest,SupplyRequest,Medication,MedicationRequest,BiologicallyDerivedProduct,Substance))
comment:
  v: Element `ServiceRequest.orderDetail.parameterFocus` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.orderDetail.parameterFocus` has a context of ReferralRequest.serviceRequested based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.orderDetail.parameterFocus` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameterFocus|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameterFocus

id:
  v: ReferralRequest.serviceRequested.extension:parameter
path:
  v: ReferralRequest.serviceRequested.extension
slice name:
  v: parameter
short:
  v: R5: The parameter details for the service being requested (new)
definition:
  v: R5: `ServiceRequest.orderDetail.parameter` (new:BackboneElement)
comment:
  v: Element `ServiceRequest.orderDetail.parameter` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.orderDetail.parameter` has a context of ReferralRequest.serviceRequested based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.orderDetail.parameter` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 1
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameter|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameter

id:
  v: ReferralRequest.serviceRequested.coding
path:
  v: ReferralRequest.serviceRequested.coding
short:
  v: Code defined by a terminology system
definition:
  v: A reference to a code defined by a terminology system.
comment:
  v: Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
requirements:
  v: Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: ReferralRequest.serviceRequested.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.serviceRequested.text
short:
  v: Plain text representation of the concept
definition:
  v: A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
comment:
  v: Very often the text is the same as a displayName of one of the codings.
requirements:
  v: The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CodeableConcept.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.9. But note many systems use C*E.2 for this
mapping:
  identity:
    v: rim
  map:
    v: ./originalText[mediaType/code="text/plain"]/data
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

id:
  v: ReferralRequest.subject
path:
  v: ReferralRequest.subject
short:
  v: Patient referred to care or transfer
definition:
  v: The patient who is the subject of a referral or transfer of care request.
comment:
  v: Referral of family, group or community is to be catered for by profiles.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: ReferralRequest.subject
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    l: Group
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: PID-3
mapping:
  identity:
    v: w5
  map:
    v: who.focus

id:
  v: ReferralRequest.subject.id
path:
  v: ReferralRequest.subject.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.subject.extension
path:
  v: ReferralRequest.subject.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.subject.extension:subject
path:
  v: ReferralRequest.subject.extension
slice name:
  v: subject
short:
  v: R5: Individual or Entity the service is ordered for
definition:
  v: R5: `ServiceRequest.subject`
comment:
  v: Element `ServiceRequest.subject` is mapped to FHIR STU3 element `ProcedureRequest.subject` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.subject` is mapped to FHIR STU3 element `ReferralRequest.subject` as `SourceIsBroaderThanTarget`. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.subject` with unmapped reference targets: Device, Group, Location, Patient.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.subject.reference
path:
  v: ReferralRequest.subject.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.subject.identifier
path:
  v: ReferralRequest.subject.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.subject.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.subject.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.context
path:
  v: ReferralRequest.context
short:
  v: Originating encounter
definition:
  v: The encounter at which the request for referral or transfer of care is initiated.
alias:
  v: encounter
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.context
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Encounter
    l: Encounter
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
    l: EpisodeOfCare
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: PV1-19
mapping:
  identity:
    v: w5
  map:
    v: context

id:
  v: ReferralRequest.context.id
path:
  v: ReferralRequest.context.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.context.extension
path:
  v: ReferralRequest.context.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.context.extension:encounter
path:
  v: ReferralRequest.context.extension
slice name:
  v: encounter
short:
  v: R5: Encounter in which the request was created additional types
definition:
  v: R5: `ServiceRequest.encounter` additional types from child elements (display, identifier, reference, type)
comment:
  v: Element `ServiceRequest.encounter` is mapped to FHIR STU3 element `ProcedureRequest.context` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.encounter` is mapped to FHIR STU3 element `ReferralRequest.context` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.encounter` do not cover the following types based on type expansion: display, identifier, reference, type. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.encounter` with unmapped reference targets: Encounter.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.context.reference
path:
  v: ReferralRequest.context.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.context.identifier
path:
  v: ReferralRequest.context.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.context.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.context.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.occurrence[x]
path:
  v: ReferralRequest.occurrence[x]
short:
  v: When the service(s) requested in the referral should occur
definition:
  v: The period of time within which the services identified in the referral/transfer of care is specified or required to occur.
comment:
  v: When the occurrenceDateTime is used, then it is indicating that the requested service must happen before the specified date.
requirements:
  v: Use cases: (1) to indicate that the requested service is not to happen before a specified date, and saving the start date in Period.start; (2) to indicate that the requested service must happen before a specified date, and saving the end date in Period.end; (3) to indicate that the requested service must happen during the specified dates ("start" and "end" values).
alias:
  v: timing
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.occurrence[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
type:
  code:
    v: Period
    l: Period
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: OBR-7/OBR-8
mapping:
  identity:
    v: w5
  map:
    v: when.planned

id:
  v: ReferralRequest.authoredOn
path:
  v: ReferralRequest.authoredOn
short:
  v: Date of creation/activation
definition:
  v: Date/DateTime of creation for draft requests and date of activation for active requests.
alias:
  v: createdOn
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.authoredOn
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RF1-7 / RF1-9?
mapping:
  identity:
    v: w5
  map:
    v: when.recorded

id:
  v: ReferralRequest.requester
path:
  v: ReferralRequest.requester
short:
  v: Who/what is requesting service
definition:
  v: The individual who initiated the request and has responsibility for its activation.
alias:
  v: author
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.requester
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() | (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: rfr-1
  severity:
    v: error
  human:
    v: onBehalfOf can only be specified if agent is practitioner or device
  expression:
    v: (agent.resolve() is Device) or (agent.resolve() is Practitioner) or onBehalfOf.exists().not()
  xpath:
    v: contains(f:agent/f:reference/@value, '/Practitioner/') or contains(f:agent/f:reference/@value, '/Device/') or not(exists(f:onBehalfOf))
  source:
    v: http://hl7.org/fhir/StructureDefinition/ReferralRequest
    l: ReferralRequest
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=AUT].role

id:
  v: ReferralRequest.requester.id
path:
  v: ReferralRequest.requester.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.requester.extension
path:
  v: ReferralRequest.requester.extension
short:
  v: Additional Content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.requester.modifierExtension
path:
  v: ReferralRequest.requester.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
is modifier:
  v: true
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.requester.agent
path:
  v: ReferralRequest.requester.agent
short:
  v: Individual making the request
definition:
  v: The device, practitioner, etc. who initiated the request.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: ReferralRequest.requester.agent
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    l: Practitioner
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    l: RelatedPerson
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    l: Device
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .player
mapping:
  identity:
    v: w5
  map:
    v: who.author

id:
  v: ReferralRequest.requester.onBehalfOf
path:
  v: ReferralRequest.requester.onBehalfOf
short:
  v: Organization agent is acting for
definition:
  v: The organization the device or practitioner was acting on behalf of.
requirements:
  v: Practitioners and Devices can be associated with multiple organizations. This element indicates which organization they were acting on behalf of when authoring the request.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.requester.onBehalfOf
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
condition:
  v: rfr-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .scoper

id:
  v: ReferralRequest.specialty
path:
  v: ReferralRequest.specialty
short:
  v: The clinical specialty (discipline) that the referral is requested for
definition:
  v: Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.specialty
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is modifier:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ReferralSpecialty
  strength:
    v: example
  description:
    v: Codes indicating the types of capability the referred to service provider must have.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/practitioner-specialty|3.0.2
mapping:
  identity:
    v: v2
  map:
    v: RF1-3

id:
  v: ReferralRequest.recipient
path:
  v: ReferralRequest.recipient
short:
  v: Receiver of referral / transfer of care request
definition:
  v: The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.
comment:
  v: There will be a primary receiver. But the request can be received by any number of "copied to" providers or organizations.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.recipient
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    l: Practitioner
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/HealthcareService
    l: HealthcareService
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: Practitioner: PRD-2/PRD-7 where PRD-3 = RT; Organization: PRD-10 where PRD-3 = RT
mapping:
  identity:
    v: w5
  map:
    v: who.actor

id:
  v: ReferralRequest.recipient.id
path:
  v: ReferralRequest.recipient.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.recipient.extension
path:
  v: ReferralRequest.recipient.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.recipient.extension:performer
path:
  v: ReferralRequest.recipient.extension
slice name:
  v: performer
short:
  v: R5: Requested performer
definition:
  v: R5: `ServiceRequest.performer`
comment:
  v: Element `ServiceRequest.performer` is mapped to FHIR STU3 element `ProcedureRequest.performer` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.performer` is mapped to FHIR STU3 element `ReferralRequest.recipient` as `SourceIsBroaderThanTarget`. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.performer` with unmapped reference targets: CareTeam, Device, HealthcareService, Organization, Patient, Practitioner, PractitionerRole, RelatedPerson. If multiple performers are present, it is interpreted as a list of *alternative* performers without any preference regardless of order. If order of preference is needed use the [http://hl7.org/fhir/StructureDefinition/request-performerOrder](http://hl7.org/fhir/extensions/StructureDefinition-request-performerOrder.html). Use CareTeam to represent a group of performers (for example, Practitioner A *and* Practitioner B).
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.recipient.reference
path:
  v: ReferralRequest.recipient.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.recipient.identifier
path:
  v: ReferralRequest.recipient.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.recipient.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.recipient.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.reasonCode
path:
  v: ReferralRequest.reasonCode
short:
  v: Reason for referral / transfer of care request
definition:
  v: Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.reasonCode
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ReferralReason
  strength:
    v: example
  description:
    v: Codes indicating why the referral is being requested.
  value set: Reference
    l: 3.0
    l: .2
    reference:
      v: http://hl7.org/fhir/ValueSet/clinical-findings|3.0.2
mapping:
  identity:
    v: v2
  map:
    v: RF1-10
mapping:
  identity:
    v: w5
  map:
    v: why

id:
  v: ReferralRequest.reasonReference
path:
  v: ReferralRequest.reasonReference
short:
  v: Why is service needed?
definition:
  v: Indicates another resource whose existence justifies this request.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.reasonReference
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Condition
    l: Condition
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation
    l: Observation
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=RSON].target
mapping:
  identity:
    v: w5
  map:
    v: why

id:
  v: ReferralRequest.description
path:
  v: ReferralRequest.description
short:
  v: A textual description of the referral
definition:
  v: The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: ReferralRequest.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is modifier:
  v: false

id:
  v: ReferralRequest.supportingInfo
path:
  v: ReferralRequest.supportingInfo
short:
  v: Additonal information to support referral or transfer of care request
definition:
  v: Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.supportingInfo
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    l: Resource
is modifier:
  v: false

id:
  v: ReferralRequest.supportingInfo.id
path:
  v: ReferralRequest.supportingInfo.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.supportingInfo.extension
path:
  v: ReferralRequest.supportingInfo.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.supportingInfo.extension:supportingInfo
path:
  v: ReferralRequest.supportingInfo.extension
slice name:
  v: supportingInfo
short:
  v: R5: Additional clinical information additional types
definition:
  v: R5: `ServiceRequest.supportingInfo` additional types (CodeableReference(http://hl7.org/fhir/StructureDefinition/Resource)) additional types from child elements (concept)
comment:
  v: Element `ServiceRequest.supportingInfo` is mapped to FHIR STU3 element `ProcedureRequest.supportingInfo` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.supportingInfo` is mapped to FHIR STU3 element `ReferralRequest.supportingInfo` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.supportingInfo` do not cover the following types: CodeableReference. The mappings for `ServiceRequest.supportingInfo` do not cover the following types based on type expansion: concept. To represent information about how the services are to be delivered use the `instructions` element.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.supportingInfo|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.supportingInfo

id:
  v: ReferralRequest.supportingInfo.reference
path:
  v: ReferralRequest.supportingInfo.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.supportingInfo.identifier
path:
  v: ReferralRequest.supportingInfo.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.supportingInfo.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.supportingInfo.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.note
path:
  v: ReferralRequest.note
short:
  v: Comments made about referral request
definition:
  v: Comments made about the referral request by any of the participants.
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.note
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Annotation
    l: Annotation

id:
  v: ReferralRequest.relevantHistory
path:
  v: ReferralRequest.relevantHistory
short:
  v: Key events in history of request
definition:
  v: Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.
comment:
  v: This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed. The Provenance for the current version can be retrieved with a _revinclude.
alias:
  v: eventHistory
min:
  v: 0
max:
  v: *
base:
  path:
    v: ReferralRequest.relevantHistory
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Provenance
    l: Provenance
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]

id:
  v: ReferralRequest.relevantHistory.id
path:
  v: ReferralRequest.relevantHistory.id
representation:
  v: xmlAttr
short:
  v: xml:id (or equivalent in JSON)
definition:
  v: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: ReferralRequest.relevantHistory.extension
path:
  v: ReferralRequest.relevantHistory.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension

id:
  v: ReferralRequest.relevantHistory.extension:relevantHistory
path:
  v: ReferralRequest.relevantHistory.extension
slice name:
  v: relevantHistory
short:
  v: R5: Request provenance additional types
definition:
  v: R5: `ServiceRequest.relevantHistory` additional types from child elements (display, identifier, reference, type)
comment:
  v: Element `ServiceRequest.relevantHistory` is mapped to FHIR STU3 element `ProcedureRequest.relevantHistory` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.relevantHistory` is mapped to FHIR STU3 element `ReferralRequest.relevantHistory` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.relevantHistory` do not cover the following types based on type expansion: display, identifier, reference, type. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.relevantHistory` with unmapped reference targets: Provenance. This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the Provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the Provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.relevantHistory.reference
path:
  v: ReferralRequest.relevantHistory.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: ref-1
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: ReferralRequest.relevantHistory.identifier
path:
  v: ReferralRequest.relevantHistory.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: ReferralRequest.relevantHistory.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: ReferralRequest.relevantHistory.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

element:
  id:
    v: ReferralRequest
  path:
    v: ReferralRequest
element:
  id:
    v: ReferralRequest.extension
  path:
    v: ReferralRequest.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 0
  max:
    v: *
element:
  id:
    v: ReferralRequest.extension:instantiatesUri
  path:
    v: ReferralRequest.extension
  slice name:
    v: instantiatesUri
  short:
    v: R5: Instantiates external protocol or definition (new)
  definition:
    v: R5: `ServiceRequest.instantiatesUri` (new:uri)
  comment:
    v: Element `ServiceRequest.instantiatesUri` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.instantiatesUri` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.instantiatesUri` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element). This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier.
  min:
    v: 0
  max:
    v: *
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesUri|0.1.0
      l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesUri
element:
  id:
    v: ReferralRequest.extension:code
  path:
    v: ReferralRequest.extension
  slice name:
    v: code
  short:
    v: R5: What is being requested/ordered additional types
  definition:
    v: R5: `ServiceRequest.code` additional types (CodeableReference(http://hl7.org/fhir/StructureDefinition/ActivityDefinition), CodeableReference(http://hl7.org/fhir/StructureDefinition/PlanDefinition)) additional types from child elements (reference)
  comment:
    v: Element `ServiceRequest.code` is mapped to FHIR STU3 element `ProcedureRequest.code` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.code` is mapped to FHIR STU3 element `ReferralRequest.type` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.code` is mapped to FHIR STU3 element `ReferralRequest.serviceRequested` as `RelatedTo`. The mappings for `ServiceRequest.code` do not cover the following types: CodeableReference. The mappings for `ServiceRequest.code` do not cover the following types based on type expansion: reference. Many laboratory and radiology procedure codes embed the specimen/organ system in the test order name, for example, serum or serum/plasma glucose, or a chest x-ray. The specimen might not be recorded separately from the test code.
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.code|0.1.0
      l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.code
element:
  id:
    v: ReferralRequest.extension:quantity
  path:
    v: ReferralRequest.extension
  slice name:
    v: quantity
  short:
    v: R5: Service amount (new)
  definition:
    v: R5: `ServiceRequest.quantity[x]` (new:Quantity, Range, Ratio)
  comment:
    v: Element `ServiceRequest.quantity[x]` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.quantity[x]` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.quantity[x]` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
  min:
    v: 0
  max:
    v: 1
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.quantity|0.1.0
      l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.quantity
element:
  id:
    v: ReferralRequest.extension:focus
  path:
    v: ReferralRequest.extension
  slice name:
    v: focus
  short:
    v: R5: What the service request is about, when it is not about the subject of record (new)
  definition:
    v: R5: `ServiceRequest.focus` (new:Reference(Resource))
  comment:
    v: Element `ServiceRequest.focus` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.focus` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.focus` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
  min:
    v: 0
  max:
    v: *
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.focus|0.1.0
      l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.focus
element:
  id:
    v: ReferralRequest.extension:location
  path:
    v: ReferralRequest.extension
  slice name:
    v: location
  short:
    v: R5: Requested location (new)
  definition:
    v: R5: `ServiceRequest.location` (new:CodeableReference(Location))
  comment:
    v: Element `ServiceRequest.location` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.location` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.location` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
  min:
    v: 0
  max:
    v: *
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.location|0.1.0
      l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.location
element:
  id:
    v: ReferralRequest.extension:reason
  path:
    v: ReferralRequest.extension
  slice name:
    v: reason
  short:
    v: R5: Explanation/Justification for procedure or service additional types
  definition:
    v: R5: `ServiceRequest.reason` additional types (CodeableReference(http://hl7.org/fhir/StructureDefinition/Condition), CodeableReference(http://hl7.org/fhir/StructureDefinition/Observation), CodeableReference(http://hl7.org/fhir/StructureDefinition/DiagnosticReport), CodeableReference(http://hl7.org/fhir/StructureDefinition/DocumentReference), CodeableReference(http://hl7.org/fhir/StructureDefinition/DetectedIssue))
  comment:
    v: Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ProcedureRequest.reasonCode` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ProcedureRequest.reasonReference` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ReferralRequest.reasonCode` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.reason` is mapped to FHIR STU3 element `ReferralRequest.reasonReference` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.reason` do not cover the following types: CodeableReference. This element represents why the referral is being made and may be used to decide how the service will be performed, or even if it will be performed at all. To be as specific as possible, a reference to *Observation* or *Condition* should be used if available. Otherwise, use `concept.text` element if the data is free (uncoded) text as shown in the [CT Scan example](https://hl7.org/fhir/servicerequest-example-di.html).
  min:
    v: 0
  max:
    v: *
  base:
    path:
      v: DomainResource.extension
    min:
      v: 0
    max:
      v: *

code:
  v: Extension
  l: Extension
profile:
  v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.reason|0.1.0
  l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.reason

id:
  v: ReferralRequest.extension:insurance
path:
  v: ReferralRequest.extension
slice name:
  v: insurance
short:
  v: R5: Associated insurance coverage (new)
definition:
  v: R5: `ServiceRequest.insurance` (new:Reference(Coverage,ClaimResponse))
comment:
  v: Element `ServiceRequest.insurance` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.insurance` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.insurance` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.insurance|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.insurance

id:
  v: ReferralRequest.extension:bodyStructure
path:
  v: ReferralRequest.extension
slice name:
  v: bodyStructure
short:
  v: R5: BodyStructure-based location on the body (new)
definition:
  v: R5: `ServiceRequest.bodyStructure` (new:Reference(BodyStructure))
comment:
  v: Element `ServiceRequest.bodyStructure` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.bodyStructure` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.bodyStructure` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element). An externally-defined extension that has been mapped as the representation of FHIR R5 element `ServiceRequest.bodyStructure`: `http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure`.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure
    l: procedure-targetBodyStructure

id:
  v: ReferralRequest.extension:patientInstruction
path:
  v: ReferralRequest.extension
slice name:
  v: patientInstruction
short:
  v: R5: Patient or consumer-oriented instructions (new)
definition:
  v: R5: `ServiceRequest.patientInstruction` (new:BackboneElement)
comment:
  v: Element `ServiceRequest.patientInstruction` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.patientInstruction` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.patientInstruction` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.patientInstruction|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.patientInstruction

id:
  v: ReferralRequest.definition.extension
path:
  v: ReferralRequest.definition.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.definition.extension:instantiatesCanonical
path:
  v: ReferralRequest.definition.extension
slice name:
  v: instantiatesCanonical
short:
  v: R5: Instantiates FHIR protocol or definition additional types
definition:
  v: R5: `ServiceRequest.instantiatesCanonical` additional types (canonical(http://hl7.org/fhir/StructureDefinition/ActivityDefinition), canonical(http://hl7.org/fhir/StructureDefinition/PlanDefinition)) additional types from child elements (value)
comment:
  v: Element `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ProcedureRequest.definition` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ReferralRequest.definition` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types: canonical. The mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types based on type expansion: value. The PlanDefinition resource is used to describe series, sequences, or groups of actions to be taken, while the ActivityDefinition resource is used to define each specific step or activity to be performed. More information can be found in the [Boundaries and Relationships](https://hl7.org/fhir/plandefi.html#12.23.2) section for PlanDefinition.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical

id:
  v: ReferralRequest.basedOn.extension
path:
  v: ReferralRequest.basedOn.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.basedOn.extension:basedOn
path:
  v: ReferralRequest.basedOn.extension
slice name:
  v: basedOn
short:
  v: R5: What request fulfills
definition:
  v: R5: `ServiceRequest.basedOn`
comment:
  v: Element `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ProcedureRequest.basedOn` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ReferralRequest.basedOn` as `SourceIsBroaderThanTarget`. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.basedOn` with unmapped reference targets: CarePlan, MedicationRequest, ServiceRequest.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.replaces.extension
path:
  v: ReferralRequest.replaces.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.replaces.extension:replaces
path:
  v: ReferralRequest.replaces.extension
slice name:
  v: replaces
short:
  v: R5: What request replaces additional types
definition:
  v: R5: `ServiceRequest.replaces` additional types from child elements (display, identifier, reference, type)
comment:
  v: Element `ServiceRequest.replaces` is mapped to FHIR STU3 element `ProcedureRequest.replaces` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.replaces` is mapped to FHIR STU3 element `ReferralRequest.replaces` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.replaces` do not cover the following types based on type expansion: display, identifier, reference, type. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.replaces` with unmapped reference targets: ServiceRequest.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.intent.extension
path:
  v: ReferralRequest.intent.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.intent.extension:intent
path:
  v: ReferralRequest.intent.extension
slice name:
  v: intent
short:
  v: R5: proposal | plan | directive | order +
definition:
  v: R5: `ServiceRequest.intent`
comment:
  v: Element `ServiceRequest.intent` is mapped to FHIR STU3 element `ProcedureRequest.intent` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.intent` is mapped to FHIR STU3 element `ReferralRequest.intent` as `SourceIsBroaderThanTarget`. The target context `ProcedureRequest.intent` is a modifier element, so this extension does not need to be defined as a modifier. This element is labeled as a modifier because the intent alters when and how the resource is actually applicable.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.intent|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.intent

id:
  v: ReferralRequest.serviceRequested.extension
path:
  v: ReferralRequest.serviceRequested.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 1
max:
  v: *

id:
  v: ReferralRequest.serviceRequested.extension:parameterFocus
path:
  v: ReferralRequest.serviceRequested.extension
slice name:
  v: parameterFocus
short:
  v: R5: The context of the order details by reference (new)
definition:
  v: R5: `ServiceRequest.orderDetail.parameterFocus` (new:CodeableReference(Device,DeviceDefinition,DeviceRequest,SupplyRequest,Medication,MedicationRequest,BiologicallyDerivedProduct,Substance))
comment:
  v: Element `ServiceRequest.orderDetail.parameterFocus` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.orderDetail.parameterFocus` has a context of ReferralRequest.serviceRequested based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.orderDetail.parameterFocus` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameterFocus|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameterFocus

id:
  v: ReferralRequest.serviceRequested.extension:parameter
path:
  v: ReferralRequest.serviceRequested.extension
slice name:
  v: parameter
short:
  v: R5: The parameter details for the service being requested (new)
definition:
  v: R5: `ServiceRequest.orderDetail.parameter` (new:BackboneElement)
comment:
  v: Element `ServiceRequest.orderDetail.parameter` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`. Element `ServiceRequest.orderDetail.parameter` has a context of ReferralRequest.serviceRequested based on following the parent source element upwards and mapping to `ReferralRequest`. Element `ServiceRequest.orderDetail.parameter` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).
min:
  v: 1
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameter|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.orderDetail.parameter

id:
  v: ReferralRequest.subject.extension
path:
  v: ReferralRequest.subject.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.subject.extension:subject
path:
  v: ReferralRequest.subject.extension
slice name:
  v: subject
short:
  v: R5: Individual or Entity the service is ordered for
definition:
  v: R5: `ServiceRequest.subject`
comment:
  v: Element `ServiceRequest.subject` is mapped to FHIR STU3 element `ProcedureRequest.subject` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.subject` is mapped to FHIR STU3 element `ReferralRequest.subject` as `SourceIsBroaderThanTarget`. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.subject` with unmapped reference targets: Device, Group, Location, Patient.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.context.extension
path:
  v: ReferralRequest.context.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.context.extension:encounter
path:
  v: ReferralRequest.context.extension
slice name:
  v: encounter
short:
  v: R5: Encounter in which the request was created additional types
definition:
  v: R5: `ServiceRequest.encounter` additional types from child elements (display, identifier, reference, type)
comment:
  v: Element `ServiceRequest.encounter` is mapped to FHIR STU3 element `ProcedureRequest.context` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.encounter` is mapped to FHIR STU3 element `ReferralRequest.context` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.encounter` do not cover the following types based on type expansion: display, identifier, reference, type. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.encounter` with unmapped reference targets: Encounter.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.recipient.extension
path:
  v: ReferralRequest.recipient.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.recipient.extension:performer
path:
  v: ReferralRequest.recipient.extension
slice name:
  v: performer
short:
  v: R5: Requested performer
definition:
  v: R5: `ServiceRequest.performer`
comment:
  v: Element `ServiceRequest.performer` is mapped to FHIR STU3 element `ProcedureRequest.performer` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.performer` is mapped to FHIR STU3 element `ReferralRequest.recipient` as `SourceIsBroaderThanTarget`. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.performer` with unmapped reference targets: CareTeam, Device, HealthcareService, Organization, Patient, Practitioner, PractitionerRole, RelatedPerson. If multiple performers are present, it is interpreted as a list of *alternative* performers without any preference regardless of order. If order of preference is needed use the [http://hl7.org/fhir/StructureDefinition/request-performerOrder](http://hl7.org/fhir/extensions/StructureDefinition-request-performerOrder.html). Use CareTeam to represent a group of performers (for example, Practitioner A *and* Practitioner B).
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference

id:
  v: ReferralRequest.supportingInfo.extension
path:
  v: ReferralRequest.supportingInfo.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.supportingInfo.extension:supportingInfo
path:
  v: ReferralRequest.supportingInfo.extension
slice name:
  v: supportingInfo
short:
  v: R5: Additional clinical information additional types
definition:
  v: R5: `ServiceRequest.supportingInfo` additional types (CodeableReference(http://hl7.org/fhir/StructureDefinition/Resource)) additional types from child elements (concept)
comment:
  v: Element `ServiceRequest.supportingInfo` is mapped to FHIR STU3 element `ProcedureRequest.supportingInfo` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.supportingInfo` is mapped to FHIR STU3 element `ReferralRequest.supportingInfo` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.supportingInfo` do not cover the following types: CodeableReference. The mappings for `ServiceRequest.supportingInfo` do not cover the following types based on type expansion: concept. To represent information about how the services are to be delivered use the `instructions` element.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.supportingInfo|0.1.0
    l: http://hl7.org/fhir/5.0/StructureDefinition/extension-ServiceRequest.supportingInfo

id:
  v: ReferralRequest.relevantHistory.extension
path:
  v: ReferralRequest.relevantHistory.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 0
max:
  v: *

id:
  v: ReferralRequest.relevantHistory.extension:relevantHistory
path:
  v: ReferralRequest.relevantHistory.extension
slice name:
  v: relevantHistory
short:
  v: R5: Request provenance additional types
definition:
  v: R5: `ServiceRequest.relevantHistory` additional types from child elements (display, identifier, reference, type)
comment:
  v: Element `ServiceRequest.relevantHistory` is mapped to FHIR STU3 element `ProcedureRequest.relevantHistory` as `SourceIsBroaderThanTarget`. Element `ServiceRequest.relevantHistory` is mapped to FHIR STU3 element `ReferralRequest.relevantHistory` as `SourceIsBroaderThanTarget`. The mappings for `ServiceRequest.relevantHistory` do not cover the following types based on type expansion: display, identifier, reference, type. The standard extension `alternate-reference` has been mapped as the representation of FHIR R5 element `ServiceRequest.relevantHistory` with unmapped reference targets: Provenance. This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the Provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the Provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://hl7.org/fhir/StructureDefinition/alternate-reference
    l: alternate-reference