{
  "resourceType": "StructureDefinition",
  "url": "http://example.org/fhir/StructureDefinition/MyAppointment",
  "name": "MyAppointment",
  "status": "draft",
  "fhirVersion": "3.0.2",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "ical",
      "uri": "http://www.ietf.org/rfc/rfc2445.txt",
      "name": "iCalendar"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Appointment",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Appointment",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Appointment.status",
        "path": "Appointment.status",
        "short": "Pospuesta | Pendiente | Agendada | Paciente ha llegado | Completada | Cancelada | Paciente no ha llegado | Anotada por error",
        "comment": "SCH-25. \r\nIf the Appointment's status is \"cancelled\" 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.\n\nThis element is labeled as a modifier because the status contains the code entered-in-error that mark the Appointment as not currently valid."
      },
      {
        "id": "Appointment.serviceCategory",
        "path": "Appointment.serviceCategory",
        "definition": "AIS.11.Conjunto de servicios que se realizarán durante esta cita."
      },
      {
        "id": "Appointment.serviceCategory.coding.system",
        "path": "Appointment.serviceCategory.coding.system",
        "fixedUri": "http://hl7.org/fhir/service-category"
      },
      {
        "id": "Appointment.specialty",
        "path": "Appointment.specialty",
        "definition": "Departamento / Servicio / Especialidad citado/a"
      },
      {
        "id": "Appointment.appointmentType",
        "path": "Appointment.appointmentType",
        "short": "CHECKUP|EMERGENCY|FOLLOWUP|ROUTINE|WALKIN",
        "definition": "ARQ-7. Tipo de cita."
      },
      {
        "id": "Appointment.reason",
        "path": "Appointment.reason",
        "short": "Justificación clínica",
        "definition": "The reason that this appointment is being scheduled. This is more clinical than administrative.\r\nInclude codes from http://snomed.info/sct  where concept is-a 404684003 (Clinical finding)\r\nInclude codes from http://snomed.info/sct  where concept is-a 71388002 (Procedure)"
      },
      {
        "id": "Appointment.reason.coding.system",
        "path": "Appointment.reason.coding.system",
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Appointment.reason.coding.code",
        "path": "Appointment.reason.coding.code",
        "comment": "AIS-3, SCH-7.\r\nNote that FHIR strings may not exceed 1MB in size"
      },
      {
        "id": "Appointment.priority",
        "path": "Appointment.priority",
        "definition": "SCH.11\r\nThe 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": "ARQ-12, SCH-11.6 / TQ1-9.\r\nSeeking implementer feedback on this property and how interoperable it is.\r\rUsing an extension to record a codeableconcept for named values may be tested at a future connectathon."
      },
      {
        "id": "Appointment.supportingInformation.reference",
        "path": "Appointment.supportingInformation.reference",
        "definition": "NTE.4\r\nA 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."
      },
      {
        "id": "Appointment.supportingInformation.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.supportingInformation.display",
        "definition": "NTE.3.\r\nPlain text narrative that identifies the resource in addition to the resource reference."
      },
      {
        "id": "Appointment.start",
        "path": "Appointment.start",
        "comment": "ARQ-11.1, SCH-11.4 / TQ1-7.\r\nNote: 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"
      },
      {
        "id": "Appointment.end",
        "path": "Appointment.end",
        "comment": "SCH-11.5 / TQ1-8/ calculated based on the start and the duration which is in ARQ-9 \r\nNote: 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"
      },
      {
        "id": "Appointment.comment",
        "path": "Appointment.comment",
        "comment": "NTE-3.\r\nAdditional text to aid in facilitating the appointment. For instance, a comment might be, \"patient should proceed immediately to infusion room upon arrival\"\r\rWhere 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": "0"
      },
      {
        "id": "Appointment.participant",
        "path": "Appointment.participant",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "actor.reference"
            }
          ],
          "rules": "open"
        },
        "short": "Participantes envueltos en la cita",
        "definition": "Listado de participantes envueltos en la cita.",
        "comment": "PID, AIP, AIG, AIL"
      },
      {
        "id": "Appointment.participant.type",
        "path": "Appointment.participant.type",
        "comment": "AIP-4, AIG-4.\r\nThe role of the participant can be used to declare what the actor will be doing in the scope of this appointment.\r\rIf the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.\r\rThis value SHALL be the same when creating an AppointmentResponse so that they can be matched, and subsequently update the Appointment."
      },
      {
        "id": "Appointment.participant.actor",
        "path": "Appointment.participant.actor",
        "comment": "PID-3-Patient ID List | AIL-3 | AIG-3 | AIP-3.\r\nReferences 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."
      },
      {
        "id": "Appointment.participant.status",
        "path": "Appointment.participant.status",
        "comment": "AIP-12, AIG-14.\r\nNote that FHIR strings may not exceed 1MB in size"
      },
      {
        "id": "Appointment.requestedPeriod",
        "path": "Appointment.requestedPeriod",
        "comment": "ARQ-11.\r\nThis does not introduce a capacity for recurring appointments."
      }
    ]
  }
}