scribe:generate and document-generation permissions and quotas.
Ask the questions
id, source document_id and document_version,
questionAnswers, optional content, and optional summary.
Define the form
Each question requires a globally unique
questionId, a question, and an
answerType. Optional description explains what to extract.
dateFormat accepts D MMM YYYY, DD/MM/YYYY, MM/DD/YYYY, MMMM DD YYYY,
MMM DD YYYY, and YYYY/MM/DD (default). Option metadata is preserved with the
option definitions. The model cannot return values outside a question’s option list.
Repeat and nest questions
Setrepeatable: true to extract multiple documented occurrences. Each occurrence
is returned as a separate answered-question entry with the same questionId, its
own answer, and its own childQuestions. No documented occurrence produces an
empty list for that repeating question. A response supports up to 50 occurrences
per repeating question and up to five question levels.
Use childQuestions for details that belong to each occurrence, such as a
medication name with its dose and frequency. Missing details remain null;
a missing fact must not be inferred from an unrelated visit.
Retrieve, retry, and review
GET /sessions/{session_id}/structured-responses/{result_id} returns the persisted
result. It remains tied to the saved source version even if that note is later edited.
Deleting the source note or session removes access to the result.
Reuse the same idempotency key and body after a lost response. Replays do not
charge another advanced-template use. An edited source note changes the request’s
source version; use a new key to generate a new form. A missing completed note
returns 409 CONSULT_NOTE_REQUIRED; invalid definitions return 422.
Use the question schema above for forms, or custom prompts
for free-text output. Present extracted answers for clinician review.