> ## 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.

# UDS Reporting

> Place, filter, and track urine drug screening orders for a patient chart with status and panel-type views.

The UDS Reporting screen lists urine drug screening (UDS) orders for a selected patient chart and allows placing new orders, accessible at `/cl/uds`.

## Overview

The page reads a `chartId` query parameter from the URL. If no `chartId` is present, the page renders an empty state instructing the user to navigate from a patient chart. When a chart is selected, the page fetches UDS orders from `cl_uds_orders` via `useUdsOrdersByChart`, filtered by the chart and organization. Orders are sorted by `ordered_at` descending. Filter controls allow narrowing by status and date range; a "Clear" button resets all filters. Each row shows: Order date, Type (Presumptive / Definitive / Confirmation), Panel (5-Panel / 10-Panel / 12-Panel / Custom), Status badge, Observed indicator, and a "View" results button (gated by `cl.uds_results.view`). A "Create UDS Order" action is available via `CreateUdsOrderDialog`.

## Who it's for

Requires permission: `cl.uds_orders.view`

Additional permission that unlocks results:

* `cl.uds_results.view` — enables the "View" results button on each row

## Before you start

* Your account must have the `cl.uds_orders.view` permission.
* Navigate from a patient chart that provides a `chartId` query parameter — opening `/cl/uds` directly without a `chartId` shows an empty state.

## Steps

<Steps>
  <Step title="Open UDS Orders from a patient chart">
    Navigate to `/cl/uds?chartId=<id>` via the patient chart. The order list loads automatically for that chart.
  </Step>

  <Step title="Filter orders">
    Select a status from the status drop-down (Ordered, Collected, Sent to Lab, Resulted, Cancelled) or set a date range using the From and To date inputs. Click "Clear" to remove all filters.
  </Step>

  <Step title="Place a new UDS order">
    Click the "Create UDS Order" action in the page header to open the order dialog and submit a new order.
  </Step>

  <Step title="View results (results permission required)">
    Click "View" on a resulted order row to open the results detail (requires `cl.uds_results.view`).
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Order statuses">
    **Ordered** → **Collected** → **Sent to Lab** → **Resulted**; **Cancelled** is a terminal non-result state.
  </Accordion>

  <Accordion title="Order types">
    **Presumptive** — initial immunoassay screen; **Definitive** — confirmatory test; **Confirmation** — secondary confirmation. (SME: verify clinical workflow sequence.)
  </Accordion>

  <Accordion title="Panel types">
    Standard 5-Panel, Standard 10-Panel, Expanded 12-Panel, Custom.
  </Accordion>

  <Accordion title="Empty and error states">
    No chart selected: "No chart selected — Navigate to a patient chart to view UDS orders." No orders for chart: "No UDS orders yet — Place a drug screening order to get started." Error state: "Error loading orders — An error occurred while loading UDS orders."
  </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/UdsOrderListPage.tsx
  * src/cores/cl/hooks/useUdsOrders.ts
  * src/cores/cl/types/uds.ts
</Accordion>
