SDK
Exams
`vault.exams` — list, read, create, update, archive/unarchive, delete/restore.
class
Signature #
class Exams(documents: VersionedDocuments[ExamRecord, ExamSummary], *, time_precision: TimePrecision | None = None) vault.exams — list, read, create, update, archive/unarchive, delete/restore.
Members #
list(*, security_group: str | None = None, include_deleted: bool = False, limit: int = 50, cursor: str | None = None) -> Page[ExamListItem] #
method
One page of exams, each with its decrypted summary (title, modality, date).
iter_all(*, security_group: str | None = None, include_deleted: bool = False, limit: int = 50) -> Iterator[ExamListItem] #
method
Every exam, across all pages.
get(exam_id: str, *, version_id: str | None = None, include_draft: bool = True) -> Exam #
method
Fetches and decrypts one exam: the newest content (draft included), or `version_id`.
create(record: ExamRecord | Mapping[str, Any], *, patient_id: str, security_group: str) -> Exam #
method
Seals `record`, links it to `patient_id` in clear `meta`, and creates the exam. `patient_id` is required and clear on purpose — it is the axis the vault itself uses to route and authorize an exam without ever opening its encrypted content. Everything else, modality included, stays sealed.
update(exam_id: str, record: ExamRecord | Mapping[str, Any], *, expected_latest_version_id: str | None = None) -> Exam #
method
Seals a new complete version of `record` (see `Patients.update` for the conflict guard).
archive(exam_id: str) -> DocumentIndex #
method
Marks the exam archived (no new version).
unarchive(exam_id: str) -> DocumentIndex #
method
Clears the archived flag (no new version).
delete(exam_id: str) -> DocumentIndex #
method
Moves the exam to the trash — a flag, never a hard delete; `restore` undoes it.
restore(exam_id: str) -> DocumentIndex #
method
Takes the exam out of the trash.