{
  "resourceType": "StructureDefinition",
  "url": "https://example.org/fhir/StructureDefinition/MyAppointment",
  "version": "3.0",
  "name": "MyAppointment",
  "status": "active",
  "date": "2023-07-12T08:46:55.3583205+00:00",
  "fhirVersion": "4.3.0",
  "kind": "resource",
  "abstract": false,
  "type": "Appointment",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Appointment",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Appointment.extension",
        "path": "Appointment.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Appointment.extension:HealthcareService",
        "path": "Appointment.extension",
        "sliceName": "HealthcareService",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://MyProject.pt/HealthcareServiceRefExt"
            ]
          }
        ]
      },
      {
        "id": "Appointment.extension:Subject",
        "path": "Appointment.extension",
        "sliceName": "Subject",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://MyProject.pt/PatientRefExt"
            ]
          }
        ]
      },
      {
        "id": "Appointment.identifier",
        "path": "Appointment.identifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://example.org/StructureDefinition/MyIdentifier"
            ]
          }
        ]
      },
      {
        "id": "Appointment.status",
        "path": "Appointment.status",
        "binding": {
          "strength": "required",
          "valueSet": "https://MyProject.pt/AppointmentStatus"
        }
      },
      {
        "id": "Appointment.cancelationReason",
        "path": "Appointment.cancelationReason",
        "max": "0"
      },
      {
        "id": "Appointment.serviceCategory",
        "path": "Appointment.serviceCategory",
        "max": "0"
      },
      {
        "id": "Appointment.serviceType",
        "path": "Appointment.serviceType",
        "max": "0"
      },
      {
        "id": "Appointment.specialty",
        "path": "Appointment.specialty",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType",
        "path": "Appointment.appointmentType",
        "max": "0"
      },
      {
        "id": "Appointment.reasonCode",
        "path": "Appointment.reasonCode",
        "max": "0"
      },
      {
        "id": "Appointment.reasonReference",
        "path": "Appointment.reasonReference",
        "max": "0"
      },
      {
        "id": "Appointment.priority",
        "path": "Appointment.priority",
        "max": "0"
      },
      {
        "id": "Appointment.description",
        "path": "Appointment.description",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation",
        "path": "Appointment.supportingInformation",
        "max": "0"
      },
      {
        "id": "Appointment.start",
        "path": "Appointment.start",
        "mapping": [
          {
            "identity": "xHIS",
            "map": "cagendas.fecha || cagendas.hora"
          }
        ]
      },
      {
        "id": "Appointment.end",
        "path": "Appointment.end",
        "max": "0"
      },
      {
        "id": "Appointment.minutesDuration",
        "path": "Appointment.minutesDuration",
        "max": "0"
      },
      {
        "id": "Appointment.slot",
        "path": "Appointment.slot",
        "max": "0"
      },
      {
        "id": "Appointment.created",
        "path": "Appointment.created",
        "mapping": [
          {
            "identity": "xHIS",
            "map": "cagendas.FECHA_EMISION"
          }
        ]
      },
      {
        "id": "Appointment.comment",
        "path": "Appointment.comment",
        "max": "0"
      },
      {
        "id": "Appointment.patientInstruction",
        "path": "Appointment.patientInstruction",
        "max": "0"
      },
      {
        "id": "Appointment.basedOn",
        "path": "Appointment.basedOn",
        "max": "0"
      },
      {
        "id": "Appointment.participant",
        "path": "Appointment.participant",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Appointment.participant:Attender",
        "path": "Appointment.participant",
        "sliceName": "Attender",
        "max": "1"
      },
      {
        "id": "Appointment.participant:Attender.type.coding.system",
        "path": "Appointment.participant.type.coding.system",
        "fixedUri": "http://hl7.org/fhir/ValueSet/encounter-participant-type"
      },
      {
        "id": "Appointment.participant:Attender.type.coding.version",
        "path": "Appointment.participant.type.coding.version",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.type.coding.code",
        "path": "Appointment.participant.type.coding.code",
        "fixedCode": "ATND"
      },
      {
        "id": "Appointment.participant:Attender.type.coding.display",
        "path": "Appointment.participant.type.coding.display",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.type.coding.userSelected",
        "path": "Appointment.participant.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.type.text",
        "path": "Appointment.participant.type.text",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.actor",
        "path": "Appointment.participant.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          }
        ]
      },
      {
        "id": "Appointment.participant:Attender.actor.type",
        "path": "Appointment.participant.actor.type",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.actor.identifier",
        "path": "Appointment.participant.actor.identifier",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.actor.display",
        "path": "Appointment.participant.actor.display",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.required",
        "path": "Appointment.participant.required",
        "max": "0"
      },
      {
        "id": "Appointment.participant:Attender.period",
        "path": "Appointment.participant.period",
        "max": "0"
      },
      {
        "id": "Appointment.requestedPeriod",
        "path": "Appointment.requestedPeriod",
        "max": "0"
      }
    ]
  }
}