private static void ConvertQuestionnaireEnableWhenComponent(TargetModel.Questionnaire.EnableWhenComponent to, SourceModel.Questionnaire.EnableWhenComponent from, FhirConverter converter) { if (from.Operator == SourceModel.Questionnaire.QuestionnaireItemOperator.Exists && from.Answer is FhirBoolean answer) { to.HasAnswer = answer.Value; } }
private static void ConvertQuestionnaireEnableWhenComponent(TargetModel.Questionnaire.EnableWhenComponent to, SourceModel.Questionnaire.EnableWhenComponent from, FhirConverter converter) { if (from.HasAnswer.HasValue) { to.Operator = TargetModel.Questionnaire.QuestionnaireItemOperator.Exists; to.Answer = new FhirBoolean(from.HasAnswer); } else if (from.Answer != null) { to.Operator = TargetModel.Questionnaire.QuestionnaireItemOperator.Equal; } }