# Auto Scribe

## Domain Types

### Clinical Reference Type

- `ClinicalReferenceType = "facility" | "referring_provider" | "study_description" | "procedure"`

  Category of canonical clinical reference value used for study workflow pickers and normalization.

  - `"facility"`

  - `"referring_provider"`

  - `"study_description"`

  - `"procedure"`

### Height Unit

- `HeightUnit = "in" | "cm"`

  Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

  - `"in"`

  - `"cm"`

### Report Status

- `ReportStatus = "in_progress" | "completed"`

  Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

  - `"in_progress"`

  - `"completed"`

### Sex

- `Sex = "male" | "female" | "other"`

  Patient's biological sex. Options: 'male', 'female', 'other'

  - `"male"`

  - `"female"`

  - `"other"`

### Study Report Metadata

- `StudyReportMetadata`

  Patient demographics and scan information for report generation

  - `age?: string`

    Patient's age at study date (e.g., '34.5 years', '2 months')

  - `dateOfBirth?: string`

    Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

  - `facilityName?: string`

    Name of the medical facility where the scan was performed

  - `height?: Height`

    Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

    - `unit: HeightUnit`

      Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

      - `"in"`

      - `"cm"`

    - `value: number`

  - `mrn?: string`

    Medical Record Number - unique patient identifier

  - `patientName?: string`

    Full name of the patient

  - `procedure?: string`

    Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

  - `referringPhysicianName?: string`

    Name of the physician who referred the patient for this scan

  - `sex?: Sex`

    Patient's biological sex. Options: 'male', 'female', 'other'

    - `"male"`

    - `"female"`

    - `"other"`

  - `studyDate?: string`

    Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

  - `studyTime?: string`

    Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

  - `weight?: Weight`

    Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

    - `unit: WeightUnit`

      Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

      - `"lbs"`

      - `"kg"`

    - `value: number`

### Study Report Status

- `StudyReportStatus = "unassigned" | "assigned" | "in_progress" | 2 more`

  AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

  - `"unassigned"`

  - `"assigned"`

  - `"in_progress"`

  - `"completed"`

  - `"addendum_active"`

### Study Type

- `StudyType = "standard" | "external"`

  Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

  - `"standard"`

  - `"external"`

### Weight Unit

- `WeightUnit = "lbs" | "kg"`

  Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

  - `"lbs"`

  - `"kg"`

# Clinical References

## Create a clinical reference

`client.autoScribe.clinicalReferences.create(ClinicalReferenceCreateParamsbody, RequestOptionsoptions?): ClinicalReference`

**post** `/v1/autoScribe/clinicalReferences`

Creates a canonical clinical reference value for study workflow pickers and normalization.

### Parameters

- `body: ClinicalReferenceCreateParams`

  - `name: string`

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `expressCustomerId?: string`

  - `externalReferenceId?: string | null`

  - `metadata?: Record<string, string>`

### Returns

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

### Example

```typescript
import Avara from 'avara-software';

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

const clinicalReference = await client.autoScribe.clinicalReferences.create({
  name: 'City Medical Center',
  type: 'facility',
});

console.log(clinicalReference.clinicalReferenceId);
```

#### Response

```json
{
  "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
  "createdAt": "2024-01-15T09:00:00Z",
  "isActive": true,
  "name": "City Medical Center",
  "type": "facility",
  "updatedAt": "2024-03-15T14:20:00Z",
  "expressCustomer": {
    "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
    "expressCustomerName": "City Medical Center"
  },
  "externalReferenceId": "FAC-001",
  "metadata": {
    "region": "northeast"
  }
}
```

## List clinical references

`client.autoScribe.clinicalReferences.list(ClinicalReferenceListParamsquery?, RequestOptionsoptions?): CursorClinicalReferences<ClinicalReference>`

**get** `/v1/autoScribe/clinicalReferences`

Lists clinical references with cursor-based pagination and optional filters.

### Parameters

- `query: ClinicalReferenceListParams`

  - `cursor?: string`

    Base64 encoded cursor from previous response

  - `expressCustomerId?: string`

    Filter by Express customer ID. Omit for no filter; pass null for clinic-wide references

  - `isActive?: boolean | null`

    Filter by active status. Defaults to true (active references only). Pass false to list inactive references.

  - `limit?: number`

    Number of results to return (1-100)

  - `type?: ClinicalReferenceType`

    Filter by clinical reference type

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

### Returns

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

### Example

```typescript
import Avara from 'avara-software';

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 clinicalReference of client.autoScribe.clinicalReferences.list()) {
  console.log(clinicalReference.clinicalReferenceId);
}
```

#### Response

```json
{
  "clinicalReferences": [
    {
      "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
      "createdAt": "2024-01-15T09:00:00Z",
      "isActive": true,
      "name": "City Medical Center",
      "type": "facility",
      "updatedAt": "2024-03-15T14:20:00Z",
      "expressCustomer": {
        "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
        "expressCustomerName": "City Medical Center"
      },
      "externalReferenceId": "FAC-001",
      "metadata": {
        "region": "northeast"
      }
    }
  ],
  "hasMore": true,
  "cursor": "cursor"
}
```

## Retrieve a clinical reference by ID

`client.autoScribe.clinicalReferences.retrieve(stringclinicalReferenceID, RequestOptionsoptions?): ClinicalReference`

**get** `/v1/autoScribe/clinicalReferences/{clinicalReferenceId}`

Retrieves a single clinical reference by its unique identifier.

### Parameters

- `clinicalReferenceID: string`

  Unique clinical reference identifier. Format: ref_{32-hex-chars}

### Returns

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

### Example

```typescript
import Avara from 'avara-software';

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

const clinicalReference = await client.autoScribe.clinicalReferences.retrieve(
  'ref_1234567890abcdef1234567890abcdef',
);

console.log(clinicalReference.clinicalReferenceId);
```

#### Response

```json
{
  "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
  "createdAt": "2024-01-15T09:00:00Z",
  "isActive": true,
  "name": "City Medical Center",
  "type": "facility",
  "updatedAt": "2024-03-15T14:20:00Z",
  "expressCustomer": {
    "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
    "expressCustomerName": "City Medical Center"
  },
  "externalReferenceId": "FAC-001",
  "metadata": {
    "region": "northeast"
  }
}
```

## Retrieve a clinical reference by external reference ID

`client.autoScribe.clinicalReferences.retrieveByExternalReferenceID(stringexternalReferenceID, RequestOptionsoptions?): ClinicalReference`

**get** `/v1/autoScribe/clinicalReferences/byExternalReferenceId/{externalReferenceId}`

Retrieves a single clinical reference by its integrator-provided external reference identifier.

### Parameters

- `externalReferenceID: string`

  Integrator-provided external reference identifier

### Returns

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

### Example

```typescript
import Avara from 'avara-software';

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

const clinicalReference = await client.autoScribe.clinicalReferences.retrieveByExternalReferenceID(
  'FAC-001',
);

console.log(clinicalReference.clinicalReferenceId);
```

#### Response

```json
{
  "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
  "createdAt": "2024-01-15T09:00:00Z",
  "isActive": true,
  "name": "City Medical Center",
  "type": "facility",
  "updatedAt": "2024-03-15T14:20:00Z",
  "expressCustomer": {
    "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
    "expressCustomerName": "City Medical Center"
  },
  "externalReferenceId": "FAC-001",
  "metadata": {
    "region": "northeast"
  }
}
```

## Update a clinical reference

`client.autoScribe.clinicalReferences.update(stringclinicalReferenceID, ClinicalReferenceUpdateParamsbody?, RequestOptionsoptions?): ClinicalReference`

**patch** `/v1/autoScribe/clinicalReferences/{clinicalReferenceId}`

Updates name, metadata, and Express customer assignment. Type is immutable after create.

### Parameters

- `clinicalReferenceID: string`

  Unique clinical reference identifier. Format: ref_{32-hex-chars}

- `body: ClinicalReferenceUpdateParams`

  - `expressCustomerId?: string`

  - `metadata?: Record<string, string> | null`

  - `name?: string`

### Returns

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

### Example

```typescript
import Avara from 'avara-software';

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

const clinicalReference = await client.autoScribe.clinicalReferences.update(
  'ref_1234567890abcdef1234567890abcdef',
);

console.log(clinicalReference.clinicalReferenceId);
```

#### Response

```json
{
  "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
  "createdAt": "2024-01-15T09:00:00Z",
  "isActive": true,
  "name": "City Medical Center",
  "type": "facility",
  "updatedAt": "2024-03-15T14:20:00Z",
  "expressCustomer": {
    "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
    "expressCustomerName": "City Medical Center"
  },
  "externalReferenceId": "FAC-001",
  "metadata": {
    "region": "northeast"
  }
}
```

## Delete a clinical reference

`client.autoScribe.clinicalReferences.delete(stringclinicalReferenceID, RequestOptionsoptions?): ClinicalReference`

**post** `/v1/autoScribe/clinicalReferences/{clinicalReferenceId}/delete`

Soft-deletes a clinical reference by setting isActive to false and suffixing the name to free the unique constraint.

### Parameters

- `clinicalReferenceID: string`

  Unique clinical reference identifier. Format: ref_{32-hex-chars}

### Returns

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

### Example

```typescript
import Avara from 'avara-software';

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

const clinicalReference = await client.autoScribe.clinicalReferences.delete(
  'ref_1234567890abcdef1234567890abcdef',
);

console.log(clinicalReference.clinicalReferenceId);
```

#### Response

```json
{
  "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
  "createdAt": "2024-01-15T09:00:00Z",
  "isActive": true,
  "name": "City Medical Center",
  "type": "facility",
  "updatedAt": "2024-03-15T14:20:00Z",
  "expressCustomer": {
    "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
    "expressCustomerName": "City Medical Center"
  },
  "externalReferenceId": "FAC-001",
  "metadata": {
    "region": "northeast"
  }
}
```

## Domain Types

### Clinical Reference

- `ClinicalReference`

  A canonical clinical reference value for study workflow pickers and normalization

  - `clinicalReferenceId: string`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `createdAt: string | null`

    Timestamp when the clinical reference was created

  - `isActive: boolean`

    Whether this reference is active and available for pickers

  - `name: string`

    Canonical display name for this reference value

  - `type: ClinicalReferenceType`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `"facility"`

    - `"referring_provider"`

    - `"study_description"`

    - `"procedure"`

  - `updatedAt: string | null`

    Timestamp when the clinical reference was last updated

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalReferenceId?: string | null`

    Integrator-provided stable identifier for mapping inbound data

  - `metadata?: Record<string, string>`

    Optional key-value metadata. Maximum 50 pairs

# Ephemeral Sessions

## Create an ephemeral AutoScribe viewer session

`client.autoScribe.ephemeralSessions.create(EphemeralSessionCreateParamsbody, RequestOptionsoptions?): EphemeralSessionCreateResponse`

**post** `/v1/autoScribe/ephemeral-sessions`

Mints a 30-second tokenized landing URL for a userless, studyless AutoScribe viewer session. The token names a customer retrievalId (not an Avara study). Optional options are echoed verbatim on ephemeral.access_requested (max 3072 bytes JSON). Optional hangingProtocol applies a single-monitor layout when the viewer loads. Requires a customer study webhook on the API key.

### Parameters

- `body: EphemeralSessionCreateParams`

  - `retrievalId: string`

    Opaque customer handle for this view session. Avara stores and echoes it; it is not an Avara study ID.

  - `hangingProtocol?: EphemeralHangingProtocol`

    Optional single-monitor hanging protocol applied when the ephemeral viewer loads. Omitted = no protocol. Invalid shape is rejected.

    - `layout: ViewerLayout`

      Viewport grid layout for an ephemeral hanging protocol. Wire values match first-party viewer layouts ('1x1' through '4x4').

      - `"1x1"`

      - `"1x2"`

      - `"1x3"`

      - `"1x4"`

      - `"2x1"`

      - `"2x2"`

      - `"2x3"`

      - `"2x4"`

      - `"3x1"`

      - `"3x2"`

      - `"3x3"`

      - `"3x4"`

      - `"4x1"`

      - `"4x2"`

      - `"4x3"`

      - `"4x4"`

    - `viewportAssignments: Array<string | null>`

  - `options?: Record<string, unknown>`

    Optional JSON object echoed verbatim on ephemeral.access_requested. Avara does not read or edit it. Hard cap 3072 bytes on JSON.stringify. Examples: studyInstanceUids or internal ids for multi-study reads. Not for URLs or manifests.

### Returns

- `EphemeralSessionCreateResponse`

  Tokenized landing URL for an ephemeral AutoScribe viewer session (30-second token).

  - `url: string`

### Example

```typescript
import Avara from 'avara-software';

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

