Autogenerated Identifiers

Hi again, I want to set autogenerated patient identifiers based on the name and the birth date of the patient. For example, for a patient named John Smith whose birth is 30/10/1995 I want an autogenerated identifier such as JOSM-30101995-plus some other number in order not to be repeated. Is there any way to do that? Thanks.

Hi @woldia

Apology in the delay in response. The Wiki links for ID Generation and usage are as below.

As per your requirement, we may not be able to include the birth date and the first name in the formation of Patient Identifier. The system does not provide that level of flexibility in setting a prefix based on a value entered on the registration form. The prefix and suffix on a patient Identifier are hardcoded values as per the OpenMRS config settings.

Can @woldia not plugin a custom identifier generator which uses its own custom logic?

/cc @darius: Any thoughts?

@gsluthra With the current configuration setting, we do not have a logic to compute an identifier based on values entered on Registration form. But based on the link you have provided, it appears like we have a provision to extend the IDgen module functionality to some extent. Will have to wait for @darius to confirm. Thanks for sharing the link.

At present the underlying idgen OpenMRS module that we use does not allow incorporating patient details into the identifier. (It’s built around generating batches of identifiers, as is implied by this Java interface.)

So, this would require some refactoring to the idgen module, to add this as a (substantial) new feature, and then presumably some smaller changes to Bahmni.

(So, this is theoretically doable, but it would require someone to put in resources to write some nontrivial code.)