> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clinikapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Consents

> SDK reference for consent operations.

# clinik.consents

Consents represent patient agreements to privacy policies, treatment plans, research participation, and other healthcare directives.

## sign

```ts theme={null}
const { data, meta } = await clinik.consents.sign(request: ConsentSignRequest): Promise<ApiResponse<Consent>>
```

| Field               | Type                                                    | Required | Description                                 |
| ------------------- | ------------------------------------------------------- | -------- | ------------------------------------------- |
| `patientId`         | `string`                                                | Yes      | Patient reference                           |
| `status`            | `string`                                                | No       | draft, proposed, active, rejected, inactive |
| `scope`             | `string`                                                | Yes      | patient-privacy, research, treatment, adr   |
| `category`          | `string \| string[]`                                    | Yes      | Consent category (e.g. "hipaa-notice")      |
| `dateTime`          | `string`                                                | No       | When consent was given                      |
| `performerId`       | `string`                                                | No       | Who is agreeing (practitioner, patient)     |
| `organizationId`    | `string`                                                | No       | Custodian organization                      |
| `policyUri`         | `string`                                                | No       | Policy URI (shorthand for single policy)    |
| `policies`          | `Array<{ authority?, uri? }>`                           | No       | Multiple policies with authority            |
| `policyRule`        | `string`                                                | No       | Regulation that this consents to            |
| `sourceAttachment`  | `object`                                                | No       | Source document (attachment)                |
| `sourceReferenceId` | `string`                                                | No       | Source document reference ID                |
| `verification`      | `Array<{ verified, verifiedWith?, verificationDate? }>` | No       | Verification details (multiple)             |
| `provision`         | `ConsentProvisionInput`                                 | No       | Provision rules with nested exceptions      |

### Provision Structure

```ts theme={null}
provision: {
  type: 'permit' | 'deny',
  period: { start?, end? },
  actor: [{ role: string, reference: string }],
  action: [{ system?, code, display? }],
  securityLabel: [{ system?, code, display? }],
  purpose: [{ system?, code, display? }],
  class: [{ system?, code, display? }],
  code: [{ system?, code, display? }],
  dataPeriod: { start?, end? },
  data: [{ meaning: 'instance' | 'related' | 'dependents' | 'authoredby', reference: string }],
  provision: [/* nested exception rules */],
}
```

## read / update / delete / search

Same pattern as other resources. Search supports `patientId`, `status`, `dateFrom`, `dateTo` filters.

### Consent Scopes

| Scope             | Description                              |
| ----------------- | ---------------------------------------- |
| `patient-privacy` | Privacy and data sharing (HIPAA notices) |
| `research`        | Research participation                   |
| `treatment`       | Treatment consent                        |
| `adr`             | Advance directive                        |
