Sha256: ffec9517bab9d3fd70d1ef48e6d6e6de846de3fde807af55215f52e69fd1e99b

Contents?: true

Size: 587 Bytes

Versions: 3

Compression:

Stored size: 587 Bytes

Contents

class Record

  include Mongoid::Document

  field :first, type: String
  field :last, type: String
  field :gender, type: String
  field :birthdate, type: Integer
  field :race, type: String
  field :ethnicity, type: String
  field :test_id, type: BSON::ObjectId

  [:allergies, :care_goals, :conditions, :encounters, :immunizations, :medical_equipment,
   :medications, :procedures, :results, :social_history, :vital_signs].each do |section|
    embeds_many section, as: :entry_list, class_name: "Entry"
  end
  
  def over_18?
    Time.at(birthdate) < Time.now.years_ago(18)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
health-data-standards-0.3.0 lib/health-data-standards/models/record.rb
health-data-standards-0.2.0 lib/health-data-standards/models/record.rb
health-data-standards-0.1.0 lib/health-data-standards/models/record.rb