fieldnotesai
    Preparing search index...
    • Orchestrates parallel autofill:

      1. Fetches session blocks once (transcript + notes + summary for the case).
      2. Fires both AI prompts simultaneously via Promise.all:
        • Prompt A (DB): extracts structured entity data → saves to DB tables (non-overwrite: only fills null/empty fields)
        • Prompt B (Form): extracts answers for the specific form fields shown on screen → returned to the caller to merge into UI state
      3. Returns results for both independently so the caller can handle partial failures (e.g. form fill succeeded but DB fill failed) without blocking the user from seeing form autofill results.

      Parameters

      • caseId: string
      • clientId: string
      • fields: FormField[]

      Returns Promise<OrchestrationResult>