Overview

High-level overview of the Toxicology feature: purpose, scope, and core concepts.

👤 Rushikesh Sakharwade📅 Updated: May 7, 2026📁 Toxicology

Overview

Toxicology in the medical laboratory identifies and quantifies toxins, drugs, and chemicals in biological samples. It is used to diagnose poisoning, monitor therapeutic drug levels, and detect substance abuse.

Toxicology

Toxicology provides the product foundation for managing toxicology-specific master data and report configuration. Before a toxicology workflow can be used in billing, report entry, or result interpretation, labs must define the underlying drug catalog, group drugs into panels, and maintain brand-specific drug collections. This setup ensures that toxicology tests use consistent substances, orderable groups, defaults, and reporting behavior across the workflow.

After the prerequisite master data is ready, a toxicology report/test is created from Profile & Report Management > Test List. When the test type is selected as Toxicology, the report parameter builder exposes toxicology components such as Screening, Confirmation, Prescription, Summary, History, Image, and Clinical Notes.

Prerequisites

RequirementWhy it mattersWhere it is enforced
Drug master data must existPanels and brands are built by adding drugs; toxicology configuration cannot be meaningful without drug recordsDrug Master / Panel Master module in livehealth-frontend; backend persistence in livehealthapp and crelio-app
Panel master data must exist when panel-based toxicology configuration is neededA panel is a collection of drugs used together for toxicology testingPanel Master UI and related backend APIs
Brand master data must exist when brand-based grouping is neededA brand is also a collection, but it groups drugs based on the drug brandBrand Master UI and related backend APIs
User must have access to Drug Master / Panel Master screensThe master setup is managed from the Quality Control area in the application sidebarFrontend route/sidebar permissions and backend authorization
Toxicology test/report must be created with test type ToxicologyToxicology-specific report components are available only after selecting the toxicology test typeTest List / Add New Test flow in livehealth-frontend

What Is It For

Frontend perspective

  • Provide Drug Master, Panel Master, and Brand Master screens under Drug Master / Panel Master.
  • Let users create, update, disable, download, and bulk-manage toxicology master records.
  • Let users build panels by searching and adding drugs to a panel.
  • Let users build brands by searching and adding drugs to a brand.
  • Show system default, custom, disabled, and all-record views where applicable.
  • Create a toxicology report/test by selecting test type Toxicology.
  • Add toxicology report components from the report parameter menu.
  • Configure Screening fields, billing availability, default drugs/panels/brands, and display ordering metadata.

Backend perspective

  • Persist drug, panel, and brand master data across livehealthapp and crelio-app.
  • Validate required fields such as drug name, panel name, panel code, and drug selection.
  • Maintain relationships between panels and drugs, and between brands and drugs.
  • Support system default lists and lab/custom records where applicable.
  • Persist toxicology report parameter configuration and component metadata for report entry and billing workflows.

Types / Modes

TypeExampleRuntime behaviorNotes
DrugAmphetamine, Ketamine, DiazepamDefines individual substances with test type, category, code, sample type, cut off, upper limit, and unitBase prerequisite for panels and brands
PanelTest PanelGroups multiple drugs under a panel name and panel codeCan include reflex options such as screening reflex and prescription reflex
BrandTest Brand 1Groups drugs based on drug brandSimilar collection behavior to panels, but organized around brand context
Screening componentScreeningFirst-line toxicology component for quickly detecting possible presence of drugs/toxinsCan be configured with fields, defaults, and billing availability
Confirmation componentConfirmationDefinitive follow-up component used to verify an exact substanceTypically follows presumptive positive screening results
Prescription componentPrescriptionMedication-history component for legally prescribed drugsHelps explain expected positives
Summary componentSummaryLinked summary of Screening or Confirmation findingsCategorizes findings as consistent, inconsistent, prescribed but consistent, or prescribed but inconsistent
History componentHistoryHistorical summary across previous toxicology reportsCan summarize the last 1 to 6 reports and link to Screening or Confirmation
Image componentImageImage grid for report attachments or default imagesConfigures max rows, max columns, and upload slots
Clinical Notes componentClinical NotesClinician observations and interpretationConnects lab findings with patient condition

Structure Of Toxicology

LayerWhat it stores or ownsTable / state / fileWhy it exists
Drug master layerIndividual toxicology drug definitionsDrugProvides the base drug catalog
Panel master layerCollections of drugs grouped as panelsDrug with is_panel = 1Supports panel-based toxicology setup using the same Drug table
Brand master layerBrand-specific collections of drugsBrand with drugs = ManyToManyField(Drug)Supports brand-based toxicology setup
Toxicology report layerToxicology report/test configuration and componentsProfile & Report Management > Test List > Add New Test > Test Type: Toxicology > Report ParametersDefines report-entry behavior for screening, confirmation, prescription, summary, history, images, and clinical notes
Frontend UI layerLists, modals, filters, bulk actions, add/update flowsDrug Master / Panel Master screens and Test List > Report Parameters builderLets users manage prerequisite master data and configure toxicology report components
Backend service layerAPIs, validation, persistence, permissionsDrug, Brand, panel records via Drug.is_panel = 1, plus toxicology handling inside generic billing default and report-submit flowsOwns source-of-truth behavior for master data, billing defaults, and report submission

Master Data Model Notes

Panels are stored in the same Drug table as drugs, with is_panel set to 1.

Brands use the Brand table and maintain a many-to-many relationship with Drug.

Key Brand model fields:

  • name: brand name.
  • is_disabled: enables/disables the brand without deleting it.
  • lab: lab scope for the brand.
  • drugs: many-to-many mapping to Drug.
  • cpt_code: CPT code for the brand.
  • created_by / updated_by: activity ownership.

The Brand table uses unique_together = (("name", "lab"), ), so brand names are unique within a lab.

Key Features

  • Drug Master list with drug name, test type, drug category, drug code, sample type, cut off, upper limit, and unit.
  • Panel Master add/update flow with panel name, panel code, CPT code, drug search, selected-drug table, and reflex toggles.
  • Brand Master add/update flow with brand name, CPT code, drug search, and selected-drug table.
  • System default request actions for new drugs, panels, and brands.
  • Download and bulk-action support from master list pages.
  • Toxicology report parameter components for screening, confirmation, prescription, summary, history, images, and clinical notes.
  • Screening component configuration for report-entry fields, defaults, grouping/sorting metadata, and billing availability.
  • Confirmation component configuration with Screening-style sections plus Reflex controls.
  • Prescription component configuration for tracking prescribed patient drugs.
  • Summary component configuration linked to Screening or Confirmation findings.
  • History component configuration for historical summaries, chart display, summary classes, date format, and date filter.
  • Image component configuration for image-grid layout and upload slots.
  • Clinical Notes component configuration linked to Screening or Confirmation with drug-level note visibility.

On this page