From abbb425001cafea2afbfe20365a6ab299cbe857f Mon Sep 17 00:00:00 2001 From: Abbie Watson Date: Tue, 15 Aug 2023 16:22:57 -0600 Subject: [PATCH] disable exporter.fhir.personal_data --- .../org/mitre/synthea/export/Exporter.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/mitre/synthea/export/Exporter.java b/src/main/java/org/mitre/synthea/export/Exporter.java index b089b355e0..5699bbbef6 100644 --- a/src/main/java/org/mitre/synthea/export/Exporter.java +++ b/src/main/java/org/mitre/synthea/export/Exporter.java @@ -236,16 +236,15 @@ private static boolean exportRecord(Person person, String fileTag, long stopTime String entryJson = parser.encodeResourceToString(entry.getResource()); appendToFile(outFilePath, entryJson); } - // } else if (Config.getAsBoolean("exporter.fhir.longitudinal_data")) { - } else if (Config.getAsBoolean("exporter.fhir.personal_data")) { - org.hl7.fhir.r4.model.Bundle bundle = FhirR4.convertToFHIR(person, stopTime); - IParser parser = FhirR4.getContext().newJsonParser().setPrettyPrint(false); - for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent entry : bundle.getEntry()) { - String filename = entry.getResource().getResourceType().toString() + ".ndjson"; - Path outFilePath = outDirectory.toPath().resolve(filename); - String entryJson = parser.encodeResourceToString(entry.getResource()); - appendToFile(outFilePath, entryJson); - } + // } else if (Config.getAsBoolean("exporter.fhir.personal_data")) { + // org.hl7.fhir.r4.model.Bundle bundle = FhirR4.convertToFHIR(person, stopTime); + // IParser parser = FhirR4.getContext().newJsonParser().setPrettyPrint(false); + // for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent entry : bundle.getEntry()) { + // String filename = entry.getResource().getResourceType().toString() + ".ndjson"; + // Path outFilePath = outDirectory.toPath().resolve(filename); + // String entryJson = parser.encodeResourceToString(entry.getResource()); + // appendToFile(outFilePath, entryJson); + // } } else { String bundleJson = FhirR4.convertToFHIRJson(person, stopTime); Path outFilePath = outDirectory.toPath().resolve(filename(person, fileTag, "json"));