Sha256: d6f6ccdcdd92916a5acadc303624613b2b88bd7efa3005250ad6d0478ed85aee

Contents?: true

Size: 983 Bytes

Versions: 12

Compression:

Stored size: 983 Bytes

Contents

require "document/embedded"
require "document/enum"

module Renalware
  class PatientDocument < Document::Embedded
    attribute :interpreter_notes, String
    attribute :admin_notes, String
    attribute :special_needs_notes, String

    class Diabetes < NestedAttribute
      attribute :diagnosis, Boolean
      attribute :diagnosed_on, Date

      validates :diagnosed_on, timeliness: { type: :date, allow_blank: true }
    end
    attribute :diabetes, Diabetes

    class Referral < Document::Embedded
      attribute :referring_physician_name, String
      attribute :referral_date, Date
      attribute :referral_type, String
      attribute :referral_notes, String
    end
    attribute :referral, Referral

    class History < Document::Embedded
      attribute :alcohol, Document::Enum, enums: %i(never rarely social heavy)
      attribute :smoking, Document::Enum, enums: %i(no ex yes) # RRSMOKING %i(never former current)
    end
    attribute :history, History
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc9 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc8 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc7 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc6 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc5 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc4 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc3 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.rc1 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.beta12 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.beta11 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.beta10 app/documents/renalware/patient_document.rb
renalware-core-2.0.0.pre.beta9 app/documents/renalware/patient_document.rb