Skip to main content
Docs vCurrent•API —
Version: Current

Changelog, versioning and deprecation

Versioning​

  • The API is versioned in the path: /api/v1/.... Breaking changes go to a new version (/api/v2), never breaking v1 in production.
  • The contract is additive: new response fields may be added at any time — handle unknown fields tolerantly. Internal engine/rule versions are in analysis_metadata.source_versions.
  • schema_version identifies the response contract (v2).

Deprecation policy​

  • Features to be removed are announced here with at least 90 days notice and start returning the Deprecation header (RFC 8594) with the sunset date.
  • Admin endpoints remain documented in the Admin Swagger (/docs/admin), separate from the client routes.

Changelog​

2026-09 — Self-feeding per organization (v1.32.20)​

  • Informative decisions now automatically feed the organization's own knowledge base (tenant RAG, no patient data) and an aggregated conduct profile enters the context of every chat of the organization.
  • Versioned training snapshots per organization (anonymized JSONL + SHA-256), generated on demand or weekly, behind a flag and consent. Nothing reaches the deterministic engine. See Alert governance.

2026-09 — Decision memory and faster evidence (v1.32.19)​

  • decision_history on each clinical_alert: per-organization memory of decisions already recorded on the same alert (counts, override rate, last justification). Presentation/context only — never changes severity or risk. Also enters the chat/MCP context.
  • Governance suggestions (admin): suppression-by-signature candidates derived from decisions, always with human approval; CONTRAINDICADO is never a candidate.
  • Anonymized decision export (admin, disabled by default + per-organization consent) for offline tuning of the text models.
  • Evidence speed: per-pair RAG lookups in parallel with caching (9.5 s → 12 ms on seen pairs); openFDA and DailyMed with 6-hour caches and parallel pair lookups.

2026-09 — End-to-end code review (v1.32.18): robustness and security​

  • Critical fix: POST /pharmacy/check answered 409 to every call (a constant internal idempotency key). Fixed; Idempotency-Key behaves exactly like /interactions/check.
  • Webhooks: delivery no longer blocks the server while retrying slow endpoints; chat.message now uses the same path as analysis.completed (retries, delivery log, replay).
  • Real client IP: the API now sees the caller's IP behind the proxy. The allowed_ips allowlist works and GET /health returns client_ip so you can check the IP we see.
  • Payload limits: free-text fields (notes ≤ 8,000 chars; conditions/allergies items ≤ 300 chars; lists ≤ 100 items; labs ≤ 100 keys) and JSON body ≤ 2 MB (413).
  • Validated pagination: limit (1–200 on client routes) and offset (≥ 0) → 422 instead of 500.
  • Batch (/interactions/batch): items run in parallel under a global deadline (100 s); unfinished items come back as an explicit error instead of the proxy dropping the connection.
  • Monthly quota: requests rejected by the per-minute limit no longer consume the monthly quota (distinct 429: Cota mensal excedida).
  • Right to erasure (LGPD): DELETE .../patients/{ref}?purge=true now deletes the profile and pseudonymizes the reference / strips clinical data from analyses, usage logs and snapshots (snapshots under legal_hold are preserved and reported). The response carries erased counts.
  • Headers: new X-SauBit-Cache, X-SauBit-Agent-Run, X-SauBit-Processing-Time-Ms (X-SafeMed-* kept for one release). Security headers (HSTS, nosniff, frame-options) on every response.
  • MCP: malformed JSON → -32700 Parse error (400) instead of 500; internal errors no longer expose details (only request_id).

2026-06 — Hospital integration, structured contract and dev experience​

  • FHIR R4 (POST /fhir/$check): Bundle → RiskAssessment + DetectedIssue; profiles MedicationRequest/Statement, Condition, AllergyIntolerance, Observation, Patient, Encounter, DiagnosticReport, Practitioner.
  • CDS Hooks (/cds-services): medication-prescribe and order-select with cards.
  • HL7 v2 (POST /hl7v2/$check): MSH/PID/AL1/DG1/RXO/RXE/RXR/OBX.
  • Batch (POST /interactions/batch, up to 25 items).
  • Idempotency (Idempotency-Key) on check/batch/fhir/hl7v2/cds.
  • Webhooks: delivery with up to 3 attempts + log + replay (admin).
  • Structured clinical contract (UCUM): dose+dose_unit (incl. mg/kg, mg/m2), form/concentration/duration/indication and DCB/ATC/RxNorm/GTIN codes; clinical_context_assessment block (completeness + residual risk).
  • Transactional semantics: response with request_id, replayed_request, billing_status; idempotent replay is not charged; GET /analyses/{id}/status.
  • Sandbox: sm_test_ keys are not billed (billing_status: "not_charged").
  • Dev: Python and Node SDKs, Postman collection, System flows page.

Earlier​

  • Alert governance (P2): alert_governance block, physician × pharmacist views, critical confirmation, "alerts that changed conduct" metric, dashboard/ROI (admin).
  • Clinical engine (P1): clinical_alerts (12 deterministic validations) + offline safety net.