You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Displaying the QuestionnaireResponse as QuestionnaireFragment in review mode, providing the original Questionnaire and QuestionnaireResponse again, shows the attachment item as not answered.
The library does only handle the url but not the data property of the Attachment resources.
Display the FHIR questionnaire again in review mode providing the response:
val questionnaireFragment =
QuestionnaireFragment.builder()
.setQuestionnaire(questionnaire)
.setQuestionnaireResponse(questionnaireResponse)
.showReviewPageBeforeSubmit(true)
.showReviewPageFirst(true)
.build()
The attachement item shows "not answered" despite the response does contain the Base64 encoded image and a title to it.
Expected behavior
The review page should at least display "answered", the title of the attachment resource or a thumbnail for the item (mime type dependent).
Smartphone (please complete the following information):
Device: Pixel 7a (and other devices)
Android version: 15
Build number: AP4A.250105.002
Additional context
The issue is caused by checking solely for an url being present and not handling the data field of the Attachment when getting the string to be displayed in
Describe the bug
When answering a Questionnaire with an image attachment item using SDCs
QuestionnaireFragment
, the created QuestionnaireResponse contains the picture taken as Base64 encoded string in thedata
field together with acontentType
andtitle
correctly.Displaying the
QuestionnaireResponse
as QuestionnaireFragment in review mode, providing the originalQuestionnaire
andQuestionnaireResponse
again, shows the attachment item as not answered.The library does only handle the
url
but not thedata
property of theAttachment
resources.Component
SDC library (Version 1.3.0)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The review page should at least display "answered", the title of the attachment resource or a thumbnail for the item (mime type dependent).
Smartphone (please complete the following information):
Additional context
The issue is caused by checking solely for an
url
being present and not handling thedata
field of theAttachment
when getting the string to be displayed inandroid-fhir/datacapture/src/main/java/com/google/android/fhir/datacapture/extensions/MoreTypes.kt
Line 88 in 5ba3a6a
This could be extended to show the title if data is present:
Would you like to work on the issue?
Yes, a possible solution is given in teh additional context section above.
The text was updated successfully, but these errors were encountered: