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

Add Support for HTTP POST Requests in RequestMutation #78

Closed
3 tasks
lincmba opened this issue Aug 7, 2024 · 1 comment · Fixed by #79
Closed
3 tasks

Add Support for HTTP POST Requests in RequestMutation #78

lincmba opened this issue Aug 7, 2024 · 1 comment · Fixed by #79
Assignees

Comments

@lincmba
Copy link
Contributor

lincmba commented Aug 7, 2024

Description:

We have previously encountered 400 errors when sending search requests to the JPA Server through the gateway-extensions. This issue was caused by the request size being too large. We resolved this by switching from GET to POST requests, as detailed in this issue: Switch to HTTP POST for FHIR Search Requests #73. This change handled all search requests where we used the fhirclient.

However, there are sections that use RequestMutation provided by the fhir-gateway dependency used by the gateway-extension. These sections were not updated, resulting in the same 400 errors as reported in this Sentry issue: Sentry Issue #49827.

To resolve this issue, two tasks are required:

  1. Support for POST Requests in the fhir-gateway Repository:
    Currently, the fhir-gateway does not support mutating HTTP POST requests. An open issue exists for this: Request Mutation for POST Requests #143. This support needs to be implemented in the fhir-gateway before changes can be made in the gateway-extensions repository.

  2. Implement Support for POST Requests in the gateway-extensions Repository:
    Once the fhir-gateway supports mutating HTTP POST requests, we need to update the gateway-extensions to handle these requests correctly.

Acceptance Criteria:

  • fhir-gateway repository supports mutating HTTP POST requests.
  • gateway-extensions repository is updated to use POST requests in all sections that use RequestMutation.
  • No more 400 errors due to large request sizes in sections using RequestMutation.

References:

@lincmba lincmba self-assigned this Aug 7, 2024
@lincmba
Copy link
Contributor Author

lincmba commented Aug 9, 2024

In handling the issue in the gateway-extensions repo, I have attempted to modify the verbs from GET to POST at the following locations:

However, these changes did not resolve the issue. Upon further investigation, I noticed that the client is being initialized using the transaction server instead of the search server:

According to the HAPI FHIR documentation, the transaction server does not support the .usingStyle(SearchStyleEnum.POST) method, which is available when using the search server. This could offer more insights on the issue, and we may need to explore alternative approaches to handle this properly.

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