Skip to main content

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.

The UDS Test Details screen at /rh/uds-tests/:id displays the complete record for a single urinalysis drug screening (UDS) test, including test information, result summary, substances tested, and follow-up notes.

Overview

The page loads the UDS test record via useUDSTestDetail, which queries rh_uds_tests with a nested join to rh_episodesrh_resident_profiles + rh_residences, and rh_uds_random_schedule, filtered by the id URL param. The breadcrumb label is set to UDS - MMM d using useEntityBreadcrumb. Two cards are displayed side by side:
  • Test Information: resident number (episode.resident_profile.resident_number), residence name (episode.residence.name), episode number (episode.episode_number), administered by (collected_by), and test date.
  • Result Summary: result badge (UDSResultBadge), whether the test was random (is_random), and the list of substances tested (substances_tested array rendered as secondary Badge elements).
If follow_up_notes is present, a third card renders the note text. If the result is positive, a bordered destructive card is shown: “Positive Result — Follow Up Required” with a description stating “A significant event should be reported for positive UDS results” and a button linking to /rh/significant-events. A loading skeleton (Skeleton) is shown while data fetches; a “UDS Test not found” message is shown if the record does not exist.

Who it’s for

No route-level RequirePermission beyond the outer RHViewGuard (rh.dashboard.view). RH_PERMISSIONS.UDS_TESTS_EDIT (rh.uds-tests.edit) exists in the permission constants but is not applied as a route-level guard on this path.

Before you start

  • Hold rh.dashboard.view to access the RH module.
  • Navigate from the UDS Testing list at /rh/uds-tests to reach an individual test record.

Steps

1

Navigate to a UDS test record

From /rh/uds-tests, click a row to open /rh/uds-tests/:id for that test. The page loads the full record.
2

Review test information

The Test Information card shows resident number, residence, episode number, the person who administered the test (collected_by), and the test date/time.
3

Review the result summary

The Result Summary card shows the result badge (negative, positive, or pending), whether it was a random test, and the substances panel tested.
4

Review follow-up notes

If follow_up_notes are present, a dedicated card displays the note text.
5

Act on a positive result

If the result is positive, a destructive alert card prompts you to navigate to /rh/significant-events. The code notes that a significant event should be reported for positive UDS results; confirm the required follow-up process with a subject-matter expert.
6

Return to the list

Click Back to UDS Tests (visible on desktop) to return to /rh/uds-tests.

Key concepts

Observable result values: negative, positive, pending. Each is rendered by UDSResultBadge with an associated icon (CheckCircle2 for negative, AlertTriangle for positive, Clock for pending).
The is_random boolean on rh_uds_tests indicates whether the test was part of a random selection. The random_schedule join references rh_uds_random_schedule for the associated schedule record.
The substances_tested field is stored as a string array. The specific substance panels used by your program should be confirmed with a subject-matter expert.
A positive result renders a hard-coded prompt to file a significant event. The clinical or compliance workflow required beyond this prompt should be confirmed with a subject-matter expert. 42 CFR Part 2 sensitivity questions should also be reviewed.
The detail page displays resident_profile.resident_number rather than a name, consistent with PHI minimization practices in the list and detail views.

Recovery Housing

Recovery Housing references and overview.

Governance & parity

Documentation coverage and governance.
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.
  • src/routes/rh.tsx
  • src/cores/rh/pages/UDSTestDetailPage.tsx
  • src/cores/rh/hooks/useUDSTestDetail.ts
  • src/cores/rh/types/index.ts