openEHR / archie

OpenEHR library implementing ADL 2, AOM 2, BMM, RM 1.0.4 and many tools
Apache License 2.0
53 stars 25 forks source link

Dependent rules with paths that must not exist may evaluate on outdated rmObject #602

Closed EBrader closed 5 months ago

EBrader commented 6 months ago

Create PathsThatMustNotExistFixer with similar purpose as for AssertionFixer that removes pathsThatMustNotExist from the root asserted during rule evaluation so that next evaluated rules take non-existence into account.

Fix applies only for paths that must not exist referring to object instance of Pathable with parent being any instance of ItemStructure, Cluster, Composition or Section. This limited set is the result of needing to know the actual type of the parent in order to call relevant methods to either delete the child from a list or set a value to null. If the desire is there to support all types, almost for all existing RMObject types, a check and cast would be needed.

To be able to import the objects from project openehr-rm, testImplementation needed to be changed to api in build.gradle of tools.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 10 lines in your changes missing coverage. Please review.

Project coverage is 71.80%. Comparing base (c065910) to head (711d751). Report is 1 commits behind head on master.

Files Patch % Lines
...nedap/archie/rules/evaluation/AssertionsFixer.java 82.45% 3 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #602 +/- ## ============================================ - Coverage 71.80% 71.80% -0.01% - Complexity 6956 6976 +20 ============================================ Files 663 663 Lines 22691 22757 +66 Branches 3676 3682 +6 ============================================ + Hits 16294 16341 +47 - Misses 4664 4686 +22 + Partials 1733 1730 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.