dbdicom.patient#

dbdicom.patient(in_database: Database | None = None, **kwargs) Patient[source]#

Create an empty DICOM patient record.

Parameters:
  • in_database (Database, optional) – If provided, the patient is created in this database. Defaults to None.

  • kwargs – Any valid DICOM (tag, value) pair to set properties of the new patient

Returns:

DICOM patient with defaults for all attributes.

Return type:

Study

Example

Create an empty patient in memory:

>>> patient = db.patient()
>>> patient.print()
---------- PATIENT -------------
Patient New Patient
--------------------------------

Note since no patient object is provided, a default database is created automatically.

>>> patient.database().print()
---------- DATABASE --------------
Location:  In memory
    Patient New Patient
----------------------------------