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

feat(lab): link visit to labs #2479

Merged
merged 3 commits into from
Dec 16, 2020

Conversation

DrewGregory
Copy link
Contributor

Add functionality to link visit to lab, and updated the schema to have a visitId in the Lab model.

fix #2184

Fixes #2184.

Changes proposed in this pull request:

  • Updated Lab db model to have an optional visitId
  • In the "New Lab Request" screen, added a required dropdown to associate the lab request with a visit id.

Add functionality to link visit to lab, and updated the schema to have a visitId in the Lab model.

fix HospitalRun#2184
@gitpod-io
Copy link

gitpod-io bot commented Nov 25, 2020

@vercel
Copy link

vercel bot commented Nov 25, 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/9yvjywvup
✅ Preview: https://hospitalrun-frontend-git-link-visit-lab.hospitalrun.vercel.app

@DrewGregory
Copy link
Contributor Author

In #2243, @jackcmeyer mentioned "updating the pouchdb schema" to describe the relationship between appointments and labs. We have since switched to associating visits with labs. Does updating the schema still apply here? I do not see any inclusion of "visits" in the schema already.

@matteovivona matteovivona added the in progress indicates that issue/pull request is currently being worked on label Nov 26, 2020
@matteovivona matteovivona requested review from fox1t and jackcmeyer and removed request for fox1t November 26, 2020 18:22
@matteovivona matteovivona added this to the v2.0 milestone Nov 26, 2020
@blestab blestab self-requested a review December 9, 2020 21:53
const onCancel = () => {
history.push('/labs')
}

const defaultSelectedVisitsOption = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a good idea to add a test for this functionality

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea. I added a test that chooses a patient in the Typeahead, makes sure the option isn't selected yet, and then tests selecting the option, which all leverages this defaultSelectedVisitsOption function.

Copy link
Contributor

@blestab blestab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matteovivona matteovivona merged commit 3b710ef into HospitalRun:master Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in progress indicates that issue/pull request is currently being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link visit to lab request
4 participants