<OperationDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <versionId value="4" />
    <lastUpdated value="2017-06-08T14:36:41.893+00:00" />
  </meta>
  <url value="http://epic.com/fhir/OperationDefinition/Appointment-find" />
  <name value="Appointment finder" />
  <status value="draft" />
  <kind value="operation" />
  <publisher value="Epic Systems" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="cooper@epic.com" />
    </telecom>
  </contact>
  <date value="2017-06-08T00:00:00Z" />
  <description value="Searches for available appointments slots.  This operation accepts a preferred date range for an appointment, as well as a specialty, optional list of practitioners, healthcare service, and patient.  For those criteria, it determines which schedulable resources are needed for the visit, and provides time slots where all required resources are available." />
  <code value="find" />
  <system value="false" />
  <type value="Appointment" />
  <instance value="false" />
  <parameter>
    <name value="requestedPeriod" />
    <use value="in" />
    <min value="0" />
    <max value="*" />
    <documentation value="The period of time that should be checked for appointment availability." />
    <type value="period" />
  </parameter>
  <parameter>
    <name value="actor" />
    <use value="in" />
    <min value="0" />
    <max value="*" />
    <documentation value="A preferred list of actors to book the appointment with.   If multiple actors are listed, the response will contain appointments with any of these actors (i.e. this does not drive joint appointment with multiple actors)." />
    <type value="reference" />
  </parameter>
  <parameter>
    <name value="service-type" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="The type of service for the appointment." />
    <type value="CodeableConcept" />
  </parameter>
  <parameter>
    <name value="patient" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <documentation value="A Patient resource that includes demographics and patient preferences.  This is provided as a resource instead of a reference because the patient may not exist when performing an availablity search.  If the appointment is for a new patient, the patient record should not be created until just before booking an appointment." />
    <type value="Patient" />
    <profile>
      <reference value="https://www.hl7.org/fhir/patient.profile.xml" />
    </profile>
  </parameter>
  <parameter>
    <name value="specialty" />
    <use value="in" />
    <min value="0" />
    <max value="*" />
    <documentation value="Indiciates which specialty for the appointment." />
    <type value="CodeableConcept" />
  </parameter>
  <parameter>
    <name value="indiciation" />
    <use value="in" />
    <min value="0" />
    <max value="*" />
    <documentation value="A list of diagnoses that this appointment is indended to treat.  This is used in conjunction with the specialty to determine which schedulable resources are needed for the visit.  For example, for an orthopedics appointment, the indiciation may drive whether a hip specialist or knee specialist is preferred." />
    <type value="CodeableConcept" />
  </parameter>
  <parameter>
    <name value="solutions" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <documentation value="A searchset Bundle of proposed Appointments where all required resources are available." />
    <type value="Bundle" />
  </parameter>
  <parameter>
    <name value="errors" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <documentation value="A OperationOutcome that represent errors that occured during execution of the operation." />
    <type value="OperationOutcome" />
  </parameter>
</OperationDefinition>