Search in sources :

Example 26 with FINISHED

use of org.hl7.fhir.r4.model.Encounter.EncounterStatus.FINISHED in project org.hl7.fhir.core by hapifhir.

the class BatchLoader method LoadDirectory.

private static void LoadDirectory(String server, String folder, int size) throws IOException, Exception {
    System.out.print("Connecting to " + server + ".. ");
    FHIRToolingClient client = new FHIRToolingClient(server, "fhir/batch-loader");
    System.out.println("Done");
    IniFile ini = new IniFile(Utilities.path(folder, "batch-load-progress.ini"));
    for (File f : new File(folder).listFiles()) {
        if (f.getName().endsWith(".json") || f.getName().endsWith(".xml")) {
            if (!ini.getBooleanProperty("finished", f.getName())) {
                sendFile(client, f, size, ini);
            }
        }
    }
}
Also used : FHIRToolingClient(org.hl7.fhir.dstu3.utils.client.FHIRToolingClient) IniFile(org.hl7.fhir.utilities.IniFile) File(java.io.File) IniFile(org.hl7.fhir.utilities.IniFile)

Aggregations

Test (org.junit.jupiter.api.Test)8 RestIntegrationTest (org.opencds.cqf.ruler.test.RestIntegrationTest)8 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)8 Bundle (org.hl7.fhir.r4.model.Bundle)7 File (java.io.File)6 Date (java.util.Date)6 Order (org.junit.jupiter.api.Order)6 TestMethodOrder (org.junit.jupiter.api.TestMethodOrder)6 FileInputStream (java.io.FileInputStream)5 BufferedReader (java.io.BufferedReader)4 InputStreamReader (java.io.InputStreamReader)4 Reference (org.hl7.fhir.r4.model.Reference)4 TokenClientParam (ca.uhn.fhir.rest.gclient.TokenClientParam)3 HashSet (java.util.HashSet)3 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)3 Coding (org.hl7.fhir.r4.model.Coding)3 Task (org.hl7.fhir.r4.model.Task)3 ValueSet (org.hl7.fhir.r4.model.ValueSet)3 Provider (org.mitre.synthea.world.agents.Provider)3 Code (org.mitre.synthea.world.concepts.HealthRecord.Code)3