diff --git a/packages/openchs-android/src/views/form/formElement/QuestionGroup.js b/packages/openchs-android/src/views/form/formElement/QuestionGroup.js index 18451c868..6a83540d7 100644 --- a/packages/openchs-android/src/views/form/formElement/QuestionGroup.js +++ b/packages/openchs-android/src/views/form/formElement/QuestionGroup.js @@ -30,6 +30,8 @@ import DurationDateFormElement from "./DurationDateFormElement"; import DurationFormElement from "./DurationFormElement"; import MultiSelectMediaFormElement from "./MultiSelectMediaFormElement"; import PhoneNumberFormElement from "./PhoneNumberFormElement"; +import SingleSelectSubjectLandingFormElement from './SingleSelectSubjectLandingFormElement'; +import MultiSelectSubjectLandingFormElement from './MultiSelectSubjectLandingFormElement'; class QuestionGroup extends AbstractFormElement { static propTypes = { @@ -95,6 +97,11 @@ class QuestionGroup extends AbstractFormElement { return _.isNil(observation) ? nullReplacement : observation.getValueWrapper(); } + getSelectedAnswerFromObservationHolder(concept, element, questionGroupIndex, nullReplacement) { + const observation = this.props.observationHolder.findQuestionGroupObservation(concept, element, questionGroupIndex); + return _.isNil(observation) ? nullReplacement : observation.getValueWrapper(); + } + renderTextFormElement(formElement) { return } + if (dataType === dataTypes.Subject && fe.isSingleSelect()) { + return + } + if (dataType === dataTypes.Subject && fe.isMultiSelect()) { + return + } })} ) diff --git a/packages/openchs-android/src/views/form/formElement/SubjectFormElement.js b/packages/openchs-android/src/views/form/formElement/SubjectFormElement.js index 6954d5998..ce501086b 100644 --- a/packages/openchs-android/src/views/form/formElement/SubjectFormElement.js +++ b/packages/openchs-android/src/views/form/formElement/SubjectFormElement.js @@ -57,6 +57,8 @@ class SubjectFormElement extends AbstractFormElement { this.dispatchAction(this.props.actionName, { formElement: this.props.element, answerUUID: subjectUUID, + parentFormElement: this.props.parentElement, + questionGroupIndex: this.props.questionGroupIndex, }); } @@ -80,6 +82,8 @@ class SubjectFormElement extends AbstractFormElement { this.dispatchAction(this.props.actionName, { formElement: this.props.element, answerUUID: individual.uuid, + parentFormElement: this.props.parentElement, + questionGroupIndex: this.props.questionGroupIndex, }); } }).to(IndividualSearchView, true);