<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://example.test/fhir/StructureDefinition/MyPatient" />
  <name value="MyEPatient" />
  <status value="draft" />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Patient" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient" />
  <derivation value="constraint" />
  <differential>
    <element id="Patient.extension:patBirthPlace">
      <path value="Patient.extension" />
      <sliceName value="patBirthPlace" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/patient-birthPlace" />
      </type>
    </element>
    <element id="Patient.identifier">
      <path value="Patient.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.identifier:NationalID">
      <path value="Patient.identifier" />
      <sliceName value="NationalID" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Patient.identifier:NationalID.type.coding.system">
      <path value="Patient.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://national.registry.org/ids" />
    </element>
    <element id="Patient.identifier:NationalID.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
      <fixedUri value="http://national.registry.org/ids" />
    </element>
    <element id="Patient.identifier:NationalID.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:PersonalID">
      <path value="Patient.identifier" />
      <sliceName value="PersonalID" />
      <max value="1" />
    </element>
    <element id="Patient.identifier:PersonalID.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
      <fixedUri value="http://national.registry.org/ids" />
    </element>
    <element id="Patient.identifier:PersonalID.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.name">
      <path value="Patient.name" />
      <short value="Name of a human or other living entity - parts and usage" />
      <definition value="A name, normally of a human, that can be used for other living entities (e.g. animals but not organizations) that have been assigned names by a human and may need the use of name parts or the need for usage information." />
      <comment value="Names may be changed, or repudiated, or people may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts does not always matter. With personal names, the different parts might or might not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems must care about name parts around the world varies widely." />
      <min value="1" />
      <type>
        <code value="HumanName" />
        <profile value="https://example.org/fhir/StructureDefinition/EgleHumanName" />
      </type>
    </element>
    <element id="Patient.telecom">
      <path value="Patient.telecom" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="use" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.telecom.extension:myExtensionContact">
      <path value="Patient.telecom.extension" />
      <sliceName value="myExtensionContact" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://example.org/fhir/StructureDefinition/MyExtensionOccupation" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Patient.telecom:homeDetails">
      <path value="Patient.telecom" />
      <sliceName value="homeDetails" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Patient.telecom:homeDetails.system">
      <path value="Patient.telecom.system" />
      <min value="1" />
      <patternCode value="email" />
    </element>
    <element id="Patient.telecom:homeDetails.value">
      <path value="Patient.telecom.value" />
      <min value="1" />
    </element>
    <element id="Patient.telecom:homeDetails.use">
      <path value="Patient.telecom.use" />
      <patternCode value="home" />
    </element>
    <element id="Patient.telecom:homeDetails.period">
      <path value="Patient.telecom.period" />
      <max value="0" />
    </element>
    <element id="Patient.telecom:workDetails">
      <path value="Patient.telecom" />
      <sliceName value="workDetails" />
      <max value="1" />
    </element>
    <element id="Patient.telecom:workDetails.value">
      <path value="Patient.telecom.value" />
      <min value="1" />
    </element>
    <element id="Patient.telecom:workDetails.use">
      <path value="Patient.telecom.use" />
      <min value="1" />
      <patternCode value="work" />
    </element>
    <element id="Patient.birthDate">
      <path value="Patient.birthDate" />
      <min value="1" />
    </element>
    <element id="Patient.address">
      <path value="Patient.address" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.address.use">
      <path value="Patient.address.use" />
      <fixedCode value="home" />
    </element>
    <element id="Patient.address:tempAddress">
      <path value="Patient.address" />
      <sliceName value="tempAddress" />
      <max value="1" />
    </element>
    <element id="Patient.address:tempAddress.use">
      <path value="Patient.address.use" />
      <fixedCode value="temp" />
    </element>
    <element id="Patient.address:tempAddress.period">
      <path value="Patient.address.period" />
      <constraint>
        <key value="egl-1" />
        <severity value="error" />
        <human value="If the patient has a temporary address, the period this address is in use should be" />
        <expression value="(use = 'temp') implies period.exists()" />
      </constraint>
    </element>
    <element id="Patient.address:Address">
      <path value="Patient.address" />
      <sliceName value="Address" />
      <max value="1" />
    </element>
    <element id="Patient.address:Address.use">
      <path value="Patient.address.use" />
      <fixedCode value="home" />
    </element>
    <element id="Patient.photo">
      <path value="Patient.photo" />
      <definition value="Image of the patient. // Paciento veido atvaizdas / Patient photo." />
    </element>
    <element id="Patient.photo.url">
      <path value="Patient.photo.url" />
      <fixedUrl value="http://esveikata.lt/Profile/ltnhr-patient#binaryPhoto" />
    </element>
  </differential>
</StructureDefinition>