<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="GEM-ERPEU-PR-AccessCode" />
  <url value="https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_Access_Code" />
  <version value="1.1.2" />
  <name value="GEM_ERPEU_PR_Access_Code" />
  <title value="Identifier Profile for EU AccessCode" />
  <status value="active" />
  <date value="2026-02-09" />
  <description value="The AccessCode that is generated by the FdV in order to access the ePrescription in an EU country." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Identifier" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Identifier" />
  <derivation value="constraint" />
  <differential>
    <element id="Identifier.use">
      <path value="Identifier.use" />
      <fixedCode value="official" />
    </element>
    <element id="Identifier.system">
      <path value="Identifier.system" />
      <min value="1" />
      <patternUri value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_EU_AccessCode" />
      <mustSupport value="true" />
    </element>
    <element id="Identifier.value">
      <path value="Identifier.value" />
      <short value="The AccessCode for redeeming the ePrescription in an EU country." />
      <definition value="This is the AccessCode that is generated by the FdV in order to access the ePrescription in an EU country. It is handed to the E-Rezept-Fachdienst by the FdV." />
      <comment value="6-digit code that is generated by the FdV in order to access the ePrescription in an EU country." />
      <min value="1" />
      <constraint>
        <key value="workflow-eu-access-code-1" />
        <severity value="error" />
        <human value="Format of the AccessCode must be a 6-digit code in the Form [a-z, A-Z, 0-9]." />
        <expression value="$this.matches('^[a-zA-Z0-9]{6}$')" />
        <source value="https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_Access_Code" />
      </constraint>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>