Class: Renalware::Pathology::Requests::GlobalRule::TransplantRegistrationStatus

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

Constant Summary

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

PARAM_COMPARISON_OPERATORS

Instance Method Summary collapse

Instance Method Details

#observation_required_for_patient?(patient, _date) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
# File 'app/models/renalware/pathology/requests/global_rule/transplant_registration_status.rb', line 12

def observation_required_for_patient?(patient, _date)
  registration = Transplants::Registration.for_patient(patient).first
  return false if registration.blank?

  registration_status = registration.current_status
  return false if registration_status.blank?

  registration_status.description.code == param_comparison_value
end

#to_sObject



22
23
24
# File 'app/models/renalware/pathology/requests/global_rule/transplant_registration_status.rb', line 22

def to_s
  "transplant registration status is #{param_comparison_value}"
end