Failure to update 'preferred' field for a patient's address

Hi guys, we are working on the Obsadmin owa and one of the features is to enable updating of a patient’s address. We have realised that a POST request to the /person/{parent-uuid}/attribute/{uuid} endpoint manages to update all the other fields but fails to update the preferred field which indicates a patient’s preferred address.

Can anyone help us get around this? Thanks. -Jackson

The patient must have a preferred address, so just changing the preferred address to preferred=false shouldn’t really work.

Maybe the way to do this is to set some other address to preferred=true? (I don’t know if this will work either, give it a try.)

1 Like

Thanks @darius, I had previously tried that with three addresses, one of them being preferred, it still did not change to make another address preferred.

This may be a bug in the REST API then. Please create a ticket for this, describing the expected behavior and giving steps to reproduce on some public OpenMRS server.

-Darius (by phone)

I will do that. cc @dkayiwa

Ticket raised: @darius @dkayiwa