Skip to content

BIP Export PDF

1. What does this feature do? (High-Level Overview)

Section titled “1. What does this feature do? (High-Level Overview)”

This feature generates a report-style PDF from the active BIP, using selected sections and current report context so teams can share a standardized clinical document for review, supervision, and external reporting. It combines narrative sections, charts, comments, consent/signature data, and insurer-specific fixed texts when available.

  • Superadmin/Admin/Owner/Manager (or any role granted export_bip and manage_bips): Can launch PDF export from BIP tabbed header actions.
  • Users with manage_bips but without export_bip: Can edit BIP but cannot use Export PDF action.
  • RBT/Analyst in read-only flow: This tabbed export action is tied to tabbed workflow header and permission check; availability depends on route/permissions.

Required permissions used by this feature path:

  • export_bip: Required for Export PDF button visibility.
  • manage_bips: Required for editable tabbed workflow entry in standard navigation.
  • view_bips: Used for read-only BIP access routes.
  • Rule 1: Export action is shown only when user passes export_bip permission check.
  • Rule 2: Export button is disabled until PDF generation prerequisites are ready (bip + client loaded, bip exists, and initial UI delay completed).
  • Rule 3: Export flow starts with section selector modal; at least one section must be selected.
  • Rule 4: Section list is filtered by feature flags; insurance-statement sections appear only when insurance-statements-fields is enabled.
  • Rule 5: School-services PDF sections are additionally filtered by bip.apply_schedule_of_services.
  • Rule 6: On confirmation, system closes selector modal, clears artifacts, and opens progress modal state.
  • Rule 7: Charts are captured before final PDF generation.
  • Rule 8: PDF generation requires persisted BIP ID; if missing, flow fails with error.
  • Rule 9: Consent data/signatures are refreshed from backend before generating document.
  • Rule 10: Report Date and Month Range are used to fetch weekly reports/chart comments for the PDF context.
  • Rule 11: If insurer fixed texts are available for client insurer_id, they are injected into generation payload.
  • Rule 12: On success, progress UI is closed and cleanup runs; on failure, user sees explicit error alert.
  • Medical > clients list > client actions > BIP View / Update.
  • Inside BIP tabbed header actions: Export PDF button.
  • Modal flow:
    • Select sections modal (Save PDF)
    • Progress/loading state during chart capture and document build
    • Error modal path when selection validation fails
  • Route family used for tabbed BIP: /bip/tabbed/:patient_id and /:id route variant under BIP module.
  1. Open BIP View / Update (tabbed workflow).
  2. Ensure Report Date and Month Range are set as desired.
  3. Click Export PDF.
  4. Select sections to include.
  5. Click Save PDF.
  6. Wait for chart capture and generation progress.
  7. Verify file download and contents.

Scenario B: Export with selective sections

Section titled “Scenario B: Export with selective sections”
  1. Open Export PDF.
  2. Use Select All / Deselect All.
  3. Re-enable only required sections.
  4. Save PDF and verify output contains only selected sections.

Scenario C: Feature-flag or school-service dependent sections

Section titled “Scenario C: Feature-flag or school-service dependent sections”
  1. Open Export PDF selector.
  2. Verify insurance-statement sections appear only when feature flag is enabled.
  3. Verify school-related sections appear only when Apply School Services is enabled.
  4. Export and confirm resulting document scope.
  • Q: What if user selects no sections?

  • A: Export is blocked and selector emits validation error requiring at least one section.

  • Q: What if BIP ID is missing when generating?

  • A: Generation fails because persisted BIP ID is required.

  • Q: What if chart capture fails?

  • A: Flow stops and user receives failed-to-capture/generate error message.

  • Q: What if insurer fixed texts are unavailable?

  • A: PDF generation continues without insurer text injection.

  • Q: Why can Export PDF button appear disabled?

  • A: Typical causes are missing loaded bip/client data, bip not existing yet, or initial readiness delay not completed.