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

[Bug]: 403 errors in source sync #510

Open
dwradcliffe opened this issue Aug 28, 2024 · 5 comments
Open

[Bug]: 403 errors in source sync #510

dwradcliffe opened this issue Aug 28, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dwradcliffe
Copy link
Contributor

Contact Details

No response

What happened?

In my logs I'm seeing some failures while syncing with one of my (real) sources. I'm definitely able to get some data but it seems like a bunch is missing.

Flavor

Docker

Version

main#c5d7717

Relevant log output

skipping resource (ServiceRequest/xxxxxxxx), request failed: An error occurred during request https://sehproxy.stelizabeth.com/arr-fhir/HRH/api/FHIR/R4/ServiceRequest/xxxxxxxx - 403 - 403 Forbidden []
@dwradcliffe dwradcliffe added the bug Something isn't working label Aug 28, 2024
@AnalogJ
Copy link
Member

AnalogJ commented Aug 28, 2024

This is actually expected. Fasten will attempt to extract and request all FHIR Resources that are referenced in your record. However most EHRs will only provide the medical record data that is legally mandated - USCDI Core v3

So any FHIR resource types that are not mandated by USCDI Core v3 will result in 403s (or other error messages).
This isn't usually a problem, because USCDI Core includes all the "clinically" relevant medical records.

Having said that, because we're so permissive of errors (since we expect them), we may be inadvertently ignoring errors from FHIR record requests that should be retried -- I don't have a good solution here, open to ideas

@dwradcliffe
Copy link
Contributor Author

Ah interesting (and frustrating). Is there a full list of types that are required? We could check against the list when ignoring the errors.

@AnalogJ
Copy link
Member

AnalogJ commented Aug 28, 2024

Yes and no. The USCDI standard has a specified list of FHIR resources that we can check against, but EHRs & health systems can voluntarily support additional FHIR types -- they can choose to send back medical records data that they aren't mandated to share

@dwradcliffe
Copy link
Contributor Author

I guess since it will retry next sync this isn't a huge problem, but we might just never know something is missing.

I think I would still hardcode a list of the USCDI standard resources so that we at least report errors if any of them fail. Can you point me to that list?

@dwradcliffe dwradcliffe changed the title [Bug]: 403 errors in mychart source [Bug]: 403 errors in source sync Aug 28, 2024
@AnalogJ
Copy link
Member

AnalogJ commented Aug 28, 2024

Here's the list of FHIR resource types in USCDI core - http://hl7.org/fhir/us/core/2021Jan/profiles-and-extensions.html

Fasten-sources also has a list of Resource Types that we use for searching - https://github.com/fastenhealth/fasten-sources/blob/main/clients/internal/base/base_client.go#L71-L97

However, you'll notice that some are commented out, which is because this list is used for searching against the api, and some resource types like Location cannot be searched by Patient ID

There's alot of layers to this onion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants