Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • Make the objects more DTO-like (less hibernate magic) - Ben Wolfe
  • Remove all calls to the database in pojos (no calls to Context) - Ben Wolfe
  • Remove ability to traverse entire graph (creator object attribute becomes creatorId integer attribute) - Ben Wolfe
  • Never use Sets as the Collection implementation as an attribute on an object (use List) - Ben Wolfe
  • Most properties (especially lists) immutable by default – ~bmamlin 
  • Avoid empty constructors & don't allow invalid objects to be created: if "stubs" needed, make them explicit (i.e., a separate object) – ~bmamlin 
  • Use uuids for .equals and .hashcode - Ben Wolfe (see
    serverOpenMRS JIRA
  • Move audit information out of Pojos – ~bmamlin
    • Change voided to be deleted
  • Change retired to be disabled (?  Not sure on the name of this one)
    • -1 from ~bmamlin, since "disabled" suggests a more temporary state than "retired" (enabling sounds good; unretiring sounds bad... which is what we want)
  • Inside every pojo, we need to have constants for the property of pojo. This way we can refer this property in the hibernate criteria using this constants instead of using String. – Nyoman Ribeka
    • example: PersonName will have public static final String GIVEN_NAME = "givenName", this way we can access them with PersonName.GIVEN_NAME in the hibernate criteria.
  • Pojos should reflect the real world instead of the data model – e.g., an Obs should be able to have multiple values or be a group of other Obs. -- ~bmamlin

Service Change Wishlist

Similar to the previous list, here is a list of things that people would like to change about our current services (PersonService, PatientService, etc)