Skip to content

Commit

Permalink
disable exporter.fhir.personal_data
Browse files Browse the repository at this point in the history
  • Loading branch information
awatson1978 committed Aug 15, 2023
1 parent 60037ce commit abbb425
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main/java/org/mitre/synthea/export/Exporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit abbb425

Please sign in to comment.