def handle_specific_source_data_criteria_reference(criteria)
      original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria)
      updated_sdc = find(@source_data_criteria, :id, criteria.id)
      if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.specific_occurrence.nil?)
        criteria.instance_variable_set(:@source_data_criteria, criteria.id)
      end
      return if original_sdc.nil?
      if (criteria.specific_occurrence && !original_sdc.specific_occurrence)
        original_sdc.instance_variable_set(:@specific_occurrence, criteria.specific_occurrence)
        original_sdc.instance_variable_set(:@specific_occurrence_const, criteria.specific_occurrence_const)
        original_sdc.instance_variable_set(:@code_list_id, criteria.code_list_id)
      end
    end
def handle_specific_source_data_criteria_reference(criteria)
      original_sdc = find(@source_data_criteria, :id, criteria.source_data_criteria)
      updated_sdc = find(@source_data_criteria, :id, criteria.id)
      if !updated_sdc.nil? && !criteria.specific_occurrence.nil? && (original_sdc.nil? || original_sdc.specific_occurrence.nil?)
        criteria.instance_variable_set(:@source_data_criteria, criteria.id)
      end
      return if original_sdc.nil?
      if (criteria.specific_occurrence && !original_sdc.specific_occurrence)
        original_sdc.instance_variable_set(:@specific_occurrence, criteria.specific_occurrence)
        original_sdc.instance_variable_set(:@specific_occurrence_const, criteria.specific_occurrence_const)
        original_sdc.instance_variable_set(:@code_list_id, criteria.code_list_id)
      end
    end
For specific occurrence data criteria, make sure the source data criteria reference points
 to the correct source data criteria.