-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(medications): implement basic medication module #2249
feat(medications): implement basic medication module #2249
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/p76ezh33f |
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.
For now, I think we should remove all code related to completing a lab. We are still determining requirements for what this workflow may look like and what the proper domain language should be.
When the requirements are known, we can complete the functionality in a separate issue.
let history: any | ||
const mockPatient = { fullName: 'test' } | ||
const mockMedication = { | ||
id: '12456', | ||
status: 'draft', | ||
patient: '1234', | ||
medication: 'medication', | ||
intent: 'order', | ||
priority: 'routine', | ||
quantity: { value: 1, unit: 'unit' }, | ||
notes: 'medication notes', | ||
requestedOn: '2020-03-30T04:43:20.102Z', | ||
} as Medication | ||
|
||
let setButtonToolBarSpy: any | ||
let titleSpy: any | ||
let medicationRepositorySaveSpy: any | ||
const expectedDate = new Date() |
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 think we should move the spies and history into the setup function for initialization. if they are tested later, then we should return them from the setup function.
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.
Thanks @jackcmeyer i have refactored the duplicated code into a setup function where possible. May you take a look if it is now alright or if i may need to take another look. May you also take a look at how i am returning values from the setup function, not sure if my approach is alright, i needed a way that would allow me to 'ignore' some of the returned variables and an array seemed like would work best.
This pull request introduces 2 alerts when merging 5cf1307 into 7ca79bc - view on LGTM.com new alerts:
|
missing new line in sidebar test file
sidebar test
Co-authored-by: Matteo Vivona <matteo.vivona@me.com> Co-authored-by: Maksim Sinik <maksim@sinik.it> Co-authored-by: morrme <morrme@users.noreply.github.com>
Fixes #2229 .
Changes proposed in this pull request:
Newly added dependencies with Bundlephobia links:
None