Class: Renalware::Pathology::Requests::GlobalRule::ObservationResult

Inherits:
Renalware::Pathology::Requests::GlobalRule show all
Defined in:
app/models/renalware/pathology/requests/global_rule/observation_result.rb

Constant Summary

Constants inherited from Renalware::Pathology::Requests::GlobalRule

PARAM_COMPARISON_OPERATORS

Instance Method Summary collapse

Instance Method Details

#observation_descriptionObject



25
26
27
# File 'app/models/renalware/pathology/requests/global_rule/observation_result.rb', line 25

def observation_description
  @observation_description ||= ObservationDescription.find_by(id: param_id)
end

#observation_required_for_patient?(patient, _date) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/models/renalware/pathology/requests/global_rule/observation_result.rb', line 15

def observation_required_for_patient?(patient, _date)
  PatientGlobalRuleDecision.new(patient, self).observation_required_for_patient?
end

#to_sObject



19
20
21
22
23
# File 'app/models/renalware/pathology/requests/global_rule/observation_result.rb', line 19

def to_s
  "#{observation_description.code} " \
  " #{param_comparison_operator} " \
  "#{param_comparison_value}"
end