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

Create base Openmrs interfaces and base objects

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      A number of discussions seem to have concluded that it would be a nice feature to refactor some base interfaces and objects out of our core API. This would allow us to act consistently across our object model, and create some useful services that can be re-usable across objects.

      As a starting point, I am proposing the following changes, which can be viewed in the attached patch. Once we come to a consensus on this, we can implement it (or whatever we decide upon) across our model objects.

      4 core interfaces:

      • OpenmrsObject - get/set id
      • Voidable - get/set voided, voidedBy, dateVoided, voidReason
      • Retireable - get/set retired, retiredBy, dateRetired, retireReason
      • Auditable - get/set creator, dateCreated, changedBy, dateChanged

      2 abstract implementations (with property getters and setters implemented):

      • OpenmrsData
      • implements OpenmrsObject, Auditable, Voidable
      • Patient, Obs, Encounter, etc would inherit from this
      • OpenmrsMetadata (abstract)
      • implements OpenmrsObject, Auditable, Retireable
      • get/set name, description (localize these later?)
      • EncounterType, OrderType, etc would inherit from this.

      Useful utilities could later be discussed for generally setting the relevent properties on a Retireable, Auditable, Voidable, etc., rather than having every service handle this same code repeatedly...

      Feedback / thoughts / discussion?

        Attachments

          Activity

            People

            Assignee:
            mseaton Mike Seaton
            Reporter:
            mseaton Mike Seaton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: