<OperationDefinition xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <meta>
    <lastUpdated value="2021-03-08T00:00:00+01:00" />
  </meta>
  <url value="https://fhir.nhs.uk/STU3/OperationDefinition/eRS-FetchWorklist-Operation-1" />
  <version value="1.1.0" />
  <name value="eRS-FetchWorklist-Operation-1" />
  <status value="active" />
  <kind value="operation" />
  <date value="2021-03-08T00:00:00+01: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="Request to retrieve a worklist for a referral request or communication request." />
  <code value="ers.fetchworklist" />
  <system value="false" />
  <type value="true" />
  <instance value="false" />
  <parameter>
    <name value="listType" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Indicates the type of ReferralRequest list requested. Only one 'listType' parameter is supported in each call and must match the type of resource being fetched." />
    <type value="CodeableConcept" />
    <binding>
      <strength value="required" />
      <valueSetUri value="https://fhir.nhs.uk/STU3/ValueSet/eRS-ReferralListSelector-1" />
    </binding>
  </parameter>
  <parameter>
    <name value="listType" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Indicates the type of CommunicationRequest list requested. Only one 'listType' parameter is supported in each call and must match the type of resource being fetched." />
    <type value="CodeableConcept" />
    <binding>
      <strength value="required" />
      <valueSetUri value="https://fhir.nhs.uk/STU3/ValueSet/eRS-CommunicationListSelector-1" />
    </binding>
  </parameter>
  <parameter>
    <name value="service" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="The service identifier" />
    <type value="Identifier" />
  </parameter>
  <parameter>
    <name value="specialtyAssignedIndicator" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Indicates whether a Specialty is assigned to the Request. If 'Assigned' the 'Specialty' parameter must be present. If 'Not Assigned' the 'specialtyAssignedIndicator' and 'Specialty' parameter must be absent." />
    <type value="CodeableConcept" />
    <binding>
      <strength value="required" />
      <valueSetUri value="https://fhir.nhs.uk/STU3/ValueSet/eRS-AssignedIndicator-1" />
    </binding>
  </parameter>
  <parameter>
    <name value="specialty" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="The Specialty for the service. If present, the 'specialtyAssignedIndicator' parameter must be set to 'Assigned'. The specialty list must be retrieved dynamically from the e-RS valueset." />
    <type value="CodeableConcept" />
    <binding>
      <strength value="required" />
      <valueSetUri value="https://eRS-Specialty-Code" />
    </binding>
  </parameter>
  <parameter>
    <name value="location" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="The service location identifier." />
    <type value="Identifier" />
  </parameter>
  <parameter>
    <name value="clinicianAssignedIndicator" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="Indicates whether a clinician is assigned to the Request. If 'Assigned' the 'Clinician' parameter must be present. If 'Not Assigned' the 'Clinician' parameter must be absent." />
    <type value="CodeableConcept" />
    <binding>
      <strength value="required" />
      <valueSetUri value="https://fhir.nhs.uk/STU3/ValueSet/eRS-AssignedIndicator-1" />
    </binding>
  </parameter>
  <parameter>
    <name value="clinician" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="The clinician assigned to the Request. If present, the 'ClinicianAssignedIndicator' parameter must be set to 'Assigned'" />
    <type value="Identifier" />
  </parameter>
  <parameter>
    <name value="response" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="The List resource that has been returned in response to the given input parameters" />
    <type value="List" />
    <profile>
      <reference value="https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" />
    </profile>
  </parameter>
</OperationDefinition>