Update patient identifiers via webservices.rest api

We are looking for a way to edit extra identifiers of a patient via webservices.rest. When patient is configured to have extra identifiers( which might be optional) like Driving license, National ID, etc… currently Webservices rest forces to add the identifiers when the patient is getting created. We would need the ability to add or edit identifiers at a later point of time after a patient is created.

The code which forces to add identifiers:

Also we found that PatientService in openmrs core supports editing a patient identifier

Is there a reason for not supporting update of patient identifiers and adding patient identifiers while editing a patient?

Can you use the PatientIdentifierResource?

Docs here: https://psbrandt.io/openmrs-contrib-apidocs/#operation--patient--parent-uuid--identifier--uuid--post

Hi @preethi_s! As @pascal says, the intended behavior for these collection subresources is that you can create any number of them the first time you create the patient (or concept, or location, etc), but afterwards you need to interact with the subresource directly to add/edit/delete. Hopefully this addresses your issue.

FYI we recently ran into a scenario where this approach wasn’t good enough, because they needed to edit multiple concept names in a single transaction. If your scenario requires it, we’re open to you expanding the current implementation in the same way.

You can read about it in this thread: