Sha256: 8c596a1f82fcc8fff6141a575bb080a1b1149e1051eeb35b34f2239e0571a490

Contents?: true

Size: 762 Bytes

Versions: 23

Compression:

Stored size: 762 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/clinical"

module Renalware
  module Clinical
    class Patient < ActiveType::Record[Renalware::Patient]
      has_many :allergies, dependent: :restrict_with_exception

      # These statuses match NHS standards for the display of recorded allergy status.
      # Note that
      # - if no_known_allergies then patient.allergies must be empty
      # - if known_allergies then patient.allergies must be not be empty
      # - unavailable is not currently used
      enumerize :allergy_status,
                in: %i(unrecorded
                       known_allergies
                       no_known_allergies
                       unavailable),
                default: "unrecorded"
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
renalware-core-2.0.64 app/models/renalware/clinical/patient.rb
renalware-core-2.0.63 app/models/renalware/clinical/patient.rb
renalware-core-2.0.62 app/models/renalware/clinical/patient.rb
renalware-core-2.0.61 app/models/renalware/clinical/patient.rb
renalware-core-2.0.60 app/models/renalware/clinical/patient.rb
renalware-core-2.0.58 app/models/renalware/clinical/patient.rb
renalware-core-2.0.57 app/models/renalware/clinical/patient.rb
renalware-core-2.0.56 app/models/renalware/clinical/patient.rb
renalware-core-2.0.55 app/models/renalware/clinical/patient.rb
renalware-core-2.0.54 app/models/renalware/clinical/patient.rb
renalware-core-2.0.53 app/models/renalware/clinical/patient.rb
renalware-core-2.0.52 app/models/renalware/clinical/patient.rb
renalware-core-2.0.51 app/models/renalware/clinical/patient.rb
renalware-core-2.0.50 app/models/renalware/clinical/patient.rb
renalware-core-2.0.48 app/models/renalware/clinical/patient.rb
renalware-core-2.0.47 app/models/renalware/clinical/patient.rb
renalware-core-2.0.46 app/models/renalware/clinical/patient.rb
renalware-core-2.0.45 app/models/renalware/clinical/patient.rb
renalware-core-2.0.44 app/models/renalware/clinical/patient.rb
renalware-core-2.0.43 app/models/renalware/clinical/patient.rb