Projects
Open source infrastructure for behavioral health systems. All published under the bh-healthcare organization. Apache 2.0.
bh-audit-schema
A canonical, versioned audit event standard for behavioral healthcare systems. Defines the structure of an audit event as JSON Schema, with compliance mappings to the HIPAA Security Rule, SOC 2 Trust Services Criteria, 42 CFR Part 2, and, for the agent controls added in v2.0, NIST AI RMF and ISO/IEC 42001.
v2.0 splits the single actor field into three attribution roles, authenticating, acting, and authorizing, and requires a delegation object for agent-mediated actions, so an AI agent working under a clinician's credentials can be audited truthfully. Conditional validation rejects an unattributed agent action by construction, and a new OVERRIDE action records a human interrupting an agent session. Ships with a FHIR R5 AuditEvent profile and a reference translator, checked in CI against a corpus of 7 positive and 13 negative examples. v1.1 remains available for producers that have not migrated.
bh-fastapi-audit
Pure ASGI middleware for emitting PHI-safe audit events from FastAPI applications. Non-blocking async emission, runtime schema validation with three failure modes, configurable DENIED outcome tracking with custom denial callbacks, schema version negotiation for gradual migration, and pluggable sinks.
Later releases added tamper-evident trails via SHA-256 chain hashing, a bh-audit verify CLI and programmatic chain verifier, a DynamoDB sink with three secondary indexes for compliance queries, a JSONL ledger sink, and opt-in privacy-first telemetry. Emits bh-audit-schema v1.1; for v2.0 agent attribution today, use bh-audit-logger.
bh-audit-logger
Framework-agnostic audit event emitter for any Python application. Built for Lambdas, workers, data pipelines, CLI tools, and anything that isn't FastAPI but still needs compliant audit logging. Zero required dependencies in core, with optional extras for a DynamoDB sink, the verify CLI, and runtime schema validation.
v2.0 makes bh-audit-schema v2.0 the default emission target, which makes this the reference emitter for agent attribution, delegation, and OVERRIDE events.
bh-sentinel
Multi-layer NLP pipeline for detecting clinical safety signals in unstructured behavioral health text. Pattern matching with negation and temporal detection, sentence-level zero-shot transformer inference, NRC emotion lexicon, and configurable rules engine. 40 clinical flags across 6 domains mapped to C-SSRS. Every flag includes evidence spans, basis descriptions, and confidence scores so clinicians can independently review. Designed for zero PHI egress and FDA Non-Device CDS compliance.
Two independently installable packages: bh-sentinel-core (deterministic, no ML dependencies) and bh-sentinel-ml (transformer layer). The ML layer runs a pinned INT8 ONNX build of RoBERTa-large-MNLI in process and labels each flag as pattern-only, transformer-only, or corroborated across both. Text in, flags out, clinician decides.
Not yet production ready. Clinical validation and calibration against labeled clinical data, plus a reference AWS deployment, are v0.3 deliverables.