handleQuestionnaireSubmission
fun handleQuestionnaireSubmission(questionnaire: Questionnaire, currentQuestionnaireResponse: QuestionnaireResponse, questionnaireConfig: QuestionnaireConfig, actionParameters: List<ActionParameter>, context: Context, onSuccessfulSubmission: (List<IdType>, QuestionnaireResponse) -> Unit)
This function performs data extraction against the QuestionnaireResponse. All the resources generated from a successful extraction by StructureMap or definition are stored in the database. The QuestionnaireResponse is also stored in the database regardless of the outcome of ResourceMapper.extract. This function will optionally generate CarePlan using the PlanDefinition resource configured in QuestionnaireConfig.planDefinitions. The QuestionnaireConfig.eventWorkflows contains configurations to cascade update the statuses of resources to in-active (close) that are related to the current QuestionnaireResponse.subject