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

Rename allergy.comment to allergy.comments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Could
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.3.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      Background

      The convention in the OpenMRS data model is to avoid using SQL reserved words in table or column names. See https://wiki.openmrs.org/x/MA8z

      Unfortunately the allergy.comment column (introduced to openmrs-core from the allergy-api module) incorrectly has a column called "comment".

      We should change this column name to "comments"

      Acceptance Criteria

      1. The "allergy.comment" column is renamed to "allergy.comments"
      2. Any existing data should be upgraded, invisibly to the end user
      3. The Allergy UI module should continue to work both before and after this change. (If this breaks, then create a separate ticket for any required changes.)
      4. The REST resource for allergies should continue to work both before and after this change, and the REST representation of allergy should remain unchanged. (If this breaks, then create a separate ticket for any required changes.)

      Nice to have:

      1. There is a unit test that runs when openmrs-core is built which verifies that all database tables and column names follow our conventions 

      Dev Notes

      The Allergy UI module's code is at https://github.com/openmrs/openmrs-module-allergyui

      The REST resource is https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-2.0/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_0/PatientAllergyResource2_0.java.

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Attachments-Category-Modification

                Activity

                  People

                  • Assignee:
                    MadhavKauntia Madhav Kauntia
                    Reporter:
                    petermo peter peter
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    5 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved:

                      Time Tracking

                      Estimated:
                      Original Estimate - 1 week Original Estimate - 1 week
                      1w
                      Remaining:
                      Remaining Estimate - 0 minutes
                      0m
                      Logged:
                      Time Spent - 1 week, 3 days
                      1w 3d