Skip to content
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

Update Composition.focus to handle Composition.entry #3647

Closed
wants to merge 4 commits into from

Conversation

sharon2719
Copy link
Contributor

@sharon2719 sharon2719 commented Dec 9, 2024

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #3617

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 52.23881% with 32 lines in your changes missing coverage. Please review.

Project coverage is 28.0%. Comparing base (0571c2d) to head (658a051).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...core/engine/configuration/ConfigurationRegistry.kt 52.2% 27 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #3647     +/-   ##
=========================================
+ Coverage     26.8%   28.0%   +1.1%     
  Complexity     801     801             
=========================================
  Files          284     283      -1     
  Lines        15053   14608    -445     
  Branches      2667    2609     -58     
=========================================
+ Hits          4036    4091     +55     
+ Misses       10500    9975    -525     
- Partials       517     542     +25     
Flag Coverage Δ
engine 62.3% <52.2%> (-0.3%) ⬇️
geowidget 16.0% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...core/engine/configuration/ConfigurationRegistry.kt 64.3% <52.2%> (-4.0%) ⬇️

... and 34 files with indirect coverage changes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rewrite this by defining a function that takes the values that have the key of either "focus" or "entry", so that you can keep all the code the same other than where you happen to get the values from?

E.g. regardless of whether the key in the composition is "focus" or "entry" all the process that happens to the

{
    "reference": ...
   "identifier": ...
}

is going to be exactly the same. So the only part that should vary is whether you get that from the a key that's called "focus" or "entry".

Also, not that in the test cases you need to handle at least the cases where

  1. the composition uses all focus
  2. the composition uses all entry
  3. the composition uses both, but not in the same section
  4. the composition uses both and at least one in the same section (ie verify it always takes either entry or focus when it sees both)
  5. the composition has neither entry or focus (yes, this is invalid but we need to check it doesn't crash)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start!

@sharon2719 sharon2719 closed this Dec 16, 2024
@sharon2719
Copy link
Contributor Author

Closed this in favor of this ##3662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update OpenSRP to download resources referenced on the Composition.focus and Composition.entry attributes
2 participants