const ephemeralSession = await client.autoScribe.ephemeralSessions.create({
  retrievalId: 'order-12345',
});

console.log(ephemeralSession.url);
```

#### Response

```json
{
  "url": "https://autoscribe.avarasoftware.com/token/landing?token=abc123"
}
```

## Domain Types

### Ephemeral Session Create Response

- `EphemeralSessionCreateResponse`

  Tokenized landing URL for an ephemeral AutoScribe viewer session (30-second token).

  - `url: string`

# Studies

## Create a new study

`client.autoScribe.studies.create(StudyCreateParamsbody, RequestOptionsoptions?): StudyCreateResponse`

**post** `/v1/autoScribe/studies`

Creates a new study in the AutoScribe system with DICOM metadata and report generation information. The study can include patient demographics, scan details, clinical context (indication, history, technologist technique/notes), an imaging modality, an external patient identifier for linking studies, and external prior reports for comparison context.

### Parameters

- `body: StudyCreateParams`

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `assignedTo?: string`

    User ID to assign the study to. Format: usr_{32-hex-chars}

  - `clinicalHistory?: string | null`

    Relevant clinical history for the patient/study

  - `clinicalIndication?: string | null`

    Clinical indication for the study (reason the study was ordered)

  - `expressCustomerId?: string`

    Express customer ID for the study. Format: cus_{32-hex-chars}

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier used to link studies for the same patient across the AutoScribe system

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text, e.g., 'CT', 'MRI', 'X-Ray')

  - `priorReports?: Array<PriorReport>`

    External prior reports (metadata + full report text) to provide longitudinal/comparison context for this study. Maximum 50 items

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `technologistNotes?: Array<string>`

    Technologist notes for the study. Maximum 50 items, each up to 1000 characters

  - `technologistTechnique?: string | null`

    Imaging technique description provided by the technologist

### Returns

- `StudyCreateResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Example

```typescript
import Avara from 'avara-software';

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

const study = await client.autoScribe.studies.create({
  reportMetadata: {},
  severity: 'normal',
  studyDescription: 'Brain MRI with Contrast',
  studyInstanceUid: '1.2.840.113619.2.55.3.604688119.868.1234567890.123',
});

console.log(study.studyInstanceUid);
```

#### Response

```json
{
  "cancelledAt": null,
  "createdAt": "2024-03-15T10:30:00Z",
  "isCancelled": false,
  "reportMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "severity": "normal",
  "studyDescription": "Brain MRI with Contrast",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "studyReportStatus": "in_progress",
  "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"
  },
  "clinicalHistory": "clinicalHistory",
  "clinicalIndication": "clinicalIndication",
  "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"
  },
  "externalPatientId": "externalPatientId",
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "isCritical": true,
  "metadata": {
    "department": "radiology",
    "priority": "routine"
  },
  "modality": "modality",
  "priorReports": [
    {
      "reportText": "IMPRESSION: No acute cardiopulmonary process.",
      "externalStudyId": "EXT-2024-001",
      "modality": "CT",
      "studyDate": "2024-01-15",
      "studyDescription": "CT Chest without contrast"
    }
  ],
  "reportIds": [
    {
      "isCritical": null,
      "reportId": "rep_1234567890abcdef1234567890abcdef",
      "status": "in_progress"
    }
  ],
  "studyType": "standard",
  "technologistNotes": [
    "x"
  ],
  "technologistTechnique": "technologistTechnique"
}
```

## List studies with pagination

`client.autoScribe.studies.list(StudyListParamsquery?, RequestOptionsoptions?): CursorStudies<StudyListResponse>`

**get** `/v1/autoScribe/studies`

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

### Parameters

- `query: StudyListParams`

  - `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)

  - `severity?: Severity`

    Filter by study severity

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription?: string`

    Filter by study description (contains match)

  - `studyReportStatus?: Array<StudyReportStatus>`

    Filter by report status(es)

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `studyType?: StudyType`

    Filter by study kind. Omit to return both 'standard' and 'external' studies.

    - `"standard"`

    - `"external"`

### Returns

- `StudyListResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Example

```typescript
import Avara from 'avara-software';

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.autoScribe.studies.list()) {
  console.log(studyListResponse.studyInstanceUid);
}
```

#### Response

```json
{
  "hasMore": true,
  "studies": [
    {
      "cancelledAt": null,
      "createdAt": "2024-03-15T10:30:00Z",
      "isCancelled": false,
      "reportMetadata": {
        "age": "38 years",
        "dateOfBirth": "1985-07-20",
        "facilityName": "City Medical Center",
        "height": {
          "unit": "cm",
          "value": 165
        },
        "mrn": "MRN-2024-001234",
        "patientName": "Jane Doe",
        "procedure": "MRI Brain with Contrast",
        "referringPhysicianName": "Dr. Michael Chen",
        "sex": "female",
        "studyDate": "2024-03-15",
        "studyTime": "14:30",
        "weight": {
          "unit": "kg",
          "value": 62
        }
      },
      "severity": "normal",
      "studyDescription": "Brain MRI with Contrast",
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
      "studyReportStatus": "in_progress",
      "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"
      },
      "clinicalHistory": "clinicalHistory",
      "clinicalIndication": "clinicalIndication",
      "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"
      },
      "externalPatientId": "externalPatientId",
      "externalReportId": "ext_1234567890abcdef1234567890abcdef",
      "isCritical": true,
      "metadata": {
        "department": "radiology",
        "priority": "routine"
      },
      "modality": "modality",
      "priorReports": [
        {
          "reportText": "IMPRESSION: No acute cardiopulmonary process.",
          "externalStudyId": "EXT-2024-001",
          "modality": "CT",
          "studyDate": "2024-01-15",
          "studyDescription": "CT Chest without contrast"
        }
      ],
      "reportIds": [
        {
          "isCritical": null,
          "reportId": "rep_1234567890abcdef1234567890abcdef",
          "status": "in_progress"
        }
      ],
      "studyType": "standard",
      "technologistNotes": [
        "x"
      ],
      "technologistTechnique": "technologistTechnique"
    }
  ],
  "cursor": "cursor"
}
```

## Retrieve a study by ID

`client.autoScribe.studies.retrieve(stringstudyID, RequestOptionsoptions?): StudyRetrieveResponse`

**get** `/v1/autoScribe/studies/{studyId}`

Retrieves a single study by its unique study ID. Returns the complete study object with all metadata, report status, and patient information.

### Parameters

- `studyID: string`

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

### Returns

- `StudyRetrieveResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Example

```typescript
import Avara from 'avara-software';

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

const study = await client.autoScribe.studies.retrieve('stu_1234567890abcdef1234567890abcdef');

console.log(study.studyInstanceUid);
```

#### Response

```json
{
  "cancelledAt": null,
  "createdAt": "2024-03-15T10:30:00Z",
  "isCancelled": false,
  "reportMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "severity": "normal",
  "studyDescription": "Brain MRI with Contrast",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "studyReportStatus": "in_progress",
  "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"
  },
  "clinicalHistory": "clinicalHistory",
  "clinicalIndication": "clinicalIndication",
  "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"
  },
  "externalPatientId": "externalPatientId",
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "isCritical": true,
  "metadata": {
    "department": "radiology",
    "priority": "routine"
  },
  "modality": "modality",
  "priorReports": [
    {
      "reportText": "IMPRESSION: No acute cardiopulmonary process.",
      "externalStudyId": "EXT-2024-001",
      "modality": "CT",
      "studyDate": "2024-01-15",
      "studyDescription": "CT Chest without contrast"
    }
  ],
  "reportIds": [
    {
      "isCritical": null,
      "reportId": "rep_1234567890abcdef1234567890abcdef",
      "status": "in_progress"
    }
  ],
  "studyType": "standard",
  "technologistNotes": [
    "x"
  ],
  "technologistTechnique": "technologistTechnique"
}
```

## Update a study

`client.autoScribe.studies.update(stringstudyID, StudyUpdateParamsbody?, RequestOptionsoptions?): StudyUpdateResponse`

**patch** `/v1/autoScribe/studies/{studyId}`

Updates a study's properties including description, severity, assignment, organization, metadata, and report metadata. All fields are optional - only provided fields will be updated.

### Parameters

- `studyID: string`

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

- `body: StudyUpdateParams`

  - `assignedTo?: string`

    User ID to assign the study to, or null to unassign. Format: usr_{32-hex-chars}

  - `clinicalHistory?: string | null`

    Relevant clinical history for the patient/study. Null clears.

  - `clinicalIndication?: string | null`

    Clinical indication for the study. Null clears.

  - `expressCustomerId?: string`

    Express Customer ID for the study, or null to remove. Format: cus_{32-hex-chars}

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier used to link studies for the same patient. Null clears.

  - `metadata?: Record<string, string> | null`

  - `modality?: string | null`

    Imaging modality for the study (free text). Null clears.

  - `priorReports?: Array<PriorReport> | null`

    External prior reports (metadata + full report text) for comparison context. Null clears; an array replaces the existing set. Maximum 50 items

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportMetadata?: ReportMetadata`

    - `age?: string | null`

    - `dateOfBirth?: string | null`

    - `facilityName?: string | null`

    - `height?: Height | null`

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string | null`

    - `patientName?: string | null`

    - `procedure?: string | null`

      Procedure or study type. Nullable on PATCH. Maps to DB scan_type and report_header.scan_type.

    - `referringPhysicianName?: string | null`

    - `sex?: Sex | null`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string | null`

      Study date (YYYY-MM-DD). Nullable on PATCH. Maps to DB scan_date and report_header.scan_date.

    - `studyTime?: string | null`

      Study time (HH:MM). Nullable on PATCH. Maps to DB scan_time and report_header.scan_time.

    - `weight?: Weight | null`

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity?: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription?: string`

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

  - `technologistNotes?: Array<string> | null`

    Technologist notes for the study. Null clears; an array replaces the existing set. Maximum 50 items, each up to 1000 characters

  - `technologistTechnique?: string | null`

    Imaging technique description provided by the technologist. Null clears.

### Returns

- `StudyUpdateResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Example

```typescript
import Avara from 'avara-software';

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

const study = await client.autoScribe.studies.update('stu_1234567890abcdef1234567890abcdef');

