Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add frontend validation for titrated dosage #7721

Closed
nihal467 opened this issue Apr 26, 2024 · 13 comments
Closed

Add frontend validation for titrated dosage #7721

nihal467 opened this issue Apr 26, 2024 · 13 comments
Labels
P1 breaking issue or vital feature

Comments

@nihal467
Copy link
Member

Describe the bug

Currently, if we enter start dosage higher than the target dosage, in the medicine titrated dosage, the system accept it.

To Reproduce
Steps to reproduce the behavior:

  1. Go consultation page, create a medicine with titarted dosage
  2. start dose is 15 and target dose is 10
  3. try to administor it
  4. See error

Expected behavior

there should be a frontend validation to ensure the target dosage is higher than the start dosage

Screenshots

image

@nihal467 nihal467 added the P1 breaking issue or vital feature label Apr 26, 2024
Copy link

⚠️ Refrain from assigning this issue to yourself if you have another P1 issue assigned that is not yet closed.

@hrit2773
Copy link
Contributor

@nihal467 this seems good... I will make the PR today itself for this issue its a small one can you assign me

@Sulochan-khadka
Copy link
Contributor

@nihal467 , there are some other issues as well. For example, one can change the units separately, which I think should not be permissible and many more of such vital errors. Therefore, should I include them as well in the PR, or just the start-target in this and file another PR to address them together?

@nihal467
Copy link
Member Author

@Sulochan-khadka the issue is assigned to @hrit2773 , feel free to open a new issue for the bug you found related to this module

@Sulochan-khadka
Copy link
Contributor

Sure @nihal467 . @hrit2773 , let me know if I can help you out to create PR as soon as possible. I think you will have to create and pass a function to DosageFormField so that a proper validation is added , so that it not only works when data is added from start to target but also checks if the start is changed again.

@hrit2773
Copy link
Contributor

@Sulochan-khadka can you take this up... actually I started working on another issue which is a big one so I'm into that flow. I think this is a high priority issue right @nihal467

@hrit2773 hrit2773 removed their assignment Apr 29, 2024
@Sulochan-khadka
Copy link
Contributor

Yeah sure... Will be creating a PR soon...

@soumya-maheshwari
Copy link
Contributor

hi @nihal467 i want to work on this issue
please assign me this.

@Sulochan-khadka
Copy link
Contributor

Hey @soumya-maheshwari actually I have progressed significantly... Therefore if you already have progressed further, let me know... Otherwise I will be raising a PR in 2-3 hours.

@soumya-maheshwari
Copy link
Contributor

Hey @Sulochan-khadka it's fine you can continue with the issue as i have not started working on it.

@Sulochan-khadka
Copy link
Contributor

Screenshot 2024-04-30 at 4 14 26 PM is the UI all OK ? @nihal467 ? Or should the message be displayed somewhere else? Currently it is checking for validation once the submit is clicked.

@nihal467
Copy link
Member Author

nihal467 commented Apr 30, 2024

it's an expected behavior, @Sulochan-khadka closing this issue, feel free to assign new issues

@Sulochan-khadka
Copy link
Contributor

@nihal467 is this solved? And I am unable to understand the meaning of expected behaviour in this reference? Does it mean that this was not even an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 breaking issue or vital feature
Projects
None yet
Development

No branches or pull requests

5 participants