<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="emergency-contact-details" />
  <url value="http://example.org/fhir/StructureDefinition/emergency-contact-details" />
  <version value="1.0.0" />
  <name value="EmergencyContactDetails" />
  <status value="draft" />
  <publisher value="Example Publisher" />
  <description value="A complex extension to capture emergency contact details." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <snapshot>
    <element id="Extension">
      <path value="Extension" />
      <short value="Emergency contact details" />
      <definition value="A complex extension to capture emergency contact details." />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <sliceName value="name" />
      <short value="Name of the emergency contact" />
      <definition value="The name of the emergency contact." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="Extension.extension:name">
      <path value="Extension.extension" />
      <sliceName value="name" />
      <short value="Name of the emergency contact" />
      <definition value="The name of the emergency contact." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <sliceName value="relationship" />
      <short value="Relationship to the patient" />
      <definition value="The relationship of the emergency contact to the patient." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="Extension.extension:relationship">
      <path value="Extension.extension" />
      <sliceName value="relationship" />
      <short value="Relationship to the patient" />
      <definition value="The relationship of the emergency contact to the patient." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <sliceName value="preferredContactMethod" />
      <short value="Preferred contact method" />
      <definition value="The preferred contact method for the emergency contact." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="Extension.extension:preferredContactMethod">
      <path value="Extension.extension" />
      <sliceName value="preferredContactMethod" />
      <short value="Preferred contact method" />
      <definition value="The preferred contact method for the emergency contact." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
  </snapshot>
</StructureDefinition>