diff --git a/android/engine/src/main/java/org/smartregister/fhircore/engine/domain/model/QuestionnaireType.kt b/android/engine/src/main/java/org/smartregister/fhircore/engine/domain/model/QuestionnaireType.kt index bf3fce59b7..ba490a4ec7 100644 --- a/android/engine/src/main/java/org/smartregister/fhircore/engine/domain/model/QuestionnaireType.kt +++ b/android/engine/src/main/java/org/smartregister/fhircore/engine/domain/model/QuestionnaireType.kt @@ -22,6 +22,7 @@ enum class QuestionnaireType { DEFAULT, EDIT, READ_ONLY, + SUMMARY, } fun QuestionnaireConfig.isDefault() = @@ -32,3 +33,6 @@ fun QuestionnaireConfig.isEditable() = fun QuestionnaireConfig.isReadOnly() = QuestionnaireType.valueOf(this.type) == QuestionnaireType.READ_ONLY + +fun QuestionnaireConfig.isSummary() = + QuestionnaireType.valueOf(this.type) == QuestionnaireType.SUMMARY diff --git a/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/questionnaire/QuestionnaireActivity.kt b/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/questionnaire/QuestionnaireActivity.kt index 54d7cd8d4b..97e6fd1886 100644 --- a/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/questionnaire/QuestionnaireActivity.kt +++ b/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/questionnaire/QuestionnaireActivity.kt @@ -49,6 +49,7 @@ import org.smartregister.fhircore.engine.configuration.QuestionnaireConfig import org.smartregister.fhircore.engine.configuration.app.LocationLogOptions import org.smartregister.fhircore.engine.domain.model.ActionParameter import org.smartregister.fhircore.engine.domain.model.isReadOnly +import org.smartregister.fhircore.engine.domain.model.isSummary import org.smartregister.fhircore.engine.ui.base.AlertDialogue import org.smartregister.fhircore.engine.ui.base.BaseMultiLanguageActivity import org.smartregister.fhircore.engine.util.DispatcherProvider @@ -282,6 +283,7 @@ class QuestionnaireActivity : BaseMultiLanguageActivity() { ) .showAsterisk(this.questionnaireConfig.showRequiredTextAsterisk) .showRequiredText(this.questionnaireConfig.showRequiredText) + .setIsReadOnly(questionnaireConfig.isSummary()) .apply { if (questionnaireResponse != null) { questionnaireResponse