Encounter.getConditions() being the only such "get all" getter should filter out voided conditions by default. A boolean parameter should be introduced on a new getter to allow including voided conditions if desired.
Encounter.removeCondition(Condition) should not remove the condition but instead leave it in and void it appropriately. Very much like things are done for the encounter's providers.
- See Encounter.getConditions()
- See Encounter.removeCondition(Condition)
- As an example, how providers are removed: https://github.com/openmrs/openmrs-core/blob/2f3e2928f84498c431a775a86930956a87a15377/api/src/main/java/org/openmrs/Encounter.java#L783-L793
We need to expand the test code base to properly reflect that those methods behave as expected.