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

Resource Expansion and toTree in bundle.build Function #15

Merged
merged 5 commits into from
Jun 8, 2020

Conversation

frisbm
Copy link
Contributor

@frisbm frisbm commented Jun 4, 2020

Description

Resource Expansion and toTree in bundle.build Function

Related US/Task

Resolves #14

Motivation and Context

This helps shorten required cypher while still allowing us to maintain a resource expansion function ourselves
Required cypher went from this:

CALL apoc.path.expand(entry, ">|relationship", "-entry", 0, 999) YIELD path
WITH collect(path) AS paths
CALL apoc.convert.toTree(paths) YIELD value
RETURN cyfhir.buildBundle(COLLECT(value))

to this:

CALL cyfhir.resource.expand(entry) YIELD path
RETURN cyfhir.bundle.build(collect(path))

How Has This Been Tested

Run multiple times against our test bundles and queries and everything seems to be working as expected to the best as i can tell without unit tests

Types of changes

  • Refactoring / dependency upgrade / docs change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional requirement

Visual screenshots

N/A

@frisbm frisbm self-assigned this Jun 4, 2020
@frisbm frisbm added the enhancement New feature or request label Jun 4, 2020
@frisbm frisbm added this to In progress in CyFHIR via automation Jun 4, 2020
README.md Outdated Show resolved Hide resolved
CyFHIR automation moved this from In progress to Reviewer approved Jun 8, 2020
@frisbm frisbm merged commit ad33307 into master Jun 8, 2020
CyFHIR automation moved this from Reviewer approved to Done Jun 8, 2020
@frisbm frisbm deleted the shorten-cypher branch June 8, 2020 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
CyFHIR
  
Done
Development

Successfully merging this pull request may close these issues.

Make buildBundle do some of the function of the last line of cypher, the part that does this:
2 participants