From 7a79be053c0ac65e6a75e9dc42384fd47cf1a4d5 Mon Sep 17 00:00:00 2001 From: Vladimir Polony Date: Thu, 19 Dec 2024 09:09:29 -0800 Subject: [PATCH] Removed unused files (#8) --- .../server/api/MultipleQueryRunner.java | 61 ------------------- src/com/podalv/search/server/api/Test.java | 18 ------ 2 files changed, 79 deletions(-) delete mode 100644 src/com/podalv/search/server/api/MultipleQueryRunner.java delete mode 100755 src/com/podalv/search/server/api/Test.java diff --git a/src/com/podalv/search/server/api/MultipleQueryRunner.java b/src/com/podalv/search/server/api/MultipleQueryRunner.java deleted file mode 100644 index 9d77dfb..0000000 --- a/src/com/podalv/search/server/api/MultipleQueryRunner.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.podalv.search.server.api; - -import java.io.*; -import java.util.Iterator; -import java.util.regex.Pattern; - -import com.podalv.search.server.api.datastructures.PatientId; - -/** Runs a list of queries and stores patient counts in a file - * - */ -public class MultipleQueryRunner { - - public static void main(final String[] args) throws IOException { - System.out.println("Usage: URL variables_file query_file output_file"); - System.out.println(); - System.out.println("Format of the query file:"); - System.out.println("IDENTIFIER\tquery"); - String line; - final AtlasConnection connection = new AtlasConnection(args[0]); - if (!connection.test()) { - System.out.println("Cannot connect to '" + args[0]); - System.exit(1); - } - final StringBuilder variables = new StringBuilder(); - BufferedReader reader = new BufferedReader(new FileReader(args[1])); - while ((line = reader.readLine()) != null) { - variables.append(line + "\n"); - } - reader.close(); - final BufferedWriter result = new BufferedWriter(new FileWriter(args[3])); - reader = new BufferedReader(new FileReader(args[2])); - while ((line = reader.readLine()) != null) { - final String[] data = line.split(Pattern.quote("\t")); - if (data.length != 2) { - System.out.println("Ignoring line '" + line + "'"); - } - else { - System.out.print("Processing " + data[0]); - long cnt = 0; - try { - final Iterator resp = connection.getPatientIds(variables.toString() + "\n" + data[1]); - while (resp.hasNext()) { - resp.next(); - cnt++; - } - } - catch (final Exception e) { - System.out.print(" ERROR " + e.getMessage()); - result.write(data[0] + "\t" + "error '" + e.getMessage() + "'\n"); - } - System.out.print(" result = " + cnt); - result.write(data[0] + "\t" + cnt + "\n"); - System.out.println(); - } - } - reader.close(); - result.close(); - } - -} diff --git a/src/com/podalv/search/server/api/Test.java b/src/com/podalv/search/server/api/Test.java deleted file mode 100755 index 4808d70..0000000 --- a/src/com/podalv/search/server/api/Test.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.podalv.search.server.api; - -import java.io.File; -import java.io.IOException; - -import com.google.gson.JsonSyntaxException; -import com.podalv.search.server.api.exceptions.QueryException; - -public class Test { - - public static void main(final String[] args) throws IOException, JsonSyntaxException, QueryException { - final AtlasConnection connection = new AtlasConnection("http://localhost:8080"); - System.out.println(connection.test()); - connection.getFile("ICD9=250.50", new File("/home/podalv/test.txt")); - connection.getFile("ICD9=250", new File("/home/podalv/test2.txt")); - connection.getFile("ICD9=249", new File("/home/podalv/test3.txt")); - } -} \ No newline at end of file