<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="Grant-EU-Access-Permission" />
  <url value="https://gematik.de/fhir/erp-eu/OperationDefinition/Grant_Access_PermissionOperationDefinition" />
  <version value="1.1.2" />
  <name value="Grant_Access_Permission" />
  <status value="active" />
  <kind value="operation" />
  <date value="2026-02-09" />
  <description value="This operation receives the access code and the country that the patient wants to grant access to. The operation validates the country and creates registeres the Access Code." />
  <affectsState value="true" />
  <code value="grant-eu-access-permission" />
  <system value="true" />
  <type value="false" />
  <instance value="false" />
  <inputProfile value="https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_PAR_Access_Authorization_Request" />
  <outputProfile value="https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_PAR_Access_Authorization_Response" />
  <parameter>
    <name value="countryCode" />
    <use value="in" />
    <min value="1" />
    <max value="1" />
    <documentation value="The country for which the patient wants to grant access." />
    <type value="Coding" />
  </parameter>
  <parameter>
    <name value="accessCode" />
    <use value="in" />
    <min value="1" />
    <max value="1" />
    <documentation value="The access code for that country." />
    <type value="Identifier" />
  </parameter>
  <parameter>
    <name value="countryCode" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="The country for which the patient wants to grant access." />
    <type value="Coding" />
  </parameter>
  <parameter>
    <name value="accessCode" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="The access code for that country." />
    <type value="Identifier" />
  </parameter>
  <parameter>
    <name value="validUntil" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="The instant until the access code is valid." />
    <type value="instant" />
  </parameter>
  <parameter>
    <name value="createdAt" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="The instant when the record was created in the E-Rezept-Fachdienst." />
    <type value="instant" />
  </parameter>
</OperationDefinition>