Skip to content
Get started

List studies with pagination

client.viewer.studies.list(StudyListParams { assignedTo, cursor, expressCustomerId, 5 more } query?, RequestOptionsoptions?): CursorStudies<StudyListResponse { cancelledAt, createdAt, isCancelled, 11 more } >
GET/v1/viewer/studies

Retrieves a paginated list of studies with optional filtering by assignment, severity, description, cancellation status, and viewer status. Returns up to 100 studies per request.

ParametersExpand Collapse
query: StudyListParams { assignedTo, cursor, expressCustomerId, 5 more }
assignedTo?: string | null

Filter by assigned user ID (null = explicitly unassigned). Format: usr_<32-hex-chars>

cursor?: string

Base64 encoded cursor from previous response

expressCustomerId?: string | null

Filter by Express customer ID (null = studies with no customer). Format: cus_{32-hex-chars}

isCancelled?: boolean | null

Filter by cancellation status

limit?: number

Number of results to return (1-100)

minimum1
maximum100
severity?: Severity

Priority level of a study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention.

Accepts one of the following:
"normal"
"high"
"stat"
studyDescription?: string

Filter by study description (contains match)

studyViewerStatus?: StudyViewerStatus

Viewer completion status for a study. 'incomplete' = not yet finished in the viewer, 'complete' = finished.

Accepts one of the following:
"incomplete"
"complete"
ReturnsExpand Collapse
StudyListResponse { cancelledAt, createdAt, isCancelled, 11 more }

A study entity in the Viewer system with viewing status

cancelledAt: string | null

Timestamp when the study was cancelled, null if not cancelled

formatdate-time
createdAt: string | null

Timestamp when the study was created

formatdate-time
isCancelled: boolean

Whether the study has been cancelled

severity: Severity

Priority level of a study. 'normal' for routine, 'high' for urgent, 'stat' for immediate attention.

Accepts one of the following:
"normal"
"high"
"stat"
studyDescription: string

Description of the study/scan (e.g., 'Brain MRI with Contrast', 'Chest CT')

minLength1
studyId: string

Unique study identifier. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

minLength1
studyViewerStatus: StudyViewerStatus

Viewer completion status for a study. 'incomplete' = not yet finished in the viewer, 'complete' = finished.

Accepts one of the following:
"incomplete"
"complete"
updatedAt: string | null

Timestamp when the study was last updated

formatdate-time
assignedTo?: UserReference { email, userId, firstName, 4 more } | null

A reference to a user with basic identifying information

email: string

User's email address

userId: string

Unique user identifier. Format: usr_{32-hex-chars}

firstName?: string

User's first name

lastName?: string

User's last name

middleName?: string

User's middle name

suffix1?: string

Name suffix (e.g., 'MD', 'Jr.')

suffix2?: string

Additional name suffix

createdByApiKey?: APIKeyReference { apiKeyId, description, isClinicalContextEnrichmentEnabled, isViewerEnabled } | null

A reference to an API key with basic identifying information

apiKeyId: string

Unique API key identifier (UUIDv4 format)

formatuuid
description: string

Human-readable description of the API key

minLength1
isClinicalContextEnrichmentEnabled?: boolean

Whether this API key has a clinical-context enrichment webhook configured

isViewerEnabled?: boolean

Whether this API key has access to the Viewer product

createdByUser?: UserReference { email, userId, firstName, 4 more } | null

A reference to a user with basic identifying information

email: string

User's email address

userId: string

Unique user identifier. Format: usr_{32-hex-chars}

firstName?: string

User's first name

lastName?: string

User's last name

middleName?: string

User's middle name

suffix1?: string

Name suffix (e.g., 'MD', 'Jr.')

suffix2?: string

Additional name suffix

expressCustomer?: ExpressCustomerReference { expressCustomerId, expressCustomerName } | null

A reference to an Express customer with basic identifying information

expressCustomerId: string

Unique Express customer identifier. Format: cus_{32-hex-chars}

expressCustomerName: string

Name of the Express customer

minLength1
metadata?: Record<string, string>

Custom key-value metadata for the study. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars

List studies with pagination

import Avara from 'avara';

const client = new Avara({
  apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const studyListResponse of client.viewer.studies.list()) {
  console.log(studyListResponse.studyInstanceUid);
}
{
  "hasMore": true,
  "studies": [
    {
      "cancelledAt": null,
      "createdAt": "2024-03-15T10:30:00Z",
      "isCancelled": false,
      "severity": "high",
      "studyDescription": "CT Chest/Abdomen/Pelvis",
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
      "studyViewerStatus": "incomplete",
      "updatedAt": "2024-03-15T14:20:00Z",
      "assignedTo": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "createdByApiKey": {
        "apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
        "description": "Production API Key",
        "isClinicalContextEnrichmentEnabled": true,
        "isViewerEnabled": true
      },
      "createdByUser": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "expressCustomer": {
        "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
        "expressCustomerName": "City Medical Center"
      },
      "metadata": {
        "department": "radiology",
        "priority": "urgent"
      }
    }
  ],
  "cursor": "cursor"
}
Returns Examples
{
  "hasMore": true,
  "studies": [
    {
      "cancelledAt": null,
      "createdAt": "2024-03-15T10:30:00Z",
      "isCancelled": false,
      "severity": "high",
      "studyDescription": "CT Chest/Abdomen/Pelvis",
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
      "studyViewerStatus": "incomplete",
      "updatedAt": "2024-03-15T14:20:00Z",
      "assignedTo": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "createdByApiKey": {
        "apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
        "description": "Production API Key",
        "isClinicalContextEnrichmentEnabled": true,
        "isViewerEnabled": true
      },
      "createdByUser": {
        "email": "dr.smith@radiology.com",
        "userId": "usr_1234567890abcdef1234567890abcdef",
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Robert",
        "suffix1": "MD",
        "suffix2": "FACR"
      },
      "expressCustomer": {
        "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
        "expressCustomerName": "City Medical Center"
      },
      "metadata": {
        "department": "radiology",
        "priority": "urgent"
      }
    }
  ],
  "cursor": "cursor"
}