console.log(study.studyInstanceUid);
```

#### Response

```json
{
  "cancelledAt": null,
  "createdAt": "2024-03-15T10:30:00Z",
  "isCancelled": false,
  "reportMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "severity": "normal",
  "studyDescription": "Brain MRI with Contrast",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "studyReportStatus": "in_progress",
  "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"
  },
  "clinicalHistory": "clinicalHistory",
  "clinicalIndication": "clinicalIndication",
  "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"
  },
  "externalPatientId": "externalPatientId",
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "isCritical": true,
  "metadata": {
    "department": "radiology",
    "priority": "routine"
  },
  "modality": "modality",
  "priorReports": [
    {
      "reportText": "IMPRESSION: No acute cardiopulmonary process.",
      "externalStudyId": "EXT-2024-001",
      "modality": "CT",
      "studyDate": "2024-01-15",
      "studyDescription": "CT Chest without contrast"
    }
  ],
  "reportIds": [
    {
      "isCritical": null,
      "reportId": "rep_1234567890abcdef1234567890abcdef",
      "status": "in_progress"
    }
  ],
  "studyType": "standard",
  "technologistNotes": [
    "x"
  ],
  "technologistTechnique": "technologistTechnique"
}
```

## Cancel a study

`client.autoScribe.studies.cancel(StudyCancelParamsbody?, RequestOptionsoptions?): StudyCancelResponse`

**post** `/v1/autoScribe/studies/cancel`

Marks a study as cancelled. Cancelled studies are preserved but flagged as inactive. Can be identified by either study ID or DICOM Study Instance UID.

### Parameters

- `body: StudyCancelParams`

  - `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')

### Returns

- `StudyCancelResponse`

  Response for cancelling a study in AutoScribe

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.studies.cancel();

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "message"
}
```

## Uncancel a study

`client.autoScribe.studies.uncancel(StudyUncancelParamsbody?, RequestOptionsoptions?): StudyUncancelResponse`

**post** `/v1/autoScribe/studies/uncancel`

Restores a cancelled study to active status. The study must have been previously cancelled. Can be identified by either study ID or DICOM Study Instance UID.

### Parameters

- `body: StudyUncancelParams`

  - `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')

### Returns

- `StudyUncancelResponse`

  Response for uncancelling a study in AutoScribe

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.studies.uncancel();

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "message"
}
```

## Generate a reroute URL with viewer and dictation

`client.autoScribe.studies.rerouteURL(StudyRerouteURLParamsbody, RequestOptionsoptions?): StudyRerouteURLResponse`

**post** `/v1/autoScribe/studies/reroute-url`

Generates a tokenized URL that redirects users to the AutoScribe interface (viewer + dictation) for the specified study and user. The URL includes authentication and is time-limited for security.

### Parameters

- `body: StudyRerouteURLParams`

  - `assignedToUserId: string`

    User ID to assign study to. Format: usr_{32-hex-chars}

  - `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')

### Returns

- `StudyRerouteURLResponse`

  Response containing the generated reroute URL for AutoScribe (viewer + dictation)

  - `url: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.studies.rerouteURL({
  assignedToUserId: 'usr_1234567890abcdef1234567890abcdef',
});

console.log(response.url);
```

#### Response

```json
{
  "url": "https://autoscribe.avarasoftware.com/study/stu_1234?token=abc123"
}
```

## Generate a viewer-only reroute URL

`client.autoScribe.studies.viewerOnlyRerouteURL(StudyViewerOnlyRerouteURLParamsbody?, RequestOptionsoptions?): StudyViewerOnlyRerouteURLResponse`

**post** `/v1/autoScribe/studies/viewer-only-reroute-url`

Generates a tokenized URL that redirects users to the viewer interface only (no dictation) for the specified study. Useful for read-only access or referring physicians. The URL includes authentication and is time-limited.

### Parameters

- `body: StudyViewerOnlyRerouteURLParams`

  - `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')

  - `userId?: string`

    Optional user ID for audit tracking. Format: usr_{32-hex-chars}

### Returns

- `StudyViewerOnlyRerouteURLResponse`

  Response containing the generated viewer-only reroute URL. Requires viewer to be configured.

  - `url: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.studies.viewerOnlyRerouteURL();

console.log(response.url);
```

#### Response

```json
{
  "url": "https://viewer.avarasoftware.com/study/stu_1234?token=abc123"
}
```

## Retrieve a study by DICOM UID

`client.autoScribe.studies.retrieveByUid(stringstudyInstanceUid, RequestOptionsoptions?): StudyRetrieveByUidResponse`

**get** `/v1/autoScribe/studies/by-uid/{studyInstanceUid}`

Retrieves a single study by its DICOM Study Instance UID. This is useful when you have the DICOM UID but not the Avara study ID.

### Parameters

- `studyInstanceUid: string`

  DICOM Study Instance UID. Format: numbers and dots (e.g., 1.2.840.10008.5.1.4.1.1.2).

### Returns

- `StudyRetrieveByUidResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.studies.retrieveByUid('1.2.840.10008.5.1.4.1.1.2');

console.log(response.studyInstanceUid);
```

#### Response

```json
{
  "cancelledAt": null,
  "createdAt": "2024-03-15T10:30:00Z",
  "isCancelled": false,
  "reportMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "severity": "normal",
  "studyDescription": "Brain MRI with Contrast",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "studyReportStatus": "in_progress",
  "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"
  },
  "clinicalHistory": "clinicalHistory",
  "clinicalIndication": "clinicalIndication",
  "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"
  },
  "externalPatientId": "externalPatientId",
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "isCritical": true,
  "metadata": {
    "department": "radiology",
    "priority": "routine"
  },
  "modality": "modality",
  "priorReports": [
    {
      "reportText": "IMPRESSION: No acute cardiopulmonary process.",
      "externalStudyId": "EXT-2024-001",
      "modality": "CT",
      "studyDate": "2024-01-15",
      "studyDescription": "CT Chest without contrast"
    }
  ],
  "reportIds": [
    {
      "isCritical": null,
      "reportId": "rep_1234567890abcdef1234567890abcdef",
      "status": "in_progress"
    }
  ],
  "studyType": "standard",
  "technologistNotes": [
    "x"
  ],
  "technologistTechnique": "technologistTechnique"
}
```

## Domain Types

### Prior Report

- `PriorReport`

  External prior report metadata and text stored on a study

  - `reportText: string`

    Full prior report text

  - `externalStudyId?: string`

    Integrator's external study identifier

  - `modality?: string`

    Imaging modality for the prior study

  - `studyDate?: string`

    Prior study date (YYYY-MM-DD)

  - `studyDescription?: string`

    Description of the prior study

### Report ID With Status

- `ReportIDWithStatus`

  A report ID paired with its current status

  - `isCritical: boolean | null`

    Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

  - `reportId: string`

    Unique report identifier. Format: rep_{32-hex-chars}

  - `status: ReportStatus`

    Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

    - `"in_progress"`

    - `"completed"`

### Study Create Response

- `StudyCreateResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Study List Response

- `StudyListResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Study Retrieve Response

- `StudyRetrieveResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Study Update Response

- `StudyUpdateResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Study Cancel Response

- `StudyCancelResponse`

  Response for cancelling a study in AutoScribe

  - `success: boolean`

  - `message?: string`

### Study Uncancel Response

- `StudyUncancelResponse`

  Response for uncancelling a study in AutoScribe

  - `success: boolean`

  - `message?: string`

### Study Reroute URL Response

- `StudyRerouteURLResponse`

  Response containing the generated reroute URL for AutoScribe (viewer + dictation)

  - `url: string`

### Study Viewer Only Reroute URL Response

- `StudyViewerOnlyRerouteURLResponse`

  Response containing the generated viewer-only reroute URL. Requires viewer to be configured.

  - `url: string`

### Study Retrieve By Uid Response

- `StudyRetrieveByUidResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

# External

## Create an external study

`client.autoScribe.studies.external.create(ExternalCreateParamsbody, RequestOptionsoptions?): ExternalCreateResponse`

**post** `/v1/autoScribe/studies/external`

Creates an archive (external) AutoScribe study. Clinical context fields are not accepted. If no report fields are sent, no report row is created. Study create is all-or-nothing, including file ingest.

### Parameters

- `body: ExternalCreateParams`

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `expressCustomerId?: string`

  - `externalPatientId?: string | null`

    Strongly recommended if you want to leverage priors functionality for future reads for this patient.

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

  - `readerName?: string`

    Optional original reader / author name. Shown as-is. May be set on study create or a later report create; a later create overwrites it when provided.

  - `reportFileName?: string`

    File name including extension. Required when reportFileUrl is provided. Supported types: PDF, PNG, JPG, GIF, WEBP.

  - `reportFileUrl?: string`

    HTTPS download URL for a PDF or image (PNG, JPG, GIF, WEBP). Not used for AI tooling; the reader can still access it. Avara fetches this URL server-side. If omitted, you can add it later. Once set, it cannot be edited; delete the study to remake it. Whitelist https://api.avarasoftware.com on the file host if the fetch is origin-restricted.

  - `reportText?: string`

    When this study is used as a prior, report AI tools leverage this text directly. If omitted, you can add it later via POST /studies/external/reports. Once set, it cannot be edited; delete the study to remake it.

  - `signedAt?: string`

    Optional original sign-off timestamp or label. Shown as-is with no format validation. May be set on study create or a later report create; a later create overwrites it when provided.

### Returns

- `ExternalCreateResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### Example

```typescript
import Avara from 'avara-software';

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

const external = await client.autoScribe.studies.external.create({
  reportMetadata: {},
  severity: 'normal',
  studyDescription: 'CT Chest without contrast',
  studyInstanceUid: '1.2.840.113619.2.55.3.604688119.868.1234567890.123',
});

console.log(external.studyInstanceUid);
```

#### Response

```json
{
  "cancelledAt": null,
  "createdAt": "2024-03-15T10:30:00Z",
  "isCancelled": false,
  "reportMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "severity": "normal",
  "studyDescription": "Brain MRI with Contrast",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "studyReportStatus": "in_progress",
  "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"
  },
  "clinicalHistory": "clinicalHistory",
  "clinicalIndication": "clinicalIndication",
  "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"
  },
  "externalPatientId": "externalPatientId",
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "isCritical": true,
  "metadata": {
    "department": "radiology",
    "priority": "routine"
  },
  "modality": "modality",
  "priorReports": [
    {
      "reportText": "IMPRESSION: No acute cardiopulmonary process.",
      "externalStudyId": "EXT-2024-001",
      "modality": "CT",
      "studyDate": "2024-01-15",
      "studyDescription": "CT Chest without contrast"
    }
  ],
  "reportIds": [
    {
      "isCritical": null,
      "reportId": "rep_1234567890abcdef1234567890abcdef",
      "status": "in_progress"
    }
  ],
  "studyType": "standard",
  "technologistNotes": [
    "x"
  ],
  "technologistTechnique": "technologistTechnique"
}
```

## Delete an external study

`client.autoScribe.studies.external.delete(ExternalDeleteParamsbody?, RequestOptionsoptions?): ExternalDeleteResponse`

**post** `/v1/autoScribe/studies/external/delete`

Soft-deletes an external study. This is one-way; POST /studies/uncancel cannot reverse it.

### Parameters

- `body: ExternalDeleteParams`

  - `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')

### Returns

