dbdicom.Record.new_study#
- Record.new_study(**kwargs)[source]#
Create a new study.
- Parameters:
kwargs (optional) – Any valid DICOM (tag, value) pair can be assigned up front as properties of the new study.
- Returns:
instance of the new study
- Return type:
Study
See also
Example
Create a new study in a patient:
>>> dory = db.patient(PatientName='Dory') >>> dory.print() ---------- PATIENT ------------- Patient Dory --------------------------------
>>> fMRI = dory.new_study(StudyDescription='fMRI', StudyDate='20091001') >>> CThead = dory.new_study(StudyDescription='CT head', StudyDate='20091002') >>> dory.print() ---------- PATIENT ------------- Patient Dory Study CT head [20091002] Study fMRI [20091001] --------------------------------
Any other record can also create a new study. Missing intermediate generations are created automatically:
>>> database = db.database() >>> database.print() ---------- DATABASE -------------- Location: In memory ----------------------------------
>>> fMRI = database.new_study(StudyDescription='fMRI') >>> database.print() ---------- DATABASE -------------- Location: In memory Patient New Patient Study fMRI [None] ----------------------------------