<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="DhdCataractMedicalDeviceProduct" />
  <url value="http://dhd.nl/fhir/StructureDefinition/DhdCataractMedicalDeviceProduct" />
  <version value="0.2.0" />
  <name value="DhdCataractMedicalDeviceProduct" />
  <status value="draft" />
  <fhirVersion value="3.0.2" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Device" />
  <baseDefinition value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicalDeviceProduct" />
  <derivation value="constraint" />
  <snapshot />
  <differential>
    <element id="Device.extension:iolMaterial">
      <path value="Device.extension" />
      <sliceName value="iolMaterial" />
      <short value="IOL material" />
      <definition value="The material of the intraocular lens used during cataract treatment." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://dhd.nl/fhir/StructureDefinition/DhdCataractIolMaterialExtension" />
      </type>
    </element>
    <element id="Device.identifier">
      <path value="Device.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type.coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Device.identifier:serialNumber">
      <path value="Device.identifier" />
      <sliceName value="serialNumber" />
      <min value="1" />
    </element>
    <element id="Device.identifier:gtin">
      <path value="Device.identifier" />
      <sliceName value="gtin" />
      <short value="Global Trade Item Number" />
      <definition value="The 14-digit GS1 Global Trade Item Number that identifies the device type." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Device.identifier:gtin.type">
      <path value="Device.identifier.type" />
      <min value="1" />
    </element>
    <element id="Device.identifier:gtin.type.coding">
      <path value="Device.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Device.identifier:gtin.type.coding.system">
      <path value="Device.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/identifier-type" />
    </element>
    <element id="Device.identifier:gtin.type.coding.code">
      <path value="Device.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="UDI" />
    </element>
    <element id="Device.identifier:gtin.system">
      <path value="Device.identifier.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/NamingSystem/gs1-di" />
    </element>
    <element id="Device.identifier:gtin.value">
      <path value="Device.identifier.value" />
      <min value="1" />
      <constraint>
        <key value="gtin-1" />
        <severity value="error" />
        <human value="GTIN must contain exactly 14 digits" />
        <expression value="matches('^[0-9]{14}$')" />
        <xpath value="matches(@value, '^[0-9]{14}$')" />
      </constraint>
    </element>
    <element id="Device.type">
      <path value="Device.type" />
      <short value="Lens type" />
      <definition value="The type of intraocular lens used during cataract treatment." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Lens type from the existing Nictiz ProductTypeCodelijst." />
        <valueSetReference>
          <reference value="http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.10.1.1--20171231000000" />
          <display value="ProductTypeCodelijst" />
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>