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

Only edit QuestionnaireResponses when using Save Draft functionality #3722

Closed
Rkareko opened this issue Mar 4, 2025 · 0 comments · Fixed by #3723
Closed

Only edit QuestionnaireResponses when using Save Draft functionality #3722

Rkareko opened this issue Mar 4, 2025 · 0 comments · Fixed by #3723
Assignees

Comments

@Rkareko
Copy link
Contributor

Rkareko commented Mar 4, 2025

Describe the Issue
During implementation of the Save Draft functionality an update was made which prevents creation of a new QuestionnaireResponse when a form is editted.

An issue has been reported in WDF where sync fails when items are added then removed from a repeated group item while the app is offline. If resources are created from each of the repeated group items during StructureMap evaluation then an entry is added to the QuestionnaireResponse.contained.entry field. When an item is removed then a patch is generated to signify that a certain entry in the QuestionnaireResponse.contained.entry should be removed. If the QuestionnaireResponse resource on the server has less items in the QuestionnaireResponse.contained.entry array than the index of the item to be removed then the server rejects the bundle and returns the following error

response-status-code: 400
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "processing",
      "diagnostics": "HAPI-1272: no such path in target JSON document"
    }
  ]
}
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

Successfully merging a pull request may close this issue.

1 participant