cds-hooks / sandbox

CDS Hooks Sandbox
http://sandbox.cds-hooks.org
Apache License 2.0
34 stars 32 forks source link

Ability to switch user/practitioner and patient from the UI #57

Open faizalMo opened 6 years ago

faizalMo commented 6 years ago

Hi, we are using the CDS sandbox in a workflow which involves validation by switching between user/practitioner and patients. It will be quite handy to be able to do these switching from the UI itself. What I am thinking of is displaying a list of users somewhere in the main view(header?) fetched from /Practitioner endpoint and also be able to select a Patient from a list of available patients(/Patient endpoint) in the patient entry page. I am keen to know if there was any such enhancement request before or if someone is already working on it. Is this something you are keen to add to the sandbox if I raise a PR with the changes?

zplata commented 6 years ago

Hi @xMECian I think your request makes sense. The previous version of the Sandbox used to have a feature for a patient list on the "Change Patient" modal, but ran into an issue once where the hardcoded patient ID's in the list weren't able to be found on the FHIR server through the HSPC Sandbox (due to a short-term mismapping), so for now, it's just an input to change the patient to prevent confusion. Would be great to see a PR with these changes for both patient and user! I think it would make sense to have these patient lists on the "Change Patient" modal, and then add an option on the settings menu to "Change User" that has a similar workflow. Thoughts?

faizalMo commented 6 years ago

Adding a new "Change User" option under settings menu with a similar workflow as "Change Patient" sounds sensible. Let me see if I can put together a PR with these changes. Cheers.

faizalMo commented 6 years ago

I have raised a pull request for this issue - https://github.com/cds-hooks/sandbox/pull/58

barabo commented 4 years ago

Just wondering if this is still a wanted feature. I know I would like to have it working for a smart web messaging demo I'm putting together.

dennispatterson commented 4 years ago

@barabo When the sandbox is SMART-launched, the user would carry over. But for standalone launch, this makes sense.

The change patient functionality is built-in, but requires manually entering the id and no searching. The same could be done from a Practitioner perspective as a starter. We'd need to test that the sandbox handles when the FHIR server is changed and SMART apps can still be launched successfully. Beyond that, more advanced search functionality could be built-in.