The UDS Test Details screen atDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/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 viauseUDSTestDetail, which queries rh_uds_tests with a nested join to rh_episodes → rh_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_testedarray rendered as secondaryBadgeelements).
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-levelRequirePermission 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.viewto access the RH module. - Navigate from the UDS Testing list at
/rh/uds-teststo reach an individual test record.
Steps
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.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.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.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.Key concepts
Result values
Result values
Observable result values:
negative, positive, pending. Each is rendered by UDSResultBadge with an associated icon (CheckCircle2 for negative, AlertTriangle for positive, Clock for pending).Random vs scheduled test
Random vs scheduled test
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.Substances tested
Substances tested
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.Positive result prompt
Positive result prompt
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.
Resident number displayed
Resident number displayed
The detail page displays
resident_profile.resident_number rather than a name, consistent with PHI minimization practices in the list and detail views.Related
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.
Documentation sources
Documentation sources
- src/routes/rh.tsx
- src/cores/rh/pages/UDSTestDetailPage.tsx
- src/cores/rh/hooks/useUDSTestDetail.ts
- src/cores/rh/types/index.ts