<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://www.ehelse.no/FHIR/StructureDefinition/EhelseAppointment" />
  <name value="EhelseAppointment" />
  <status value="draft" />
  <experimental value="true" />
  <date value="2017-09-13T08:35:27.127+02:00" />
  <description value="This profile defines the Appointment object used in the national project that shall enable the citizen to have his appointments in a calendar at the national health care protal." />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Appointment" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Appointment" />
  <derivation value="constraint" />
  <differential>
    <element id="Appointment.appointmentType">
      <path value="Appointment.appointmentType" />
      <definition value="The code set selected is the one that has most relevanse for the patient. The aim of this profile is to poulate the patient calendar." />
      <requirements value="The current code set is found to limited. The code set for Encounter.class is more suitable for our purpose." />
      <min value="1" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="appointment-type" />
        </extension>
        <strength value="required" />
        <valueSetUri value="http://hl7.org/fhir/ValueSet/v3-ActEncounterCode" />
      </binding>
    </element>
    <element id="Appointment.description">
      <path value="Appointment.description" />
      <min value="1" />
    </element>
    <element id="Appointment.supportingInformation">
      <path value="Appointment.supportingInformation" />
      <requirements value="In our profile the organization responsible for providing the health care sercvice must be given. As the partcipants are refferd and referrela can not be nested, we find no other pkcaeholder for the managing organizatio  than in the supporting information." />
      <min value="1" />
    </element>
    <element id="Appointment.start">
      <path value="Appointment.start" />
      <min value="1" />
    </element>
    <element id="Appointment.end">
      <path value="Appointment.end" />
      <min value="1" />
    </element>
    <element id="Appointment.participant">
      <path value="Appointment.participant" />
      <requirements value="In our profile there must be at least two participants: The paitient, and the location whetre the healthcare service is to be provided." />
      <min value="2" />
    </element>
    <element id="Appointment.participant.actor">
      <path value="Appointment.participant.actor" />
      <min value="1" />
    </element>
    <element id="Appointment.participant.required">
      <path value="Appointment.participant.required" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>