ConsentManager is a widget for presenting consent documents to patients, capturing digital signatures, and tracking the full consent lifecycle. It displays the consent document with its scope, category, and policy link, then guides the patient through signing. Status transitions — from draft through proposed, active, or rejected — are all managed through a backend proxy you control.
Props
URL of your backend proxy endpoint. The widget sends GET requests to load consent documents and PATCH requests to update consent status when the patient signs or declines.
CSS class name applied to the widget’s root element for layout and theming control.
Callback invoked when a load or update request to your proxy fails. Use this to alert the patient and prevent the flow from proceeding without a recorded consent decision.
Proxy setup
Your proxy needs to return consent documents on GET and accept status updates on PATCH. The example below shows a Next.js App Router implementation:Usage
Features
- Consent document display: renders the document with its scope, category, and applicable policy URI
- Digital signature capture: collects a patient signature as part of the consent record
- Status tracking: manages transitions through the
draft → proposed → active → rejectedlifecycle - Verification status display: shows whether the consent has been verified by a clinician
- Policy URI linking: links out to the full policy document referenced by the consent record
Consents are stored as FHIR
Consent resources. The widget maps signature events to the appropriate FHIR status transitions, so your consent records are immediately available through the ClinikAPI search and read endpoints.