Skip to content

Commit 9ace5c4

Browse files
author
Myung Choi
committed
Problem with Lab Data with spaces at the end
Problem fixed by adding .trim() to remove leading and trailing spaces when reading from CSV file.
1 parent fc10dd3 commit 9ace5c4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CCDAexecutable/CDAgen.jar

12 Bytes
Binary file not shown.
35 Bytes
Binary file not shown.

CDAgenerator/src/edu/gatech/i3l/mdht/ccdagen/ReadLabT.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ private void run() {
157157
while ((line = br.readLine()).split(",").length != 0) {
158158
String[] temp = line.split(",");
159159

160-
visitDate.add(temp[0]);
161-
test.add(temp[1]);
162-
loinc.add(temp[2]);
163-
value.add(temp[3]);
164-
unit.add(temp[4]);
165-
shortName.add(temp[5]);
160+
visitDate.add(temp[0].trim());
161+
test.add(temp[1].trim());
162+
loinc.add(temp[2].trim());
163+
value.add(temp[3].trim());
164+
unit.add(temp[4].trim());
165+
shortName.add(temp[5].trim());
166166
lineCount++;
167167
// System.out.println(temp.length);
168168
// System.out.println(visitDate.size());

0 commit comments

Comments
 (0)