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

$cascade operation round 2, incl. recursion #1122

Closed
paynejd opened this issue Nov 19, 2021 · 3 comments
Closed

$cascade operation round 2, incl. recursion #1122

paynejd opened this issue Nov 19, 2021 · 3 comments
Assignees

Comments

@paynejd
Copy link
Member

paynejd commented Nov 19, 2021

Following up on #1088, the next round of work on the $cascade operator will support recursion and hierarchy, and will improve alignment with FHIR.

  • Add ability to cascade a concept's hierarchy in addition to mappings -- this will be enabled by default, and the user can control it with the cascadeHierarchy=true|false parameter
  • Add option for the user to control whether mappings are cascaded -- this is enabled by default: cascadeMappings=true|false
  • Add option to exclude mappings from the list of resources returned, eg includeMappings=false
  • Add option to exclude map types, eg excludeMapTypes=SAME-AS -- note that this parameter should be ignored if mapTypes parameter is present
  • Add ability to recursively walk thru a concept's hierarchy and mappings
    • User should have the option to limit the number of levels -- eg cascadeLevels=0 is the current behavior of no recursion; cascadeLevels=1 goes to the next level; cascadeLevels=all or * means do all levels and should be the default behavior
    • Recursion needs to prevent infinite loops, eg. if a concept has already been processed, then don't process it again
    • Recursion should apply the same mapType filters
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Nov 23, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Nov 23, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Nov 23, 2021
…chy (default true) and cascade mappings option (default true)
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Nov 24, 2021
…level | limiting results and swagger parameters
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Nov 24, 2021
@snyaggarwal
Copy link
Contributor

@paynejd This is deployed on QA

@paynejd
Copy link
Member Author

paynejd commented Dec 1, 2021

This query returns 211 resources:

These two queries (just including/excluding the same map types) should return a total of 212 resources, right? (Because both are going to include the original concept) But the first one is 173 and the second one is 4, for a total of 177 resources.

What is causing the mismatch?

@paynejd
Copy link
Member Author

paynejd commented Dec 2, 2021

@snyaggarwal walked us thru an analysis of cascade recursion that showed that the results above were actually correct. See the image below-- we'll want to add a similar diagram to our documentation. Closing this out and further work will take place in #1131

image

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

No branches or pull requests

2 participants