From 989c7d00469eb4f4dc7606960b908c6c307b2636 Mon Sep 17 00:00:00 2001 From: Ramin Haeri Azad Date: Wed, 30 Jan 2019 17:01:32 -0500 Subject: [PATCH] Added fix for variable category import. (#14) --- .../opal/support/REDCapVariableValueSourceFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/obiba/datasource/opal/support/REDCapVariableValueSourceFactory.java b/src/main/java/org/obiba/datasource/opal/support/REDCapVariableValueSourceFactory.java index b6aadef..f88d60d 100644 --- a/src/main/java/org/obiba/datasource/opal/support/REDCapVariableValueSourceFactory.java +++ b/src/main/java/org/obiba/datasource/opal/support/REDCapVariableValueSourceFactory.java @@ -64,7 +64,7 @@ private void addCategories(Variable.Builder builder, Map variabl String select_choices = variableMetadata.get("select_choices_or_calculations"); if(!Strings.isNullOrEmpty(select_choices) && hasCategories(variableMetadata)) { Stream.of(select_choices.split("\\|")).forEach(parts -> { - String[] catParts = parts.split("\\s*,\\s*"); + String[] catParts = parts.split("\\s*,\\s*", 2); builder.addCategory( Category.Builder .newCategory(catParts[0])