IdGen: Why does IdentifierSource not extend BaseOpenmrsObject?

Hey @mogoodrich / @mseaton,

Pinging you because I “think” you may be the initial committers, why is it that IdentifierSource does not extend BaseOpenmrsObject (here)?

@mksd, this was because in the original implementation in 2009, one of the planned users (I believe ti was @akanter), had an implementation running on OpenMRS 1.4. BaseOpenmrsObject was something we added in 1.5 I believe. Refactoring the relevant classes to be based on OpenmrsMetadata would be a good thing to do now for sure. It was actually done in a “recent” pull request for adding restful web services, but that pull request needed more work and we never merged it. It would be useful to get this properly ticketed and worked on independently.

Mike

Thanks @mseaton for the input.

I bumped onto this issue because of our Initializer, it leverages a template pattern that associates a BaseOpenmrsObject with its OpenmrsService (here), hence my question.

I worked around this by wrapping the IdentifierSource instances into a class that extends BaseOpenmrsObject.