-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add titrated prescription dosage type (#6565)
* feat: option to add titrated drug dose in prescription * Update prescription model and form to use dosage_type and base_dosage instead of is_prn and dosage * Update edit prescription form and fix dosage validation * Refactor administration dosage validation * Fix unit validation in PrescriptionFormValidator * Add dosage information to TimelineNode * Remove dosage from TimelineNode component * fix: renamed cypress dosage field selector to base_dosage * Merge branch 'develop' into fix-issue-6432 * update cypress to match new dosage field's id * fixed linting issue --------- Co-authored-by: Rithvik Nishad <mail@rithviknishad.dev> Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Co-authored-by: khavinshankar <khavinshankar@gmail.com>
- Loading branch information
1 parent
921fb4c
commit df8c57b
Showing
17 changed files
with
409 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { DOSAGE_UNITS } from "../../Medicine/models"; | ||
import NumericWithUnitsFormField from "./NumericWithUnitsFormField"; | ||
import { FormFieldBaseProps } from "./Utils"; | ||
|
||
type Props = FormFieldBaseProps<string> & { | ||
placeholder?: string; | ||
autoComplete?: string; | ||
min?: string | number; | ||
max?: string | number; | ||
}; | ||
|
||
export default function DosageFormField(props: Props) { | ||
return <NumericWithUnitsFormField {...props} units={DOSAGE_UNITS} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.