{
  "resourceType": "OperationDefinition",
  "id": "Grant-EU-Access-Permission",
  "url": "https://gematik.de/fhir/erp-eu/OperationDefinition/Grant_Access_PermissionOperationDefinition",
  "status": "active",
  "version": "1.1.2",
  "date": "2026-02-09",
  "name": "Grant_Access_Permission",
  "kind": "operation",
  "description": "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.",
  "code": "grant-eu-access-permission",
  "system": true,
  "type": false,
  "instance": false,
  "affectsState": true,
  "inputProfile": "https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_PAR_Access_Authorization_Request",
  "outputProfile": "https://gematik.de/fhir/erp-eu/StructureDefinition/GEM_ERPEU_PR_PAR_Access_Authorization_Response",
  "parameter": [
    {
      "name": "countryCode",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "The country for which the patient wants to grant access.",
      "type": "Coding"
    },
    {
      "name": "accessCode",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "The access code for that country.",
      "type": "Identifier"
    },
    {
      "name": "countryCode",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "The country for which the patient wants to grant access.",
      "type": "Coding"
    },
    {
      "name": "accessCode",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "The access code for that country.",
      "type": "Identifier"
    },
    {
      "name": "validUntil",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "The instant until the access code is valid.",
      "type": "instant"
    },
    {
      "name": "createdAt",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "The instant when the record was created in the E-Rezept-Fachdienst.",
      "type": "instant"
    }
  ]
}