> ## 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.

# Labs

> SDK reference for lab report (DiagnosticReport) operations.

# clinik.labs

## create

```ts theme={null}
const { data, meta } = await clinik.labs.create(request: LabCreateRequest): Promise<ApiResponse<DiagnosticReport>>
```

| Field                | Type                                          | Required | Description                                                                      |
| -------------------- | --------------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| `status`             | `string`                                      | Yes      | registered, partial, preliminary, final, amended, corrected, appended, cancelled |
| `code`               | `string \| { system?, code, display? }`       | Yes      | LOINC report type                                                                |
| `patientId`          | `string`                                      | Yes      | Patient reference                                                                |
| `encounterId`        | `string`                                      | No       | Encounter reference                                                              |
| `effectiveDateTime`  | `string`                                      | No       | Clinically relevant time (point in time)                                         |
| `effectivePeriod`    | `{ start?, end? }`                            | No       | Clinically relevant time (range)                                                 |
| `resultIds`          | `string[]`                                    | No       | Observation IDs in this report                                                   |
| `category`           | `string`                                      | No       | LAB, RAD, PAT                                                                    |
| `conclusion`         | `string`                                      | No       | Clinical conclusion text                                                         |
| `conclusionCodes`    | `Array<{ system?, code, display? }>`          | No       | SNOMED findings                                                                  |
| `performer`          | `string`                                      | No       | Who performed the diagnostic                                                     |
| `resultsInterpreter` | `string`                                      | No       | Who interpreted results                                                          |
| `specimenIds`        | `string[]`                                    | No       | Specimen references                                                              |
| `presentedForm`      | `Array<{ contentType, data?, url?, title? }>` | No       | Attached documents                                                               |
| `basedOn`            | `string[]`                                    | No       | ServiceRequest IDs this report is based on                                       |
| `media`              | `Array<{ comment?, linkId }>`                 | No       | Media/images linked to this report                                               |

## read

Supports `_include` for referenced observations:

```ts theme={null}
const { data } = await clinik.labs.read('lab_abc123', {
  include: ['Observation'],
});
```

## update

```ts theme={null}
const { data, meta } = await clinik.labs.update(id: string, request: LabUpdateRequest): Promise<ApiResponse<DiagnosticReport>>
```

Updatable fields: `status`, `conclusion`, `conclusionCodes`, `resultIds`, `resultsInterpreter`, `presentedForm`, `effectiveDateTime`, `effectivePeriod`.

## delete / search

Same pattern as other resources.