- `ExternalDeleteResponse`

  Result of deleting an external study

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const external = await client.autoScribe.studies.external.delete();

console.log(external.success);
```

#### Response

```json
{
  "success": true,
  "message": "message"
}
```

## Domain Types

### External Create Response

- `ExternalCreateResponse`

  A study entity in the AutoScribe system with report workflow status

  - `cancelledAt: string | null`

    Timestamp when the study was cancelled, null if not cancelled

  - `createdAt: string | null`

    Timestamp when the study was created

  - `isCancelled: boolean`

    Whether the study has been cancelled

  - `reportMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `severity: Severity`

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

    - `"normal"`

    - `"high"`

    - `"stat"`

  - `studyDescription: string`

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

  - `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')

  - `studyReportStatus: StudyReportStatus`

    AutoScribe report workflow status for a study. 'unassigned' = no radiologist assigned, 'assigned' = assigned but not started, 'in_progress' = actively being dictated, 'completed' = report signed, 'addendum_active' = addendum in progress.

    - `"unassigned"`

    - `"assigned"`

    - `"in_progress"`

    - `"completed"`

    - `"addendum_active"`

  - `updatedAt: string | null`

    Timestamp when the study was last updated

  - `assignedTo?: UserReference | 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

  - `clinicalHistory?: string | null`

    Relevant clinical history for the study

  - `clinicalIndication?: string | null`

    Clinical indication for the study

  - `createdByApiKey?: APIKeyReference | null`

    A reference to an API key with basic identifying information

    - `apiKeyId: string`

      Unique API key identifier (UUIDv4 format)

    - `description: string`

      Human-readable description of the API key

    - `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 | null`

    A reference to a user with basic identifying information

  - `expressCustomer?: ExpressCustomerReference | 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

  - `externalPatientId?: string | null`

    Integrator-provided stable patient identifier for linking studies

  - `externalReportId?: string`

    External report identifier when this study has an attached archive report. Format: ext_{32-hex-chars}

  - `isCritical?: boolean`

    Whether the primary report was marked as critical at sign-off

  - `metadata?: Record<string, string>`

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

  - `modality?: string | null`

    Imaging modality for the study (free text)

  - `priorReports?: Array<PriorReport>`

    External prior reports with metadata and text

    - `reportText: string`

      Full prior report text

    - `externalStudyId?: string`

      Integrator's external study identifier

    - `modality?: string`

      Imaging modality for the prior study

    - `studyDate?: string`

      Prior study date (YYYY-MM-DD)

    - `studyDescription?: string`

      Description of the prior study

  - `reportIds?: Array<ReportIDWithStatus>`

    Array of report IDs associated with this study, including addendums

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

  - `studyType?: StudyType`

    Kind of study. 'standard' is a live AutoScribe reading-workflow study. 'external' is an imported archive study.

    - `"standard"`

    - `"external"`

  - `technologistNotes?: Array<string>`

    Technologist notes for the study

  - `technologistTechnique?: string | null`

    Imaging technique description

### External Delete Response

- `ExternalDeleteResponse`

  Result of deleting an external study

  - `success: boolean`

  - `message?: string`

# Reports

## Attach an external report

`client.autoScribe.studies.external.reports.create(ReportCreateParamsbody?, RequestOptionsoptions?): ReportCreateResponse`

**post** `/v1/autoScribe/studies/external/reports`

Attach or fill missing report fields on an existing external study. Text and file are write-once. readerName and signedAt overwrite when provided.

### Parameters

- `body: ReportCreateParams`

  - `readerName?: string`

    Optional original reader / author name. Shown as-is. May be set on study create or a later report create; a later create overwrites it when provided.

  - `reportFileName?: string`

    File name including extension. Required when reportFileUrl is provided. Supported types: PDF, PNG, JPG, GIF, WEBP.

  - `reportFileUrl?: string`

    HTTPS download URL for a PDF or image (PNG, JPG, GIF, WEBP). Not used for AI tooling; the reader can still access it. Avara fetches this URL server-side. If omitted, you can add it later. Once set, it cannot be edited; delete the study to remake it. Whitelist https://api.avarasoftware.com on the file host if the fetch is origin-restricted.

  - `reportText?: string`

    When this study is used as a prior, report AI tools leverage this text directly. If omitted, you can add it later via POST /studies/external/reports. Once set, it cannot be edited; delete the study to remake it.

  - `signedAt?: string`

    Optional original sign-off timestamp or label. Shown as-is with no format validation. May be set on study create or a later report create; a later create overwrites it when provided.

  - `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')

### Returns

- `ReportCreateResponse`

  Created or updated external report identifiers

  - `externalReportId: string`

  - `studyId: string`

  - `studyInstanceUid: string`

### Example

```typescript
import Avara from 'avara-software';

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

const report = await client.autoScribe.studies.external.reports.create();

console.log(report.studyInstanceUid);
```

#### Response

```json
{
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123"
}
```

## List external reports

`client.autoScribe.studies.external.reports.list(ReportListParamsquery?, RequestOptionsoptions?): CursorExternalReports<ReportListResponse>`

**get** `/v1/autoScribe/studies/external/reports`

Cursor-paginated list of external reports. List items omit report text and download URLs.

### Parameters

- `query: ReportListParams`

  - `cursor?: string`

    Base64 encoded cursor from previous response

  - `limit?: number`

    Number of results to return (1-100)

  - `studyId?: string`

    Filter to one study. Format: stu_{32-hex-chars}

### Returns

- `ReportListResponse`

  - `createdAt: string | null`

  - `externalReportId: string`

  - `hasReportText: boolean`

  - `reportPdfPresent: boolean`

  - `studyId: string`

  - `studyInstanceUid: string`

  - `readerName?: string | null`

  - `signedAt?: string | null`

### Example

```typescript
import Avara from 'avara-software';

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 reportListResponse of client.autoScribe.studies.external.reports.list()) {
  console.log(reportListResponse.studyInstanceUid);
}
```

#### Response

```json
{
  "hasMore": true,
  "reports": [
    {
      "createdAt": "2019-12-27T18:11:19.117Z",
      "externalReportId": "ext_1234567890abcdef1234567890abcdef",
      "hasReportText": true,
      "reportPdfPresent": true,
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
      "readerName": "readerName",
      "signedAt": "signedAt"
    }
  ],
  "cursor": "cursor"
}
```

## Retrieve an external report

`client.autoScribe.studies.external.reports.retrieve(stringexternalReportID, RequestOptionsoptions?): ReportRetrieveResponse`

**get** `/v1/autoScribe/studies/external/reports/{externalReportId}`

Returns snapshot metadata plus report text and/or a short-lived download URL. Text is what AI priors use; the file is reader-only and is not used for AI.

### Parameters

- `externalReportID: string`

  External report identifier. Format: ext_{32-hex-chars}

### Returns

- `ReportRetrieveResponse`

  External report snapshot including text and/or a presigned file URL

  - `createdAt: string | null`

  - `externalReportId: string`

  - `studyId: string`

  - `studyInstanceUid: string`

  - `presignedUrl?: string | null`

    Short-lived download URL for the attached PDF or image. Not used for AI tooling; the reader can still access it.

  - `readerName?: string | null`

  - `reportText?: string | null`

    When this study is used as a prior, report AI tools leverage this text directly.

  - `signedAt?: string | null`

  - `snapshotMetadata?: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

### Example

```typescript
import Avara from 'avara-software';

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

const report = await client.autoScribe.studies.external.reports.retrieve(
  'ext_1234567890abcdef1234567890abcdef',
);

console.log(report.studyInstanceUid);
```

#### Response

```json
{
  "createdAt": "2019-12-27T18:11:19.117Z",
  "externalReportId": "ext_1234567890abcdef1234567890abcdef",
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "presignedUrl": "https://viewer.avarasoftware.com/study/stu_1234",
  "readerName": "readerName",
  "reportText": "reportText",
  "signedAt": "signedAt",
  "snapshotMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  }
}
```

## Domain Types

### Report Create Response

- `ReportCreateResponse`

  Created or updated external report identifiers

  - `externalReportId: string`

  - `studyId: string`

  - `studyInstanceUid: string`

### Report List Response

- `ReportListResponse`

  - `createdAt: string | null`

  - `externalReportId: string`

  - `hasReportText: boolean`

  - `reportPdfPresent: boolean`

  - `studyId: string`

  - `studyInstanceUid: string`

  - `readerName?: string | null`

  - `signedAt?: string | null`

### Report Retrieve Response

- `ReportRetrieveResponse`

  External report snapshot including text and/or a presigned file URL

  - `createdAt: string | null`

  - `externalReportId: string`

  - `studyId: string`

  - `studyInstanceUid: string`

  - `presignedUrl?: string | null`

    Short-lived download URL for the attached PDF or image. Not used for AI tooling; the reader can still access it.

  - `readerName?: string | null`

  - `reportText?: string | null`

    When this study is used as a prior, report AI tools leverage this text directly.

  - `signedAt?: string | null`

  - `snapshotMetadata?: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

# Users

## Create and invite a new user

`client.autoScribe.users.invite(UserInviteParamsbody, RequestOptionsoptions?): UserInviteResponse`

**post** `/v1/autoScribe/users`

Creates a new user in the AutoScribe system and sends them an invitation email. The user will have the specified permissions including report creation and study management capabilities. NPI number is required for users who can create reports.

### Parameters

- `body: UserInviteParams`

  - `canCreateReports: boolean`

  - `canManageStudies: boolean`

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

  - `lastName: string`

    User's last name

  - `level: AssignableUserLevel`

    User access level assignable via the API. 'admin' can manage users/settings, 'member' has standard access. 'owner' is dashboard-only and cannot be assigned via the API.

    - `"admin"`

    - `"member"`

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### Returns

- `UserInviteResponse`

  Response for inviting a user to AutoScribe. Level is restricted to admin/member since owners cannot be invited via API.

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: AssignableUserLevel`

    User access level assignable via the API. 'admin' can manage users/settings, 'member' has standard access. 'owner' is dashboard-only and cannot be assigned via the API.

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.users.invite({
  canCreateReports: true,
  canManageStudies: true,
  clinicRole: 'Radiologist',
  email: 'dr.johnson@hospital.org',
  firstName: 'Sarah',
  hasDashboardAccess: true,
  lastName: 'Johnson',
  level: 'member',
});

console.log(response.middleName);
```

#### Response

```json
{
  "canCreateReports": true,
  "canManageStudies": true,
  "clinicRole": "Radiologist",
  "createdAt": "2024-01-15T10:00:00Z",
  "email": "dr.johnson@hospital.org",
  "firstName": "Sarah",
  "hasDashboardAccess": true,
  "invitedSource": "api",
  "lastLoginAt": "2024-03-15T09:00:00Z",
  "lastName": "Johnson",
  "level": "member",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "middleName": "Marie",
  "npiNumber": "1234567893",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": "FACR"
}
```

## List users with pagination

`client.autoScribe.users.list(UserListParamsquery?, RequestOptionsoptions?): CursorUsers<UserListResponse>`

**get** `/v1/autoScribe/users`

Retrieves a paginated list of users with optional filtering by access level, email, name, invitation source, and report creation capability. Returns up to 100 users per request.

### Parameters

