TruPath Admin Dashboard Guide

The admin dashboard (dashboard/) is a separate, session-authenticated area used to manage reference data (respiratory targets, antimicrobial clinical precautions, recommendations, ICD-10 codes), review generated reports, and manage dashboard accounts. It is unrelated to the report-generation API's shared-secret key (see API docs) - dashboard pages are gated by a logged-in session, not by X-API-Key/Basic Auth.

Logging in

dashboard/login.php checks the submitted username/password against the users table with PHP's password_verify() against a bcrypt hash stored in password_hash. There is no password-reset-by-email flow - resetting a password means editing the row directly, via the Users page below or SQL.

A default account is seeded by database/schema.sql:

username: admin
password: TruPath@2026
Change this before any production deployment. The seeded password is documented in plaintext in dashboard/login.php and this guide - treat it as a known value, not a secret, until it's rotated.

Session mechanics

All session handling lives in includes/dashboard_session.php:

Dashboard pages

All pages share a common header/nav/footer (dashboard/_layout.php) and a common list+modal CRUD pattern (POST action=create|update|delete, ?edit=<id>/?new=1 opening an add/edit <dialog>, a DataTables-enhanced table.data-table). dashboard/pathogens.php is the clearest example if you're adding a new reference-data page.

PagePurpose
dashboard/index.phpOverview - record counts and data-library metadata.
dashboard/reports.phpBrowse/filter generated reports, download PDFs. Shows a real Pages column (genuine multi-page pagination) instead of status/type filters - nothing to filter on those, see below.
dashboard/pathogens.phpManage targets - the 34-organism respiratory panel (17 viruses, 14 bacteria, 3 fungal).
dashboard/antimicrobials.phpManage clinical_precautions - THE real hydration source for Alternative Antimicrobials (31 drugs). Includes the exclusion flags, clearly marked as stored-but-unenforced (see below).
dashboard/recommendations.phpManage per-target recommendation rankings (target_recommendations, 136 rows).
dashboard/icd10.phpManage icd_options (50 codes). Reference/visibility only - see below, no server-side effect in this product.
dashboard/users.phpManage dashboard accounts - admin role required.

There is no "MAST Plates" page and no "Resistance Genes" page - this product has neither. MAST_PENDING/MAST_FINAL are 100% dead code in the approved source (render() hardcodes PCR_ONLY; no data-mode control exists at all, confirmed by grep). Dropped rather than built for a workflow that can never run.

ICD-10 Codes: reference/visibility only, NOT a validation gate

Unlike tpl-fungal (where ICD-10 tiering genuinely drives a live codingWarning API field), this product's ICD-10 codes are confirmed fully inert to clinical logic. The source's own diagnosisWarning banner is purely client-side - it never blocks report generation, and diagnosis codes never appear anywhere in the rendered PCR report (grepped the engine's render() pipeline - zero references).

The icd10.php page exists so the requisition form's 50-code checklist stays administrable alongside the rest of the reference data - but editing a code's tier here has zero effect on api/generate-report.php's behavior or response. Deliberate, not an oversight.

Antimicrobials: the exclusion flags are stored but unenforced

Three drugs (Nirmatrelvir-Ritonavir, Ribavirin, Trimethoprim-Sulfamethoxazole) have renal_exclusion_when_flagged/hepatic_exclusion_when_flagged set. The approved source defines a matching function, organExcluded(caseData, alternative), that would hard-exclude such a drug when the disease flag is active - but it is never called anywhere (grepped the engine module - it appears only in its own definition). This port reproduces it verbatim for traceability and likewise never calls it.

Toggling these checkboxes only changes whether the RED renal/hepatic icon is shown - it never removes a drug from the report. Verify this is intentional before relying on it clinically.

How this product's clinical engine actually differs

Cloned from tpl-wound's architecture (closest sibling by far - same 1102x1427 canvas, same palette, ~80% shared function names), but the clinical algorithms and real pagination are this product's own:

Updating the mapping data

The approved standalone generator has no client-side "upload updated spreadsheet" feature - its data blocks are embedded JS consts. Update here via:

  1. Editing rows directly through the Pathogens / Antimicrobials / Recommendations / ICD-10 Codes pages, or
  2. Replacing the product's own data/*.json audit-export files, re-running tools/build_reference_json.php, then tools/import_data_library.php.

Users (add/remove dashboard accounts)

dashboard/users.php is an admin-only page:

What the Admin Dashboard does NOT do

← Back to Report Generator