{
  "resourceType": "StructureDefinition",
  "id": "el-appointment",
  "url": "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-appointment",
  "version": "1.0.0",
  "name": "ELAppointment",
  "title": "EL Appointment Profile",
  "status": "draft",
  "description": "The profile for Appointment",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Appointment",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Appointment",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Appointment.meta.extension",
        "path": "Appointment.meta.extension",
        "min": 1
      },
      {
        "id": "Appointment.meta.extension:organization",
        "path": "Appointment.meta.extension",
        "sliceName": "organization",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-meta-organization-extension"
            ]
          }
        ]
      },
      {
        "id": "Appointment.meta.tag",
        "path": "Appointment.meta.tag",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-metatag-vs"
        }
      },
      {
        "id": "Appointment.extension",
        "path": "Appointment.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Appointment.extension:el-appointment-extension",
        "path": "Appointment.extension",
        "sliceName": "el-appointment-extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-appointment-extension"
            ]
          }
        ]
      },
      {
        "id": "Appointment.status",
        "path": "Appointment.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-status-vs"
        }
      },
      {
        "id": "Appointment.start",
        "path": "Appointment.start",
        "min": 1
      },
      {
        "id": "Appointment.end",
        "path": "Appointment.end",
        "min": 1
      },
      {
        "id": "Appointment.minutesDuration",
        "path": "Appointment.minutesDuration",
        "min": 1
      },
      {
        "id": "Appointment.created",
        "path": "Appointment.created",
        "min": 1
      },
      {
        "id": "Appointment.participant",
        "path": "Appointment.participant",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "actor.type"
            }
          ],
          "rules": "open"
        },
        "min": 4,
        "max": "5"
      },
      {
        "id": "Appointment.participant:patient",
        "path": "Appointment.participant",
        "sliceName": "patient",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.participant:patient.actor",
        "path": "Appointment.participant.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-patient"
            ]
          }
        ]
      },
      {
        "id": "Appointment.participant:patient.actor.type",
        "path": "Appointment.participant.actor.type",
        "min": 1,
        "patternUri": "Patient"
      },
      {
        "id": "Appointment.participant:patient.status",
        "path": "Appointment.participant.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-patient-participation-status-vs"
        }
      },
      {
        "id": "Appointment.participant:healthcareservice",
        "path": "Appointment.participant",
        "sliceName": "healthcareservice",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.participant:healthcareservice.actor",
        "path": "Appointment.participant.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-healthcareservice"
            ]
          }
        ]
      },
      {
        "id": "Appointment.participant:healthcareservice.actor.type",
        "path": "Appointment.participant.actor.type",
        "min": 1,
        "patternUri": "HealthcareService"
      },
      {
        "id": "Appointment.participant:healthcareservice.status",
        "path": "Appointment.participant.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-healthcareservice-participation-status-vs"
        }
      },
      {
        "id": "Appointment.participant:practitioner",
        "path": "Appointment.participant",
        "sliceName": "practitioner",
        "min": 1,
        "max": "2"
      },
      {
        "id": "Appointment.participant:practitioner.type",
        "path": "Appointment.participant.type",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-practitioner-participation-type-vs"
        }
      },
      {
        "id": "Appointment.participant:practitioner.actor",
        "path": "Appointment.participant.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-practitioner"
            ]
          }
        ]
      },
      {
        "id": "Appointment.participant:practitioner.actor.type",
        "path": "Appointment.participant.actor.type",
        "min": 1,
        "patternUri": "Practitioner"
      },
      {
        "id": "Appointment.participant:practitioner.status",
        "path": "Appointment.participant.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-practitioner-participation-status-vs"
        }
      },
      {
        "id": "Appointment.participant:location",
        "path": "Appointment.participant",
        "sliceName": "location",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.participant:location.type",
        "path": "Appointment.participant.type",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-location-participation-type-vs"
        }
      },
      {
        "id": "Appointment.participant:location.actor",
        "path": "Appointment.participant.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-location"
            ]
          }
        ]
      },
      {
        "id": "Appointment.participant:location.actor.type",
        "path": "Appointment.participant.actor.type",
        "min": 1,
        "patternUri": "Location"
      },
      {
        "id": "Appointment.participant:location.status",
        "path": "Appointment.participant.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-appointment-location-participation-status-vs"
        }
      }
    ]
  }
}