- `query: UserListParams`

  - `canCreateReports?: boolean | null`

    Filter by canCreateReports permission (AutoScribe-specific)

  - `cursor?: string`

    Base64 encoded cursor from previous response

  - `email?: string`

    Filter by exact email match

  - `firstName?: string`

    Filter by first name (contains match)

  - `invitedSource?: InvitedSource`

    Filter by invitation source

    - `"dashboard"`

    - `"api"`

  - `lastName?: string`

    Filter by last name (contains match)

  - `level?: UserLevel`

    Filter by user level

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `limit?: number`

    Number of results to return (1-100)

### Returns

- `UserListResponse`

  A user in the AutoScribe system with report creation permissions

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### Example

```typescript
import Avara from 'avara-software';

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 userListResponse of client.autoScribe.users.list()) {
  console.log(userListResponse.middleName);
}
```

#### Response

```json
{
  "hasMore": true,
  "users": [
    {
      "canCreateReports": true,
      "canManageStudies": true,
      "clinicRole": "Radiologist",
      "createdAt": "2024-01-15T10:00:00Z",
      "email": "dr.johnson@hospital.org",
      "firstName": "Sarah",
      "hasDashboardAccess": true,
      "invitedSource": "api",
      "lastLoginAt": "2024-03-15T09:00:00Z",
      "lastName": "Johnson",
      "level": "member",
      "userId": "usr_1234567890abcdef1234567890abcdef",
      "middleName": "Marie",
      "npiNumber": "1234567893",
      "phoneNumber": "5551234567",
      "suffix1": "MD",
      "suffix2": "FACR"
    }
  ],
  "cursor": "cursor"
}
```

## Retrieve a user by ID

`client.autoScribe.users.retrieve(stringuserID, RequestOptionsoptions?): UserRetrieveResponse`

**get** `/v1/autoScribe/users/{userId}`

Retrieves a single user by their unique user ID. Returns the complete user object with all profile information, permissions, AutoScribe-specific settings, and status.

### Parameters

- `userID: string`

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

### Returns

- `UserRetrieveResponse`

  A user in the AutoScribe system with report creation permissions

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### Example

```typescript
import Avara from 'avara-software';

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

const user = await client.autoScribe.users.retrieve('usr_1234567890abcdef1234567890abcdef');

console.log(user.middleName);
```

#### Response

```json
{
  "canCreateReports": true,
  "canManageStudies": true,
  "clinicRole": "Radiologist",
  "createdAt": "2024-01-15T10:00:00Z",
  "email": "dr.johnson@hospital.org",
  "firstName": "Sarah",
  "hasDashboardAccess": true,
  "invitedSource": "api",
  "lastLoginAt": "2024-03-15T09:00:00Z",
  "lastName": "Johnson",
  "level": "member",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "middleName": "Marie",
  "npiNumber": "1234567893",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": "FACR"
}
```

## Update a user

`client.autoScribe.users.update(stringuserID, UserUpdateParamsbody?, RequestOptionsoptions?): UserUpdateResponse`

**patch** `/v1/autoScribe/users/{userId}`

Updates a user's profile information, permissions, and AutoScribe-specific settings. All fields are optional - only provided fields will be updated. Email cannot be changed via API. NPI number is required if enabling report creation capability.

### Parameters

- `userID: string`

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

- `body: UserUpdateParams`

  - `canCreateReports?: boolean`

  - `canManageStudies?: boolean`

  - `clinicRole?: ClinicRole | null`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `firstName?: string`

    User's first name

  - `hasDashboardAccess?: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `lastName?: string`

    User's last name

  - `level?: AssignableUserLevel`

    User access level assignable via the API. 'admin' can manage users/settings, 'member' has standard access. 'owner' is dashboard-only and cannot be assigned via the API.

    - `"admin"`

    - `"member"`

  - `middleName?: string | null`

  - `npiNumber?: string | null`

  - `phoneNumber?: string | null`

  - `suffix1?: string | null`

  - `suffix2?: string | null`

### Returns

- `UserUpdateResponse`

  A user in the AutoScribe system with report creation permissions

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### Example

```typescript
import Avara from 'avara-software';

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

const user = await client.autoScribe.users.update('usr_1234567890abcdef1234567890abcdef');

console.log(user.middleName);
```

#### Response

```json
{
  "canCreateReports": true,
  "canManageStudies": true,
  "clinicRole": "Radiologist",
  "createdAt": "2024-01-15T10:00:00Z",
  "email": "dr.johnson@hospital.org",
  "firstName": "Sarah",
  "hasDashboardAccess": true,
  "invitedSource": "api",
  "lastLoginAt": "2024-03-15T09:00:00Z",
  "lastName": "Johnson",
  "level": "member",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "middleName": "Marie",
  "npiNumber": "1234567893",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": "FACR"
}
```

## Revoke user access

`client.autoScribe.users.revokeAccess(UserRevokeAccessParamsbody, RequestOptionsoptions?): UserRevokeAccessResponse`

**post** `/v1/autoScribe/users/revoke-access`

Deactivates a user's access to the system. The user will no longer be able to log in, create reports, or access studies. User data is preserved and can be reactivated later.

### Parameters

- `body: UserRevokeAccessParams`

  - `userId: string`

    User ID to revoke access for. Format: usr_{32-hex-chars}

### Returns

- `UserRevokeAccessResponse`

  Response for revoking user access in AutoScribe

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.users.revokeAccess({
  userId: 'usr_1234567890abcdef1234567890abcdef',
});

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "User access revoked successfully"
}
```

## Reactivate a user

`client.autoScribe.users.reactivate(UserReactivateParamsbody, RequestOptionsoptions?): UserReactivateResponse`

**post** `/v1/autoScribe/users/reactivate`

Restores access for a previously deactivated user. The user will regain their original permissions including report creation and study management capabilities.

### Parameters

- `body: UserReactivateParams`

  - `userId: string`

    User ID to reactivate. Format: usr_{32-hex-chars}

### Returns

- `UserReactivateResponse`

  Response for reactivating a user in AutoScribe

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.users.reactivate({
  userId: 'usr_1234567890abcdef1234567890abcdef',
});

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "User reactivated successfully"
}
```

## Domain Types

### User Invite Response

- `UserInviteResponse`

  Response for inviting a user to AutoScribe. Level is restricted to admin/member since owners cannot be invited via API.

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: AssignableUserLevel`

    User access level assignable via the API. 'admin' can manage users/settings, 'member' has standard access. 'owner' is dashboard-only and cannot be assigned via the API.

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### User List Response

- `UserListResponse`

  A user in the AutoScribe system with report creation permissions

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### User Retrieve Response

- `UserRetrieveResponse`

  A user in the AutoScribe system with report creation permissions

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### User Update Response

- `UserUpdateResponse`

  A user in the AutoScribe system with report creation permissions

  - `canCreateReports: boolean`

    Whether the user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the user has permission to create, update, and manage studies

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the user was created

  - `email: string`

    User's email address for login and notifications

  - `firstName: string`

    User's first name

  - `hasDashboardAccess: boolean`

    Whether the user can access the dashboard interface. Required for admin users

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `lastLoginAt: string | null`

    Timestamp of user's last login, null if never logged in

  - `lastName: string`

    User's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `userId: string`

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

  - `middleName?: string`

    User's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string`

    User's phone number (10-15 digits, optional)

  - `suffix1?: string`

    Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

  - `suffix2?: string`

    Additional name suffix (optional)

### User Revoke Access Response

- `UserRevokeAccessResponse`

  Response for revoking user access in AutoScribe

  - `success: boolean`

  - `message?: string`

### User Reactivate Response

- `UserReactivateResponse`

  Response for reactivating a user in AutoScribe

  - `success: boolean`

  - `message?: string`

# Invitations

## List user invitations

`client.autoScribe.users.invitations.list(InvitationListParamsquery?, RequestOptionsoptions?): CursorInvitations<InvitationListResponse>`

**get** `/v1/autoScribe/users/invitations`

Retrieves a paginated list of user invitations with optional filtering by status, expiration, date range, and user ID. Returns up to 100 invitations per request.

### Parameters

- `query: InvitationListParams`

  - `cursor?: string`

    Base64 encoded cursor from previous response

  - `endDate?: string`

    Filter invitations created on or before this date (YYYY-MM-DD)

  - `expired?: InvitationExpiredFilter`

    Filter by expiration status

    - `"all"`

    - `"expired"`

    - `"not-expired"`

  - `limit?: number`

    Number of results to return (1-100)

  - `startDate?: string`

    Filter invitations created on or after this date (YYYY-MM-DD)

  - `status?: Array<InvitationStatus>`

    Filter by invitation status(es)

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `userId?: string`

    Filter by user ID. Format: usr_{32-hex-chars}

### Returns

- `InvitationListResponse`

  A pending user invitation in the AutoScribe system

  - `canCreateReports: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicId: string`

    UUID of the clinic this invitation belongs to

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the invitation was created

  - `email: string`

    Email address the invitation was sent to

  - `expiry: string | null`

    When the invitation expires, null if no expiration

  - `firstName: string`

    Invited user's first name

  - `hasDashboardAccess: boolean`

    Whether the invited user will have dashboard access

  - `invitationId: string`

    Unique invitation identifier. Format: inv_{32-hex-chars}

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `inviterId: string`

    User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

  - `lastName: string`

    Invited user's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `status: InvitationStatus`

    Lifecycle status of an invitation: 'sent', 'accepted', 'rejected', or 'revoked'.

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `updatedAt: string | null`

    Timestamp when the invitation was last updated

  - `userId: string`

    Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

  - `invitedByApiKeyId?: string`

    UUID of the API key used to send this invitation. Null if sent via dashboard

  - `middleName?: string | null`

    Invited user's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string | null`

    Invited user's phone number (optional)

  - `suffix1?: string | null`

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

  - `suffix2?: string | null`

    Additional name suffix - optional

### Example

```typescript
import Avara from 'avara-software';

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 invitationListResponse of client.autoScribe.users.invitations.list()) {
  console.log(invitationListResponse.middleName);
}
```

#### Response

```json
{
  "hasMore": true,
  "invitations": [
    {
      "canCreateReports": true,
      "canManageStudies": true,
      "clinicId": "550e8400-e29b-41d4-a716-446655440000",
      "clinicRole": "Radiologist",
      "createdAt": "2024-03-15T10:00:00Z",
      "email": "dr.chen@hospital.org",
      "expiry": "2024-04-15T00:00:00Z",
      "firstName": "Michael",
      "hasDashboardAccess": true,
      "invitationId": "inv_1234567890abcdef1234567890abcdef",
      "invitedSource": "api",
      "inviterId": "usr_1234567890abcdef1234567890abcdef",
      "lastName": "Chen",
      "level": "member",
      "status": "sent",
      "updatedAt": "2024-03-15T10:00:00Z",
      "userId": "usr_1234567890abcdef1234567890abcdef",
      "invitedByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
      "middleName": "David",
      "npiNumber": "1234567893",
      "phoneNumber": "5551234567",
      "suffix1": "MD",
      "suffix2": null
    }
  ],
  "cursor": "cursor"
}
```

## Retrieve an invitation by ID

`client.autoScribe.users.invitations.retrieve(stringinvitationID, RequestOptionsoptions?): InvitationRetrieveResponse`

**get** `/v1/autoScribe/users/invitations/{invitationId}`

Retrieves a single invitation by its unique invitation ID. Returns the complete invitation details including status, expiration, associated user information, and AutoScribe-specific permissions.

### Parameters

- `invitationID: string`

  Unique invitation identifier. Format: inv_{32-hex-chars}

### Returns

