OptionalannotationExactly which AI fields to answer, by annotation id: the chunking lever, walking
DryRunFormFillResult.aiFieldIds a slice at a time. Present, maxAiFields is ignored.
Ids that are not answerable AI fields are dropped rather than errors — the caller's plan may be
one save older than the template. Deterministic fields resolve on EVERY chunk, so the caller
dedupes by annotation id.
Optionalchosencontact_type_id -> contact_id, as the user chose; authorized exactly as a real fill authorizes it.
The caller's organization from authentication: the authorization boundary, never the request body.
OptionalincludeAlso open the patient's EMR namespace to retrieval.
OptionalmaxAI fields to answer, in template order. Clamped to MAX_DRY_RUN_AI_FIELD_CAP.
OptionalrenderRender-only: draw these caller-supplied answers onto the template and return the bytes, running
no lane — how a chunked session gets ONE PDF carrying every chunk's answers. Untrusted input.
Takes precedence over annotationIds; the tRPC layer refuses both together.
OptionalrenderDraw the answers onto the template and return the bytes. On by default: geometry is what is being tested.
OptionalrunnerRunner levers, passed in because the caller owns the flag provider and @repo/ai-agents never reads flags.
OptionalselectedThe patient's charts the AI lane may read. Empty means EMR-only (or nothing).
OptionalselectedThe patient's completed session notes the AI lane may quote, authorized exactly as a real fill authorizes them.
OptionaltreatmentScopes patient-context resolution to one episode.
The acting user: form visibility is per-user, so this is half the authorization key.