Non-patient sequence generator

Hello! We are developing own business module for OpenMRS and we need to generate sequence for some entity (non Patient). Firstly we have looked at idgen functionality, but it seems designed for the Patient entity only. Please advise what other options we have to have a sequence generator in general.

Thanks

It’s a good point. I recently encountered the same when looking at options for generating a unique Queue Number for the Queue module, and we have related functionality that has been separately implemented in core to generate Order Numbers, which would likely benefit from the idgen-based approach.

The simplest thing might be just to make a change to the idgen module such that IdentifierSource.identifierType becomes optional rather than required. This can likely be done with minimal impact and effort.

@props - feel free to raise a ticket around this. @ibacher / @mogoodrich - any issues you can think of with this?

Nothing springs to mind, thanks @mseaton and @props !

No, that sounds like a great idea. We might need a new type of identifier generator to properly support the queue number thing (since an important aspect of ticket numbers like that is that they reset daily).