Technical Reference · v1.3 · Open Source
Technical Reference
Reference implementation artifacts for the NHID-Clinical v1.3 specification. These tools demonstrate that the specification can be implemented, replayed, and evaluated through deterministic trace artifacts and conformance testing.
Reference Artifacts
Canonical Event Schema
schema/nhid_trace_schema_v1.json
JSON Schema (Draft 2020‑12) for a single NHID‑Trace event. Includes schema annotations referencing disclosure, identity, and auditability considerations associated with TCPA, HIPAA, CA AB 489, and NY S7263.
Policy Engine
src/nhid_policy_engine_v1.py
Pure Python reference implementation of the five core conformance tests plus a bot‑to‑bot detection rule. No external dependencies; fully deterministic.
Conformance Test Suite
tests/nhid_conformance_test_suite_v1.yaml
18 machine‑readable test cases covering every pass/fail/edge scenario in the v1.3 spec. Vendors can use this YAML file to self‑validate their implementations.
Failure Injection Harness
tests/failure_injection_harness.py
pytest‑based test suite. Unit tests run with no server required. Integration tests validate a live FastAPI endpoint against malformed inputs and replay determinism.
Trace Generator & Example Traces
tests/trace_generator.py
CLI script that produces canonical NHID‑Clinical trace files. Ten pre‑generated failure traces are available in the /traces directory.
Policy Engine Playground experimental
Browser-based interactive demo of the disclosure policy rules. Paste or select a canonical event JSON, run the engine, and inspect the deterministic trace output. Identical input always produces identical output.
Open Playground →Quick Start
git clone https://github.com/NHID-Clinical/NHID-Clinical.git cd NHID-Clinical pip install -r requirements.txt python -m pytest tests/ -v python -m jsonschema schema/nhid_trace_schema_v1.json python tests/trace_generator.py --offline
Unit tests run without a server. Integration tests require a FastAPI instance at http://127.0.0.1:8000 and will be automatically skipped if the server is not reachable.
Vendor Interoperability
The adapters/ directory contains format adapters that convert vendor-specific call transcripts to NHID-Clinical event traces. Currently available: Twilio Voice Intelligence. See the interoperability demo →
Important
These tools are experimental and not for production use. NHID‑Clinical does not issue certifications, conduct audits, or provide legal advice. Conformance testing is self‑administered. No external authority validates results. Adoption of these artifacts does not confer HIPAA compliance, TCPA compliance, or any regulatory approval.
Open for feedback
Questions or suggestions?
Join the community discussion or reach out directly.