Skip to content

Commit

Permalink
survey id populate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbgomes committed May 23, 2024
1 parent 9f52d7b commit d0d4f73
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/data/utils/questionHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,19 @@ export const mapProgramDataElementToQuestions = (
currentQuestion.id === WARD2_ID_DATAELEMENT_ID ||
currentQuestion.id === AMR_SURVEYS_PREVALENCE_DEA_SURVEY_ID)
) {
currentQuestion.value = event?.event;
currentQuestion.disabled = true;
}

// Set SurveyId to the value of the eventId.
if (
currentQuestion &&
(currentQuestion.id === SURVEY_ID_DATAELEMENT_ID ||
currentQuestion.id === SURVEY_ID_PATIENT_DATAELEMENT_ID ||
currentQuestion.id === AMR_SURVEYS_PREVALENCE_DEA_SURVEY_ID)
) {
currentQuestion.value = event?.event;
}

return currentQuestion;
}
})
Expand Down

0 comments on commit d0d4f73

Please sign in to comment.