Affects Version/s: None
Fix Version/s: 1.1
Enhance ConditionService.saveCondition to end an existing condition. Add Condition.endCondition(Concept reason) and Condition.endCondition(Date endDate, Concept reason) methods.
Introduce a way to limit the possible end reasons.
1. Ensure "Edit Conditions" privilege for ending an existing condition.
2. endDate should be set as now if not supplied.
3. endReason should be mandatory and can point to any concept (e.g., will point to concepts like 'Cured' or 'Ruled Out' in Bahmni).
3. Enhance ConditionDAO.saveCondition to allow ending condition.
4. Introduce a global property that points to a concept set whose members are the allowed end reasons. (See org.openmrs.api.impl.OrderServiceImpl#getDrugDosingUnits for an example of this.) Introduce a method in ConditionService to get this list.