care_fe
care_fe copied to clipboard
Add frontend validation for titrated dosage
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:
- Go consultation page, create a medicine with titarted dosage
- start dose is 15 and target dose is 10
- try to administor it
- See error
Expected behavior
there should be a frontend validation to ensure the target dosage is higher than the start dosage
Screenshots
:warning: Refrain from assigning this issue to yourself if you have another P1
issue assigned that is not yet closed.
@nihal467 this seems good... I will make the PR today itself for this issue its a small one can you assign me
@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?
@Sulochan-khadka the issue is assigned to @hrit2773 , feel free to open a new issue for the bug you found related to this module
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.
@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
Yeah sure... Will be creating a PR soon...
hi @nihal467 i want to work on this issue please assign me this.
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.
Hey @Sulochan-khadka it's fine you can continue with the issue as i have not started working on it.
it's an expected behavior, @Sulochan-khadka closing this issue, feel free to assign new issues
@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?