Class: Renalware::UKRDC::MeasurementUnit

Inherits:
ApplicationRecord show all
Defined in:
app/models/renalware/ukrdc/measurement_unit.rb

Overview

Represents a valid UKRDC pathology test result measurement unit e.g. “mg”. See github.com/renalreg/ukrdc/blob/master/Schema/Types/CF_RR23.xsd

Instance Method Summary collapse

Instance Method Details

#titleObject

A friendly string containing the name folllowed by the description (if present) in parentheses e.g. “l (litres)”



14
15
16
17
18
# File 'app/models/renalware/ukrdc/measurement_unit.rb', line 14

def title
  return name if description.blank? || name == description

  "#{name} (#{description})"
end