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

# Shared Notes Across Products

> List and read clinical notes shared across Suki products with getEncounterInfo, note-level APIs, and encounterContent

Shared notes across products let you build visit-level screens for providers on iOS, such as a list of notes for the EMR encounter, each note's status, and which artifacts are ready. After a provider picks a note, you can load its content, context, or structured data in your app, including notes that were started in another Suki product for the same visit.

Pass the same EMR encounter id you set as `SukiAmbientConstant.kEmrEncounterId` when you create the session. Use `getEncounterInfo` or `listEncounterNotes` to get `noteId` values, then call the note-level methods.

## How to list and read shared notes

`status(for:)`, `content(for:)`, `transcript(for:)`, and `getStructuredData(for:)` retrieve the processing status or generated content for a single ambient recording session. Each method requires a `sessionId`.

To list or retrieve clinical notes shared across Suki products, use the note read APIs described below. Depending on the API, pass one of the following:

* An EMR encounter id.
* A `noteId`.
* The Ambient API `encounter_id` (the same value you pass as `kSessionId`) as `encounterId` for `encounterContent`.

All of these APIs are asynchronous, and their completion handlers are invoked on the main queue. Errors are returned as generic or gRPC errors, not `SukiStatus`. These APIs use the same token provider configured for the ambient session APIs.

For more information, refer to [Ambient interoperability](/mobile-sdk/ambient-guides/ambient-interoperability).

<Tip>
  * Call **`getEncounterInfo(emrEncounterId:)`** when you need to see the notes for an EMR visit, including each note's status, timestamps, sessions, and available artifacts.

  * Call **`listEncounterNotes(emrEncounterId:)`** when you only need `noteId` values. Both APIs take the same EMR encounter id you pass as `SukiAmbientConstant.kEmrEncounterId` when you create the session.
</Tip>

### Note read methods

The following are the note read methods supported by the Mobile SDK.

<ResponseField name="getEncounterInfo(emrEncounterId:)" type="method">
  Returns an overview of the shared notes for an EMR encounter. Use this when you need note status, sessions, and available artifacts before you call note-level or session-level retrieve APIs.

  <Expandable title="Parameter and success type">
    <ResponseField name="emrEncounterId" type="EmrEncounterId" required={true}>
      Your EMR or EHR encounter id for the patient visit. This is the same value you pass as `SukiAmbientConstant.kEmrEncounterId` when you create the session.
    </ResponseField>

    <ResponseField name="Success" type="[EncounterInfoNote]">
      Each **`EncounterInfoNote`** includes **`noteId`**, **`status`**, **`createdAt`**, **`updatedAt`**, and **`sessions`**. Each **`EncounterInfoSession`** includes **`sessionId`**, **`status`**, and **`artifacts`**. Artifact values are `"transcript"`, `"recording"`, or `"content"`. This method does not return note content, transcript text, or recording bytes. When an artifact is listed, fetch it with the existing session-level or note-level retrieve APIs.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="listEncounterNotes(emrEncounterId:)" type="method">
  Lists notes for an EMR encounter so you can discover shared notes across products.

  <Expandable title="Parameter and success type">
    <ResponseField name="emrEncounterId" type="String" required={true}>
      Your EMR or EHR encounter id for the patient visit. This is the same value you pass as `SukiAmbientConstant.kEmrEncounterId` on create.
    </ResponseField>

    <ResponseField name="Success" type="[EncounterCompositionSummary]">
      Each summary includes **`noteId`** only. Pass that value to the note-level APIs below.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="getNoteContext(noteId:)" type="method">
  Reads note-level context for a shared clinical note.

  <Expandable title="Parameter and success type">
    <ResponseField name="noteId" type="String" required={true}>
      Pass the **`noteId`** from `getEncounterInfo`, `listEncounterNotes`, or from an online `createSession` response.
    </ResponseField>

    <ResponseField name="Success" type="NoteLevelContext">
      Returns **`NoteLevelContext`**.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="getNoteContent(noteId:)" type="method">
  Reads note content (suggestions) for a shared clinical note.

  <Expandable title="Parameter and success type">
    <ResponseField name="noteId" type="String" required={true}>
      Pass the **`noteId`** from `getEncounterInfo`, `listEncounterNotes`, or from an online `createSession` response.
    </ResponseField>

    <ResponseField name="Success" type="[Suggestion]">
      Returns **`[Suggestion]`** through `ContentCallback` (`Result<[Suggestion], Error>`).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="getNoteStructuredData(noteId:)" type="method">
  Reads structured note data for a shared clinical note.

  <Expandable title="Parameter and success type">
    <ResponseField name="noteId" type="String" required={true}>
      Pass the **`noteId`** from `getEncounterInfo`, `listEncounterNotes`, or from an online `createSession` response.
    </ResponseField>

    <ResponseField name="Success" type="StructuredDataResponseModel">
      Returns **`StructuredDataResponseModel`** through `StructuredDataCallback` (`Result<StructuredDataResponseModel, Error>`).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="encounterContent(encounterId:)" type="method">
  Reads encounter-level content for the Ambient API `encounter_id`. This is not an EMR encounter lookup.

  <Expandable title="Parameter and success type">
    <ResponseField name="encounterId" type="String" required={true}>
      Pass the Ambient API **`encounter_id`**. This is the same value you pass as **`SukiAmbientConstant.kSessionId`** on create or re-ambient. Do not pass the EMR encounter id.
    </ResponseField>

    <ResponseField name="Success" type="[Suggestion]">
      Returns **`[Suggestion]`**, same shape as `getNoteContent`, through `ContentCallback`.
    </ResponseField>
  </Expandable>
