From dcde6183e6f211e3d0474df6de1aadcd8e326ec0 Mon Sep 17 00:00:00 2001 From: Simon Schiff Date: Thu, 27 Sep 2018 15:20:54 +0200 Subject: [PATCH] Fix for CSVExporter encounter cost format was not independent of default locale at the running system --- src/main/java/org/mitre/synthea/export/CSVExporter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/mitre/synthea/export/CSVExporter.java b/src/main/java/org/mitre/synthea/export/CSVExporter.java index b7bc73379a..11b47d11f4 100644 --- a/src/main/java/org/mitre/synthea/export/CSVExporter.java +++ b/src/main/java/org/mitre/synthea/export/CSVExporter.java @@ -12,6 +12,7 @@ import java.math.RoundingMode; import java.nio.file.Path; import java.util.UUID; +import java.util.Locale; import org.mitre.synthea.helpers.Utilities; import org.mitre.synthea.world.agents.Person; @@ -322,7 +323,7 @@ private String encounter(String personID, Encounter encounter) throws IOExceptio //DESCRIPTION s.append(clean(coding.display)).append(','); //COST - s.append(String.format("%.2f", encounter.cost())).append(','); + s.append(String.format(Locale.US, "%.2f", encounter.cost())).append(','); //REASONCODE & REASONDESCRIPTION if (encounter.reason == null) { s.append(",");