Consent
1. What does this feature do? (High-Level Overview)
Section titled “1. What does this feature do? (High-Level Overview)”This feature manages treatment consent evidence for the BIP, including consent language, role-based signatures, signature dates, and placeholders. It supports legal-clinical traceability by capturing who approved implementation and when.
2. Who is this for? (Roles & Permissions)
Section titled “2. Who is this for? (Roles & Permissions)”- Superadmin/Admin/Owner/Manager (or any role granted manage_bips): Primary users of editable tabbed BIP flow; can manage consent fields and signature assets.
- RBT/Analyst without manage_bips: Usually redirected to full BIP read-only flow (/bip/show/patient/:id) instead of tabbed editing flow.
- Users without BIP access permissions (view_bips/manage_bips): Cannot access BIP actions from normal client workflows.
Required permissions used by this feature path:
- manage_bips: Required to remain in editable tabbed BIP route.
- view_bips: Used in non-tabbed BIP viewing entry points.
3. Business Rules & Enforcements
Section titled “3. Business Rules & Enforcements”- Rule 1: This tab is defined as consent with title Consent.
- Rule 2: If no BIP exists yet, tab interaction is blocked globally and users must first create a BIP.
- Rule 3: On tab init with valid BIP ID, system loads consent signature assets from backend.
- Rule 4: Signature image upload has size validation; files above 2MB are rejected with warning.
- Rule 5: Clearing a signature requires confirmation dialog before removal.
- Rule 6: Updating consent fields emits bipUpdated for parent autosave flow.
- Rule 7: Parent/guardian signature placeholder is forced true and parent date reset on consent field updates in this implementation path.
- Rule 8: Tab completion state requires all four signature fields present in parent logic: analyst 1, analyst 2, physician, and parent/guardian.
- Rule 9: Tab warning/error state is raised when consent object exists but one or more required signature fields are missing.
4. UI Placement
Section titled “4. UI Placement”- Medical > Clients list > client actions > BIP View / Update.
- Inside BIP tabbed view: Consent tab (id consent).
- Route family used for tabbed BIP: /bip/tabbed/:patient_id and /:id route variant under BIP module.
5. How-To Guide (Step-by-Step)
Section titled “5. How-To Guide (Step-by-Step)”Scenario A: Register signatures for consent
Section titled “Scenario A: Register signatures for consent”- Go to Medical and open the clients list.
- Open client actions and click BIP View / Update.
- Open Consent tab.
- Upload signature images for Analyst 1, Analyst 2, Physician, and Parent/Guardian.
- Set signature dates for each role.
- Confirm data is saved and reflected in tab state.
Scenario B: Remove an incorrect signature
Section titled “Scenario B: Remove an incorrect signature”- In Consent tab, locate the signature block.
- Click delete/clear button.
- Confirm deletion in warning dialog.
- Signature and linked date are cleared.
Scenario C: Use placeholders instead of signature image
Section titled “Scenario C: Use placeholders instead of signature image”- In each signature block, toggle Add placeholder as needed.
- Keep date fields aligned with documentation policy.
- Verify final consent completeness according to workflow requirements.
6. What happens if…? (Edge Cases / FAQ)
Section titled “6. What happens if…? (Edge Cases / FAQ)”-
Q: What happens if I upload a signature image larger than 2MB?
-
A: Upload is blocked and a warning message is displayed.
-
Q: What if consent data cannot be loaded from backend?
-
A: Error is logged and tab remains usable with current local state.
-
Q: Why can Consent tab still show warning?
-
A: Parent validation marks warning when one or more required signature fields are missing.