0 && pickedEncounterId === null
}
disabled={!canManageDocuments}
value={pickedEncounterId}
onChange={setSuggestedEncounter}
/>
{/* A vaccination scan offers to file against the dose it records,
through the same ±7-day rule the visit suggestion uses. */}
{doc.kind === "VACCINATION" ? (
) : null}
{/* Which visits and doses this page is filed against, and — for
someone who may manage the vault — the links themselves.
Keyed on the write-failure count so a refused write drops
the local selection back to what the server confirmed. */}
void detailQuery.refetch()}
onChange={(part) => patch.mutate(part)}
/>
{/* The lab results read from this page and the
medications it belongs to. Conditions, visits and doses
have their own blocks above. */}
{/* Staged-facts review + the stored-text extract recovery. The
existing extract/confirm chain finally gets its control on
the document itself: pending facts open the review, a read
lab document with nothing staged offers "Extract lab
values" over its stored text — never a re-upload. */}