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

# Clinical Import History

> View content bundles imported into your organization from the Clinical Marketplace, with rollback capability.

This screen lists all marketplace bundle imports for the current organization and is available at `/cl/marketplace/imports`.

## Overview

The Import History page lists records from `cl_marketplace_imports`, ordered most-recent-first, scoped to the current organization. Each entry displays the bundle key, version, number of imported items, import timestamp, and a status badge (`Completed`, `In Progress`, or `Rolled Back`). Users with the `cl.marketplace.import` permission see a **Roll back** button on `completed` imports. Initiating a rollback opens a confirmation dialog that names the item count and import date; confirming calls the rollback mutation, which deletes the rows captured in the import's `rollback_snapshot` and marks the record as `rolled_back`. The action is described as irreversible in the confirmation dialog.

## Who it's for

Requires permission: `cl.marketplace.import`

## Before you start

You must hold the `cl.marketplace.import` permission to access this page and to initiate rollbacks. Import records are scoped to the current organization.

## Steps

<Steps>
  <Step title="Open Import History">
    Navigate to `/cl/marketplace/imports`. The page loads all import records for your organization.
  </Step>

  <Step title="Review the import list">
    Each card shows bundle key, version, item count, import date/time, and status badge.
  </Step>

  <Step title="Initiate a rollback (if permitted)">
    Click **Roll back** on a `Completed` import. This is only available when you hold `cl.marketplace.import`.
  </Step>

  <Step title="Confirm the rollback">
    Review the confirmation dialog showing the item count and import date. Click **Roll back** to confirm or **Cancel** to abort. The dialog warns that the action cannot be undone.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Import status values">
    The code maps statuses to badge variants: `completed` → default, `in_progress` → secondary, `rolled_back` → destructive.
  </Accordion>

  <Accordion title="Empty and error states">
    When no imports exist, an empty state is shown: "No imports yet — Browse the marketplace to find and import accreditation-aligned content bundles." If the list fails to load, a destructive alert titled "Error Loading Import History" is displayed with a sanitized error message.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Clinical" icon="stethoscope" href="/cl/overview">
    Overview of the Clinical core.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/cl.tsx
  * src/cores/cl/pages/MarketplaceImportsPage.tsx
  * src/cores/cl/hooks/useMarketplaceImports.ts
</Accordion>
