-
Notifications
You must be signed in to change notification settings - Fork 130
Fix concept retrieval by parsing string ID to integer in Person Attribute Translator #567
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
base: master
Are you sure you want to change the base?
Fix concept retrieval by parsing string ID to integer in Person Attribute Translator #567
Conversation
…oided PersonAttributes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #567 +/- ##
============================================
+ Coverage 77.84% 78.46% +0.61%
+ Complexity 2683 2516 -167
============================================
Files 239 239
Lines 7452 7353 -99
Branches 901 1022 +121
============================================
- Hits 5801 5769 -32
+ Misses 1115 990 -125
- Partials 536 594 +58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
...c/main/java/org/openmrs/module/fhir2/api/translators/impl/PersonAttributeTranslatorImpl.java
Outdated
Show resolved
Hide resolved
@pmanko since Ian is extremely swamped right now, could you kindly take a look at this PR? Big-picture context here: ICRC is using Google Health's Android FHIR SDK to build a secure offline app for offline/community-based patient visits. To get it to exchange data with their O3 systems, they've been making improvements to the FHIR2 module, like this one. :) So this is based in field-level needs. |
@icrc-jofrancisco Could we add an integration test to cover this feature please? |
…dd-test (test) added concept type PersonAttribute to patient and person integration test
Hello @ibacher Can you check the latest tests added? Thanks |
Followed up with Ian today - this is in his review queue, and he'll try to get to it Monday for you! Thank you for your patience and, as always, really appreciate your contributions ❤️ 💐 🙏 |
Description of what I changed
Updated concept retrieval to use the correct
ConceptService.get(Integer id)
method by explicitly parsing the string ID to an integer.Previously, the code was passing a stringified numeric ID to
ConceptService.get(String uuid)
, which led tonull
being returned in real scenarios because no UUID matched the numeric string. This change ensures we call the correct method overload for integer-based IDs.Thanks,
CC: @ibacher @parthfloyd
Checklist: I completed these to help reviewers :)
My IDE is configured to follow the code style of this project.
I have added tests to cover my changes. (If you refactored
existing code that was well tested you do not have to add tests)
I ran
mvn clean package
right before creating this pull request andadded all formatting changes to my commit.
All new and existing tests passed.
My pull request is based on the latest changes of the master branch.