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.
Consent-Specific Features
| Feature | Description |
|---|---|
| Communication Sections | Pre-configured sections with 7 communication preference questions (SMS, email, fax, WhatsApp, etc.) |
| Expiry (TTL) | Configurable time-to-live with Day/Month/Year granularity |
| PDF Iterations | requires_pdf_iterations flag enables multi-iteration PDF generation |
| Hidden Section Codes | Consent forms don't expose section codes in the UI |
Key Service Functions
File: src/components/reusable/ConsentManagement/helpers.ts
| Function | Method + Endpoint | Description |
|---|---|---|
fetchBillWiseConsents(billId) | GET api-v3/account/patient-consent/{billId} | Get consent status for a bill |
linkConsentsToLabForm(labFormId, consentIds) | PUT .../link-process | Link consent processes to an existing form |
unlinkConsentsToLabForm(labFormId, consentIds) | PUT .../unlink-process | Unlink consent processes |
uploadConsentAttachment(formId, payload) | POST .../attachment | Upload signed consent document |
notifyPatientConsent(action, formId) | POST .../{action}/notification/{formId} | Send patient notification |
revokePatientConsent(labFormId, comments) | POST .../revoke | Revoke a patient's consent |
Consent Status in Billing
Consent status is shown at multiple touchpoints in the billing workflow:
- On bill load:
BillConfirmationFootercallsfetchBillWiseConsents(billId)→ storesbillConsentExists+billConsentDetailsinRedux.GENERIC. - Consent badge/status is displayed alongside the bill confirmation actions.
- The same status is surfaced in:
BillUpdateFooter,TRFBillingPage,RevisedBill.
Consent Response Retrieval
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.