Class: Renalware::Pathology::ObservationForPatientObservationDescriptionQuery
- Inherits:
-
Object
- Object
- Renalware::Pathology::ObservationForPatientObservationDescriptionQuery
- Defined in:
- app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(patient, observation_description) ⇒ ObservationForPatientObservationDescriptionQuery
constructor
A new instance of ObservationForPatientObservationDescriptionQuery.
Constructor Details
#initialize(patient, observation_description) ⇒ ObservationForPatientObservationDescriptionQuery
Returns a new instance of ObservationForPatientObservationDescriptionQuery.
8 9 10 11 |
# File 'app/models/renalware/pathology/observation_for_patient_observation_description_query.rb', line 8 def initialize(patient, observation_description) @patient = patient @observation_description = observation_description end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/models/renalware/pathology/observation_for_patient_observation_description_query.rb', line 13 def call @patient .observations .where(description: @observation_description) .order(observed_at: :desc) .first end |