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

Refactor PersonAttributeType to use a "datatype" and "handler_config" instead of a "format"

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Could
    • Resolution: Won't Fix
    • None
    • None
    • None
    • Undetermined

    Description

      The way we've implemented PersonAttributeType.format is quite hacky. That property stores the fully-qualified name of the Java class that gets stored (in String form) in PersonAttribute.value. It's up to the class to convert itself to/from String by implementing Attributable.

      Instead we should implement the idea of AttributeHandler (discussed in TRUNK-2131), which should be a shared resource with VisitAttributeType and other AttributeTypes.

      Thus a PersonAttributeType would specify an "attribute datatype" and a "handler config", which together describe how to instantiate a handler. The handler would control how the PersonAttribute.value column is converted between a String and a java object.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                darius Darius Jazayeri
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: