scribe:generate to generate, scribe:read to retrieve, and
scribe:write to save edits. The clinician needs access to the selected templates
and generation entitlements.
Request generation
POST /sessions/{session_id}/consult-note
If you omit
template_ids, Cortexa uses the session’s template selection or default.
The default response is 200 text/event-stream. Process each output.delta as
it arrives. The final output.ready contains the saved document, so you do not
need to poll or fetch the result separately.
Receive the result
output.ready. Completed output can arrive immediately without deltas.
A disconnected stream is incomplete until every document has a result.
See Streaming for the event format, failure handling, and resuming
the same request after a disconnect. For background-only generation, add
?stream=false to receive a 202 receipt and follow Jobs.
Example completed document:
content structure depend on the template and clinical
inputs. rendered_text is the display text; do not assume a fixed schema for
content across templates.
Save clinician edits
To edit a particular document, use its ID. To edit the latest completed consult note generated through the consult-note endpoint, use:base_version with the current value from the document you read.
A stale version returns 409; retrieve the latest document and resolve the
edits before saving again. If no completed consult note is available, this
endpoint returns 409 CONSULT_NOTE_REQUIRED.