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

Subsequent extraction of Questionnaire returns only Patient resource instead of Patient and Observation resources #2756

Open
Itskiprotich opened this issue Dec 10, 2024 · 3 comments
Labels
P1 High priority issue

Comments

@Itskiprotich
Copy link
Contributor

Describe the bug

When extracting a Questionnaire containing both Patient and Observation resources using the Android FHIR SDK, the extraction behavior is inconsistent:

On the first extraction attempt, both Patient and Observation resources are returned as expected.
On subsequent attempts, only the Patient resource is extracted.
This behavior suggests a potential issue with resource handling or caching during the extraction process.

Component
SDC Library.

To Reproduce

  1. Create a Questionnaire containing Patient and Observation resources.
  2. Perform an extraction using the SDC Library.
    i). First attempt: Both Patient and Observation resources are returned.
    ii). Subsequent attempts: Only the Patient resource is returned.

Expected behavior
Both Patient and Observation resources should consistently be extracted on every attempt.

Screenshots
Image

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
N/A

@jingtang10
Copy link
Collaborator

please post the input and output of both extraction calls

@santosh-pingle
Copy link
Collaborator

santosh-pingle commented Dec 16, 2024

@Itskiprotich You can use the code below to convert the resources (Questionnaire, QuestionnaireResponse) into a JSON string for posting here.
FhirContext.forCached(FhirVersionEnum.R4).newJsonParser().encodeResourceToString(questionnaireResponse)

@santosh-pingle santosh-pingle added the P1 High priority issue label Dec 16, 2024
@jingtang10
Copy link
Collaborator

the problem is the get questionnaire response code is not making a copy of the response correctly.

needs to be changed to take from this rather than questionnaireResponse

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

No branches or pull requests

3 participants