- `InvitationRetrieveResponse`

  A pending user invitation in the AutoScribe system

  - `canCreateReports: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicId: string`

    UUID of the clinic this invitation belongs to

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the invitation was created

  - `email: string`

    Email address the invitation was sent to

  - `expiry: string | null`

    When the invitation expires, null if no expiration

  - `firstName: string`

    Invited user's first name

  - `hasDashboardAccess: boolean`

    Whether the invited user will have dashboard access

  - `invitationId: string`

    Unique invitation identifier. Format: inv_{32-hex-chars}

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `inviterId: string`

    User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

  - `lastName: string`

    Invited user's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `status: InvitationStatus`

    Lifecycle status of an invitation: 'sent', 'accepted', 'rejected', or 'revoked'.

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `updatedAt: string | null`

    Timestamp when the invitation was last updated

  - `userId: string`

    Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

  - `invitedByApiKeyId?: string`

    UUID of the API key used to send this invitation. Null if sent via dashboard

  - `middleName?: string | null`

    Invited user's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string | null`

    Invited user's phone number (optional)

  - `suffix1?: string | null`

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

  - `suffix2?: string | null`

    Additional name suffix - optional

### Example

```typescript
import Avara from 'avara-software';

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

const invitation = await client.autoScribe.users.invitations.retrieve(
  'inv_1234567890abcdef1234567890abcdef',
);

console.log(invitation.middleName);
```

#### Response

```json
{
  "canCreateReports": true,
  "canManageStudies": true,
  "clinicId": "550e8400-e29b-41d4-a716-446655440000",
  "clinicRole": "Radiologist",
  "createdAt": "2024-03-15T10:00:00Z",
  "email": "dr.chen@hospital.org",
  "expiry": "2024-04-15T00:00:00Z",
  "firstName": "Michael",
  "hasDashboardAccess": true,
  "invitationId": "inv_1234567890abcdef1234567890abcdef",
  "invitedSource": "api",
  "inviterId": "usr_1234567890abcdef1234567890abcdef",
  "lastName": "Chen",
  "level": "member",
  "status": "sent",
  "updatedAt": "2024-03-15T10:00:00Z",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "invitedByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
  "middleName": "David",
  "npiNumber": "1234567893",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": null
}
```

## Update an invitation

`client.autoScribe.users.invitations.update(stringinvitationID, InvitationUpdateParamsbody?, RequestOptionsoptions?): InvitationUpdateResponse`

**patch** `/v1/autoScribe/users/invitations/{invitationId}`

Updates a pending invitation's user details, permissions, and AutoScribe-specific settings before it is accepted. Only valid for invitations that have not expired or been processed. NPI number is required if enabling report creation.

### Parameters

- `invitationID: string`

  Unique invitation identifier. Format: inv_{32-hex-chars}

- `body: InvitationUpdateParams`

  - `canCreateReports?: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies?: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicRole?: ClinicRole | null`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `firstName?: string`

    Invited user's first name

  - `hasDashboardAccess?: boolean`

    Whether the invited user will have dashboard access

  - `lastName?: string`

    Invited user's last name

  - `level?: AssignableUserLevel`

    User access level assignable via the API. 'admin' can manage users/settings, 'member' has standard access. 'owner' is dashboard-only and cannot be assigned via the API.

    - `"admin"`

    - `"member"`

  - `middleName?: string | null`

  - `npiNumber?: string | null`

  - `phoneNumber?: string | null`

  - `suffix1?: string | null`

  - `suffix2?: string | null`

### Returns

- `InvitationUpdateResponse`

  A pending user invitation in the AutoScribe system

  - `canCreateReports: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicId: string`

    UUID of the clinic this invitation belongs to

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the invitation was created

  - `email: string`

    Email address the invitation was sent to

  - `expiry: string | null`

    When the invitation expires, null if no expiration

  - `firstName: string`

    Invited user's first name

  - `hasDashboardAccess: boolean`

    Whether the invited user will have dashboard access

  - `invitationId: string`

    Unique invitation identifier. Format: inv_{32-hex-chars}

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `inviterId: string`

    User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

  - `lastName: string`

    Invited user's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `status: InvitationStatus`

    Lifecycle status of an invitation: 'sent', 'accepted', 'rejected', or 'revoked'.

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `updatedAt: string | null`

    Timestamp when the invitation was last updated

  - `userId: string`

    Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

  - `invitedByApiKeyId?: string`

    UUID of the API key used to send this invitation. Null if sent via dashboard

  - `middleName?: string | null`

    Invited user's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string | null`

    Invited user's phone number (optional)

  - `suffix1?: string | null`

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

  - `suffix2?: string | null`

    Additional name suffix - optional

### Example

```typescript
import Avara from 'avara-software';

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

const invitation = await client.autoScribe.users.invitations.update(
  'inv_1234567890abcdef1234567890abcdef',
);

console.log(invitation.middleName);
```

#### Response

```json
{
  "canCreateReports": true,
  "canManageStudies": true,
  "clinicId": "550e8400-e29b-41d4-a716-446655440000",
  "clinicRole": "Radiologist",
  "createdAt": "2024-03-15T10:00:00Z",
  "email": "dr.chen@hospital.org",
  "expiry": "2024-04-15T00:00:00Z",
  "firstName": "Michael",
  "hasDashboardAccess": true,
  "invitationId": "inv_1234567890abcdef1234567890abcdef",
  "invitedSource": "api",
  "inviterId": "usr_1234567890abcdef1234567890abcdef",
  "lastName": "Chen",
  "level": "member",
  "status": "sent",
  "updatedAt": "2024-03-15T10:00:00Z",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "invitedByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
  "middleName": "David",
  "npiNumber": "1234567893",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": null
}
```

## Revoke an invitation

`client.autoScribe.users.invitations.revoke(InvitationRevokeParamsbody?, RequestOptionsoptions?): InvitationRevokeResponse`

**post** `/v1/autoScribe/users/invitations/revoke`

Revokes a pending invitation, preventing it from being accepted. Can revoke by invitation ID, user ID, or both. Useful for cancelling invitations sent in error.

### Parameters

- `body: InvitationRevokeParams`

  - `invitationId?: string`

    Invitation ID to revoke. Format: inv_{32-hex-chars}

  - `userId?: string`

    User ID whose pending invitation to revoke. Format: usr_{32-hex-chars}

### Returns

- `InvitationRevokeResponse`

  Response for revoking an invitation in AutoScribe

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.users.invitations.revoke();

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "message"
}
```

## Domain Types

### Invitation List Response

- `InvitationListResponse`

  A pending user invitation in the AutoScribe system

  - `canCreateReports: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicId: string`

    UUID of the clinic this invitation belongs to

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the invitation was created

  - `email: string`

    Email address the invitation was sent to

  - `expiry: string | null`

    When the invitation expires, null if no expiration

  - `firstName: string`

    Invited user's first name

  - `hasDashboardAccess: boolean`

    Whether the invited user will have dashboard access

  - `invitationId: string`

    Unique invitation identifier. Format: inv_{32-hex-chars}

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `inviterId: string`

    User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

  - `lastName: string`

    Invited user's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `status: InvitationStatus`

    Lifecycle status of an invitation: 'sent', 'accepted', 'rejected', or 'revoked'.

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `updatedAt: string | null`

    Timestamp when the invitation was last updated

  - `userId: string`

    Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

  - `invitedByApiKeyId?: string`

    UUID of the API key used to send this invitation. Null if sent via dashboard

  - `middleName?: string | null`

    Invited user's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string | null`

    Invited user's phone number (optional)

  - `suffix1?: string | null`

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

  - `suffix2?: string | null`

    Additional name suffix - optional

### Invitation Retrieve Response

- `InvitationRetrieveResponse`

  A pending user invitation in the AutoScribe system

  - `canCreateReports: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicId: string`

    UUID of the clinic this invitation belongs to

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the invitation was created

  - `email: string`

    Email address the invitation was sent to

  - `expiry: string | null`

    When the invitation expires, null if no expiration

  - `firstName: string`

    Invited user's first name

  - `hasDashboardAccess: boolean`

    Whether the invited user will have dashboard access

  - `invitationId: string`

    Unique invitation identifier. Format: inv_{32-hex-chars}

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `inviterId: string`

    User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

  - `lastName: string`

    Invited user's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `status: InvitationStatus`

    Lifecycle status of an invitation: 'sent', 'accepted', 'rejected', or 'revoked'.

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `updatedAt: string | null`

    Timestamp when the invitation was last updated

  - `userId: string`

    Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

  - `invitedByApiKeyId?: string`

    UUID of the API key used to send this invitation. Null if sent via dashboard

  - `middleName?: string | null`

    Invited user's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string | null`

    Invited user's phone number (optional)

  - `suffix1?: string | null`

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

  - `suffix2?: string | null`

    Additional name suffix - optional

### Invitation Update Response

- `InvitationUpdateResponse`

  A pending user invitation in the AutoScribe system

  - `canCreateReports: boolean`

    Whether the invited user can generate and sign radiology reports. Requires NPI number

  - `canManageStudies: boolean`

    Whether the invited user will have permission to create, update, and manage studies

  - `clinicId: string`

    UUID of the clinic this invitation belongs to

  - `clinicRole: ClinicRole`

    A user's clinical or organizational role within the clinic.

    - `"Doctor"`

    - `"Physician"`

    - `"Surgeon"`

    - `"Radiologist"`

    - `"Cardiologist"`

    - `"Neurologist"`

    - `"Urologist"`

    - `"Gynecologist"`

    - `"Endocrinologist"`

    - `"Oncologist"`

    - `"Radiation Oncologist"`

    - `"Hematologist"`

    - `"Gastroenterologist"`

    - `"Pulmonologist"`

    - `"Nephrologist"`

    - `"Rheumatologist"`

    - `"Dermatologist"`

    - `"Ophthalmologist"`

    - `"Otolaryngologist"`

    - `"Pediatrician"`

    - `"Obstetrician"`

    - `"Psychiatrist"`

    - `"Anesthesiologist"`

    - `"Emergency Medicine Physician"`

    - `"Family Medicine Physician"`

    - `"Internal Medicine Physician"`

    - `"Pathologist"`

    - `"Nuclear Medicine Physician"`

    - `"Pain Management Specialist"`

    - `"Infectious Disease Specialist"`

    - `"Immunologist"`

    - `"Physician Assistant"`

    - `"Nurse Practitioner"`

    - `"Certified Registered Nurse Anesthetist"`

    - `"Psychologist"`

    - `"Medical Assistant"`

    - `"Scribe"`

    - `"Registered Nurse"`

    - `"Nurse Manager"`

    - `"Patient Care Coordinator"`

    - `"Imaging Technologist"`

    - `"Laboratory Technician"`

    - `"Medical Laboratory Scientist"`

    - `"Pathologists' Assistant"`

    - `"Phlebotomist"`

    - `"Pharmacist"`

    - `"Pharmacy Technician"`

    - `"Physical Therapist"`

    - `"Occupational Therapist"`

    - `"Speech-Language Pathologist"`

    - `"Respiratory Therapist"`

    - `"Nutritionist"`

    - `"Front Desk Operator"`

    - `"Revenue Cycle Manager"`

    - `"Administrative Director"`

    - `"Administrative Assistant"`

    - `"Legal Administrator"`

    - `"IT Administrator"`

    - `"IT Support"`

    - `"Software Engineer"`

    - `"Other"`

  - `createdAt: string | null`

    Timestamp when the invitation was created

  - `email: string`

    Email address the invitation was sent to

  - `expiry: string | null`

    When the invitation expires, null if no expiration

  - `firstName: string`

    Invited user's first name

  - `hasDashboardAccess: boolean`

    Whether the invited user will have dashboard access

  - `invitationId: string`

    Unique invitation identifier. Format: inv_{32-hex-chars}

  - `invitedSource: InvitedSource`

    How a user/invitation was created - via the dashboard UI ('dashboard') or the API ('api').

    - `"dashboard"`

    - `"api"`

  - `inviterId: string`

    User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

  - `lastName: string`

    Invited user's last name

  - `level: UserLevel`

    User access level. 'owner' has full control (dashboard-only, not assignable via API), 'admin' can manage users/settings, 'member' has standard access.

    - `"owner"`

    - `"admin"`

    - `"member"`

  - `status: InvitationStatus`

    Lifecycle status of an invitation: 'sent', 'accepted', 'rejected', or 'revoked'.

    - `"sent"`

    - `"accepted"`

    - `"rejected"`

    - `"revoked"`

  - `updatedAt: string | null`

    Timestamp when the invitation was last updated

  - `userId: string`

    Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

  - `invitedByApiKeyId?: string`

    UUID of the API key used to send this invitation. Null if sent via dashboard

  - `middleName?: string | null`

    Invited user's middle name (optional)

  - `npiNumber?: string`

    National Provider Identifier - required for users who can create reports (10-digit number)

  - `phoneNumber?: string | null`

    Invited user's phone number (optional)

  - `suffix1?: string | null`

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

  - `suffix2?: string | null`

    Additional name suffix - optional

