-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Patient/$match: Add remaining parameters #6447
base: master
Are you sure you want to change the base?
Patient/$match: Add remaining parameters #6447
Conversation
Even if they are not used, it simplifies using the parameters when overriding the `match` function.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6447 +/- ##
============================================
+ Coverage 83.54% 83.56% +0.02%
- Complexity 27432 27785 +353
============================================
Files 1707 1739 +32
Lines 106185 107472 +1287
Branches 13397 13489 +92
============================================
+ Hits 88710 89811 +1101
- Misses 11750 11877 +127
- Partials 5725 5784 +59 ☔ View full report in Codecov by Sentry. |
Heya Felix, thanks for the contribution! I'm having some trouble understanding the purpose of the MR. Is it that you have an underlying service which wants to make use of these parameters in your own implementation? What do you mean when you say it simplifies the parameters? If you want to make use of other parameters, instead of overriding this class, why not replace the provider entirely? This adds two parameters that are effectively vestigial in our implementation, which could lead to confusion to users who expect them to do something (since they will be published automatically in our docs). I'm not opposed to this necessarily, but if we were to add these parameters, I would require a few small changes:
I actually don't know the answer to this offhand, but if you just wrote a separate method which bound to the same name, using different parameters, does the method binder correctly route it to the new method? If so, it's probably a better solution to have your own overriding provider implement these new parameters, and have our method delegate to yours in your provider, e.g. something like
That said, I don't know if our method binder would route that correctly, probably worth checking as I think that solution is cleaner from a platform perspective. If our binder doesnt route that correctly, then I think we could take this MR with the above changes (1+2 )made. |
Hi @tadgh, thanks for your detailed comment, and sure I can provide further information why I think this is important. Use case and reason for suggested changeOur use case is the following: We use Regarding adding parameters which are not usedYou are right regarding that providing parameters that are not used is confusing. On the other hand, as the standard specifies them, it's also fair that they are present. Probably eventually HAPI's example implementation should also support the parameters, even though the implementation as a whole is quite rudimentary, as it is based only on a parts of what MDM matching does (as opposed to an actual scoring, which is complex). Regarding
I can see that Regarding annotating another method with the same
|
If you are talking about Given that, and the fact that PatientMatchProvider.java is only 50 lines long, it's probably easier for you to just write your own and load that? Alternatively, rework your pr to:
And yeah, you can omit the R6-only parameter, that's fine. |
Good to hear that I'll update the PR as discussed. I think I'll open a separate issue regarding |
Sounds great, thanks! @me when its ready for review, i may not see it otherwise. |
Even if they are not used, it simplifies using the parameters when overriding the
match
function.