ejp-rd-vp / vp-portal-issues

0 stars 0 forks source link

Incorrect filtering using CDE Term "NCIT_C2991" for orphaCodes #45

Closed ammarbarakat closed 1 year ago

ammarbarakat commented 1 year ago

Describe your problem.

According to the documentation, the CDE Term "NCIT_C2991" should be used to filter using orphaCodes in the following format:

{
    "id": "NCIT_C2991",
    "operator": "=",
    "value": [ "Orphanet_730" ]
}

However, the current approach is not working as expected. Instead, we have to send the orphaCodes in a different format:

{
    "id": [ "Orphanet_730" ]
}

Describe the solution you'd like

We would like to know if it's possible to make the filtering work as per the documentation, using the CDE Term "NCIT_C2991" in the specified format. This would enable us to maintain consistency and to keep all sent filters in the same format.

Additional context

@rini21 Could you please help us with solving this issue?

rini21 commented 1 year ago

Hi @ammarbarakat, thanks for reaching out.

To clarify the filtering approach, the current specification includes three types of filters as described in the documentation:

  1. Alphanumerical Query Filters (only '=' operator, associated permitted values)
  2. Numerical Query Filters (comparison operators, associated values)
  3. Ontological Query Filters (no operator & value)

These filter types are based on the various types of filters in the original Beacon v2 standard.


Regarding the specific issue you mentioned, we chose to use the format with only the 'id' attribute, like this for Ontology filters: {"id": ["Orphanet_730"]}, instead of including 'operator' and 'value' attributes like this: {"id": "NCIT_C2991", "operator": "=", "value": ["Orphanet_730"]} to maintain consistency with the Beacon v2 standard.

As agreed upon, Disease and Phenotype filters fall under Ontological Filters. Hence, they only require the 'id' attribute, as we currently do not have additional attributes and features such as semantic similarity searching and hierarchical ontology querying. For more information, you can refer to this link. Perhaps these features could be added to future roadmap of VP Portal?

To further clarify your concern regarding

According to the documentation, the CDE Term "NCIT_C2991" should be used to filter using orphaCodes in the following format: {"id": "NCIT_C2991","operator": "=","value": [ "Orphanet_730" ]}

The documentation for both the list of filters for the /individuals endpoint and the /catalogs endpoint specify that the CDE term for Disease or Disorder is indeed NCIT_C2991. However, the main attribute(s) we use in the POST request query JSON body are 'id', 'operator', and 'value', not the CDE terms.

Hope this explanation helps clarify the usage. If you have any more questions or need further assistance, feel free to ask.

Thanks, Rini

rini21 commented 1 year ago

I hope my response explanation addresses your concern. Otherwise, feel free to reopen this issue and we can discuss it at length.