# Receive exports

The client emits an event each time the note or the patient instructions are exported. Exports are not replayed, and only reach a listener once the client is `ready`.

## `noteExported`[​](#noteexported "Direct link to noteexported")

`detail` is a [`NoteExportData`](/connect/sdk/reference/type-aliases/NoteExportData.md). It fires when the note is exported, by the provider or by `exportNote()`. An export sent before `ready` is dropped.

The SDK forwards the payload as the iframe sent it, without validation, so fields the types do not name can be present.

`NoteExportData` is the note of the `NOTE_EXPORT` callback in camelCase. It has:

* `note.sections`, each with a `title`, a `category` and a `structuredContent`,
* `note.freeText`,
* an optional `transcript`, when enabled in Admin,
* optional `visitDiagnoses`.

Each section carries a `structuredContent`. The flattened `content`, which the callback deprecates, may still be present at runtime but is not typed: do not rely on it.

A `structuredContent` is either `{ type: "TEXT", text }` or `{ type: "SUBSECTIONS", subsections }`. A subsection has a `title` (or `null`), a `text`, and its `icd10Codes` and `snomedCodes`, which are empty when codes are not available at export time.

Section categories

A section `category` is one of `CHIEF_COMPLAINT`, `HISTORY_OF_PRESENT_ILLNESS`, `PAST_HISTORY`, `CURRENT_MEDICATIONS`, `VITALS`, `IMMUNIZATIONS`, `ASSESSMENT_AND_PLAN`, `EXAMINATION`, `RESULTS`, `PRESCRIPTIONS`, `APPOINTMENTS`, or `null` when the section does not fit a category. Several sections can share a category, for example separate Assessment and Plan sections both use `ASSESSMENT_AND_PLAN`. Nabla may add categories: treat unknown values like `null`.

## `patientInstructionsExported`[​](#patientinstructionsexported "Direct link to patientinstructionsexported")

`detail` is a [`PatientInstructionsExportData`](/connect/sdk/reference/type-aliases/PatientInstructionsExportData.md). It fires when the provider exports patient instructions.

## Exports and callbacks[​](#exports-and-callbacks "Direct link to Exports and callbacks")

The same note also goes to the `NOTE_EXPORT` callback of your backend. Keep the callback as the record you save, and use the event to update the page. See [Receive callbacks](/connect/guides/callbacks.md).
