class DrugSafetyUpdate < Document
  FORMAT_SPECIFIC_FIELDS = %i(
    therapeutic_area
  ).freeze

  attr_accessor(*FORMAT_SPECIFIC_FIELDS)

  def initialize(params = {})
    super(params, FORMAT_SPECIFIC_FIELDS)
  end

  def taxons
    [ALERTS_AND_RECALLS_TAXON_ID]
  end

  def self.title
    "Drug Safety Update"
  end

  def send_email_on_publish?
    false
  end

  def primary_publishing_organisation
    "240f72bd-9a4d-4f39-94d9-77235cadde8e"
  end
end

class DrugSafetyUpdate < Document
  FORMAT_SPECIFIC_FIELDS = %i(
    first_published_at
    therapeutic_area
  ).freeze

  attr_accessor(*FORMAT_SPECIFIC_FIELDS)

  def initialize(params = {})
    super(params, FORMAT_SPECIFIC_FIELDS)
  end

  def taxons
    [ALERTS_AND_RECALLS_TAXON_ID]
  end

  def self.title
    "Drug Safety Update"
  end

  def send_email_on_publish?
    false
  end

  def primary_publishing_organisation
    "240f72bd-9a4d-4f39-94d9-77235cadde8e"
  end
end

Add `first_published_at` as a special field for drug safety updates
Add `first_published_at` as a special field for drug safety updates

This could be better managed by changing this to a common field for specialist documents (or all documents) in Rummager, but for now this is necessary because the Rummager code looks inside the details hash for this field rather than at the top level.