### Invitation Revoke Response

- `InvitationRevokeResponse`

  Response for revoking an invitation in AutoScribe

  - `success: boolean`

  - `message?: string`

# Reports

## List reports for a study

`client.autoScribe.reports.list(ReportListParamsquery?, RequestOptionsoptions?): ReportListResponse`

**get** `/v1/autoScribe/reports`

Retrieves all reports (including versions and addendums) for a specific study. Must provide either study ID or DICOM Study Instance UID. Returns report metadata including status, version, and timestamps.

### Parameters

- `query: ReportListParams`

  - `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')

### Returns

- `ReportListResponse`

  Response containing a list of reports for a study

  - `reports: Array<Report>`

    Array of report objects with full details

    - `createdAt: string | null`

      Timestamp when the report was created

    - `isAddendum: boolean`

      Whether this report is an addendum to a previous report

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `signedAt: string | null`

      Timestamp when the report was signed, null if not yet signed

    - `snapshotMetadata: StudyReportMetadata`

      Patient demographics and scan information for report generation

      - `age?: string`

        Patient's age at study date (e.g., '34.5 years', '2 months')

      - `dateOfBirth?: string`

        Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

      - `facilityName?: string`

        Name of the medical facility where the scan was performed

      - `height?: Height`

        Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

        - `unit: HeightUnit`

          Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

          - `"in"`

          - `"cm"`

        - `value: number`

      - `mrn?: string`

        Medical Record Number - unique patient identifier

      - `patientName?: string`

        Full name of the patient

      - `procedure?: string`

        Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

      - `referringPhysicianName?: string`

        Name of the physician who referred the patient for this scan

      - `sex?: Sex`

        Patient's biological sex. Options: 'male', 'female', 'other'

        - `"male"`

        - `"female"`

        - `"other"`

      - `studyDate?: string`

        Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

      - `studyTime?: string`

        Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

      - `weight?: Weight`

        Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

        - `unit: WeightUnit`

          Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

          - `"lbs"`

          - `"kg"`

        - `value: number`

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

    - `studyId: string`

      Study ID this report belongs to. Format: stu_{32-hex-chars}

    - `updatedAt: string | null`

      Timestamp when the report was last updated

    - `userId: string`

      User ID of the radiologist who created/signed this report. Format: usr_{32-hex-chars}

    - `reportPlainText?: string`

      Plain text content of the report

  - `studyId: string`

    Study ID the reports belong to. 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')

### Example

```typescript
import Avara from 'avara-software';

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

const reports = await client.autoScribe.reports.list();

console.log(reports.studyInstanceUid);
```

#### Response

```json
{
  "reports": [
    {
      "createdAt": "2024-03-15T14:30:00Z",
      "isAddendum": false,
      "isCritical": false,
      "reportId": "rep_1234567890abcdef1234567890abcdef",
      "signedAt": "2024-03-15T16:00:00Z",
      "snapshotMetadata": {
        "age": "38 years",
        "dateOfBirth": "1985-07-20",
        "facilityName": "City Medical Center",
        "height": {
          "unit": "cm",
          "value": 165
        },
        "mrn": "MRN-2024-001234",
        "patientName": "Jane Doe",
        "procedure": "MRI Brain with Contrast",
        "referringPhysicianName": "Dr. Michael Chen",
        "sex": "female",
        "studyDate": "2024-03-15",
        "studyTime": "14:30",
        "weight": {
          "unit": "kg",
          "value": 62
        }
      },
      "status": "completed",
      "studyId": "stu_1234567890abcdef1234567890abcdef",
      "updatedAt": "2024-03-15T16:00:00Z",
      "userId": "usr_1234567890abcdef1234567890abcdef",
      "reportPlainText": "FINDINGS: Normal brain MRI. No acute intracranial abnormality. IMPRESSION: Unremarkable brain MRI."
    }
  ],
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123"
}
```

## Retrieve report text

`client.autoScribe.reports.text(ReportTextParamsquery?, RequestOptionsoptions?): ReportTextResponse`

**get** `/v1/autoScribe/reports/text`

Retrieves the text content of a report. Can fetch a single report by report ID, or all reports for a study by study ID/DICOM UID. Returns plain text report content.

### Parameters

- `query: ReportTextParams`

  - `reportId?: string`

    Unique report identifier. Format: rep_{32-hex-chars}

  - `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')

### Returns

- `ReportTextResponse = SingleReportTextResponse | ListReportsTextResponse`

  Response containing a single report with its plain text

  - `SingleReportTextResponse`

    Response containing a single report with its plain text

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `snapshotMetadata: StudyReportMetadata`

      Patient demographics and scan information for report generation

      - `age?: string`

        Patient's age at study date (e.g., '34.5 years', '2 months')

      - `dateOfBirth?: string`

        Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

      - `facilityName?: string`

        Name of the medical facility where the scan was performed

      - `height?: Height`

        Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

        - `unit: HeightUnit`

          Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

          - `"in"`

          - `"cm"`

        - `value: number`

      - `mrn?: string`

        Medical Record Number - unique patient identifier

      - `patientName?: string`

        Full name of the patient

      - `procedure?: string`

        Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

      - `referringPhysicianName?: string`

        Name of the physician who referred the patient for this scan

      - `sex?: Sex`

        Patient's biological sex. Options: 'male', 'female', 'other'

        - `"male"`

        - `"female"`

        - `"other"`

      - `studyDate?: string`

        Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

      - `studyTime?: string`

        Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

      - `weight?: Weight`

        Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

        - `unit: WeightUnit`

          Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

          - `"lbs"`

          - `"kg"`

        - `value: number`

    - `studyId: string`

      Study ID this report belongs to. 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')

    - `plainText?: string`

      Plain text content of the report

  - `ListReportsTextResponse`

    Response containing a list of reports with their plain text

    - `reports: Array<ReportTextItem>`

      Array of report text items

      - `isCritical: boolean | null`

        Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

      - `reportId: string`

        Unique report identifier. Format: rep_{32-hex-chars}

      - `snapshotMetadata: StudyReportMetadata`

        Patient demographics and scan information for report generation

      - `studyId: string`

        Study ID this report belongs to. 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')

      - `plainText?: string`

        Plain text content of the report

    - `studyId: string`

      Study ID the reports belong to. 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')

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.reports.text();

console.log(response);
```

#### Response

```json
{
  "isCritical": false,
  "reportId": "rep_1234567890abcdef1234567890abcdef",
  "snapshotMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123",
  "plainText": "FINDINGS: Normal brain MRI. No acute intracranial abnormality. IMPRESSION: Unremarkable brain MRI."
}
```

## Retrieve report PDF URL

`client.autoScribe.reports.pdf(ReportPdfParamsquery?, RequestOptionsoptions?): ReportPdfResponse`

**get** `/v1/autoScribe/reports/pdf`

Retrieves presigned URLs for accessing report PDFs. Can fetch a single report by report ID, or all reports for a study by study ID/DICOM UID. URLs are time-limited for security.

### Parameters

- `query: ReportPdfParams`

  - `reportId?: string`

    Unique report identifier. Format: rep_{32-hex-chars}

  - `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')

### Returns

- `ReportPdfResponse = SingleReportPdfResponse | ListReportsPdfResponse`

  Response containing a single report with its PDF download URL

  - `SingleReportPdfResponse`

    Response containing a single report with its PDF download URL

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `presignedUrl: string`

      Time-limited presigned URL to download the PDF (expires after 1 hour)

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `snapshotMetadata: StudyReportMetadata`

      Patient demographics and scan information for report generation

      - `age?: string`

        Patient's age at study date (e.g., '34.5 years', '2 months')

      - `dateOfBirth?: string`

        Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

      - `facilityName?: string`

        Name of the medical facility where the scan was performed

      - `height?: Height`

        Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

        - `unit: HeightUnit`

          Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

          - `"in"`

          - `"cm"`

        - `value: number`

      - `mrn?: string`

        Medical Record Number - unique patient identifier

      - `patientName?: string`

        Full name of the patient

      - `procedure?: string`

        Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

      - `referringPhysicianName?: string`

        Name of the physician who referred the patient for this scan

      - `sex?: Sex`

        Patient's biological sex. Options: 'male', 'female', 'other'

        - `"male"`

        - `"female"`

        - `"other"`

      - `studyDate?: string`

        Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

      - `studyTime?: string`

        Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

      - `weight?: Weight`

        Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

        - `unit: WeightUnit`

          Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

          - `"lbs"`

          - `"kg"`

        - `value: number`

    - `studyId: string`

      Study ID this report belongs to. 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')

  - `ListReportsPdfResponse`

    Response containing a list of reports with their PDF download URLs

    - `reports: Array<ReportPdfItem>`

      Array of report PDF items with download URLs

      - `isCritical: boolean | null`

        Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

      - `presignedUrl: string`

        Time-limited presigned URL to download the PDF (expires after 1 hour)

      - `reportId: string`

        Unique report identifier. Format: rep_{32-hex-chars}

      - `snapshotMetadata: StudyReportMetadata`

        Patient demographics and scan information for report generation

      - `studyId: string`

        Study ID this report belongs to. 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')

    - `studyId: string`

      Study ID the reports belong to. 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')

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.reports.pdf();

