Safety Transitions
1. What does this feature do? (High-Level Overview)
Section titled “1. What does this feature do? (High-Level Overview)”This feature documents the safety and transition planning portion of the BIP so clinicians can define risk management and continuity-of-care procedures in one workflow, clinically organizing generalization guidance, risk assessment, crisis management content, de-escalation techniques, and transition planning (fading/discharge) to support safer implementation across settings and long-term treatment progression.
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 create and update safety/transition content. - 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
safetywith titleSafety & Transitionsin the BIP tab catalog. - Rule 2: If no BIP exists yet, tab interaction is blocked globally and users must first create a BIP.
- Rule 3: Field edits emit
bipUpdated, which triggers parent debounced autosave for persistence. - Rule 4: Tab completion state requires all three values:
generalization_training,risk_assessment, andcrisis_plan.description. - Rule 5: Tab warning/error state is raised when crisis plan exists but is incomplete (
descriptionorpreventionmissing). - Rule 6: Crisis plan is normalized on write; if absent, component initializes
crisis_planobject before updating description/prevention. - Rule 7: De-escalation techniques list supports add/edit/remove operations; delete action requires explicit confirmation.
4. UI Placement
Section titled “4. UI Placement”- Medical > client list > client actions >
BIP View / Update. - Inside BIP tabbed view: tab
Safety & Transitions(tab idsafety). - Route family used for tabbed BIP:
/bip/tabbed/:patient_idand/:idroute variant under BIP module.
5. How-To Guide (Step-by-Step)
Section titled “5. How-To Guide (Step-by-Step)”Scenario A: Complete safety and transition planning
Section titled “Scenario A: Complete safety and transition planning”- Go to Medical and open the client list.
- Open client actions and click
BIP View / Update. - Open tab
Safety & Transitions. - Complete Generalization Training and Risk Assessment sections.
- Fill Crisis Plan Description and Crisis Prevention.
- Add de-escalation techniques as needed.
- Complete Fading Plan and Discharge Plan for transition pathway.
- Wait for autosave confirmation/toast after edits.
Scenario B: Add and maintain de-escalation techniques
Section titled “Scenario B: Add and maintain de-escalation techniques”- In
Safety & Transitions, go to De-escalation Techniques. - Click
Add Technique. - Enter technique description.
- Repeat for additional techniques.
- To remove one, click delete and confirm warning dialog.
Scenario C: Correct tab warning state
Section titled “Scenario C: Correct tab warning state”- Open
Safety & Transitions. - If tab shows warning, verify Crisis Plan fields.
- Ensure both Description and Prevention are completed.
- Confirm required core fields for completion are populated.
6. What happens if…? (Edge Cases / FAQ)
Section titled “6. What happens if…? (Edge Cases / FAQ)”-
Q: What happens if crisis plan does not exist yet?
-
A: The component creates an empty crisis plan object automatically when user starts editing description/prevention.
-
Q: Why can the tab be incomplete even when some text exists?
-
A: Completion requires specific core fields (generalization, risk assessment, and crisis plan description), not just any safety text.
-
Q: What if a user removes a de-escalation technique accidentally?
-
A: Deletion requires explicit confirmation before the row is removed.