Tribe Module Project

This project is complete and was integrated into the OpenMRS 1.5.0 release.

Move Tribe to a Person Attribute Type

Mentor(s): ?Ben Wolfe, ?Mike Seaton

Assigned to: ?Upul Godage

Abstract: The Patient object currently has a Tribe on it pointing at the Tribe object. This tribe attribute really should be a PersonAttribute. The work would involve writing some sql to convert everyone's database that is using it to the new setup. It would also entail going through the API and finding everywhere that tribe is referenced and removing it. (PersonAttributes are already able to be viewed/edited through the interface). A module would then need to be created to facilitate editing of the possible tribes in the system. Read more on TRAC-652@ticket (Bonus points for finishing TRAC-624@ticket as well.)

Target: Successful completion of this project would provide an update for existing implementations that would remove patient.tribe from their database, moving values to the person_attribute table and creation of a module that would allow implementations that want to use tribe, create a person attribute for tribe and manage available list of tribes.


  • Create a new module for Tribe.
  • Tribe is similar to the Location used as a PersonAttribute in OpenMRS.
  • Implement Attributable methods.
  • Tribe person attribute will save the Tribe ID as the serialized person attribute pointing to the Tribe object.
  • Create TribeService, TribeServiceImpl for maintaining Tribes.
  • Create TribeDAO implement HibernateTribeDAO to maintain tribe table.
  • Module will take care of creation, maintenance of tribe table.
  • Write new or move existing Tribe save, load methods from PatientDAO, AdministrationDAO and Hibernate implementations.
  • Add menu item in Administration page for Tribe administration through the module.
  • Move TribeListController, TribeFormController to module accessed from menu extension.
  • editPersonInfo.jsp takes care of showing person attribute types.
  • Write script to read current tribe foreign key in the patient table and create a person attribute for specific patient.
  • Delete the tribe column in patient.