Multiple Person Attributes for Race

I’m working to implement a web form with OpenMRS 2.0 as the backend, and there is a requirement to allow multiple race selections as defined by the National Institute of Health (NIH). OpenMRS comes packaged with a Race person attribute type already defined. However, the addAttribute method in the Person object only allows one person attribute per attribute type. I don’t see any other option to add more than one person attribute per attribute type. It’s odd, as well, there’s an option to get a list of person attributes by attribute type when there isn’t a possibility to save more than one. Is there a way to add more than one person attribute per type I’m missing? Thanks!

I was able to extract the current Set of attributes from the Person object, perform the needed voids/adds, and then post it back to the Person. It seems to work as expected. Thanks!

1 Like

Thanks for sharing the solution to your problem. :slight_smile: