-
Notifications
You must be signed in to change notification settings - Fork 16
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
5648 prescriptions directions section #6362
base: develop
Are you sure you want to change the base?
5648 prescriptions directions section #6362
Conversation
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx
Outdated
Show resolved
Hide resolved
Bundle size differenceComparing this PR to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Requested a few little things, mostly want to ensure disabled when disabled, and fix the state error 🙏
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.test.ts
Outdated
Show resolved
Hide resolved
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx
Outdated
Show resolved
Hide resolved
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx
Outdated
Show resolved
Hide resolved
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx
Show resolved
Hide resolved
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx
Outdated
Show resolved
Hide resolved
client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx
Show resolved
Hide resolved
if (!abbreviation) return; | ||
3_5; | ||
const note = getPrescriptionDirections(abbreviation, options); | ||
updateNotes(note); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have set it so that when setting the abbreviation the default selection will clear and vice versa.. For the Directions, are there any pros or cons to the relevant abbreviation or default remaining? Particularly for the abbreviations, the user can go back and add more if they exit too early, if it clears they will need to start them again
…iptionLineEditForm.test.ts Co-authored-by: Laché Melvin <[email protected]>
…b.com/msupply-foundation/open-msupply into 5648-prescriptions-directions-section
Fixes #5648
👩🏻💻 What does this PR do?
Add inputs to Prescription Line Edit Form -> Description
This form now consists of:
Abbreviation Input
Default Input
Directions Input
A test file has also been created for the abbreviation handler
💌 Any notes for the reviewer?
Form alignment is slightly off and top row fields are smaller than design. Could do with another pass for styling improvements
🧪 Testing
Go to Prescriptions -> New Prescription -> Search for a Patient
Add Item -> Choose any item and quantity
In the abbreviations field, type in some abbreviations, and include other words as well. (see below for current mock data - not hooked up to database yet)
EG: TAKE One -> output is: TAKE 1 per day in the AM
Tab or click out of the field, see the abbreviation data remain and expanded directions appear in the directions field
Abbreviations are not case sensitive, and anything not recognised as an abbreviation will remain in the original case
Select a direction from the dropdown - see that this replaces everything in the directions
Edit the directions field directly
Go to another screen and navigate back to the same prescription - see that the direction is saved
-[ ] Automated tests will pass
Configured abbreviations:
Type: One -> Result: 1 per day in the AM
Type: Two -> Result: 2 per Day
Type: 3_5 -> Result: 3 1/2 per day
📃 Documentation
1.
2.