console.log(response);
```

#### Response

```json
{
  "isCritical": false,
  "presignedUrl": "https://storage.avarasoftware.com/reports/rep_1234.pdf?token=abc123",
  "reportId": "rep_1234567890abcdef1234567890abcdef",
  "snapshotMetadata": {
    "age": "38 years",
    "dateOfBirth": "1985-07-20",
    "facilityName": "City Medical Center",
    "height": {
      "unit": "cm",
      "value": 165
    },
    "mrn": "MRN-2024-001234",
    "patientName": "Jane Doe",
    "procedure": "MRI Brain with Contrast",
    "referringPhysicianName": "Dr. Michael Chen",
    "sex": "female",
    "studyDate": "2024-03-15",
    "studyTime": "14:30",
    "weight": {
      "unit": "kg",
      "value": 62
    }
  },
  "studyId": "stu_1234567890abcdef1234567890abcdef",
  "studyInstanceUid": "1.2.840.113619.2.55.3.604688119.868.1234567890.123"
}
```

## Create a report addendum

`client.autoScribe.reports.addendum(stringreportID, RequestOptionsoptions?): ReportAddendumResponse`

**post** `/v1/autoScribe/reports/{reportId}/addendum`

Initiates the creation of an addendum to an existing completed report. The study status will change to 'addendum_active' allowing the radiologist to dictate additional findings.

### Parameters

- `reportID: string`

  Unique report identifier. Format: rep_{32-hex-chars}

### Returns

- `ReportAddendumResponse`

  Response for creating a report addendum

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.reports.addendum('rep_1234567890abcdef1234567890abcdef');

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "message"
}
```

## Cancel a report addendum

`client.autoScribe.reports.cancelAddendum(stringreportID, RequestOptionsoptions?): ReportCancelAddendumResponse`

**post** `/v1/autoScribe/reports/{reportId}/cancel-addendum`

Cancels an in-progress addendum and reverts the study status to 'completed'. The original report remains unchanged. Only valid for active addendums.

### Parameters

- `reportID: string`

  Unique report identifier. Format: rep_{32-hex-chars}

### Returns

- `ReportCancelAddendumResponse`

  Response for cancelling a report addendum

  - `success: boolean`

  - `message?: string`

### Example

```typescript
import Avara from 'avara-software';

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

const response = await client.autoScribe.reports.cancelAddendum(
  'rep_1234567890abcdef1234567890abcdef',
);

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "message": "message"
}
```

## Domain Types

### Report

- `Report`

  A radiology report in the AutoScribe system

  - `createdAt: string | null`

    Timestamp when the report was created

  - `isAddendum: boolean`

    Whether this report is an addendum to a previous report

  - `isCritical: boolean | null`

    Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

  - `reportId: string`

    Unique report identifier. Format: rep_{32-hex-chars}

  - `signedAt: string | null`

    Timestamp when the report was signed, null if not yet signed

  - `snapshotMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `status: ReportStatus`

    Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

    - `"in_progress"`

    - `"completed"`

  - `studyId: string`

    Study ID this report belongs to. Format: stu_{32-hex-chars}

  - `updatedAt: string | null`

    Timestamp when the report was last updated

  - `userId: string`

    User ID of the radiologist who created/signed this report. Format: usr_{32-hex-chars}

  - `reportPlainText?: string`

    Plain text content of the report

### Report Pdf Item

- `ReportPdfItem`

  A report with its PDF download URL

  - `isCritical: boolean | null`

    Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

  - `presignedUrl: string`

    Time-limited presigned URL to download the PDF (expires after 1 hour)

  - `reportId: string`

    Unique report identifier. Format: rep_{32-hex-chars}

  - `snapshotMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `studyId: string`

    Study ID this report belongs to. 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')

### Report Text Item

- `ReportTextItem`

  A report with its plain text content

  - `isCritical: boolean | null`

    Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

  - `reportId: string`

    Unique report identifier. Format: rep_{32-hex-chars}

  - `snapshotMetadata: StudyReportMetadata`

    Patient demographics and scan information for report generation

    - `age?: string`

      Patient's age at study date (e.g., '34.5 years', '2 months')

    - `dateOfBirth?: string`

      Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

    - `facilityName?: string`

      Name of the medical facility where the scan was performed

    - `height?: Height`

      Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

      - `unit: HeightUnit`

        Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

        - `"in"`

        - `"cm"`

      - `value: number`

    - `mrn?: string`

      Medical Record Number - unique patient identifier

    - `patientName?: string`

      Full name of the patient

    - `procedure?: string`

      Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

    - `referringPhysicianName?: string`

      Name of the physician who referred the patient for this scan

    - `sex?: Sex`

      Patient's biological sex. Options: 'male', 'female', 'other'

      - `"male"`

      - `"female"`

      - `"other"`

    - `studyDate?: string`

      Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

    - `studyTime?: string`

      Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

    - `weight?: Weight`

      Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

      - `unit: WeightUnit`

        Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

        - `"lbs"`

        - `"kg"`

      - `value: number`

  - `studyId: string`

    Study ID this report belongs to. 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')

  - `plainText?: string`

    Plain text content of the report

### Report List Response

- `ReportListResponse`

  Response containing a list of reports for a study

  - `reports: Array<Report>`

    Array of report objects with full details

    - `createdAt: string | null`

      Timestamp when the report was created

    - `isAddendum: boolean`

      Whether this report is an addendum to a previous report

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `signedAt: string | null`

      Timestamp when the report was signed, null if not yet signed

    - `snapshotMetadata: StudyReportMetadata`

      Patient demographics and scan information for report generation

      - `age?: string`

        Patient's age at study date (e.g., '34.5 years', '2 months')

      - `dateOfBirth?: string`

        Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

      - `facilityName?: string`

        Name of the medical facility where the scan was performed

      - `height?: Height`

        Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

        - `unit: HeightUnit`

          Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

          - `"in"`

          - `"cm"`

        - `value: number`

      - `mrn?: string`

        Medical Record Number - unique patient identifier

      - `patientName?: string`

        Full name of the patient

      - `procedure?: string`

        Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

      - `referringPhysicianName?: string`

        Name of the physician who referred the patient for this scan

      - `sex?: Sex`

        Patient's biological sex. Options: 'male', 'female', 'other'

        - `"male"`

        - `"female"`

        - `"other"`

      - `studyDate?: string`

        Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

      - `studyTime?: string`

        Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

      - `weight?: Weight`

        Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

        - `unit: WeightUnit`

          Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

          - `"lbs"`

          - `"kg"`

        - `value: number`

    - `status: ReportStatus`

      Status of an individual report. 'in_progress' = actively being dictated, 'completed' = signed.

      - `"in_progress"`

      - `"completed"`

    - `studyId: string`

      Study ID this report belongs to. Format: stu_{32-hex-chars}

    - `updatedAt: string | null`

      Timestamp when the report was last updated

    - `userId: string`

      User ID of the radiologist who created/signed this report. Format: usr_{32-hex-chars}

    - `reportPlainText?: string`

      Plain text content of the report

  - `studyId: string`

    Study ID the reports belong to. 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')

### Report Text Response

- `ReportTextResponse = SingleReportTextResponse | ListReportsTextResponse`

  Response containing a single report with its plain text

  - `SingleReportTextResponse`

    Response containing a single report with its plain text

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `snapshotMetadata: StudyReportMetadata`

      Patient demographics and scan information for report generation

      - `age?: string`

        Patient's age at study date (e.g., '34.5 years', '2 months')

      - `dateOfBirth?: string`

        Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

      - `facilityName?: string`

        Name of the medical facility where the scan was performed

      - `height?: Height`

        Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

        - `unit: HeightUnit`

          Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

          - `"in"`

          - `"cm"`

        - `value: number`

      - `mrn?: string`

        Medical Record Number - unique patient identifier

      - `patientName?: string`

        Full name of the patient

      - `procedure?: string`

        Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

      - `referringPhysicianName?: string`

        Name of the physician who referred the patient for this scan

      - `sex?: Sex`

        Patient's biological sex. Options: 'male', 'female', 'other'

        - `"male"`

        - `"female"`

        - `"other"`

      - `studyDate?: string`

        Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

      - `studyTime?: string`

        Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

      - `weight?: Weight`

        Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

        - `unit: WeightUnit`

          Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

          - `"lbs"`

          - `"kg"`

        - `value: number`

    - `studyId: string`

      Study ID this report belongs to. 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')

    - `plainText?: string`

      Plain text content of the report

  - `ListReportsTextResponse`

    Response containing a list of reports with their plain text

    - `reports: Array<ReportTextItem>`

      Array of report text items

      - `isCritical: boolean | null`

        Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

      - `reportId: string`

        Unique report identifier. Format: rep_{32-hex-chars}

      - `snapshotMetadata: StudyReportMetadata`

        Patient demographics and scan information for report generation

      - `studyId: string`

        Study ID this report belongs to. 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')

      - `plainText?: string`

        Plain text content of the report

    - `studyId: string`

      Study ID the reports belong to. 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')

### Report Pdf Response

- `ReportPdfResponse = SingleReportPdfResponse | ListReportsPdfResponse`

  Response containing a single report with its PDF download URL

  - `SingleReportPdfResponse`

    Response containing a single report with its PDF download URL

    - `isCritical: boolean | null`

      Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

    - `presignedUrl: string`

      Time-limited presigned URL to download the PDF (expires after 1 hour)

    - `reportId: string`

      Unique report identifier. Format: rep_{32-hex-chars}

    - `snapshotMetadata: StudyReportMetadata`

      Patient demographics and scan information for report generation

      - `age?: string`

        Patient's age at study date (e.g., '34.5 years', '2 months')

      - `dateOfBirth?: string`

        Patient's date of birth. Format: YYYY-MM-DD (e.g., '1990-05-20')

      - `facilityName?: string`

        Name of the medical facility where the scan was performed

      - `height?: Height`

        Patient's height with unit (e.g., {value: 70, unit: 'inches'} or {value: 178, unit: 'cm'})

        - `unit: HeightUnit`

          Unit of measure for a height value. 'in' = inches, 'cm' = centimeters.

          - `"in"`

          - `"cm"`

        - `value: number`

      - `mrn?: string`

        Medical Record Number - unique patient identifier

      - `patientName?: string`

        Full name of the patient

      - `procedure?: string`

        Procedure or study type (e.g., 'MRI Brain with Contrast'). Maps to database scan_type and dictation report_header.scan_type.

      - `referringPhysicianName?: string`

        Name of the physician who referred the patient for this scan

      - `sex?: Sex`

        Patient's biological sex. Options: 'male', 'female', 'other'

        - `"male"`

        - `"female"`

        - `"other"`

      - `studyDate?: string`

        Study date (YYYY-MM-DD). Maps to database scan_date and dictation report_header.scan_date.

      - `studyTime?: string`

        Study time (HH:MM). Maps to database scan_time and dictation report_header.scan_time.

      - `weight?: Weight`

        Patient's weight with unit (e.g., {value: 150, unit: 'lbs'} or {value: 68, unit: 'kg'})

        - `unit: WeightUnit`

          Unit of measure for a weight value. 'lbs' = pounds, 'kg' = kilograms.

          - `"lbs"`

          - `"kg"`

        - `value: number`

    - `studyId: string`

      Study ID this report belongs to. 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')

  - `ListReportsPdfResponse`

    Response containing a list of reports with their PDF download URLs

    - `reports: Array<ReportPdfItem>`

      Array of report PDF items with download URLs

      - `isCritical: boolean | null`

        Whether the report was marked critical at sign-off. null when the report is not yet completed; true/false once completed.

      - `presignedUrl: string`

        Time-limited presigned URL to download the PDF (expires after 1 hour)

      - `reportId: string`

        Unique report identifier. Format: rep_{32-hex-chars}

      - `snapshotMetadata: StudyReportMetadata`

        Patient demographics and scan information for report generation

      - `studyId: string`

        Study ID this report belongs to. 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')

    - `studyId: string`

      Study ID the reports belong to. 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')

### Report Addendum Response

- `ReportAddendumResponse`

  Response for creating a report addendum

  - `success: boolean`

  - `message?: string`

### Report Cancel Addendum Response

- `ReportCancelAddendumResponse`

  Response for cancelling a report addendum

  - `success: boolean`

  - `message?: string`
