Sha256: cc88ca7207d6b71405b8812d9c8b1f097517e212b0197779f5affab29bb9ed63

Contents?: true

Size: 565 Bytes

Versions: 21

Compression:

Stored size: 565 Bytes

Contents

class FulfillmentHistory
  include Mongoid::Document
  include Mongoid::Attributes::Dynamic
  
  field :prescriptionNumber, as: :prescription_number, type: String
  field :dispenseDate, as: :dispense_date, type: Integer
  field :quantityDispensed, as: :quantity_dispensed, type: Hash
  field :fillNumber, as: :fill_number, type: Integer
  field :fillStatus, as: :fill_status, type: String
  
  belongs_to :provider, class_name: "Provider"

  def shift_dates(date_diff)
    self.dispenseDate = (self.dispenseDate.nil?) ? nil : self.dispenseDate + date_diff
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
health-data-standards-3.5.0 lib/health-data-standards/models/fulfillment_history.rb