msupply-foundation / mobile

Open source mobile app for medical inventory control
http://msupply.org.nz/mobile
Other
43 stars 27 forks source link

#5239 set some more mandatory fields #5266

Closed arjunSussol closed 1 year ago

arjunSussol commented 1 year ago

Set some more mandatory fields for patient and prescriber.

Fixes #5239

Change summary

Explain and justify your changes

Testing

Steps to reproduce or otherwise test the changes of this PR:

Related areas to think about

If there are any general areas of the codebase your changes might have side affects on, mention them here

arjunSussol commented 1 year ago

(4.1.4.b) Prevent user from omitting mandatory information

AnushaUp commented 1 year ago

Testing

Tested in v8.6.6-rc3 Test APK Steps to reproduce or otherwise test the changes of this PR:

AnushaUp commented 1 year ago
  • On mobile, you must give or select a valid value for above fields to create/update the patient/prescriber.

Its creating problems for dispensing vaccine for the patients from other store. It does not let you move forward if the mandatory fields are empty and can't let you input in the fields also.

sanjeevsussol commented 1 year ago

@anildahalsussol - can you do the review?

anildahalsussol commented 1 year ago
  • On mobile, you must give or select a valid value for above fields to create/update the patient/prescriber.

Its creating problems for dispensing vaccine for the patients from other store. It does not let you move forward if the mandatory fields are empty and can't let you input in the fields also.

@adamdewey @arjunSussol: Are we okay with this one?

adamdewey commented 1 year ago

@adamdewey @arjunSussol: Are we okay with this one?

No, we can't release like this unfortunately.

I was talking to @DhanyaHerath earlier - we were thinking that we could put these changes behind a global preference - so that only the K client could use them. Would that be an option?

arjunSussol commented 1 year ago

@adamdewey @arjunSussol: Are we okay with this one?

No, we can't release like this unfortunately.

I was talking to @DhanyaHerath earlier - we were thinking that we could put these changes behind a global preference - so that only the K client could use them. Would that be an option?

Hi @adamdewey even if we add the store preference as you mentioned then still the issue will be raised for the Kiribati sites. One can't dispense vaccine to patient of another store.

DhanyaHerath commented 1 year ago

@arjunSussol Oh, I see what you mean, though catch me up a little - does this get checked every time you dispense? Not when you are creating the patient itself?

arjunSussol commented 1 year ago

Hi @DhanyaHerath yes, it will be checked every time when dispensed to a patient from different store.

Also, validation works when creating new patient or prescriber.

arjunSussol commented 1 year ago

Tested with @AnushaUp : Apart from that, we got some flaw regarding json schema like Previous serious allergic reactions?: Not shown as required in the UI and also it has default value. Similarly for Previous adverse events following immunisation

@anildahalsussol @AnushaUp Have you updated the form_schema as described in the PR description?

AnushaUp commented 1 year ago

Tested with @AnushaUp : Apart from that, we got some flaw regarding json schema like Previous serious allergic reactions?: Not shown as required in the UI and also it has default value. Similarly for Previous adverse events following immunisation

@anildahalsussol @AnushaUp Have you updated the form_schema as described in the PR description?

@anildahalsussol @arjunSussol Yeah it was due to the json field not updated properly😅

AnushaUp commented 1 year ago

Moving this to done as per the discussion

arjunSussol commented 1 year ago

@adamdewey @arjunSussol: Are we okay with this one?

No, we can't release like this unfortunately.

I was talking to @DhanyaHerath earlier - we were thinking that we could put these changes behind a global preference - so that only the K client could use them. Would that be an option?

@adamdewey @DhanyaHerath I have set the preference in the mobile side, by default it will be False. We can create footrunner for Kiribati and set it to True, then validation will work accordingly. Fixed by https://github.com/openmsupply/mobile/pull/5266/commits/74eaa9f3053bb627a80f71cf42af7dd55597689f

@anildahalsussol @AnushaUp I will create a release version once approved this PR. Please, make sure that you have updated the form_schema before testing this. Also, we may need a foot-runner for Kiribati data.

JonnaQuismundo commented 1 year ago

Hi @anildahalsussol can you re-review? Thanks!