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

Search Result (_sort) - Ability to Search by additional clinical date columns (MedicationRequest.authoredon, MedicationDispense.whenprepared) #4035

Closed
LKShankarKarthik opened this issue Aug 16, 2024 · 4 comments
Labels
Bug Bug bug bug.

Comments

@LKShankarKarthik
Copy link

LKShankarKarthik commented Aug 16, 2024

Describe the bug
We have hosted this OSS in Azure App Service with appropriate configuration change to support _sort on below resources (clinical date columns). But its not behaving as expected (seems to work intermittently)

image

FHIR Version
R4

Data provider
CosmosDB

To Reproduce
Steps to reproduce the behavior:

  1. Run the below Query
    MedicationDispense?patient=XXXXXX&whenprepared=ge2023-08-17T12%3A00&whenprepared=le2024-07-17T23%3A59&_count=100**&_sort=-whenprepared**
  2. Above request returns bundle with HTTP 200 but with below warning (which is not expected).

image

Expected behavior
FHIR Response shouldnt have the above warning and it should return results.

Actual behavior
Returns HTTP 200 Bundle Response, but with OperationOutcome (Warning)

@LKShankarKarthik LKShankarKarthik added the Bug Bug bug bug. label Aug 16, 2024
@LKShankarKarthik LKShankarKarthik changed the title Serach Result (_sort) - Ability to Serach by additional clinical date columns (MedicationRequest.authoredon, MedicationDispense.whenprepared) Search Result (_sort) - Ability to Search by additional clinical date columns (MedicationRequest.authoredon, MedicationDispense.whenprepared) Aug 16, 2024
@EXPEkesheth
Copy link
Collaborator

@LKShankarKarthik - The sort capability with Cosmos DB is supported on when the above config is updated prior to creating he database. After the data base is created, updating the config would not enable the sort capability on search parameters added.

@LKShankarKarthik
Copy link
Author

@EXPEkesheth - Thanks for the update. Is there a way to check when it was added? As I remember, we updated the config before we loaded the data (or as part of initial deployment).

@brendankowitz
Copy link
Member

Hi @LKShankarKarthik, yes, this config only applies when it initializes the collection. We only invested minimally in sort support for Cosmos since we had much richer support for free in SQL.

As such, there isn't a UI or API for this, I'd advise its not something we're looking to expand or support beyond what's currently there.
Internally, you can update the status in the DB to "Supported", restart the service, then follow the $reindex guidance which should populate the sortable index and enable it. This only works on strings and dates.

image

@EXPEkesheth
Copy link
Collaborator

Closing with no response and question is answered

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

No branches or pull requests

3 participants