Sha256: 24c249d08faf6bd9290396930457b86a17ed59fb5585fca7e7fd7bd8d7b16992
Contents?: true
Size: 957 Bytes
Versions: 44
Compression:
Stored size: 957 Bytes
Contents
# frozen_string_literal: true module MalawiHivProgramReports module Clinic class PatientsDueForViralLoad attr_accessor :start_date, :end_date def initialize(start_date:, end_date:, **_kwargs) @start_date = start_date @end_date = end_date end def find_report patients_alive_and_on_treatment.select do |patient_id| patient_viral_load_due?(patient_id) end end private def patient_viral_load_due?(patient_id) reminder = viral_load_reminder(patient_id) reminder[:eligibile] # Yes its spelt eligibile not eligible... end def patients_alive_and_on_treatment PatientsAliveAndOnTreatment .new(start_date:, end_date:) .find_report end def viral_load_reminder(patient_id) ArtService::VlReminder .new(patient_id:, date: end_date) .vl_reminder_info end end end end
Version data entries
44 entries across 44 versions & 1 rubygems