Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

feat(medications): implement basic medication module #2249

Merged
merged 43 commits into from Aug 14, 2020
Merged

feat(medications): implement basic medication module #2249

merged 43 commits into from Aug 14, 2020

Conversation

blestab
Copy link
Contributor

@blestab blestab commented Jul 23, 2020

Fixes #2229 .

Changes proposed in this pull request:

  • Add New Medication request
  • View/Update Medication request details
  • Complete Medication request
  • Cancel Medication request
  • List Medication requests
  • Medications Unit Tests

Newly added dependencies with Bundlephobia links:

None

@gitpod-io
Copy link

gitpod-io bot commented Jul 23, 2020

@matteovivona matteovivona added this to In progress in Version 2.0 via automation Jul 24, 2020
@matteovivona matteovivona added this to the v2.0 milestone Jul 24, 2020
@matteovivona matteovivona added the in progress indicates that issue/pull request is currently being worked on label Jul 24, 2020
@vercel
Copy link

vercel bot commented Jul 24, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/p76ezh33f
✅ Preview: https://hospitalrun-frontend-git-fork-blestab-master.hospitalrun.vercel.app

@matteovivona matteovivona self-requested a review July 30, 2020 13:15
@matteovivona matteovivona added the 🚀enhancement an issue/pull request that adds a feature to the application label Jul 30, 2020
Copy link
Member

@jackcmeyer jackcmeyer left a 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.

src/__tests__/medications/Medications.test.tsx Outdated Show resolved Hide resolved
Comment on lines 26 to 43
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()
Copy link
Member

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.

Copy link
Contributor Author

@blestab blestab Aug 3, 2020

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.

@lgtm-com
Copy link

lgtm-com bot commented Aug 13, 2020

This pull request introduces 2 alerts when merging 5cf1307 into 7ca79bc - view on LGTM.com

new alerts:

  • 2 for Overwritten property

@jackcmeyer jackcmeyer merged commit ab1bd5c into HospitalRun:master Aug 14, 2020
Version 2.0 automation moved this from In progress to Done Aug 14, 2020
jackcmeyer pushed a commit that referenced this pull request Aug 14, 2020
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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚀enhancement an issue/pull request that adds a feature to the application in progress indicates that issue/pull request is currently being worked on
Projects
Version 2.0
  
Done
Development

Successfully merging this pull request may close these issues.

implement basic medication module
5 participants