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
20 stars 12 forks source link

Can create patient without first & last name in patient-program setup #4334

Closed nishaDangol-Sussol closed 3 weeks ago

nishaDangol-Sussol commented 2 months ago

What went wrong? 😲

Can create patient without first & last name in patient-program setup Note: For normal dispensary (without patient-program setup), there is no problem; without mandatory fields, it doesn't allow for name creation further, which is correct

Tag severity level depending on programs-feature usage

Expected behaviour 🤔

shouldn't allow to proceed with patient creation without mandatory fields: first name & last name

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Do the minimum to setup patient-programs in your store
  2. Create new patient
  3. Enter nothing and proceed
  4. See error: it lets you proceed without mandatory fields: first name & last name
  5. Enter nothing and save
  6. See error: nameless patient without any NID nor NUIC is generated

Your environment 🌱

andreievg commented 2 months ago

Triage, must have because it would be one of the first things to look at fixing when we have future programs budget

CarlosNZ commented 1 month ago

This is just a JSON Forms config. I've updated the Patient type in the ProgramSchemas repo to make firstName and lastName required.

Don't think there's anything else to do in the actual codebase is there?

roxy-dao commented 3 weeks ago

I think patient programs first name and last name wasn't made mandatory cause they can have anon... but I guess they can just put anon 🤷🏻 closing issue since fix in programschema repo.. can reopen if requested.