QuestionnaireFragment

open class QuestionnaireFragment

A Fragment for displaying FHIR Questionnaires and getting user responses as FHIR QuestionnareResponses.

For more information, see the QuestionnaireFragment developer guide.

Constructors

Link copied to clipboard
fun QuestionnaireFragment()

Types

Link copied to clipboard
object Companion

Extras that can be passed to QuestionnaireFragment to define its behavior. When you create a QuestionnaireFragment, one of EXTRA_QUESTIONNAIRE_JSON_URI or EXTRA_QUESTIONNAIRE_JSON_STRING is required.

data class QuestionnaireItemViewHolderFactoryMatcher(factory: QuestionnaireItemViewHolderFactory, matches: (<ERROR CLASS>) -> Boolean)

Data class that holds a matcher function (matches) which evaluates whether a given factory should be used to display a given Questionnaire.QuestionnaireItemComponent.

Functions

open fun getCustomQuestionnaireItemViewHolderFactoryMatchers(): <ERROR CLASS>

Override this method to specify when custom questionnaire components should be used. It should return a List of QuestionnaireItemViewHolderFactoryMatchers which are used to evaluate whether a custom QuestionnaireItemViewHolderFactory should be used to render a given questionnaire item.

Link copied to clipboard
fun getQuestionnaireResponse(): <ERROR CLASS>

Returns a org.hl7.fhir.r4.model.QuestionnaireResponse populated with any answers that are present on the rendered QuestionnaireFragment when it is called.