{
  "resourceType": "StructureDefinition",
  "id": "a5f4b52f-896d-4c6c-b8d2-8467617f60f7",
  "meta": {
    "lastUpdated": "2021-03-08T11:46:16.29+00:00"
  },
  "url": "http://hl7.fi/fhir/StructureDefinition/FinnishAppointmentAppointment",
  "name": "FinnishAppointmentAppointment",
  "status": "draft",
  "date": "2021-03-08T11:24:08.3858157+00:00",
  "description": "Profile for appointment (ajanvaraus) in Finnish Scheduling environment. The contents is based on the scheduling appointment spefication.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Appointment",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Appointment",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Appointment",
        "path": "Appointment",
        "constraint": [
          {
            "key": "app-4",
            "severity": "error",
            "human": "Cancel reason is mandatory, if status is \"siirretty\" or \"peruttu\"",
            "expression": "(Appointment.status='siirretty' or Appointment.status='peruttu') implies Appointment.cancelationReason.exists()",
            "source": "http://hl7.fi/fhir/StructureDefinition/FinnishAppointmentAppointment"
          }
        ]
      },
      {
        "id": "Appointment.extension",
        "path": "Appointment.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Appointment.extension:ParentAppointment",
        "path": "Appointment.extension",
        "sliceName": "ParentAppointment",
        "requirements": "12 Pääajanvaraus",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.fi/fhir/StructureDefinition/ParentAppointment"
            ]
          }
        ]
      },
      {
        "id": "Appointment.extension:AppointmentMutability",
        "path": "Appointment.extension",
        "sliceName": "AppointmentMutability",
        "requirements": "95 Peruttavissa\r\n96 Siirrettävissä\r\n96.1 Peruutuksen tai siirron aikaraja",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.fi/fhir/StructureDefinition/AppointmentMutabilityExtension"
            ]
          }
        ]
      },
      {
        "id": "Appointment.extension:NotificationInfoExtension",
        "path": "Appointment.extension",
        "sliceName": "NotificationInfoExtension",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/NotificationInfoExtension"
            ]
          }
        ]
      },
      {
        "id": "Appointment.extension:ChildAppointment",
        "path": "Appointment.extension",
        "sliceName": "ChildAppointment",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.fi/fhir/StructureDefinition/ChildAppointment"
            ]
          }
        ]
      },
      {
        "id": "Appointment.status",
        "path": "Appointment.status",
        "short": "suunniteltu | tilattu | varattu | peruttu | siirretty | alkanut | toteutunut | ehdotettu | saapumatta",
        "binding": {
          "strength": "required",
          "valueSet": "https://koodistopalvelu.kanta.fi/codeserver/pages/classification-view-page.xhtml?classificationKey=1943&versionKey=2203"
        }
      },
      {
        "id": "Appointment.cancelationReason.coding.system",
        "path": "Appointment.cancelationReason.coding.system",
        "short": "THL - Palvelutapahtuman peruuntumisen tai siirtymisen syy",
        "fixedUri": "urn:oid:1.2.246.537.6.126.2008"
      },
      {
        "id": "Appointment.serviceCategory",
        "path": "Appointment.serviceCategory",
        "max": "1"
      },
      {
        "id": "Appointment.serviceCategory.coding.system",
        "path": "Appointment.serviceCategory.coding.system",
        "short": "THL - Sosiaali- ja terveyspalvelujen luokitus",
        "fixedUri": "urn:oid:1.2.246.537.6.50.201801"
      },
      {
        "id": "Appointment.serviceType",
        "path": "Appointment.serviceType",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.serviceType.coding.system",
        "path": "Appointment.serviceType.coding.system",
        "short": "THL - Sosiaali- ja terveysalan palvelunimikkeistö",
        "comment": "hl7fi: koodilla ilmaistu tieto palvelusta, johon ajanvaraus kohdistuu Huom. Palvelun nimi ilmaistaan THL - Sosiaali- ja terveysalan palvelunimikkeistön avulla.\r\n\r\nThe URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
        "requirements": "71 Palvelun nimi",
        "fixedUri": "urn:oid:1.2.246.537.6.49.201501"
      },
      {
        "id": "Appointment.appointmentType.coding.system",
        "path": "Appointment.appointmentType.coding.system",
        "short": "hl7fi: asiointitapa",
        "definition": "hl7fi: koodilla ilmaistu tieto ammattihenkilön ja asiakkaan välisen asioinnin tavasta",
        "fixedUri": "1.2.246.537.6.884.2015"
      },
      {
        "id": "Appointment.patientInstruction.extension",
        "path": "Appointment.patientInstruction.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Appointment.patientInstruction.extension:PatientInstructionURL",
        "path": "Appointment.patientInstruction.extension",
        "sliceName": "PatientInstructionURL",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.fi/fhir/StructureDefinition/PatientInstructionURLExtension"
            ]
          }
        ]
      },
      {
        "id": "Appointment.participant",
        "path": "Appointment.participant",
        "label": "Patient",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "actor.type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Appointment.participant:patientParticipant",
        "path": "Appointment.participant",
        "sliceName": "patientParticipant",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.participant:patientParticipant.type",
        "path": "Appointment.participant.type",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "SBJ"
            }
          ]
        }
      },
      {
        "id": "Appointment.participant:patientParticipant.actor.type",
        "path": "Appointment.participant.actor.type",
        "fixedUri": "Patient"
      },
      {
        "id": "Appointment.requestedPeriod",
        "path": "Appointment.requestedPeriod",
        "max": "1"
      }
    ]
  }
}