Closed aeyates closed 9 months ago
After tracing through a specific use case, I understand the problem. This is only manifesting when a provider logs in and tries to access a patient that has not been initiated into REDCap. In this case, COACH does the following:
Code will be modified to only show the AE text if REDCap is enabled AND the audience is a Patient as opposed to the Care Team.
After reviewing the most recent logs with additional information, I can see the error we are getting back from REDCap when trying to the the AE Survey link:
<error>The record 'null' does not exist</error>
Through some experimentation, it seems like this can happen if we ask for the record Id corresponding to the COACH Id and the record can't be found. This shouldn't be happening, but I can see that in some cases, no record in REDCap is being created for the corresponding record in COACH. A recent example is uuid 060d2c15-2d93-4f4c-9473-97550f262d43. It should have been created sometime between the creation of record 8 at 01/23/2024 3:24pm and record 9 at 01/24/2024 10:35am. Weirdly, I don't see matching activity in the COACH logs at 3:24 pm. I do see some logs an hour later.