</ResponseField>

#### Note read method signatures

The following are the method signatures for the note read APIs in the Mobile SDK.

```swift Swift theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
public func getEncounterInfo( // [!code ++:4] New in v2.8.0
    emrEncounterId: EmrEncounterId,
    onCompletion completionHandler: @escaping (Result<[EncounterInfoNote], Error>) -> Void
)

public func listEncounterNotes(
    emrEncounterId: String,
    onCompletion completionHandler: @escaping (Result<[EncounterCompositionSummary], Error>) -> Void
)

public func getNoteContext(
    noteId: String,
    onCompletion completionHandler: @escaping (Result<NoteLevelContext, Error>) -> Void
)

public func getNoteContent(
    noteId: String,
    onCompletion completionHandler: @escaping ContentCallback
)
// ContentCallback = (Result<[Suggestion], Error>) -> Void

public func getNoteStructuredData(
    noteId: String,
    onCompletion completionHandler: @escaping StructuredDataCallback
)
// StructuredDataCallback = (Result<StructuredDataResponseModel, Error>) -> Void

public func encounterContent(
    encounterId: String,
    onCompletion completionHandler: @escaping ContentCallback
)
// Same ContentCallback as getNoteContent. Pass Ambient API encounter_id as encounterId
// (Ambient API encounter_id). Do not pass the EMR encounter id.
```

#### Encounter info types

```swift Swift theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
public typealias EmrEncounterId = String // [!code ++:16] New in v2.8.0

public struct EncounterInfoNote: Codable {
    public var noteId: String
    public var createdAt: Date?
    public var updatedAt: Date?
    public var status: String
    public var sessions: [EncounterInfoSession]
}

public struct EncounterInfoSession: Codable {
    public var sessionId: String
    public var status: String
    /// v1 values: "transcript", "recording", "content"
    public var artifacts: [String]
}
```

#### Get encounter info

```swift Swift theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
SukiAmbientCoreManager.shared.getEncounterInfo(emrEncounterId: emrEncounterId) { result in // [!code ++:13] New in v2.8.0
    switch result {
    case .success(let notes):
        for note in notes {
            print(note.noteId, note.status, note.createdAt, note.updatedAt)
            for session in note.sessions {
                print(session.sessionId, session.status, session.artifacts)
            }
        }
    case .failure(let error):
        print(error)
    }
}
```

#### List encounter notes and get note content

```swift Swift theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
SukiAmbientCoreManager.shared.listEncounterNotes(emrEncounterId: emrEncounterId) { result in
    switch result {
    case .success(let summaries):
        for summary in summaries {
            let noteId = summary.noteId
            SukiAmbientCoreManager.shared.getNoteContent(noteId: noteId) { contentResult in
                switch contentResult {
                case .success(let suggestions):
                    print(suggestions)
                case .failure(let error):
                    print(error)
                }
            }
        }
    case .failure(let error):
        print(error)
    }
}
```

#### Get note content after encounter info

```swift Swift theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
SukiAmbientCoreManager.shared.getEncounterInfo(emrEncounterId: emrEncounterId) { result in // [!code ++] New in v2.8.0
    switch result {
    case .success(let notes):
        for note in notes {
            SukiAmbientCoreManager.shared.getNoteContent(noteId: note.noteId) { contentResult in
                switch contentResult {
                case .success(let suggestions):
                    print(suggestions)
                case .failure(let error):
                    print(error)
                }
            }
        }
    case .failure(let error):
        print(error)
    }
}
```

## Next steps

<Icon icon="file-lines" iconType="solid" /> **[Session status and content retrieval](/mobile-sdk/ambient-guides/session-status-and-content-retrieval)** - overview of all retrieval workflows.

<Icon icon="file-lines" iconType="solid" /> **[Ambient interoperability](/mobile-sdk/ambient-guides/ambient-interoperability)** - Conflict handling and shared encounter setup.

<Icon icon="file-lines" iconType="solid" /> **[Check status and retrieve content](/mobile-sdk/ambient-guides/check-status-and-retrieve-content)** - Session-scoped status, note, transcript, and structured data APIs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.