FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagehl7.fhir.uv.xver-r4.r3
Resource TypeStructureDefinition
IdStructureDefinition-profile-ServiceRequest-for-ReferralRequest.json
FHIR VersionR3
Sourcehttp://hl7.org/fhir/uv/xver-r4.r3/0.1.0/StructureDefinition-profile-ServiceRequest-for-ReferralRequest.html
URLhttp://hl7.org/fhir/4.0/StructureDefinition/profile-ServiceRequest-for-ReferralRequest
Version0.1.0
Statusactive
Date2026-03-17T16:03:29.8473498-05:00
NameProfile_R4_ServiceRequest_R3_ReferralRequest
TitleCross-version Profile for R4.ServiceRequest for use in FHIR STU3
Realmuv
Authorityhl7
DescriptionThis cross-version profile allows R4 ServiceRequest content to be represented via FHIR STU3 ReferralRequest resources.
TypeReferralRequest
Kindresource

Resources that use this resource

StructureDefinition
hl7.fhir.uv.xver-r4.r3#0.1.0extension-BiologicallyDerivedProduct.requestR4: Procedure request (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-DeviceUseStatement.basedOnR4: Fulfills plan, proposal or order (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-DeviceUseStatement.derivedFromR4: Supporting information (new)

Resources that this resource uses

StructureDefinition
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.instantiatesCanonicalR4: Instantiates FHIR protocol or definition additional types
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.instantiatesUriR4: Instantiates external protocol or definition (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.insuranceR4: Associated insurance coverage (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.intentR4: proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.locationCodeR4: Requested location (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.locationReferenceR4: Requested location (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.patientInstructionR4: Patient or consumer-oriented instructions (new)
hl7.fhir.uv.xver-r4.r3#0.1.0extension-ServiceRequest.quantityR4: Service amount (new)

Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: StructureDefinition profile-ServiceRequest-for-ReferralRequest

NameFlagsCard.TypeDescription & Constraintsdoco
.. ReferralRequest 0..*ReferralRequestA request for referral or transfer of care
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
.... extension:instantiatesUri 0..*uriR4: Instantiates external protocol or definition (new)
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.instantiatesUri
.... extension:quantity 0..1Quantity, Ratio, RangeR4: Service amount (new)
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.quantity
.... extension:locationCode 0..*CodeableConceptR4: Requested location (new)
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.locationCode
Binding: ServiceDeliveryLocationRoleType|2014-03-26 (example): A location type where services are delivered.
.... extension:locationReference 0..*Reference(Cross-version Profile for R4.Location for use in FHIR STU3(0.1.0) | Location)R4: Requested location (new)
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.locationReference
.... extension:insurance 0..*Reference(Cross-version Profile for R4.Coverage for use in FHIR STU3(0.1.0) | Coverage | Cross-version Profile for R4.ClaimResponse for use in FHIR STU3(0.1.0) | ClaimResponse)R4: Associated insurance coverage (new)
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.insurance
.... extension:patientInstruction 0..1stringR4: Patient or consumer-oriented instructions (new)
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.patientInstruction
... definition
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
..... extension:instantiatesCanonical 0..*uriR4: Instantiates FHIR protocol or definition additional types
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical
... basedOn
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
..... extension:basedOn 0..*?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/alternate-reference]]R4: What request fulfills
URL: http://hl7.org/fhir/StructureDefinition/alternate-reference
... replaces
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
..... extension:replaces 0..*?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/alternate-reference]]R4: What request replaces additional types
URL: http://hl7.org/fhir/StructureDefinition/alternate-reference
... intent
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
..... extension:intent 0..1codeR4: proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
URL: http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.intent
Binding: R4RequestIntentForR3 (0.1.0) (required): The kind of service request.
... recipient
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
..... extension:performer 0..*?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/alternate-reference]]R4: Requested performer
URL: http://hl7.org/fhir/StructureDefinition/alternate-reference
... reasonReference
.... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
..... extension:reasonReference 0..*?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/alternate-reference]]R4: Explanation/Justification for service or service
URL: http://hl7.org/fhir/StructureDefinition/alternate-reference

doco Documentation for this format

Source1

