SDK

PatientRecord

The `data` stream of a patient (`PatientData` in the web app) — everything here is sealed before upload. `birth_date` accepts a `date` or an aware `datetime` and is stored the way the web app stores it, as a UTC ISO 8601 instant. Set `Settings.time_precision` to truncate it to the workspace's anonymization precision before sealing, like the web app does.

On this page

class

Signature #

class PatientRecord(*, legal_name: str, display_name: str, identifiers: list[PersonalIdentifier] | None = None, external_id: str | None = None, birth_date: str | None = None, biological_sex: Literal['MALE', 'FEMALE', 'INTERSEX', 'UNDEFINED'] | None = None, gender_identity: Literal['CIS_MALE', 'CIS_FEMALE', 'TRANS_MALE', 'TRANS_FEMALE', 'NON_BINARY', 'AGENDER', 'FLUID', 'OTHER', 'PREFER_NOT_TO_SAY'] | None = None, race_identity: Literal['WHITE', 'BLACK', 'BROWN', 'YELLOW', 'INDIGENOUS', 'NOT_DECLARED'] | None = None, email: str | None = None, phone: str | None = None, address: PatientAddress | None = None, internal_notes: list[str] | None = None, custom_attributes: dict[str, Any] | None = None)

Bases: BaseModel

The data stream of a patient (PatientData in the web app) — everything here is sealed before upload.

birth_date accepts a date or an aware datetime and is stored the way the web app stores it, as a UTC ISO 8601 instant. Set Settings.time_precision to truncate it to the workspace's anonymization precision before sealing, like the web app does.

Members #

attribute

display_name: str #

attribute

identifiers: list[PersonalIdentifier] | None = None #

attribute

external_id: str | None = None #

attribute

birth_date: str | None = None #

attribute

biological_sex: Literal['MALE', 'FEMALE', 'INTERSEX', 'UNDEFINED'] | None = None #

attribute

gender_identity: Literal['CIS_MALE', 'CIS_FEMALE', 'TRANS_MALE', 'TRANS_FEMALE', 'NON_BINARY', 'AGENDER', 'FLUID', 'OTHER', 'PREFER_NOT_TO_SAY'] | None = None #

attribute

race_identity: Literal['WHITE', 'BLACK', 'BROWN', 'YELLOW', 'INDIGENOUS', 'NOT_DECLARED'] | None = None #

attribute

email: str | None = None #

attribute

phone: str | None = None #

attribute

address: PatientAddress | None = None #

attribute

internal_notes: list[str] | None = None #

attribute

custom_attributes: dict[str, Any] | None = None #

attribute