-
Notifications
You must be signed in to change notification settings - Fork 250
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
Super class field mapping Resource Extraction #954
Conversation
Codecov Report
@@ Coverage Diff @@
## master #954 +/- ##
============================================
+ Coverage 88.40% 88.43% +0.03%
Complexity 498 498
============================================
Files 112 112
Lines 9355 9362 +7
Branches 637 638 +1
============================================
+ Hits 8270 8279 +9
+ Misses 751 748 -3
- Partials 334 335 +1
Continue to review full report at Codecov.
|
@aditya-07 , could you please review this PR? |
@Tarun-Bhardwaj @aditya-07 I have fixed the failing CI issue |
datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt
Outdated
Show resolved
Hide resolved
…mapping/ResourceMapper.kt Co-authored-by: aditya-07 <[email protected]>
@aditya-07 feedback resolved. |
datacapture/src/main/java/com/google/android/fhir/datacapture/mapping/ResourceMapper.kt
Outdated
Show resolved
Hide resolved
…mapping/ResourceMapper.kt Co-authored-by: Aditya Kurkure <[email protected]>
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.
Great PR @maimoonak! LGTM!
@maimoonak @aditya-07: Looking through this code, I understand that the change you made is making sure a latter value is not overriding an earlier value if you're setting the same field (which is a list). So I'm not sure the title of this PR is accurate - can you confirm? and if so can you update the title and description? thanks |
@jingtang10 The main aim of PR as to allow mapping fields into superclass. For example with The issue that was fixed into PR was 'Allow super class field mapping for SDC Resource Extraction' |
thanks @maimoonak - as long as this is documented in this issue it's fine. if you can just list the two things this PR does in the description that'd be great. thanks! |
But perhaps a good follow-up PR to write is to provide minimal test cases. I think your new test case is too big and testing both of the things this PR is doing. |
Ok. Sure would break it down into two separate cases for each functionality separately |
Fixes #943
Description
Resource Extraction by Field allows mapping for parent class fields like DomainResource field extension for Patient class
Alternative(s) considered
The class just needed additional handling to traverse super class when Field not found in current class mapped
Type
Choose one: Bug fix
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project./gradlew check
and./gradlew connectedCheck
to test my changes locally