Safety Review
Four-database flow: ANCHOR timeline, mission control, and optional safety attention SP; optional BM TS_case_party when case ids resolve; optional META meta_person for party identities. ED writes remain on POST /api/events. Nothing is auto-sent to 911, attorneys, or GALs.
Four-database readiness
Connection strings present vs enrichers that succeeded on this request. No automatic outbound notifications.
- ANCHOR pool configured
- META pool configured
- BM pool configured
- ED pool configured
- BM party lookup OK
- META person lookup OK
- Object timeline (usp_timeline_get_by_object_v1) OK
Rollout status (this repo)
What ships today vs in flight vs next — pair with the checklist below.
Implemented
- ANCHOR household timeline + mission control + optional usp_safety_attention_by_household_v1 (critical signals & attention tasks).
- ANCHOR usp_timeline_get_by_object_v1 when signal object ids are present on critical rows (merged related timeline).
- ED signal/task versioned writes and Anchor event writers (usp_an_event_write_v1 / usp_an_event_write_from_ed_v1) via POST /api/events.
- Safety Action Panel: no auto-911 / no auto-notify; manual logging only.
Wiring
- BM TS_case_party reads when AZURE_SQL_BM_CONNECTION_STRING is set and case ids resolve from task/signal rows or ?caseId=.
- META meta_person lookup when AZURE_SQL_META_CONNECTION_STRING is set and party rows expose person_id-style keys.
- Environment flags in fourDb readiness block (pools configured vs enricher success).
Next
- META: meta_code_value labels for party roles (display_label) and meta_user / meta_person_relationship context per approved joins.
- BM: TS_case ↔ household linkage once column names are confirmed in AE_BM_DEV.
- ED: optional read procedures or views for signal/task by case without ad hoc invented columns.
Safety Action Panel
Escalation-level signals detected (Safety Review). This app never places calls automatically. Use the steps below only when you intend to act.
Signal summary
Elevated ideation language during intake; clinician review required per protocol.
Signal type
SUICIDE_RISK
Strength
HIGH
Confidence
91%
Timestamp
Apr 9, 2026, 10:15 AM
Household context
Household 1 · Person — · Object sig-mock-esc-1
Log action taken
Writes a manual event on the existing POST /api/events path (no new fields).
Signal summary
Automated triage flagged critical strength — verify in source system.
Signal type
INTAKE_NOTE
Strength
CRITICAL
Confidence
72%
Timestamp
Apr 9, 2026, 10:15 AM
Household context
Household 1 · Person person-demo-1 · Object sig-mock-esc-2
Log action taken
Writes a manual event on the existing POST /api/events path (no new fields).
Critical signal summary
| timelineItemId | eventTsUtc | eventFamilyCode | eventTypeCode | eventTypeName | summaryText | sourceSystemCode | sourceTableName | sourceRecordId | priorSourceRecordId | objectTypeCode | objectId | objectVersionId | priorObjectVersionId | householdId | personId | causedByUserId | correlationId | sessionId | detailJson | recordHashValue | createdTsUtc |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mock-esc-suicide | 2026-04-09T10:15:40.069Z | DOMAIN | SIGNAL_CAPTURED | Signal captured | Elevated ideation language during intake; clinician review required per protocol. | TS360 | signal | sig-mock-esc-1 | — | signal | sig-mock-esc-1 | v1 | — | 1 | — | — | — | — | {"signal_type_code":"SUICIDE_RISK","signal_strength_code":"HIGH","confidence_score":0.91} | — | 2026-04-09T10:15:40.069Z |
| mock-esc-critical-only | 2026-04-09T10:15:40.069Z | DOMAIN | SIGNAL_CAPTURED | Signal captured | Automated triage flagged critical strength — verify in source system. | TS360 | signal | sig-mock-esc-2 | — | signal | sig-mock-esc-2 | v1 | — | 1 | person-demo-1 | — | — | — | {"signal_type_code":"INTAKE_NOTE","signal_strength_code":"CRITICAL","confidence_score":0.72} | — | 2026-04-09T10:15:40.069Z |
Linked safety review tasks
| timelineItemId | eventTsUtc | eventFamilyCode | eventTypeCode | eventTypeName | summaryText | sourceSystemCode | sourceTableName | sourceRecordId | priorSourceRecordId | objectTypeCode | objectId | objectVersionId | priorObjectVersionId | householdId | personId | causedByUserId | correlationId | sessionId | detailJson | recordHashValue | createdTsUtc |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mock-esc-suicide | 2026-04-09T10:15:40.069Z | DOMAIN | SIGNAL_CAPTURED | Signal captured | Elevated ideation language during intake; clinician review required per protocol. | TS360 | signal | sig-mock-esc-1 | — | signal | sig-mock-esc-1 | v1 | — | 1 | — | — | — | — | {"signal_type_code":"SUICIDE_RISK","signal_strength_code":"HIGH","confidence_score":0.91} | — | 2026-04-09T10:15:40.069Z |
| mock-esc-critical-only | 2026-04-09T10:15:40.069Z | DOMAIN | SIGNAL_CAPTURED | Signal captured | Automated triage flagged critical strength — verify in source system. | TS360 | signal | sig-mock-esc-2 | — | signal | sig-mock-esc-2 | v1 | — | 1 | person-demo-1 | — | — | — | {"signal_type_code":"INTAKE_NOTE","signal_strength_code":"CRITICAL","confidence_score":0.72} | — | 2026-04-09T10:15:40.069Z |
| evt-report | 2026-04-02T10:02:00.000Z | DOMAIN | Reporting | Reporting | Report Generated | TS360 | — | — | — | — | — | — | — | — | — | — | — | — | — | — | 2026-04-02T10:02:00.000Z |
| evt-notes | 2026-04-02T09:14:00.000Z | DOMAIN | Documentation | Documentation | Notes Attached | TS360 | — | — | — | — | — | — | — | — | — | — | — | — | — | — | 2026-04-02T09:14:00.000Z |
| evt-appointment | 2026-04-02T09:00:00.000Z | DOMAIN | Care | Care | Appointment Added | Anchor | — | — | — | — | — | — | — | — | — | — | — | — | — | — | 2026-04-02T09:00:00.000Z |
Optional notification targets (ATTORNEY / GAL)
Rows come from AE_BM_DEV.dbo.TS_case_party when the BM pool is configured and case ids are known (from signal/task columns or the optional case id field above). TS360 does not email or call these parties — use your approved workflow. You may record intent below for audit.
Case case-mock-safety · ATTORNEY
Party row (as returned from BM)
- party_role_code
- ATTORNEY
- person_id
- person-mock-attorney
- description_text
- Mock BM row — use live BM + ts_case_id on ED/ANCHOR rows to replace.
Case case-mock-safety · GAL
Party row (as returned from BM)
- party_role_code
- GAL
- person_id
- person-mock-gal
META person lookup (optional)
| person_id | display_label |
|---|---|
| person-mock-attorney | Mock attorney party (demo) |
| person-mock-gal | Mock GAL party (demo) |
Related timeline by signal object (usp_timeline_get_by_object_v1)
- SIGNAL_CAPTURED2026-04-09T10:15:40.069Z
Elevated ideation language during intake; clinician review required per protocol.
- SIGNAL_CAPTURED2026-04-09T10:15:40.069Z
Automated triage flagged critical strength — verify in source system.
Latest related timeline (safety heuristic on household feed)
- SIGNAL_CAPTURED2026-04-09T10:15:40.069Z
Elevated ideation language during intake; clinician review required per protocol.
- SIGNAL_CAPTURED2026-04-09T10:15:40.069Z
Automated triage flagged critical strength — verify in source system.
Latest household timeline (full feed slice)
- SIGNAL_CAPTURED2026-04-09T10:15:40.069Z
Elevated ideation language during intake; clinician review required per protocol.
- SIGNAL_CAPTURED2026-04-09T10:15:40.069Z
Automated triage flagged critical strength — verify in source system.
- Reporting2026-04-02T10:02:00.000Z
Report Generated
- Documentation2026-04-02T09:14:00.000Z
Notes Attached
- Care2026-04-02T09:00:00.000Z
Appointment Added
- Finance2026-04-01T16:05:00.000Z
Expense Recorded
- Communication2026-04-01T15:28:00.000Z
Message Logged
- Exchange2026-04-01T15:15:00.000Z
Pickup Completed
Object & procedure checklist (Case Reconstruction Engine™ / CRE™)
Status reflects this repository and route wiring. Validate Azure objects with node scripts/inspect-dev-schema.js.
AE_META_DEV
- planned
dbo.meta_code_value
Use display_label in UI when wired; not queried on Safety Review yet.
- in progress
dbo.meta_person
Optional lookup when AZURE_SQL_META_CONNECTION_STRING + party person ids.
- docs only
dbo.meta_household
- docs only
dbo.meta_household_member
- planned
dbo.meta_person_relationship
Graph joins not on Safety Review route yet.
- planned
dbo.meta_user
Sessions separate from Safety Review enricher.
AE_BM_DEV
- in progress
dbo.TS_case_party (ATTORNEY / GAL hints)
Loaded when BM pool set + resolved case ids (from rows or ?caseId=).
- docs only
dbo.TS_case, bm_object_type, bm_workflow_* , bm_module
Case header not joined yet — parties only.
AE_ED_DEV
- wired
dbo.signal, dbo.task, seq_signal_id
Versioned SPs + POST /api/events close-and-append paths.
- wired
usp_signal_create_v1 / usp_signal_update_v1
- wired
usp_task_create_v1 / usp_task_update_v1
AE_ANCHOR_DEV — writes
- wired
usp_an_event_write_v1
Default ED RS2 writer (non-signal entities).
- wired
usp_an_event_write_from_ed_v1
Signal RS2 writer.
AE_ANCHOR_DEV — timeline / dashboard
- wired
usp_timeline_get_v1
- wired
usp_timeline_get_by_household_v1
Household dashboard + Safety Review feed.
- in progress
usp_timeline_get_by_object_v1
Called for signal object refs on critical rows when SP deployed.
- wired
usp_mission_control_by_household_v1
Fallback rows for open attention tasks when safety SP RS2 empty.
AE_ANCHOR_DEV — safety
- wired
usp_safety_attention_by_household_v1
Called when deployed; batches passed through without reshaping. If missing, UI uses timeline + mission control fallbacks.
Written summary: CRE_Build_Status.md at repository root (open in your editor or source host).