Skip to main content

v1

patient_notes record, v1 — canonical aliases.

Consumers and the record registry import from here and never touch the inner module names, mirroring flow_specs/v1/__init__.py.

Module​

Submodules​

Classes​

ORM​

class ORM(**kwargs):

SQLAlchemy model for the patient_notes cache table.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Variables​

  • bitfount_patient_id : sqlalchemy.orm.base.Mapped[str]
  • body : sqlalchemy.orm.base.Mapped[str]
  • created_at : sqlalchemy.orm.base.Mapped[str]
  • created_by : sqlalchemy.orm.base.Mapped[str]
  • created_by_username : sqlalchemy.orm.base.Mapped[str]
  • deleted_at : sqlalchemy.orm.base.Mapped[str | None]
  • deleted_by : sqlalchemy.orm.base.Mapped[str | None]
  • deleted_by_username : sqlalchemy.orm.base.Mapped[str | None]
  • edited_at : sqlalchemy.orm.base.Mapped[str | None]
  • edited_by : sqlalchemy.orm.base.Mapped[str | None]
  • edited_by_username : sqlalchemy.orm.base.Mapped[str | None]
  • id : sqlalchemy.orm.base.Mapped[str]
  • project_id : sqlalchemy.orm.base.Mapped[str]
  • review_event_id : sqlalchemy.orm.base.Mapped[str | None]
  • tags : sqlalchemy.orm.base.Mapped[dict[str, typing.Any] | None]

Record​

class Record(**data: Any):

A note a site user wrote about a patient for a trial.

Attributes

  • id: The note's ID (a UUID).
  • project_id: The trial (project) ID.
  • bitfount_patient_id: The Bitfount patient ID.
  • review_event_id: The review the note was written with, or None for a standalone note.
  • body: The note's text. May contain PII; never leaves the site.
  • created_by: The author's Bitfount user ID.
  • created_by_username: The author's username when they wrote it.
  • created_at: When the note was written.
  • deleted_by: The Bitfount user ID of whoever deleted it, if deleted.
  • deleted_by_username: Their username when they deleted it.
  • deleted_at: When the note was deleted.
  • edited_by: The Bitfount user ID of whoever edited it, if edited.
  • edited_by_username: Their username when they edited it.
  • edited_at: When the note was edited.
  • tags: Arbitrary flat metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Variables​

  • static bitfount_patient_id : str
  • static body : str
  • static created_by : str
  • static created_by_username : str
  • static deleted_by : str | None
  • static deleted_by_username : str | None
  • static edited_by : str | None
  • static edited_by_username : str | None
  • static id : str
  • static model_config
  • static project_id : str
  • static review_event_id : str | None