<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferral-Parameters-1" />
  <version value="1.0.0" />
  <name value="eRS-CreateReferral-Parameters-1" />
  <status value="draft" />
  <date value="2019-01-09T11:37:03.008+00:00" />
  <publisher value="NHS Digital" />
  <contact>
    <name value="Interoperability Team" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Create Referral" />
  <copyright value="Copyright © 2017 NHS Digital" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Parameters" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Parameters" />
  <derivation value="constraint" />
  <snapshot>
    <element id="Parameters">
      <path value="Parameters" />
      <short value="Operation Request or Response" />
      <definition value="Create Referral endpoint parameters." />
      <comment value="The parameters that may be used are defined by the OperationDefinition resource." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Resource" />
        <min value="0" />
        <max value="*" />
      </base>
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="infrastructure.exchange" />
      </mapping>
    </element>
    <element id="Parameters.id">
      <path value="Parameters.id" />
      <short value="Logical id of this artifact" />
      <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." />
      <comment value="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 value="0" />
      <max value="1" />
      <base>
        <path value="Resource.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="id" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.meta">
      <path value="Parameters.meta" />
      <short value="Metadata about the resource" />
      <definition value="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 value="0" />
      <max value="1" />
      <base>
        <path value="Resource.meta" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Meta" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.implicitRules">
      <path value="Parameters.implicitRules" />
      <short value="A set of rules under which this content was created" />
      <definition value="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 value="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. &#xA;&#xA;This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Resource.implicitRules" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="uri" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.language">
      <path value="Parameters.language" />
      <short value="Language of the resource content" />
      <definition value="The base language in which the resource is written." />
      <comment value="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 value="0" />
      <max value="1" />
      <base>
        <path value="Resource.language" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueReference>
            <reference value="http://hl7.org/fhir/ValueSet/all-languages" />
          </valueReference>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language" />
        </extension>
        <strength value="extensible" />
        <description value="A human language." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/languages" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter">
      <path value="Parameters.parameter" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="name" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <short value="Operation Parameter" />
      <definition value="A parameter passed to or received from the operation." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter.value[x]">
      <path value="Parameters.parameter.value[x]" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="base64Binary" />
      </type>
      <type>
        <code value="boolean" />
      </type>
      <type>
        <code value="code" />
      </type>
      <type>
        <code value="date" />
      </type>
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="decimal" />
      </type>
      <type>
        <code value="id" />
      </type>
      <type>
        <code value="instant" />
      </type>
      <type>
        <code value="integer" />
      </type>
      <type>
        <code value="markdown" />
      </type>
      <type>
        <code value="oid" />
      </type>
      <type>
        <code value="positiveInt" />
      </type>
      <type>
        <code value="string" />
      </type>
      <type>
        <code value="time" />
      </type>
      <type>
        <code value="unsignedInt" />
      </type>
      <type>
        <code value="uri" />
      </type>
      <type>
        <code value="Address" />
      </type>
      <type>
        <code value="Age" />
      </type>
      <type>
        <code value="Annotation" />
      </type>
      <type>
        <code value="Attachment" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="Coding" />
      </type>
      <type>
        <code value="ContactPoint" />
      </type>
      <type>
        <code value="Count" />
      </type>
      <type>
        <code value="Distance" />
      </type>
      <type>
        <code value="Duration" />
      </type>
      <type>
        <code value="HumanName" />
      </type>
      <type>
        <code value="Identifier" />
      </type>
      <type>
        <code value="Money" />
      </type>
      <type>
        <code value="Period" />
      </type>
      <type>
        <code value="Quantity" />
      </type>
      <type>
        <code value="Range" />
      </type>
      <type>
        <code value="Ratio" />
      </type>
      <type>
        <code value="Reference" />
      </type>
      <type>
        <code value="SampledData" />
      </type>
      <type>
        <code value="Signature" />
      </type>
      <type>
        <code value="Timing" />
      </type>
      <type>
        <code value="Meta" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:patient">
      <path value="Parameters.parameter" />
      <sliceName value="patient" />
      <short value="NHS Number" />
      <definition value="The NHS Number of the patient who the referral being created is for." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="patient" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.valueIdentifier:valueIdentifier">
      <path value="Parameters.parameter.valueIdentifier" />
      <sliceName value="valueIdentifier" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Identifier" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:patient.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:referringClinician">
      <path value="Parameters.parameter" />
      <sliceName value="referringClinician" />
      <short value="Referring Clinician" />
      <definition value="Required if and only if the logged in user has a role of Referring Clinician Admin.&#xD;&#xA;&#xD;&#xA;Format: ^[0-9]{12}$" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="referringClinician" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.valueIdentifier:valueIdentifier">
      <path value="Parameters.parameter.valueIdentifier" />
      <sliceName value="valueIdentifier" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Identifier" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:referringClinician.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:contentSensitive">
      <path value="Parameters.parameter" />
      <sliceName value="contentSensitive" />
      <short value="Content Sensitive" />
      <definition value="An indication of whether the referral is to be marked as ‘Sensitive’. If True, then users with non-clinical roles (e.g. Referring Admins and Service Provider Admin) will not be able to view the referral details." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="contentSensitive" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.valueBoolean:valueBoolean">
      <path value="Parameters.parameter.valueBoolean" />
      <sliceName value="valueBoolean" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="boolean" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:contentSensitive.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:shortlist">
      <path value="Parameters.parameter" />
      <sliceName value="shortlist" />
      <short value="List of Services" />
      <definition value="A list of 1 to 20 services that will form the shortlist for the referral.&#xD;&#xA;&#xD;&#xA;The patient will be able to book an appointment at any of these services." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="shortlist" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.valueReference:valueReference">
      <path value="Parameters.parameter.valueReference" />
      <sliceName value="valueReference" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="0" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.resource">
      <path value="Parameters.parameter.resource" />
      <short value="Include the List resource to list the HealthcareServices." />
      <definition value="The List resource has been profiled as:&#xD;&#xA;&#xD;&#xA;https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferralShortlist-List-1" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:shortlist.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:unaccreditedComment">
      <path value="Parameters.parameter" />
      <sliceName value="unaccreditedComment" />
      <short value="Unaccredited Comment" />
      <definition value="An explanation of the reason why the user decided to shortlist an ‘unaccredited’ service, thus overriding the referrer rights rules that had been set for that service.&#xD;&#xA;&#xD;&#xA;Required if and only if the shortlist contains one or more ‘unaccredited’ services." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="unaccreditedComment" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.valueString:valueString">
      <path value="Parameters.parameter.valueString" />
      <sliceName value="valueString" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:unaccreditedComment.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays">
      <path value="Parameters.parameter" />
      <sliceName value="firstReminderFollowUpDays" />
      <short value="First Reminder Letter Follow Up Days" />
      <definition value="If &gt; 0, the system will send an automated letter to the patient after the number of days stated, if the patient hasn’t yet booked an appointment.&#xD;&#xA;If = 0, the system will not send reminder letters for this referral." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="firstReminderFollowUpDays" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.valueUnsignedInt:valueUnsignedInt">
      <path value="Parameters.parameter.valueUnsignedInt" />
      <sliceName value="valueUnsignedInt" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="unsignedInt" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter">
      <path value="Parameters.parameter" />
      <sliceName value="intentionToAddReferralLetter" />
      <short value="Intention to add Referral" />
      <definition value="Intention to add Referral." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <constraint>
        <key value="inv-1" />
        <severity value="error" />
        <human value="A parameter must have only one of (value, resource, part)" />
        <expression value="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))" />
        <xpath value="exists(f:value) or exists(f:resource) and not(exists(f:value) and exists(f:resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Parameters" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.id">
      <path value="Parameters.parameter.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.extension">
      <path value="Parameters.parameter.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.modifierExtension">
      <path value="Parameters.parameter.modifierExtension" />
      <short value="Extensions that cannot be ignored" />
      <definition value="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 value="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 value="extensions" />
      <alias value="user content" />
      <alias value="modifiers" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="BackboneElement.modifierExtension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.name">
      <path value="Parameters.parameter.name" />
      <short value="Name from the definition" />
      <definition value="The name of the parameter (reference to the operation definition)." />
      <comment value="Note that FHIR strings may not exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.name" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <fixedString value="intentionToAddReferralLetter" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.valueCoding:valueCoding">
      <path value="Parameters.parameter.valueCoding" />
      <sliceName value="valueCoding" />
      <short value="If parameter is a data type" />
      <definition value="If the parameter is a data type." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.value[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Coding" />
      </type>
      <condition value="ele-1" />
      <condition value="inv-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
      </constraint>
      <isSummary value="true" />
      <binding>
        <strength value="required" />
        <description value="Intention to add Referral" />
        <valueSetReference>
          <reference value="https://fhir.nhs.uk/STU3/ValueSet/eRS-ReferralLetterIntention" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.resource">
      <path value="Parameters.parameter.resource" />
      <short value="If parameter is a whole resource" />
      <definition value="If the parameter is a whole resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Parameters.parameter.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Resource" />
      </type>
      <condition value="inv-1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Entity. Role, or Act" />
      </mapping>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.part">
      <path value="Parameters.parameter.part" />
      <short value="Named part of a multi-part parameter" />
      <definition value="A named part of a multi-part parameter." />
      <comment value="Only one level of nested parameters is allowed." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Parameters.parameter.part" />
        <min value="0" />
        <max value="*" />
      </base>
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Parameters#Parameters.parameter" />
      <isSummary value="true" />
    </element>
  </snapshot>
  <differential>
    <element id="Parameters">
      <path value="Parameters" />
      <definition value="Create Referral endpoint parameters." />
    </element>
    <element id="Parameters.parameter">
      <path value="Parameters.parameter" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="name" />
        </discriminator>
        <rules value="closed" />
      </slicing>
    </element>
    <element id="Parameters.parameter:patient">
      <path value="Parameters.parameter" />
      <sliceName value="patient" />
      <short value="NHS Number" />
      <definition value="The NHS Number of the patient who the referral being created is for." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:patient.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="patient" />
    </element>
    <element id="Parameters.parameter:patient.valueIdentifier:valueIdentifier">
      <path value="Parameters.parameter.valueIdentifier" />
      <sliceName value="valueIdentifier" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="Parameters.parameter:referringClinician">
      <path value="Parameters.parameter" />
      <sliceName value="referringClinician" />
      <short value="Referring Clinician" />
      <definition value="Required if and only if the logged in user has a role of Referring Clinician Admin.&#xD;&#xA;&#xD;&#xA;Format: ^[0-9]{12}$" />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:referringClinician.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="referringClinician" />
    </element>
    <element id="Parameters.parameter:referringClinician.valueIdentifier:valueIdentifier">
      <path value="Parameters.parameter.valueIdentifier" />
      <sliceName value="valueIdentifier" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="Parameters.parameter:contentSensitive">
      <path value="Parameters.parameter" />
      <sliceName value="contentSensitive" />
      <short value="Content Sensitive" />
      <definition value="An indication of whether the referral is to be marked as ‘Sensitive’. If True, then users with non-clinical roles (e.g. Referring Admins and Service Provider Admin) will not be able to view the referral details." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:contentSensitive.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="contentSensitive" />
    </element>
    <element id="Parameters.parameter:contentSensitive.valueBoolean:valueBoolean">
      <path value="Parameters.parameter.valueBoolean" />
      <sliceName value="valueBoolean" />
      <type>
        <code value="boolean" />
      </type>
    </element>
    <element id="Parameters.parameter:shortlist">
      <path value="Parameters.parameter" />
      <sliceName value="shortlist" />
      <short value="List of Services" />
      <definition value="A list of 1 to 20 services that will form the shortlist for the referral.&#xD;&#xA;&#xD;&#xA;The patient will be able to book an appointment at any of these services." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:shortlist.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="shortlist" />
    </element>
    <element id="Parameters.parameter:shortlist.valueReference:valueReference">
      <path value="Parameters.parameter.valueReference" />
      <sliceName value="valueReference" />
      <max value="0" />
      <type>
        <code value="Reference" />
      </type>
    </element>
    <element id="Parameters.parameter:shortlist.resource">
      <path value="Parameters.parameter.resource" />
      <short value="Include the List resource to list the HealthcareServices." />
      <definition value="The List resource has been profiled as:&#xD;&#xA;&#xD;&#xA;https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferralShortlist-List-1" />
    </element>
    <element id="Parameters.parameter:unaccreditedComment">
      <path value="Parameters.parameter" />
      <sliceName value="unaccreditedComment" />
      <short value="Unaccredited Comment" />
      <definition value="An explanation of the reason why the user decided to shortlist an ‘unaccredited’ service, thus overriding the referrer rights rules that had been set for that service.&#xD;&#xA;&#xD;&#xA;Required if and only if the shortlist contains one or more ‘unaccredited’ services." />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:unaccreditedComment.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="unaccreditedComment" />
    </element>
    <element id="Parameters.parameter:unaccreditedComment.valueString:valueString">
      <path value="Parameters.parameter.valueString" />
      <sliceName value="valueString" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays">
      <path value="Parameters.parameter" />
      <sliceName value="firstReminderFollowUpDays" />
      <short value="First Reminder Letter Follow Up Days" />
      <definition value="If &gt; 0, the system will send an automated letter to the patient after the number of days stated, if the patient hasn’t yet booked an appointment.&#xD;&#xA;If = 0, the system will not send reminder letters for this referral." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="firstReminderFollowUpDays" />
    </element>
    <element id="Parameters.parameter:firstReminderFollowUpDays.valueUnsignedInt:valueUnsignedInt">
      <path value="Parameters.parameter.valueUnsignedInt" />
      <sliceName value="valueUnsignedInt" />
      <type>
        <code value="unsignedInt" />
      </type>
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter">
      <path value="Parameters.parameter" />
      <sliceName value="intentionToAddReferralLetter" />
      <short value="Intention to add Referral" />
      <definition value="Intention to add Referral." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.name">
      <path value="Parameters.parameter.name" />
      <fixedString value="intentionToAddReferralLetter" />
    </element>
    <element id="Parameters.parameter:intentionToAddReferralLetter.valueCoding:valueCoding">
      <path value="Parameters.parameter.valueCoding" />
      <sliceName value="valueCoding" />
      <type>
        <code value="Coding" />
      </type>
      <binding>
        <strength value="required" />
        <description value="Intention to add Referral" />
        <valueSetReference>
          <reference value="https://fhir.nhs.uk/STU3/ValueSet/eRS-ReferralLetterIntention" />
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>