Product EngineeringFeaturesLab FormsFrontendlivehealth-frontend

Consent Management

Consent form capture, status tracking, notifications, and revocation in livehealth-frontend.

👤 Ritu Kataria📅 Updated: Mar 13, 2026🏷️ feature

Consent Management

Consent forms are a special Lab Form type with an extended lifecycle. Beyond standard form capture, they include expiry/TTL management, PDF generation, patient notification, and revocation flows.


FeatureDescription
Communication SectionsPre-configured sections with 7 communication preference questions (SMS, email, fax, WhatsApp, etc.)
Expiry (TTL)Configurable time-to-live with Day/Month/Year granularity
PDF Iterationsrequires_pdf_iterations flag enables multi-iteration PDF generation
Hidden Section CodesConsent forms don't expose section codes in the UI

Key Service Functions

File: src/components/reusable/ConsentManagement/helpers.ts

FunctionMethod + EndpointDescription
fetchBillWiseConsents(billId)GET api-v3/account/patient-consent/{billId}Get consent status for a bill
linkConsentsToLabForm(labFormId, consentIds)PUT .../link-processLink consent processes to an existing form
unlinkConsentsToLabForm(labFormId, consentIds)PUT .../unlink-processUnlink consent processes
uploadConsentAttachment(formId, payload)POST .../attachmentUpload signed consent document
notifyPatientConsent(action, formId)POST .../{action}/notification/{formId}Send patient notification
revokePatientConsent(labFormId, comments)POST .../revokeRevoke a patient's consent

Consent status is shown at multiple touchpoints in the billing workflow:

  1. On bill load: BillConfirmationFooter calls fetchBillWiseConsents(billId) → stores billConsentExists + billConsentDetails in Redux.GENERIC.
  2. Consent badge/status is displayed alongside the bill confirmation actions.
  3. The same status is surfaced in: BillUpdateFooter, TRFBillingPage, RevisedBill.

getBillConsentDetails(billId)


GET api-v3/account/lab/form/consent/bill/{billId}/responses


prepareConsentDetails(response)   // Transform for display


Redux GENERIC: { billConsentExists, billConsentDetails }

File: src/components/reusable/ConsentManagement/PatientConsentDetails.tsx — renders the consent details panel.

On this page