Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #838 (reopened defect)

Opened 5 months ago

Last modified 2 weeks ago

Empty person attributes are created when adding a new person

Reported by: arbaughj Assigned to: somebody
Priority: minor Milestone: OpenMRS Someday
Component: OpenMRS Code Base Keywords: empty person attributes HISA2008
Cc: Introductory Ticket: 0

Description

When adding a new patient, empty records are created in the person_attribute table for fields that are left blank. It would save space and complexity in the database not to create these empty fields.

Attachments

database_person_attribute_table.jpg (46.8 kB) - added by arbaughj on 06/18/08 18:17:41.
View showing the empty records that are created. Notice, only one field, the email address was entered when creating this new patient.

Change History

06/18/08 18:17:41 changed by arbaughj

  • attachment database_person_attribute_table.jpg added.

View showing the empty records that are created. Notice, only one field, the email address was entered when creating this new patient.

06/18/08 18:21:15 changed by arbaughj

  • keywords changed from empty person attributes to empty person attributes HISA2008.
  • milestone set to OpenMRS 1.3.

06/19/08 16:34:34 changed by arbaughj

This error still occurs in OpenMRS Version: 1.3.0.11 RC2 Build 4648. Thanks to Martin for helping me run this test on his new install.

06/20/08 12:52:13 changed by bwolfe

Is it re-adding empty rows? Ideally it wouldn't void and then add the same value, but if someone fills out a form with empty textboxes openmrs won't know if the user emptied the box to essentially delete a past value.

06/20/08 13:34:09 changed by arbaughj

This occurs when adding a new patient, for any person attribute fields that are left blank. These fields (rows) have never existed before, so they need not be created and left empty. See the initial screen shot, taken right after adding a new patient, not editing an existing patient.

06/24/08 17:38:26 changed by bwolfe

  • status changed from new to closed.
  • resolution set to wontfix.

What if a blank value has a different meaning than a nonexistent value?

When editing a patient multiple times they are not getting multiple (duplicate) blank rows, so I'm going to close this.

06/25/08 02:46:04 changed by bmamlin

  • priority changed from major to trivial.
  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from OpenMRS 1.3 to OpenMRS Someday.

I'd agree with James on this one -- the UI should allow for person attributes to be removed (any existing value voided and not replaced) rather than storing empty strings for person attributes. Likewise, leaving person attributes blank should not create a bunch of empty string values in the database. If a blank value needs to be stored for some reason, then it should be the exception, not the default behavior (IMHO).

But this is low priority, since the system is not creating duplicate blank rows. Re-opening as a low priority ticket for the OpenMRS Someday milestone (i.e., just shy of wontfix).

10/14/08 14:18:27 changed by arbaughj

  • priority changed from trivial to major.
  • intro_ticket changed.

This defect has become a major priority with the usage of person attributes of date type. (org.openmrs.util.AttributableDate)

The empty strings of the date type case the list of patients not to display when searching for patients. The following error appears in the catalina.out log.

WARN - PersonAttribute.getHydratedObject(417) |2008-10-14 08:37:01,884| Unable to hydrate value: for type: 11InLocalityDate org.openmrs.api.APIException: Unable to parse the given string: as a date object

10/20/08 13:27:47 changed by bwolfe

This doesn't seem to be stopping any processing on my end for the main patient search. Does the patient list not show up for you? What page are you seeing this on ?

11/04/08 16:24:24 changed by arbaughj

  • priority changed from major to minor.

I was not able to search for patients on the main patient search page. The list of patients wasn't being displayed. Deleting the blank person_attribute's solved the problem. It's working OK with new person_attributes being added that are blank. I have reduced the priority to minor, and it will remain open since it is causing warnings in the log, and it shouldn't be the default behavior, per bmamlin, see above.