Overview

High-level overview of the Missing Details feature: purpose, data model, and core concepts.

👤 Rucha Mahesh Kulkarni📅 Updated: Mar 16, 2026📁 Missing Details

Overview

Continue patient registration and order creation even when some business-critical details are missing, while keeping a clean audit trail until those details are actually filled.

Missing Details

Missing Details is a cross-stack fallback-and-tracking system. It lets the lab move forward when patient or order data is unavailable right now, but it does not pretend the data is complete. Instead, it stores which field was missing, what placeholder/default value was used, where that happened, who did it, and whether the record has been resolved later.

In plain engineering terms: this feature is the safety rail between strict data quality and real-world front-desk chaos. The frontend lets the operator mark a field as missing and inject a configured default. The backend persists an unresolved LabMissingDetails row. Later, when a real value lands through patient update, order update, accession, or manual resolve, the system flips that row to resolved and keeps the trail intact.

TicketTitleNotes
EN-10733Missing DetailsPrimary feature ticket referenced for this guide

Prerequisites

RequirementWhy it mattersWhere it is enforced
Template data must exist in MissingDetailsTemplatesThe config modal can only enable fields that exist as master templatesmodels/missing_details_templates.py, fixtures/missing_details_templates.json
Lab-level config must be created in LabMissingDetailsConfigurationCheckboxes only appear for configured fieldsLabMissingDetailsConfigView (API)
User must have missing_details_access to see the Missing Data moduleThe sidebar entry and primary UI are permission-gatedRegistration SideBar, Organisation SideBar
Frontend must preload config into model stateThe checkbox component hides itself if config is not loaded or the field is not configuredfetchLabMissingDetailsConfiguration, MissingFieldCustomCheckBox
For entity-backed defaults, the relevant create flow must be availableSome configured defaults bootstrap a referral/org/test/ICD/insurance/group entity behind the scenesLabMissingDetailsConfiguration.process_field(...)
Session must identify lab and sometimes org scopeMissing detail rows are always lab-scoped and optionally org-scopedLabMissingDetailsView, PY-2 registration/billing flows

What Is It For

Frontend perspective

  • Let staff keep the workflow moving instead of blocking registration or billing because one field is missing.
  • Show a Missing checkbox only for fields the lab has explicitly configured.
  • Auto-fill a known placeholder/default value when the operator marks a field as missing.
  • Keep enough generic state to know which config entry was used, what value was injected, and whether the UI should still show the checkbox or switch to a Missing Data tag.
  • Show unresolved missing details on the waiting list, dashboards, accession pages, and the Missing Data tab.
  • Give staff one-click routes into patient update or order update from the Missing Data tab.

Backend perspective

  • Store lab-level defaults separately from actual missing-detail incidents.
  • Create unresolved LabMissingDetails rows when a patient or order is saved with configured missing fields.
  • Resolve those rows automatically when a real value later differs from the stored placeholder value.
  • Resolve those rows manually when the UI explicitly marks them resolved.
  • Attach has_missing_fields flags back onto bill and patient payloads so other screens can show red tags.
  • Create and log dependent entities for default values that are not plain strings, such as referral, organization, test, ICD, insurance, or group.

Types Of Missing Entities

TypeExamplesWhat the default looks likeExtra entity creation neededRuntime behavior
Static / value-only fieldsAddress, Email, Age, Patient ID, Contact Number, Order Number, Report RemarkUsually a plain string, number, or dateNoFrontend injects the configured value directly into the form
Select-backed but still straightforward fieldsNationality, Ethnicity, Race, Patient TypeA label/value that the frontend can construct locallyNo backend entity creationFrontend maps the configured value into the expected select object
Entity-backed patient fieldsReferral, Organization, Allergies, Diseases, Clinical History, Insurance, GroupA name or code that should eventually exist as a proper domain entityYes, in many casesConfig save can bootstrap the entity; registration/billing then references it
Entity-backed order fieldsTest, Test ICD code, Bill ICD codes, Consulting doctorA catalog entity or coded objectYesConfig save can create the entity, then billing/order update can use it

Structure Of Missing Details

LayerWhat it storesTable / stateWhy it exists
Master template layerWhich fields are even eligible for Missing DetailsMissingDetailsTemplatesGlobal catalog
Lab configuration layerWhich templates this lab has enabled and what default value to injectLabMissingDetailsConfigurationPer-lab behavior switchboard
Runtime incident layer (Transactional Data)Every actual patient/order missing-field eventLabMissingDetailsAudit + resolution lifecycle
Entity creation trace layerWhich config caused a domain entity to be createdMissingDetailsEntityCreationObservability + traceability

There is also a fifth unofficial layer in practice: activity logs. They are not the source of truth for missing details, but they are the breadcrumb trail for entity creation activity, queueing, success, and failure.

Key Features

  • Lab-specific configuration instead of a hardcoded global rule set.
  • Soft-disable semantics for config rows, so historical references are not blown away.
  • Runtime tracking at both patient level and order level.
  • Automatic resolution when new real data differs from the stored placeholder.
  • Manual resolution through Missing Data UI and related update flows.
  • has_missing_fields flag propagation into report/waiting/search style screens.
  • Organization scoping support through org_id on runtime rows.
  • Collection-centre-specific UI gating so the feature does not leak into unsupported contexts.
  • Legacy PY-2 compatibility for entity creation that still depends on old controllers.
  • Local PY-3 entity creation for some insurance/group flows where migration work has already happened.

On this page