Skip to content

Commit

Permalink
Added some file management improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
paulolaup committed May 8, 2022
1 parent 35ed8f2 commit 3d85e5f
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 613 deletions.
Binary file modified .gradle/7.3.3/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.3.3/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.3.3/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.3.3/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/file-system.probe
Binary file not shown.
612 changes: 0 additions & 612 deletions build/classes/groovy/main/map/rxnorm/mapping_atc.json

This file was deleted.

3 changes: 3 additions & 0 deletions src/main/groovy/org/example/syntheakds/Main.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.example.syntheakds

import org.apache.commons.io.FileUtils
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.core.LoggerContext
Expand Down Expand Up @@ -44,6 +45,8 @@ class Main {
def timeSpan = end - start
logger.info("[#]Finished conversion in ${Math.floor(timeSpan/60) as int}m ${timeSpan%60}s.")

//Delete all files generated by Synthea
FileUtils.cleanDirectory(SyntheaKDSConfig.patDirPath.toFile())
}

private static GeneratorOptions configureGeneratorOptions(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import java.nio.file.Paths
class SyntheaKDSConfig {

//Preset values
static final Path mapDirPath = Utils.getJarDir().resolve("map")
static final Path basePath = Paths.get("").toAbsolutePath()
static final Path mapDirPath = basePath.resolve(Paths.get("output", "mappings"))
static final Path outputDirPath = basePath.resolve(Paths.get("output", System.currentTimeMillis().toString()))
static final Path tmpDirPath = outputDirPath.resolve('tmp_output')
static final Path patDirPath = tmpDirPath.resolve('fhir')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.example.syntheakds.processing

import ca.uhn.fhir.parser.IParser
import com.fasterxml.jackson.databind.ObjectMapper
import org.apache.commons.io.FileUtils
import org.example.syntheakds.config.SyntheaKDSConfig
import org.example.syntheakds.utils.Utils

Expand Down

0 comments on commit 3d85e5f

Please sign in to comment.