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

The answer fields are dropped in QuestionnaireResponse due to recursive structure. #758

Closed
bashir2 opened this issue Jul 12, 2023 · 0 comments · Fixed by #759
Closed

The answer fields are dropped in QuestionnaireResponse due to recursive structure. #758

bashir2 opened this issue Jul 12, 2023 · 0 comments · Fixed by #759
Assignees
Labels
bug Something isn't working P0:immediate An issue to be handled ASAP

Comments

@bashir2
Copy link
Collaborator

bashir2 commented Jul 12, 2023

This is an issue reported by one of the users and the gist of it is that the answer fields of QuestionnaireResponse resources are dropped in the Parquet files. The root cause of this is the recursive structure of QuestionnaireResponse and the way it is being broken by Bunsen (see this section of SQL-on-FHIR spec for context). Two points about this issue:

  • The answer fields at the highest level, i.e., QuestionnaireResponse.item.answer are properly exported to Parquet.
  • This issue is not resolved by simply increasing recursive depth (Make recursive depth of Bunsen a configuration parameter. #757) because what is happening is that the first time QuestionnaireResponse.item.item is processed, its answer field is dropped because of recursion, because there are two QuestionnaireResponse.item.answer already on the stack. If we increase the recursive depth, this will still happen.

I have a fix for this where QuestionnaireResponse.item.item objects are differentiated depending on whether any of their child elements are dropped by recursion or not. It is not a perfect solution but it works. Note this issue is similar to some other issues we had with identifier fields here.

@bashir2 bashir2 added bug Something isn't working P0:immediate An issue to be handled ASAP labels Jul 12, 2023
@bashir2 bashir2 self-assigned this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0:immediate An issue to be handled ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant