Skip to content

Commit

Permalink
Don't run custom exporters during unit testing. Fix checkstyle warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hadleynet committed Aug 29, 2023
1 parent 1fabe0a commit 4aa8e2b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/mitre/synthea/export/Exporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ private static boolean exportRecord(Person person, String fileTag, long stopTime
writeNewFile(outFilePath, consolidatedNotes);
}

if (patientExporters != null && !patientExporters.isEmpty()) {
if (Config.getAsBoolean("exporter.clinical_note.export", true)
&& patientExporters != null && !patientExporters.isEmpty()) {
for (PatientExporter patientExporter : patientExporters) {
patientExporter.export(person, stopTime, options);
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/mitre/synthea/export/rif/RIFExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ static boolean isVAorIHS(HealthRecord.Encounter encounter) {
return isVA || isIHSCenter;
}

/**
* Get the types of claim for the supplied encounter.
* @param encounter the encounter
* @return the applicable types of claim
*/
public static Set<ClaimType> getClaimTypes(HealthRecord.Encounter encounter) {
Set<ClaimType> types = new HashSet<>();
boolean isSNF = encounter.type.equals(HealthRecord.EncounterType.SNF.toString());
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/mitre/synthea/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public static void exportOff() {
Config.set("exporter.bfd.export", "false");
Config.set("exporter.cdw.export", "false");
Config.set("exporter.text.export", "false");
Config.set("exporter.custom.export", "false");
Config.set("exporter.text.per_encounter_export", "false");
Config.set("exporter.clinical_note.export", "false");
Config.set("exporter.symptoms.csv.export", "false");
Expand Down

0 comments on commit 4aa8e2b

Please sign in to comment.