def setup_derived_entry_elements(id_generator)
      @hqmf_id = attr_val('./*/cda:id/@root') || attr_val('./*/cda:typeId/@extension')
      @title = attr_val('./*/cda:code/cda:displayName/@value').try(:titleize)
      @type = attr_val('./*/cda:code/@code')
      @comments = @entry.xpath('./*/cda:text/cda:xml/cda:qdmUserComments/cda:item/text()', HQMF2::Document::NAMESPACES)
                  .map(&:content)
      handle_preconditions(id_generator)
      obs_test = attr_val('./cda:measureObservationDefinition/@classCode')
      # If there are no measure observations, or there is a title, then there are no aggregations to extract
      return unless !@title && obs_test.to_s == 'OBS'
      @title = attr_val('../cda:code/cda:displayName/@value')
      @aggregator = attr_val('./cda:measureObservationDefinition/cda:methodCode/cda:item/@code')
    end
def setup_derived_entry_elements(id_generator)
      @hqmf_id = attr_val('./*/cda:id/@root') || attr_val('./*/cda:typeId/@extension')
      @title = attr_val('./*/cda:code/cda:displayName/@value').try(:titleize)
      @type = attr_val('./*/cda:code/@code')
      @comments = @entry.xpath('./*/cda:text/cda:xml/cda:qdmUserComments/cda:item/text()', HQMF2::Document::NAMESPACES)
                  .map(&:content)
      handle_preconditions(id_generator)
      obs_test = attr_val('./cda:measureObservationDefinition/@classCode')
      # If there are no measure observations, or there is a title, then there are no aggregations to extract
      return unless !@title && obs_test.to_s == 'OBS'
      @title = attr_val('../cda:code/cda:displayName/@value')
      @aggregator = attr_val('./cda:measureObservationDefinition/cda:methodCode/cda:item/@code')
    end
Handles extracting elements from the entry