You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, after we take the symptom survey, we just land back at the home dashboard. Instead, it would be nice to generate the health summary after the survey is done, since these are both related to upcoming Appointments. However, we encounter a race condition where the symptom survey triggers a cascade of functions to be called on the backend that compute the symptom scores, write the results to the patient's collection in Firestore, runs the medication recommendation algorithm, and potentially triggers a message. The health summary depends on the most recent symptom scores and medication recommendations, so we would have to figure out how to make sure these processes complete before we call the function that generates the health summary.
Solution
Modify the closure that is called when the user submits the symptom survey to navigate to the heart health viewer. Solve the race condition by waiting X amount of time before calling the generate health summary function, or identify a sign in the server that indicates the required processes are complete (e.g. when the new message is delivered to the client, or when a new symptom score is added to the VitalsManager).
Additional context
No response
Code of Conduct
I agree to follow this project's Code of Conduct and Contributing Guidelines
The text was updated successfully, but these errors were encountered:
Problem
At the moment, after we take the symptom survey, we just land back at the home dashboard. Instead, it would be nice to generate the health summary after the survey is done, since these are both related to upcoming Appointments. However, we encounter a race condition where the symptom survey triggers a cascade of functions to be called on the backend that compute the symptom scores, write the results to the patient's collection in Firestore, runs the medication recommendation algorithm, and potentially triggers a message. The health summary depends on the most recent symptom scores and medication recommendations, so we would have to figure out how to make sure these processes complete before we call the function that generates the health summary.
Solution
Modify the closure that is called when the user submits the symptom survey to navigate to the heart health viewer. Solve the race condition by waiting X amount of time before calling the generate health summary function, or identify a sign in the server that indicates the required processes are complete (e.g. when the new message is delivered to the client, or when a new symptom score is added to the VitalsManager).
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: