<commit_before>class EvidenceItem < ActiveRecord::Base
  include Moderated
  include Subscribable
  include WithAudits
  include WithTimepointCounts
  include WithSingleValueAssociations
  include SoftDeletable
  acts_as_commentable

  belongs_to :source
  belongs_to :disease
  belongs_to :variant
  has_and_belongs_to_many :drugs

  serialize :remote_errors, JSON
  serialize :remote_ids, JSON

  alias_attribute :text, :description

  associate_by_attribute :source, :pubmed_id
  associate_by_attribute :disease, :name
  associate_by_attribute :drugs, :drug_ids

  display_by_attribute :source, :pubmed_id
  display_by_attribute :disease, :name

  enum evidence_type: [:Diagnostic, :Prognostic, :Predictive]
  enum evidence_level: [:A, :B, :C, :D, :E]
  enum evidence_direction: [:Supports, 'Does Not Support']
  enum variant_origin: [:Somatic, :Germline]
  enum clinical_significance: [:Sensitivity, 'Resistance Or Non-Response', 'Better Outcome', 'Poor Outcome', :Positive, :Negative, 'N/A']

  def self.view_scope
    eager_load(:disease, :source, :drugs)<commit_msg>fix value<commit_after>class EvidenceItem < ActiveRecord::Base
  include Moderated
  include Subscribable
  include WithAudits
  include WithTimepointCounts
  include WithSingleValueAssociations
  include SoftDeletable
  acts_as_commentable

  belongs_to :source
  belongs_to :disease
  belongs_to :variant
  has_and_belongs_to_many :drugs

  serialize :remote_errors, JSON
  serialize :remote_ids, JSON

  alias_attribute :text, :description

  associate_by_attribute :source, :pubmed_id
  associate_by_attribute :disease, :name
  associate_by_attribute :drugs, :drug_ids

  display_by_attribute :source, :pubmed_id
  display_by_attribute :disease, :name

  enum evidence_type: [:Diagnostic, :Prognostic, :Predictive]
  enum evidence_level: [:A, :B, :C, :D, :E]
  enum evidence_direction: [:Supports, 'Does Not Support']
  enum variant_origin: [:Somatic, :Germline]
  enum clinical_significance: [:Sensitivity, 'Resistance or Non-Response', 'Better Outcome', 'Poor Outcome', :Positive, :Negative, 'N/A']

  def self.view_scope
    eager_load(:disease, :source, :drugs)
{'fraction_non_alphanumeric': 0.08870214752567694, 'fraction_numerical': 0.0, 'mean_word_length': 6.003267973856209, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7120177', 'n_tokens_mistral': 738, 'n_tokens_neox': 702, 'n_words': 176}