Sha256: fa7272638fb971ad7ebc0c329a324aaf2a8dff6bba186df3ae6514a57a4beafc
Contents?: true
Size: 690 Bytes
Versions: 43
Compression:
Stored size: 690 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/pathology" module Renalware module Pathology class ObservationForPatientObservationDescriptionUsingSetQuery pattr_initialize :patient, :observation_description_code # Fetches the patient's most recent observation for the supplied observation_description.code # (eg 'HGB') using the patient's current_observation_set jsonb hash and returnd something # like { "result" => "123", "observed_on" => "2019-01-01" } def call return {} unless patient.current_observation_set patient.current_observation_set.values.fetch(observation_description_code, {}) end end end end
Version data entries
43 entries across 43 versions & 1 rubygems