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

    • Type: New Feature
    • Status: Ready for Work
    • Priority: Could
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              darius Darius Jazayeri [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: