msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

Patient lookup not working with unique and required code field in patient creation form #5268

Open andreievg opened 1 month ago

andreievg commented 1 month ago

What went wrong? 😲

When patient creation form is configured with JSON forms to have unique and required patient code there is not way to lookup a patient through mSupply central, and local search doesn't work during patient creation phase

Expected behaviour 🤔

Able to lookup and search patient in configured JSON forms

How to Reproduce 🔨

You can use data file below or configure json schema this way: Simple patient schema.zip

patient creation schema.json.zip

Try to create patient and then create another patient in effort to search for it, since code is required and is unique in the first form, there is no way to search for that patient (as code won't match), looks like partial code doesn't work.

On another site you can actually search for this patient but only if you know the patient code exactly

Your environment 🌱

andreievg commented 1 month ago

Me and @roxy-dao tried another config (basically removing both codes from initial patient creation form), and it works, here is the new json (see difference in the form_schema of the first row)

patient creation schema.json.zip

andreievg commented 1 month ago

Needs to be on the server for that Client, just pending confirmation