You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: burial_form.rb
    path of file: ./repos/vets-api/app/models/preneeds
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'common/models/base'

# Preneeds namespace
#
module Preneeds
  # Models a Preneeds Burial form. This class (and associa
    
    def as_eoas
      hash = {
        applicant: applicant&.as_eoas, applicationStatus: application_status,
        attachments: attachments.map(&:as_eoas),
        claimant: claimant&.as_eoas, currentlyBuriedPersons: currently_buried_persons.map(&:as_eoas),
        hasAttachments: has_attachments, hasCurrentlyBuried: has_currently_buried,
        sendingApplication: sending_application, sendingCode: sending_code || '', sentTime: sent_time.iso8601,
        trackingNumber: tracking_number, veteran: veteran&.as_eoas
      }

      [:currentlyBuriedPersons].each do |key|
        hash.delete(key) if hash[key].blank?
      end

      Common::HashHelpers.deep_compact(hash)
    end