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

Refactor definition-based extraction for multiple resource and create extraction context #670

Closed
jingtang10 opened this issue Jul 23, 2021 · 3 comments · Fixed by #1014
Closed
Assignees
Labels
effort:xsmall Extra small effort - 1 day P1 High priority issue type:enhancement New feature or request

Comments

@jingtang10
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The extraction code for multiple resources needs to be refactored

Describe the solution you'd like
Refactor the definition based extraction functions so that they are not extension functions of Base any more. Instead, a extraction context should be passed down during extraction."

We need to create something like data class ExtractionContext and pass it down during the definition-based extraction process.

It should probably include the current target resource, as well as anything else that has been created to be added to the final bundle.

Describe alternatives you've considered
Current approach does work, but it's difficult to read and understand and lacks the level of abstraction we need for this code.

Additional context
NA

Would you like to work on the issue?
NA

@jingtang10 jingtang10 added the type:enhancement New feature or request label Jul 23, 2021
@jingtang10 jingtang10 added this to To do in Data capture library via automation Jul 23, 2021
@jingtang10
Copy link
Collaborator Author

type of the extraction context could probably be: Map<ResourceType, List<Resource>> and each list acts kinda like a stack.

@fredhersch
Copy link
Collaborator

@Tarun-Bhardwaj This should be completed as part of the next release of the DefinitionBased Extraction. We should plan to provide documentation and use cases with how to implement this within Questionnaire

@Tarun-Bhardwaj Tarun-Bhardwaj added Beta P1 High priority issue labels Oct 19, 2021
@Tarun-Bhardwaj Tarun-Bhardwaj added Beta and removed Beta labels Nov 23, 2021
@santosh-pingle santosh-pingle moved this from To do to In progress in Data capture library Dec 9, 2021
@Tarun-Bhardwaj Tarun-Bhardwaj added the effort:xsmall Extra small effort - 1 day label Dec 10, 2021
@Tarun-Bhardwaj Tarun-Bhardwaj added Beta and removed Beta labels Dec 16, 2021
@jingtang10 jingtang10 linked a pull request Jan 10, 2022 that will close this issue
8 tasks
@jingtang10
Copy link
Collaborator Author

This is done in #1014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:xsmall Extra small effort - 1 day P1 High priority issue type:enhancement New feature or request
Projects
Archived in project
4 participants