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

Adding category SearchParameter breaks similar SearchParameters until restart #3487

Open
nielsrustenburg opened this issue Aug 18, 2023 · 2 comments
Labels
Bug Bug bug bug. VSTS-Backlog On VSTS Backlog

Comments

@nielsrustenburg
Copy link

nielsrustenburg commented Aug 18, 2023

Describe the bug
Adding a SearchParameter for the 'category' on a resource type for which this is not supported by default breaks support of the 'category' SearchParameter for other resource types.

We are adding a SearchParameter for MedicationDispense & MedicationAdministration, which works fine, but after doing so, the SearchParameter of 'category' no longer works for Observation, Consent, Procedure, MedicationRequest, MedicationStatement, and likely others.

After many successful(ly failing) reproductions on my local machine the problem was gone after I restarted my laptop, it appears that restarting the fhir-server also fixes the problem.

FHIR Version?
Stu3

Data provider?
SQL Server

To Reproduce

  1. Start fresh fhir-server connected to an empty database
  2. Add 2 Observations and 2 MedicationDispenses, all with different categories example-resources-sparam-category-bug.txt
  3. Make following GET Request to prove Observation category SearchParameter is initially working, you should get 1 resource back
    {{fhirServerUrl}}/Patient/example/Observation?code=http%3A%2F%2Fsnomed.info%2Fsct%7C49581000146104
  4. Make following GET Request to prove MedicationDispense category SearchParameter is not supported, you should get 2 resources and an operationoutcome indicating the SearchParameter is not supported.
    {{fhirServerUrl}}/Patient/example/MedicationDispense?category=http%3A%2F%2Fsnomed.info%2Fsct%7C373784005
  5. Add new SearchParameter for MedicationDispense-category SearchParameter-Medications-category.txt
  6. Reindex & wait for reindexing to be done
  7. Repeat the request from step 4 to prove the MedicationDispense category SearchParameter is now supported, you should get 1 resource back
  8. Repeat the request from step 3, an OperationOutcome will be returned indicating "The search parameter 'category' is not supported for resource type 'Observation'."

Extra step: Restarting the fhir-server and repeat the requests, now both search parameters are supported

Expected behavior
Adding a category SearchParameter to one ResourceType does not affect existing/default SearchParameters for other ResourceTypes

Actual behavior
After adding a category SearchParameter for MedicationDispense, the default category SearchParameters for other ResourceTypes like Observation/Consent etc. are no longer supported until fhir-server is restarted.

@nielsrustenburg nielsrustenburg added the Bug Bug bug bug. label Aug 18, 2023
@feordin
Copy link
Contributor

feordin commented Aug 21, 2023

Thank you for the bug report! I have repro'd the issue, and we are working on a fix.

@EXPEkesheth EXPEkesheth added the VSTS-Current We are working on this item in the current sprint label Aug 28, 2023
@EXPEkesheth
Copy link
Contributor

#110271

@EXPEkesheth EXPEkesheth added VSTS-Backlog On VSTS Backlog and removed VSTS-Current We are working on this item in the current sprint labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug bug bug. VSTS-Backlog On VSTS Backlog
Projects
None yet
Development

No branches or pull requests

3 participants