{
  "resourceType": "StructureDefinition",
  "id": "profile-ServiceRequest-for-ReferralRequest",
  "text": {
    "status": "extensions",
    "div": "<!-- snip (see above) -->"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "fhir"
    },
    {
      "extension": [
        {
          "url": "packageId",
          "valueId": "hl7.fhir.uv.xver-r4.r3"
        },
        {
          "url": "version",
          "valueString": "0.1.0"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/package-source"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 0,
      "_valueInteger": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueUri": "http://hl7.org/fhir/uv/xver/ImplementationGuide/hl7.fhir.uv.xver-r4.r3"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use",
      "_valueCode": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueUri": "http://hl7.org/fhir/uv/xver/ImplementationGuide/hl7.fhir.uv.xver-r4.r3"
          }
        ]
      }
    }
  ],
  "url": "http://hl7.org/fhir/4.0/StructureDefinition/profile-ServiceRequest-for-ReferralRequest",
  "version": "0.1.0",
  "name": "Profile_R4_ServiceRequest_R3_ReferralRequest",
  "title": "Cross-version Profile for R4.ServiceRequest for use in FHIR STU3",
  "status": "active",
  "experimental": false,
  "date": "2026-03-17T16:03:29.8473498-05:00",
  "publisher": "FHIR Infrastructure",
  "contact": [
    {
      "name": "FHIR Infrastructure",
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description": "This cross-version profile allows R4 ServiceRequest content to be represented via FHIR STU3 ReferralRequest resources.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "fhirVersion": "3.0.2",
  "mapping": [
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "ReferralRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ReferralRequest",
  "derivation": "constraint",
  "snapshot": {
    "element": [
      {
        "id": "ReferralRequest",
        "path": "ReferralRequest",
        "short": "A request for referral or transfer of care",
        "definition": "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": [
          "ReferralRequest TransferOfCare Request"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest",
          "min": 0,
          "max": "*"
        },
        "constraint": [
          {
            "key": "dom-2",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
            "expression": "contained.contained.empty()",
            "xpath": "not(parent::f:contained and f:contained)",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key": "dom-1",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
            "expression": "contained.text.empty()",
            "xpath": "not(parent::f:contained and f:text)",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key": "dom-4",
            "severity": "error",
            "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
            "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
            "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key": "dom-3",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
            "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
            "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Entity. Role, or Act"
          },
          {
            "identity": "w5",
            "map": "clinical.careprovision"
          }
        ]
      },
      {
        "id": "ReferralRequest.id",
        "path": "ReferralRequest.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "id"
          }
        ],
        "isSummary": true
      },
      {
        "id": "ReferralRequest.meta",
        "path": "ReferralRequest.meta",
        "short": "Metadata about the resource",
        "definition": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.meta",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Meta"
          }
        ],
        "isSummary": true
      },
      {
        "id": "ReferralRequest.implicitRules",
        "path": "ReferralRequest.implicitRules",
        "short": "A set of rules under which this content was created",
        "definition": "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": "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. \n\nThis 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": 0,
        "max": "1",
        "base": {
          "path": "Resource.implicitRules",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "uri"
          }
        ],
        "isModifier": true,
        "isSummary": true
      },
      {
        "id": "ReferralRequest.language",
        "path": "ReferralRequest.language",
        "short": "Language of the resource content",
        "definition": "The base language in which the resource is written.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.language",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
              "valueReference": {
                "reference": "http://hl7.org/fhir/ValueSet/all-languages|3.0.2"
              }
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "Language"
            }
          ],
          "strength": "extensible",
          "description": "A human language.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/languages|3.0.2"
          }
        }
      },
      {
        "id": "ReferralRequest.text",
        "path": "ReferralRequest.text",
        "short": "Text summary of the resource, for human interpretation",
        "definition": "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": "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": [
          "narrative",
          "html",
          "xhtml",
          "display"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.text",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Narrative"
          }
        ],
        "condition": [
          "dom-1"
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Act.text?"
          }
        ]
      },
      {
        "id": "ReferralRequest.contained",
        "path": "ReferralRequest.contained",
        "short": "Contained, inline Resources",
        "definition": "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": "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": [
          "inline resources",
          "anonymous resources",
          "contained resources"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.contained",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Resource"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension",
        "path": "ReferralRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:instantiatesUri",
        "path": "ReferralRequest.extension",
        "sliceName": "instantiatesUri",
        "short": "R4: Instantiates external protocol or definition (new)",
        "definition": "R4: `ServiceRequest.instantiatesUri` (new:uri)",
        "comment": "Element `ServiceRequest.instantiatesUri` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.instantiatesUri` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.instantiatesUri` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).\nThis might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.instantiatesUri|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.extension:quantity",
        "path": "ReferralRequest.extension",
        "sliceName": "quantity",
        "short": "R4: Service amount (new)",
        "definition": "R4: `ServiceRequest.quantity[x]` (new:Quantity, Range, Ratio)",
        "comment": "Element `ServiceRequest.quantity[x]` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.quantity[x]` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.quantity[x]` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.quantity|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.extension:locationCode",
        "path": "ReferralRequest.extension",
        "sliceName": "locationCode",
        "short": "R4: Requested location (new)",
        "definition": "R4: `ServiceRequest.locationCode` (new:CodeableConcept)",
        "comment": "Element `ServiceRequest.locationCode` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.locationCode` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.locationCode` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.locationCode|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.extension:locationReference",
        "path": "ReferralRequest.extension",
        "sliceName": "locationReference",
        "short": "R4: Requested location (new)",
        "definition": "R4: `ServiceRequest.locationReference` (new:Reference(Location))",
        "comment": "Element `ServiceRequest.locationReference` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.locationReference` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.locationReference` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.locationReference|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.extension:insurance",
        "path": "ReferralRequest.extension",
        "sliceName": "insurance",
        "short": "R4: Associated insurance coverage (new)",
        "definition": "R4: `ServiceRequest.insurance` (new:Reference(Coverage,ClaimResponse))",
        "comment": "Element `ServiceRequest.insurance` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.insurance` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.insurance` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.insurance|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.extension:patientInstruction",
        "path": "ReferralRequest.extension",
        "sliceName": "patientInstruction",
        "short": "R4: Patient or consumer-oriented instructions (new)",
        "definition": "R4: `ServiceRequest.patientInstruction` (new:string)",
        "comment": "Element `ServiceRequest.patientInstruction` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.patientInstruction` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.patientInstruction` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.patientInstruction|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.modifierExtension",
        "path": "ReferralRequest.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.identifier",
        "path": "ReferralRequest.identifier",
        "short": "Business identifier",
        "definition": "Business identifier that uniquely identifies the referral/care transfer request instance.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.identifier",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-6 / RF1-11"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition",
        "path": "ReferralRequest.definition",
        "short": "Instantiates protocol or definition",
        "definition": "A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.definition",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ActivityDefinition"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/PlanDefinition"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=DEFN].target"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.id",
        "path": "ReferralRequest.definition.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.extension",
        "path": "ReferralRequest.definition.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.extension:instantiatesCanonical",
        "path": "ReferralRequest.definition.extension",
        "sliceName": "instantiatesCanonical",
        "short": "R4: Instantiates FHIR protocol or definition additional types",
        "definition": "R4: `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": "Element `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ProcedureRequest.definition` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ReferralRequest.definition` as `SourceIsBroaderThanTarget`.\nThe mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types: canonical.\nThe mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types based on type expansion: value.\nNote: This is a business identifier, not a resource identifier (see [discussion](https://hl7.org/fhir/resource.htm#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.reference",
        "path": "ReferralRequest.definition.reference",
        "short": "Literal reference, Relative, internal or absolute URL",
        "definition": "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": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.reference",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.identifier",
        "path": "ReferralRequest.definition.identifier",
        "short": "Logical reference, when literal reference is not known",
        "definition": "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": "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. \n\nWhen 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\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Reference.identifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".identifier"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.definition.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.display",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn",
        "path": "ReferralRequest.basedOn",
        "short": "Request fulfilled by this request",
        "definition": "Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.",
        "alias": [
          "fulfills"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.basedOn",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "ReferralRequest.basedOn.id",
        "path": "ReferralRequest.basedOn.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn.extension",
        "path": "ReferralRequest.basedOn.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn.extension:basedOn",
        "path": "ReferralRequest.basedOn.extension",
        "sliceName": "basedOn",
        "short": "R4: What request fulfills",
        "definition": "R4: `ServiceRequest.basedOn`",
        "comment": "Element `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ProcedureRequest.basedOn` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ReferralRequest.basedOn` as `SourceIsBroaderThanTarget`.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.basedOn` with unmapped reference targets: MedicationRequest, ServiceRequest.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn.reference",
        "path": "ReferralRequest.basedOn.reference",
        "short": "Literal reference, Relative, internal or absolute URL",
        "definition": "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": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.reference",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn.identifier",
        "path": "ReferralRequest.basedOn.identifier",
        "short": "Logical reference, when literal reference is not known",
        "definition": "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": "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. \n\nWhen 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\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Reference.identifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".identifier"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.basedOn.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.display",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces",
        "path": "ReferralRequest.replaces",
        "short": "Request(s) replaced by this request",
        "definition": "Completed or terminated request(s) whose function is taken by this new request.",
        "comment": "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": "Allows tracing the continuation of a therapy or administrative process instantiated through multiple requests.",
        "alias": [
          "supersedes",
          "prior",
          "renewed order"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.replaces",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=RPLC].target"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.id",
        "path": "ReferralRequest.replaces.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.extension",
        "path": "ReferralRequest.replaces.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.extension:replaces",
        "path": "ReferralRequest.replaces.extension",
        "sliceName": "replaces",
        "short": "R4: What request replaces additional types",
        "definition": "R4: `ServiceRequest.replaces` additional types from child elements (display, identifier, reference, type)",
        "comment": "Element `ServiceRequest.replaces` is mapped to FHIR STU3 element `ProcedureRequest.replaces` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.replaces` is mapped to FHIR STU3 element `ReferralRequest.replaces` as `SourceIsBroaderThanTarget`.\nThe mappings for `ServiceRequest.replaces` do not cover the following types based on type expansion: display, identifier, reference, type.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.replaces` with unmapped reference targets: ServiceRequest.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.reference",
        "path": "ReferralRequest.replaces.reference",
        "short": "Literal reference, Relative, internal or absolute URL",
        "definition": "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": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.reference",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.identifier",
        "path": "ReferralRequest.replaces.identifier",
        "short": "Logical reference, when literal reference is not known",
        "definition": "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": "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. \n\nWhen 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\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Reference.identifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".identifier"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.replaces.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.display",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.groupIdentifier",
        "path": "ReferralRequest.groupIdentifier",
        "short": "Composite request this is part of",
        "definition": "The business identifier of the logical \"grouping\" request/order that this referral is a part of.",
        "requirements": "Allows multiple orders to be collected as part of a single requisition.",
        "alias": [
          "grouperId",
          "requisition"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.groupIdentifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "ReferralRequest.status",
        "path": "ReferralRequest.status",
        "short": "draft | active | suspended | cancelled | completed | entered-in-error | unknown",
        "definition": "The status of the authorization/intention reflected by the referral request record.",
        "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
        "requirements": "Workflow status is handled by the Task resource.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "ReferralRequest.status",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ReferralRequestStatus"
            }
          ],
          "strength": "required",
          "description": "The status of the referral.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/request-status|3.0.2"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-1"
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "id": "ReferralRequest.intent",
        "path": "ReferralRequest.intent",
        "short": "proposal | plan | order",
        "definition": "Distinguishes the \"level\" of authorization/demand implicit in this request.",
        "requirements": "The same resource structure is used when capturing proposals/recommendations, plans and actual requests.",
        "alias": [
          "category"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "ReferralRequest.intent",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ReferralCategory"
            }
          ],
          "strength": "required",
          "description": "Codes identifying the stage lifecycle stage of a request",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/request-intent|3.0.2"
          }
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "id": "ReferralRequest.intent.id",
        "path": "ReferralRequest.intent.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references)",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "ReferralRequest.intent.extension",
        "path": "ReferralRequest.intent.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.intent.extension:intent",
        "path": "ReferralRequest.intent.extension",
        "sliceName": "intent",
        "short": "R4: proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option",
        "definition": "R4: `ServiceRequest.intent`",
        "comment": "Element `ServiceRequest.intent` is mapped to FHIR STU3 element `ProcedureRequest.intent` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.intent` is mapped to FHIR STU3 element `ReferralRequest.intent` as `SourceIsBroaderThanTarget`.\nThe target context `ProcedureRequest.intent` is a modifier element, so this extension does not need to be defined as a modifier.\nThis element is labeled as a modifier because the intent alters when and how the resource is actually applicable.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.intent|0.1.0"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.intent.value",
        "path": "ReferralRequest.intent.value",
        "representation": [
          "xmlAttr"
        ],
        "short": "Primitive value for code",
        "definition": "Primitive value for code",
        "min": 0,
        "max": "1",
        "base": {
          "path": "string.value",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-regex",
                "valueString": "[^\\s]+([\\s]?[^\\s]+)*"
              }
            ],
            "_code": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type",
                  "valueString": "string"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type",
                  "valueString": "xsd:token"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-rdf-type",
                  "valueString": "xsd:token"
                }
              ]
            }
          }
        ]
      },
      {
        "id": "ReferralRequest.type",
        "path": "ReferralRequest.type",
        "short": "Referral/Transition of care request type",
        "definition": "An indication of the type of referral (or where applicable the type of transfer of care) request.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.type",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ReferralType"
            }
          ],
          "strength": "example",
          "description": "Codes for types of referral; e.g. consult, transfer, temporary transfer.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/referral-type|3.0.2"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-10"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "id": "ReferralRequest.priority",
        "path": "ReferralRequest.priority",
        "short": "Urgency of referral / transfer of care request",
        "definition": "An indication of the urgency of referral (or where applicable the type of transfer of care) request.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.priority",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ReferralPriority"
            }
          ],
          "strength": "required",
          "description": "Codes indicating the relative priority of the referral.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/request-priority|3.0.2"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-2"
          },
          {
            "identity": "w5",
            "map": "grade"
          }
        ]
      },
      {
        "id": "ReferralRequest.serviceRequested",
        "path": "ReferralRequest.serviceRequested",
        "short": "Actions requested as part of the referral",
        "definition": "The service(s) that is/are requested to be provided to the patient.  For example: cardiac pacemaker insertion.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.serviceRequested",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "RequestedService"
            }
          ],
          "strength": "example",
          "description": "Codes indicating the types of services that might be requested as part of a referral.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-practice-codes|20091109"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "PR1-3 / OBR-4"
          },
          {
            "identity": "w5",
            "map": "what"
          }
        ]
      },
      {
        "id": "ReferralRequest.subject",
        "path": "ReferralRequest.subject",
        "short": "Patient referred to care or transfer",
        "definition": "The patient who is the subject of a referral or transfer of care request.",
        "comment": "Referral of family, group or community is to be catered for by profiles.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "ReferralRequest.subject",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "PID-3"
          },
          {
            "identity": "w5",
            "map": "who.focus"
          }
        ]
      },
      {
        "id": "ReferralRequest.context",
        "path": "ReferralRequest.context",
        "short": "Originating encounter",
        "definition": "The encounter at which the request for referral or transfer of care is initiated.",
        "alias": [
          "encounter"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.context",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "PV1-19"
          },
          {
            "identity": "w5",
            "map": "context"
          }
        ]
      },
      {
        "id": "ReferralRequest.occurrence[x]",
        "path": "ReferralRequest.occurrence[x]",
        "short": "When the service(s) requested in the referral should occur",
        "definition": "The period of time within which the services identified in the referral/transfer of care is specified or required to occur.",
        "comment": "When the occurrenceDateTime is used, then it is indicating that the requested service must happen before the specified date.",
        "requirements": "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": [
          "timing"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.occurrence[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "OBR-7/OBR-8"
          },
          {
            "identity": "w5",
            "map": "when.planned"
          }
        ]
      },
      {
        "id": "ReferralRequest.authoredOn",
        "path": "ReferralRequest.authoredOn",
        "short": "Date of creation/activation",
        "definition": "Date/DateTime of creation for draft requests and date of activation for active requests.",
        "alias": [
          "createdOn"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.authoredOn",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-7 / RF1-9?"
          },
          {
            "identity": "w5",
            "map": "when.recorded"
          }
        ]
      },
      {
        "id": "ReferralRequest.requester",
        "path": "ReferralRequest.requester",
        "short": "Who/what is requesting service",
        "definition": "The individual who initiated the request and has responsibility for its activation.",
        "alias": [
          "author"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.requester",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "rfr-1",
            "severity": "error",
            "human": "onBehalfOf can only be specified if agent is practitioner or device",
            "expression": "(agent.resolve() is Device) or (agent.resolve() is Practitioner) or onBehalfOf.exists().not()",
            "xpath": "contains(f:agent/f:reference/@value, '/Practitioner/') or contains(f:agent/f:reference/@value, '/Device/') or not(exists(f:onBehalfOf))",
            "source": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=AUT].role"
          }
        ]
      },
      {
        "id": "ReferralRequest.requester.id",
        "path": "ReferralRequest.requester.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.requester.extension",
        "path": "ReferralRequest.requester.extension",
        "short": "Additional Content defined by implementations",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.requester.modifierExtension",
        "path": "ReferralRequest.requester.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "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": "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": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.requester.agent",
        "path": "ReferralRequest.requester.agent",
        "short": "Individual making the request",
        "definition": "The device, practitioner, etc. who initiated the request.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "ReferralRequest.requester.agent",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".player"
          },
          {
            "identity": "w5",
            "map": "who.author"
          }
        ]
      },
      {
        "id": "ReferralRequest.requester.onBehalfOf",
        "path": "ReferralRequest.requester.onBehalfOf",
        "short": "Organization agent is acting for",
        "definition": "The organization the device or practitioner was acting on behalf of.",
        "requirements": "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": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.requester.onBehalfOf",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          }
        ],
        "condition": [
          "rfr-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".scoper"
          }
        ]
      },
      {
        "id": "ReferralRequest.specialty",
        "path": "ReferralRequest.specialty",
        "short": "The clinical specialty (discipline) that the referral is requested for",
        "definition": "Indication of the clinical domain or discipline to which the referral or transfer of care request is sent.  For example: Cardiology Gastroenterology Diabetology.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.specialty",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isModifier": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ReferralSpecialty"
            }
          ],
          "strength": "example",
          "description": "Codes indicating the types of capability the referred to service provider must have.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/practitioner-specialty|3.0.2"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-3"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient",
        "path": "ReferralRequest.recipient",
        "short": "Receiver of referral / transfer of care request",
        "definition": "The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.",
        "comment": "There will be a primary receiver. But the request can be received by any number of \"copied to\" providers or organizations.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.recipient",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/HealthcareService"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "Practitioner: PRD-2/PRD-7 where PRD-3 = RT; Organization: PRD-10 where PRD-3 = RT"
          },
          {
            "identity": "w5",
            "map": "who.actor"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.id",
        "path": "ReferralRequest.recipient.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.extension",
        "path": "ReferralRequest.recipient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.extension:performer",
        "path": "ReferralRequest.recipient.extension",
        "sliceName": "performer",
        "short": "R4: Requested performer",
        "definition": "R4: `ServiceRequest.performer`",
        "comment": "Element `ServiceRequest.performer` is mapped to FHIR STU3 element `ProcedureRequest.performer` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.performer` is mapped to FHIR STU3 element `ReferralRequest.recipient` as `SourceIsBroaderThanTarget`.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.performer` with unmapped reference targets: CareTeam, PractitionerRole.\nIf 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 [request-performerOrder extension](https://hl7.org/fhir/extension-request-performerorder.html).  Use CareTeam to represent a group of performers (for example, Practitioner A *and* Practitioner B).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.reference",
        "path": "ReferralRequest.recipient.reference",
        "short": "Literal reference, Relative, internal or absolute URL",
        "definition": "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": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.reference",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.identifier",
        "path": "ReferralRequest.recipient.identifier",
        "short": "Logical reference, when literal reference is not known",
        "definition": "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": "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. \n\nWhen 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\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Reference.identifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".identifier"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.recipient.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.display",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonCode",
        "path": "ReferralRequest.reasonCode",
        "short": "Reason for referral / transfer of care request",
        "definition": "Description of clinical condition indicating why referral/transfer of care is requested.  For example:  Pathological Anomalies, Disabled (physical or mental),  Behavioral Management.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.reasonCode",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ReferralReason"
            }
          ],
          "strength": "example",
          "description": "Codes indicating why the referral is being requested.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/clinical-findings|3.0.2"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RF1-10"
          },
          {
            "identity": "w5",
            "map": "why"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference",
        "path": "ReferralRequest.reasonReference",
        "short": "Why is service needed?",
        "definition": "Indicates another resource whose existence justifies this request.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.reasonReference",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Condition"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=RSON].target"
          },
          {
            "identity": "w5",
            "map": "why"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.id",
        "path": "ReferralRequest.reasonReference.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.extension",
        "path": "ReferralRequest.reasonReference.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.extension:reasonReference",
        "path": "ReferralRequest.reasonReference.extension",
        "sliceName": "reasonReference",
        "short": "R4: Explanation/Justification for service or service",
        "definition": "R4: `ServiceRequest.reasonReference`",
        "comment": "Element `ServiceRequest.reasonReference` is mapped to FHIR STU3 element `ProcedureRequest.reasonReference` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.reasonReference` is mapped to FHIR STU3 element `ReferralRequest.reasonReference` as `SourceIsBroaderThanTarget`.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.reasonReference` with unmapped reference targets: DiagnosticReport, DocumentReference.\nThis 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 when referencing  *DiagnosticReport*  it should contain a finding  in `DiagnosticReport.conclusion` and/or `DiagnosticReport.conclusionCode`.   When using a reference to *DocumentReference*, the target document should contain clear findings language providing the relevant reason for this service request.  Use  the CodeableConcept text element in `ServiceRequest.reasonCode` if the data is free (uncoded) text as shown in the [CT Scan example](https://hl7.org/fhir/servicerequest-example-di.html).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.reference",
        "path": "ReferralRequest.reasonReference.reference",
        "short": "Literal reference, Relative, internal or absolute URL",
        "definition": "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": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.reference",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.identifier",
        "path": "ReferralRequest.reasonReference.identifier",
        "short": "Logical reference, when literal reference is not known",
        "definition": "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": "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. \n\nWhen 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\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Reference.identifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".identifier"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.reasonReference.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Reference.display",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "ReferralRequest.description",
        "path": "ReferralRequest.description",
        "short": "A textual description of the referral",
        "definition": "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": 0,
        "max": "1",
        "base": {
          "path": "ReferralRequest.description",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.supportingInfo",
        "path": "ReferralRequest.supportingInfo",
        "short": "Additonal information to support referral or transfer of care request",
        "definition": "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": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.supportingInfo",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
          }
        ],
        "isModifier": false
      },
      {
        "id": "ReferralRequest.note",
        "path": "ReferralRequest.note",
        "short": "Comments made about referral request",
        "definition": "Comments made about the referral request by any of the participants.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.note",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Annotation"
          }
        ]
      },
      {
        "id": "ReferralRequest.relevantHistory",
        "path": "ReferralRequest.relevantHistory",
        "short": "Key events in history of request",
        "definition": "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": "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": [
          "eventHistory"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "ReferralRequest.relevantHistory",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Provenance"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "ReferralRequest",
        "path": "ReferralRequest"
      },
      {
        "id": "ReferralRequest.extension",
        "path": "ReferralRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.extension:instantiatesUri",
        "path": "ReferralRequest.extension",
        "sliceName": "instantiatesUri",
        "short": "R4: Instantiates external protocol or definition (new)",
        "definition": "R4: `ServiceRequest.instantiatesUri` (new:uri)",
        "comment": "Element `ServiceRequest.instantiatesUri` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.instantiatesUri` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.instantiatesUri` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).\nThis might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.instantiatesUri|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:quantity",
        "path": "ReferralRequest.extension",
        "sliceName": "quantity",
        "short": "R4: Service amount (new)",
        "definition": "R4: `ServiceRequest.quantity[x]` (new:Quantity, Range, Ratio)",
        "comment": "Element `ServiceRequest.quantity[x]` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.quantity[x]` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.quantity[x]` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.quantity|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:locationCode",
        "path": "ReferralRequest.extension",
        "sliceName": "locationCode",
        "short": "R4: Requested location (new)",
        "definition": "R4: `ServiceRequest.locationCode` (new:CodeableConcept)",
        "comment": "Element `ServiceRequest.locationCode` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.locationCode` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.locationCode` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.locationCode|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:locationReference",
        "path": "ReferralRequest.extension",
        "sliceName": "locationReference",
        "short": "R4: Requested location (new)",
        "definition": "R4: `ServiceRequest.locationReference` (new:Reference(Location))",
        "comment": "Element `ServiceRequest.locationReference` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.locationReference` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.locationReference` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.locationReference|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:insurance",
        "path": "ReferralRequest.extension",
        "sliceName": "insurance",
        "short": "R4: Associated insurance coverage (new)",
        "definition": "R4: `ServiceRequest.insurance` (new:Reference(Coverage,ClaimResponse))",
        "comment": "Element `ServiceRequest.insurance` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.insurance` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.insurance` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.insurance|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:patientInstruction",
        "path": "ReferralRequest.extension",
        "sliceName": "patientInstruction",
        "short": "R4: Patient or consumer-oriented instructions (new)",
        "definition": "R4: `ServiceRequest.patientInstruction` (new:string)",
        "comment": "Element `ServiceRequest.patientInstruction` has a context of ProcedureRequest based on following the parent source element upwards and mapping to `ProcedureRequest`.\nElement `ServiceRequest.patientInstruction` has a context of ReferralRequest based on following the parent source element upwards and mapping to `ReferralRequest`.\nElement `ServiceRequest.patientInstruction` has no mapping targets in FHIR STU3. Typically, this is because the element has been added (is a new element).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.patientInstruction|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.definition.extension",
        "path": "ReferralRequest.definition.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.definition.extension:instantiatesCanonical",
        "path": "ReferralRequest.definition.extension",
        "sliceName": "instantiatesCanonical",
        "short": "R4: Instantiates FHIR protocol or definition additional types",
        "definition": "R4: `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": "Element `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ProcedureRequest.definition` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.instantiatesCanonical` is mapped to FHIR STU3 element `ReferralRequest.definition` as `SourceIsBroaderThanTarget`.\nThe mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types: canonical.\nThe mappings for `ServiceRequest.instantiatesCanonical` do not cover the following types based on type expansion: value.\nNote: This is a business identifier, not a resource identifier (see [discussion](https://hl7.org/fhir/resource.htm#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.instantiatesCanonical|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.basedOn.extension",
        "path": "ReferralRequest.basedOn.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.basedOn.extension:basedOn",
        "path": "ReferralRequest.basedOn.extension",
        "sliceName": "basedOn",
        "short": "R4: What request fulfills",
        "definition": "R4: `ServiceRequest.basedOn`",
        "comment": "Element `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ProcedureRequest.basedOn` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.basedOn` is mapped to FHIR STU3 element `ReferralRequest.basedOn` as `SourceIsBroaderThanTarget`.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.basedOn` with unmapped reference targets: MedicationRequest, ServiceRequest.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.replaces.extension",
        "path": "ReferralRequest.replaces.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.replaces.extension:replaces",
        "path": "ReferralRequest.replaces.extension",
        "sliceName": "replaces",
        "short": "R4: What request replaces additional types",
        "definition": "R4: `ServiceRequest.replaces` additional types from child elements (display, identifier, reference, type)",
        "comment": "Element `ServiceRequest.replaces` is mapped to FHIR STU3 element `ProcedureRequest.replaces` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.replaces` is mapped to FHIR STU3 element `ReferralRequest.replaces` as `SourceIsBroaderThanTarget`.\nThe mappings for `ServiceRequest.replaces` do not cover the following types based on type expansion: display, identifier, reference, type.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.replaces` with unmapped reference targets: ServiceRequest.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.intent.extension",
        "path": "ReferralRequest.intent.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.intent.extension:intent",
        "path": "ReferralRequest.intent.extension",
        "sliceName": "intent",
        "short": "R4: proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option",
        "definition": "R4: `ServiceRequest.intent`",
        "comment": "Element `ServiceRequest.intent` is mapped to FHIR STU3 element `ProcedureRequest.intent` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.intent` is mapped to FHIR STU3 element `ReferralRequest.intent` as `SourceIsBroaderThanTarget`.\nThe target context `ProcedureRequest.intent` is a modifier element, so this extension does not need to be defined as a modifier.\nThis element is labeled as a modifier because the intent alters when and how the resource is actually applicable.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.intent|0.1.0"
          }
        ]
      },
      {
        "id": "ReferralRequest.recipient.extension",
        "path": "ReferralRequest.recipient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.recipient.extension:performer",
        "path": "ReferralRequest.recipient.extension",
        "sliceName": "performer",
        "short": "R4: Requested performer",
        "definition": "R4: `ServiceRequest.performer`",
        "comment": "Element `ServiceRequest.performer` is mapped to FHIR STU3 element `ProcedureRequest.performer` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.performer` is mapped to FHIR STU3 element `ReferralRequest.recipient` as `SourceIsBroaderThanTarget`.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.performer` with unmapped reference targets: CareTeam, PractitionerRole.\nIf 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 [request-performerOrder extension](https://hl7.org/fhir/extension-request-performerorder.html).  Use CareTeam to represent a group of performers (for example, Practitioner A *and* Practitioner B).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      },
      {
        "id": "ReferralRequest.reasonReference.extension",
        "path": "ReferralRequest.reasonReference.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "ReferralRequest.reasonReference.extension:reasonReference",
        "path": "ReferralRequest.reasonReference.extension",
        "sliceName": "reasonReference",
        "short": "R4: Explanation/Justification for service or service",
        "definition": "R4: `ServiceRequest.reasonReference`",
        "comment": "Element `ServiceRequest.reasonReference` is mapped to FHIR STU3 element `ProcedureRequest.reasonReference` as `SourceIsBroaderThanTarget`.\nElement `ServiceRequest.reasonReference` is mapped to FHIR STU3 element `ReferralRequest.reasonReference` as `SourceIsBroaderThanTarget`.\nThe standard extension `alternate-reference` has been mapped as the representation of FHIR R4 element `ServiceRequest.reasonReference` with unmapped reference targets: DiagnosticReport, DocumentReference.\nThis 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 when referencing  *DiagnosticReport*  it should contain a finding  in `DiagnosticReport.conclusion` and/or `DiagnosticReport.conclusionCode`.   When using a reference to *DocumentReference*, the target document should contain clear findings language providing the relevant reason for this service request.  Use  the CodeableConcept text element in `ServiceRequest.reasonCode` if the data is free (uncoded) text as shown in the [CT Scan example](https://hl7.org/fhir/servicerequest-example-di.html).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/alternate-reference"
          }
        ]
      }
    ]
  }
}