def add_attributes_to_dcm(dcm)
      # Series level:
      dcm.add_element(SOP_CLASS, @class_uid)
      dcm.add_element(SERIES_UID, @series_uid)
      dcm.add_element(SERIES_NUMBER, '1')
      # Study level:
      dcm.add_element(STUDY_DATE, @study.date)
      dcm.add_element(STUDY_TIME, @study.time)
      dcm.add_element(STUDY_UID, @study.study_uid)
      dcm.add_element(STUDY_ID, @study.id)
      # Add frame level tags if a relevant frame exists:
      if @study.iseries && @study.iseries.frame
        dcm.add_element(PATIENT_ORIENTATION, '')
        dcm.add_element(FRAME_OF_REF, @study.iseries.frame.uid)
        dcm.add_element(POS_REF_INDICATOR, '')
      end
      # Patient level:
      dcm.add_element(PATIENTS_NAME, @study.patient.name)
      dcm.add_element(PATIENTS_ID, @study.patient.id)
      dcm.add_element(BIRTH_DATE, @study.patient.birth_date)
      dcm.add_element(SEX, @study.patient.sex)
    end
def add_attributes_to_dcm(dcm)
      # Series level:
      dcm.add_element(SOP_CLASS, @class_uid)
      dcm.add_element(SERIES_UID, @series_uid)
      dcm.add_element(SERIES_NUMBER, '1')
      # Study level:
      dcm.add_element(STUDY_DATE, @study.date)
      dcm.add_element(STUDY_TIME, @study.time)
      dcm.add_element(STUDY_UID, @study.study_uid)
      dcm.add_element(STUDY_ID, @study.id)
      # Add frame level tags if a relevant frame exists:
      if @study.iseries && @study.iseries.frame
        dcm.add_element(PATIENT_ORIENTATION, '')
        dcm.add_element(FRAME_OF_REF, @study.iseries.frame.uid)
        dcm.add_element(POS_REF_INDICATOR, '')
      end
      # Patient level:
      dcm.add_element(PATIENTS_NAME, @study.patient.name)
      dcm.add_element(PATIENTS_ID, @study.patient.id)
      dcm.add_element(BIRTH_DATE, @study.patient.birth_date)
      dcm.add_element(SEX, @study.patient.sex)
    end
Creates a new Series instance. The Series Instance UID string is used to
 uniquely identify a Series.

 @param [String] series_uid the Series Instance UID string
 @param [String] modality the modality string of the series (e.g. 'CT', 'RTSTRUCT')
 @param [Study] study the Study instance which this Series belongs to
 @param [Hash] options the options to use for creating the Series
 @option options [String] :class_uid the SOP class UID (DICOM tag '0008,0016')
 @option options [String] :date the series date (DICOM tag '0008,0021')
 @option options [String] :description the series description (DICOM tag '0008,103E')
 @option options [String] :time the series time (DICOM tag '0008,0031')

 Inserts general series, study and patient level attributes from this
 instance, as well as from the related study, patient and frame instances
 to a DICOM object.

 @param [DICOM::DObject] dcm a DICOM object typically belonging to an image instance of this series
 @return [DICOM::DObject] a DICOM object with the relevant attributes added