-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LUPEYALPHA-1172] EY admin matching details #3348
Conversation
b6d4cb6
to
e9dc9d5
Compare
e9dc9d5
to
075f628
Compare
1946719
to
075f628
Compare
075f628
to
79bb707
Compare
@@ -43,9 +43,9 @@ def matching_claims | |||
|
|||
concatenated_columns = "CONCAT(#{attributes.join(",")})" | |||
policies_to_find_matches.map { |policy| | |||
policy::Eligibility.where("LOWER(#{concatenated_columns}) = LOWER(?)", vals.join) | |||
policy::Eligibility.where("LOWER(#{concatenated_columns}) = LOWER(?)", vals.join) if (attributes - policy::Eligibility.column_names).empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 could this result in a missed match? Perhaps it's better to strip out any columns which don't exist but still match those which do, rather than skipping entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So right now, there is never more than one column, so we probably don't need to concatenate here.
I can refactor this code to remove the concat - not sure why it's here.
The column is based on the ELIGIBILITY_MATCHING_ATTRIBUTES
for the policy,
which is teacher_reference_number
for TSLR, LUPP, FE and ECP.
and passport_number
for IRP.
I guess in theory, you could specify multiple columns per policy, but we haven't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer your question - I don't think this will result in a missed match.
That where clause is to check for eligibilities that match all of the columns in concatenated_columns.
If one of those columns does not exist on an eligibility, then there will never be a match with that eligibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this commit should let us still do the comparison if the eligibilities have some different attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah - that is better 👍🏽
79bb707
to
cc7e686
Compare
cc7e686
to
ed5dc73
Compare
ed5dc73
to
908089c
Compare
908089c
to
166ec2a
Compare
13e17f0
to
af037ed
Compare
If the two eligibilities don't have all the same attributes, rather than skipping the comparison only compare the attributes they have in common. Also uses select rather than pluck so we don't need to run a query for each iteration of the loop
af037ed
to
806c202
Compare
https://dfedigital.atlassian.net/browse/LUPEYALPHA-1172