From e2723c768792ac8d62c8926786aaf73b482518a0 Mon Sep 17 00:00:00 2001 From: cferris32 Date: Fri, 5 Apr 2024 16:48:11 -0400 Subject: [PATCH] simplify --- .../vaos/app/controllers/vaos/v2/appointments_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/vaos/app/controllers/vaos/v2/appointments_controller.rb b/modules/vaos/app/controllers/vaos/v2/appointments_controller.rb index abe56a107d2..44778701d7c 100644 --- a/modules/vaos/app/controllers/vaos/v2/appointments_controller.rb +++ b/modules/vaos/app/controllers/vaos/v2/appointments_controller.rb @@ -263,9 +263,8 @@ def merge_clinics(appointments) def merge_facilities(appointments) appointments.each do |appt| appt[:location] = get_facility_memoized(appt[:location_id]) unless appt[:location_id].nil? - if cerner?(appt) - appt_location_values = extract_all_values(appt[:location]) - log_appt_id_location_name(appt) if contains_substring(appt_location_values, 'COL OR 1') + if cerner?(appt) && contains_substring(extract_all_values(appt[:location]), 'COL OR 1') + log_appt_id_location_name(appt) end end end