OHDSI / OHDSI/WebAPI

Enhancement: Filter WebAPI results based upon created or modified date

Open
#2,293 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
151
Forks
183
Avg merge
14m
Merged PRs (30d)
2

Description

Desired behavior

API calls that return large JSON objects can be filtered to just retrieve values since a specific date.
For example:

  1. cohortdefinition - where coalesce(modifiedDate,createdDate) > 'YYYY-MM-DD'
  2. cohortdefinition/{id}/info - where startTime > 'YYYY-MM-DD'
  3. conceptset - where coalesce(modifiedDate,createdDate) > 'YYYY-MM-DD'
  4. estimation - where coalesce(modifiedDate,createdDate) > 'YYYY-MM-DD'
  5. ir - where coalesce(modifiedDate,createdDate) > 'YYYY-MM-DD'
Actual behavior

Although the APIs work OK as-is, they do not lend themselves to incremental loads. As the data volume grows, this becomes increasingly burdensome.

Enhancement Request

Add afterdate option to relevant GET requests to return just the subset of the results where the start/modified/created dates are after the specified date.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the GET handlers for the cohortdefinition, conceptset, estimation, and ir endpoints, including the cohortdefinition/{id}/info endpoint. Determine how each endpoint currently selects its date field, then define the afterdate request behavior and verify that filtered results contain only records after the supplied date.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.