Class: Renalware::Letters::Part::ClinicalObservations

Inherits:
Renalware::Letters::Part show all
Includes:
AttributeNameHelper
Defined in:
app/models/renalware/letters/part/clinical_observations.rb

Constant Summary collapse

OBSERVATION_ATTRS =
%i(bp weight height bmi urine_blood urine_protein).freeze
OBSERVATION_UNITS =
{ weight: :kg, height: :m }.freeze

Instance Attribute Summary

Attributes inherited from Renalware::Letters::Part

#event, #letter, #patient

Instance Method Summary collapse

Methods included from AttributeNameHelper

#attr_name

Methods inherited from Renalware::Letters::Part

#initialize

Constructor Details

This class inherits a constructor from Renalware::Letters::Part

Instance Method Details

#each_observationObject



14
15
16
17
18
19
# File 'app/models/renalware/letters/part/clinical_observations.rb', line 14

def each_observation
  observations.each do |arr|
    label, result, unit_of_measurement = arr
    yield(label, result, unit_of_measurement)
  end
end

#to_partial_pathObject



21
22
23
# File 'app/models/renalware/letters/part/clinical_observations.rb', line 21

def to_partial_path
  "renalware/letters/parts/clinical_observations"
end