Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3769

Encounter.patientId should be deprecated as it leads to consistency problems

    Details

    • Complexity:
      Low

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Attachments-Category-Modification

                Activity

                  People

                  • Assignee:
                    surangak Suranga Kasthurirathne
                    Reporter:
                    rowanseymour Rowan Seymour
                    Watchers:
                    Christopher Hay, Daniel Kayiwa, Kaweesi Joseph, Mark Goodrich, Rowan Seymour, Suranga Kasthurirathne, Wyclif Luyima
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    7 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved:

                      Time Tracking

                      Estimated:
                      Original Estimate - 3 hours
                      3h
                      Remaining:
                      Time Spent - 1 hour Remaining Estimate - 2 hours
                      2h
                      Logged:
                      Time Spent - 1 hour Remaining Estimate - 2 hours
                      1h