personalcancertoolkit / openmrs-module-patientportaltoolkit

Other
7 stars 9 forks source link

Zip code shows as empty in user profile #532

Closed bmamlin closed 3 weeks ago

bmamlin commented 2 months ago

During testing on 4/15/24, @PhilipAdeoye was adding a zip code to his profile and saving, but, when returning to the user profile, the zip code was blank again.

Looking at other users (e.g., TestPatient David), the zip code shows in the profile as expected.

The problem appears to be the lack of an address properly saving for @PhilipAdeoye's test patient account. It might be related to a person's address requiring more than a zip code to be created?

PhilipAdeoye commented 2 months ago

A patient's zipcode is pulled from their address. If the patient does not have an address, when their profile is viewed, no zipcode is shown. Using the OpenMRS admin tools to add an address to the patient's record successfully fixes this issue

bmamlin commented 2 months ago

@PhilipAdeoye, if someone has a valid address and uses the user profile form to change their zipcode, is the zipcode of their address updated? If so, then maybe we should make the zipcode non-editable in the profile form when the user doesn't have an address on file. If updating the zipcode doesn't update their address, then perhaps the zipcode shouldn't editable in the user profile form under any circumstance.

PhilipAdeoye commented 2 months ago

@bmamlin

Q1 answer: Yes.

We should probably remove the zipcode from the form. I can't really tell what purpose it serves on there at all. What do you think?

bmamlin commented 2 months ago

The only reason I can think of is that it would allow the user to control a default zip code used for showing community services. But that page has been updated to use browser-base-location or a user-entered zip code... so, I too don't see a reason to make it user-editable in the profile. I'll check with David via email.

bmamlin commented 2 months ago

Confirmed with David:

I agree with your solution – the only reason I can think of, also, is to drive the community resources map.

So, we can remove zip code from the patient's profile (i.e., profile display and form).