-
Type:
Bug
-
Status: Closed
-
Priority:
Must
-
Resolution: Fixed
-
Affects Version/s: OpenMRS 1.9.1
-
Fix Version/s: Platform 1.11.0
-
Component/s: Data Model
-
Complexity:Low
Encounters have a patient property which is mapped to the patient_id column, but also a separate patientId property mapped to the same column. The patientId property doesn't get updated when patient is updated, which can lead to consistency problems, and breaks methods like EncounterService.getAllEncounters(Cohort)
The patientId field should be deprecated and eventually removed. Hibernate HQL queries which use this property can use patient.personId instead.
We could also as a temporary measure update patientId in setPatient to keep them more consistent.
TODOs:
- Deprecate the getters/setters for patientId and removed it from Encounters.hbm.xml
- is related to
-
REPORT-451 EncountersForPatientDataEvaluator shouldn't filter on patientId property as this can differ to patient.personId
-
- Ready for Work
-