<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://hl7india.org/fhir/StructureDefinition/Appointment" />
  <name value="Appointment" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="ical" />
    <uri value="http://ietf.org/rfc/2445" />
    <name value="iCalendar" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Appointment" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Appointment" />
  <derivation value="constraint" />
  <differential>
    <element id="Appointment.reasonReference">
      <path value="Appointment.reasonReference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/Condition" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/Procedure" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/Observation" />
      </type>
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
    <element id="Appointment.supportingInformation">
      <path value="Appointment.supportingInformation" />
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
    <element id="Appointment.slot">
      <path value="Appointment.slot" />
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
    <element id="Appointment.basedOn">
      <path value="Appointment.basedOn" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/ServiceRequest" />
      </type>
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
    <element id="Appointment.participant.actor">
      <path value="Appointment.participant.actor" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/HealthcareService" />
        <targetProfile value="http://hl7india.org/fhir/StructureDefinition/Location" />
      </type>
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
    <element id="Appointment.participant.period">
      <path value="Appointment.participant.period" />
      <constraint>
        <key value="per-1" />
        <severity value="error" />
        <human value="If present, start SHALL have a lower value than end" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
    <element id="Appointment.requestedPeriod">
      <path value="Appointment.requestedPeriod" />
      <constraint>
        <key value="per-1" />
        <severity value="error" />
        <human value="If present, start SHALL have a lower value than end" />
        <source value="http://hl7.org/fhir/StructureDefinition/Appointment" />
      </constraint>
    </element>
  </differential>
</StructureDefinition>