Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patient Chart should update when creating clinical exam. #28

Open
1 task
jeremiahfallin opened this issue Oct 23, 2023 · 6 comments
Open
1 task

Patient Chart should update when creating clinical exam. #28

jeremiahfallin opened this issue Oct 23, 2023 · 6 comments

Comments

@jeremiahfallin
Copy link
Collaborator

Currently the patient dashboard needs to be refreshed after creating a clinical exam in order to see that clinical exam.

Acceptance Critera:

  • After creating a new clinical exam for a patient you will be able to navigate to it from that patient's page.
@jeremiahfallin
Copy link
Collaborator Author

This might actually be an issue with any interactions with the database. Working on the edit exam issue the new exam info isn't updating on the form even though it's there when I refresh.

@mentalcaries
Copy link
Contributor

This might actually be an issue with any interactions with the database. Working on the edit exam issue the new exam info isn't updating on the form even though it's there when I refresh.

Good catch. This was one I had some problems with. One idea I had was to implement it as a real time event

Maybe the implementation is not correct?

@jeremiahfallin
Copy link
Collaborator Author

I think there are 3 ways to handle it.

  1. Set up a subscription as you suggested.
  2. Set up polling. (Similar to a subscription but it's just calling the query every so often instead of there being a back and forth relationship between the db and the client)
  3. Refetch the query when appropriate (when the table that's related to the query is changed). I couldn't find anything in the supabase docs about this so we'd have to create the functionality ourselves.

@mentalcaries
Copy link
Contributor

@jeremiahfallin
There's some uncommented code in PatientClinicalExamCard.tsx on line 36 that's supposed to do this. It's possible that it was forgotten during testing.
I tried it on my current branch and it seems to solve the problem. Can you try it on yours when you get a chance and let me know

@jeremiahfallin
Copy link
Collaborator Author

@mentalcaries It fixes it on the modal but not on the edit page I'm using for my tissue.

@jeremiahfallin
Copy link
Collaborator Author

I believe PR #29 will close this as well with the subscription.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants