<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://example.org/fhir/StructureDefinition/MyAppointment" />
  <name value="MyAppointment" />
  <status value="draft" />
  <fhirVersion value="3.0.2" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="ical" />
    <uri value="http://www.ietf.org/rfc/rfc2445.txt" />
    <name value="iCalendar" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Appointment" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Appointment" />
  <derivation value="constraint" />
  <snapshot />
  <differential>
    <element id="Appointment.status">
      <path value="Appointment.status" />
      <short value="Pospuesta | Pendiente | Agendada | Paciente ha llegado | Completada | Cancelada | Paciente no ha llegado | Anotada por error" />
      <comment value="SCH-25. &#xD;&#xA;If the Appointment's status is &quot;cancelled&quot; then all participants are expected to have their calendars released for the appointment period, and as such any Slots that were marked as BUSY can be re-set to FREE.&#xA;&#xA;This element is labeled as a modifier because the status contains the code entered-in-error that mark the Appointment as not currently valid." />
    </element>
    <element id="Appointment.serviceCategory">
      <path value="Appointment.serviceCategory" />
      <definition value="AIS.11.Conjunto de servicios que se realizarán durante esta cita." />
    </element>
    <element id="Appointment.serviceCategory.coding.system">
      <path value="Appointment.serviceCategory.coding.system" />
      <fixedUri value="http://hl7.org/fhir/service-category" />
    </element>
    <element id="Appointment.specialty">
      <path value="Appointment.specialty" />
      <definition value="Departamento / Servicio / Especialidad citado/a" />
    </element>
    <element id="Appointment.appointmentType">
      <path value="Appointment.appointmentType" />
      <short value="CHECKUP|EMERGENCY|FOLLOWUP|ROUTINE|WALKIN" />
      <definition value="ARQ-7. Tipo de cita." />
    </element>
    <element id="Appointment.reason">
      <path value="Appointment.reason" />
      <short value="Justificación clínica" />
      <definition value="The reason that this appointment is being scheduled. This is more clinical than administrative.&#xD;&#xA;Include codes from http://snomed.info/sct  where concept is-a 404684003 (Clinical finding)&#xD;&#xA;Include codes from http://snomed.info/sct  where concept is-a 71388002 (Procedure)" />
    </element>
    <element id="Appointment.reason.coding.system">
      <path value="Appointment.reason.coding.system" />
      <fixedUri value="http://snomed.info/sct" />
    </element>
    <element id="Appointment.reason.coding.code">
      <path value="Appointment.reason.coding.code" />
      <comment value="AIS-3, SCH-7.&#xD;&#xA;Note that FHIR strings may not exceed 1MB in size" />
    </element>
    <element id="Appointment.priority">
      <path value="Appointment.priority" />
      <definition value="SCH.11&#xD;&#xA;The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)." />
      <comment value="ARQ-12, SCH-11.6 / TQ1-9.&#xD;&#xA;Seeking implementer feedback on this property and how interoperable it is.&#xD;&#xD;Using an extension to record a codeableconcept for named values may be tested at a future connectathon." />
    </element>
    <element id="Appointment.supportingInformation.reference">
      <path value="Appointment.supportingInformation.reference" />
      <definition value="NTE.4&#xD;&#xA;A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." />
    </element>
    <element id="Appointment.supportingInformation.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Appointment.supportingInformation.display" />
      <definition value="NTE.3.&#xD;&#xA;Plain text narrative that identifies the resource in addition to the resource reference." />
    </element>
    <element id="Appointment.start">
      <path value="Appointment.start" />
      <comment value="ARQ-11.1, SCH-11.4 / TQ1-7.&#xD;&#xA;Note: This is intended for precisely observed times, typically system logs etc., and not human-reported times - for them, see date and dateTime below. Time zone is always required" />
    </element>
    <element id="Appointment.end">
      <path value="Appointment.end" />
      <comment value="SCH-11.5 / TQ1-8/ calculated based on the start and the duration which is in ARQ-9 &#xD;&#xA;Note: This is intended for precisely observed times, typically system logs etc., and not human-reported times - for them, see date and dateTime below. Time zone is always required" />
    </element>
    <element id="Appointment.comment">
      <path value="Appointment.comment" />
      <comment value="NTE-3.&#xD;&#xA;Additional text to aid in facilitating the appointment. For instance, a comment might be, &quot;patient should proceed immediately to infusion room upon arrival&quot;&#xD;&#xD;Where this is a planned appointment and the start/end dates are not set then this field can be used to provide additional guidance on the details of the appointment request, including any restrictions on when to book it." />
      <max value="0" />
    </element>
    <element id="Appointment.participant">
      <path value="Appointment.participant" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="actor.reference" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Participantes envueltos en la cita" />
      <definition value="Listado de participantes envueltos en la cita." />
      <comment value="PID, AIP, AIG, AIL" />
    </element>
    <element id="Appointment.participant.type">
      <path value="Appointment.participant.type" />
      <comment value="AIP-4, AIG-4.&#xD;&#xA;The role of the participant can be used to declare what the actor will be doing in the scope of this appointment.&#xD;&#xD;If the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.&#xD;&#xD;This value SHALL be the same when creating an AppointmentResponse so that they can be matched, and subsequently update the Appointment." />
    </element>
    <element id="Appointment.participant.actor">
      <path value="Appointment.participant.actor" />
      <comment value="PID-3-Patient ID List | AIL-3 | AIG-3 | AIP-3.&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
    </element>
    <element id="Appointment.participant.status">
      <path value="Appointment.participant.status" />
      <comment value="AIP-12, AIG-14.&#xD;&#xA;Note that FHIR strings may not exceed 1MB in size" />
    </element>
    <element id="Appointment.requestedPeriod">
      <path value="Appointment.requestedPeriod" />
      <comment value="ARQ-11.&#xD;&#xA;This does not introduce a capacity for recurring appointments." />
    </element>
  </differential>
</StructureDefinition>