hospitalrun-frontend icon indicating copy to clipboard operation
hospitalrun-frontend copied to clipboard

Add `New Imaging Request` button on visits page

Open jackcmeyer opened this issue 4 years ago • 19 comments

🚀 Feature Proposal

There should be a new button added to the patient visits page which allows a user to make a new imaging request quickly.

This button should navigate the user to the Imaging Request page when clicked and auto-populate the patient and visit information.

jackcmeyer avatar Aug 27 '20 03:08 jackcmeyer

Can i be assigned for this ?

Fibii avatar Aug 29 '20 13:08 Fibii

Yes, @Fibii! I've assigned this to you!

jackcmeyer avatar Aug 29 '20 15:08 jackcmeyer

There are two ways to do this, since when we view a patient, the patient state will store that patient, we can just use that state to populate the info for the imaging request

in NewImagingRequest

const { patient } = useSelector((state: RootState) => state.patient)

will get us the last patient that we we viewed, which is the patient we wanted to add an imaging for

The other way would be passing the patient as props to NewImagingRequest and populate the fields with the passed props

which way should it be @jackcmeyer, i'm also interested in new ideas.

Fibii avatar Sep 09 '20 16:09 Fibii

I think the best way is to pass the current patient id using react-router.

When doing history.push you can pass state with the second param.

history.push('/imagings/new', { patientId: currentPatientId })

Then on the new imaging request we can read it like:

const location = useLocation()
const { patientId } = location.state

jackcmeyer avatar Sep 10 '20 04:09 jackcmeyer

Hi @jackcmeyer , If no one is working currently, I would like to work on this.

dev-script avatar Oct 29 '20 04:10 dev-script

Hi @Fibii , compliments of the season and best wishes for 2021! Just checking how this work is going.

blestab avatar Jan 05 '21 11:01 blestab

Hi @blestab, i added a PR #2550 (tests are not implemented yet), i want a review on the changes before implementing the tests since the proposal didn't include any details

If everything's fine, maybe @dev-script can implement the tests if they want to?

have a nice day y'all and sorry for the late PR :)

Fibii avatar Jan 18 '21 23:01 Fibii

Thank you @Fibii I have some feedback for the PR, do you want to tackle it or should i ask if @dev-script can take it over

blestab avatar Jan 20 '21 11:01 blestab

@blestab @dev-script can take over if they want to

Fibii avatar Jan 21 '21 14:01 Fibii

@blestab can you please assign me

dev-script avatar Feb 03 '21 06:02 dev-script

@dev-script sure

matteovivona avatar Feb 05 '21 10:02 matteovivona

@tehKapa can you please confirm once where to place the Imaging Request button exactly.

dev-script avatar Feb 07 '21 05:02 dev-script

I would put it instead of "Add visits" button (that is redundant) when I open the detail of the visit

Screenshot 2021-02-09 at 12 31 58

matteovivona avatar Feb 09 '21 11:02 matteovivona

@dev-script Hello. Are you still working on this issue?

baoqchau avatar Jun 13 '21 02:06 baoqchau

@baoqchau you can take over

dev-script avatar Jun 13 '21 05:06 dev-script

I have a lot of work recently so I can no longer work on this issue. Anyone else feel free to take it

baoqchau avatar Sep 06 '21 17:09 baoqchau

@tehKapa @blestab @jackcmeyer Hello, could I be assigned this?

gcrt0701 avatar Jan 29 '22 05:01 gcrt0701

@gcrt0701 yes :)

matteovivona avatar Jan 29 '22 10:01 matteovivona

Which fields should be auto-populated in the New Imaging Request form? The patient name seems obvious but I don't understand how the Visits field should be filled in.

gcrt0701 avatar Apr 13 '22 03:04 gcrt0701