예제 #1
0
  /**
   * Checks that fhir cell i2b2 is up
   *
   * @throws Exception
   */
  @Test
  public void checkDB_FHIR_CELL_I2B2_IT() throws Exception {
    HttpRequest http = new HttpRequest();

    String url =
        AppConfig.getProp(AppConfig.PROTOCOL_FHIR_I2B2)
            + "://"
            + AppConfig.getProp(AppConfig.HOST_FHIR_I2B2)
            + ":"
            + AppConfig.getProp(AppConfig.PORT_FHIR_I2B2)
            + "/fhir-i2b2/";

    Response resp = http.doPostGeneric(url, null, null, null, "GET");
    assertTrue(resp.getResponseCode() >= 200 && resp.getResponseCode() <= 204);
  }
예제 #2
0
 /**
  * Checks that c3pro db is accessible
  *
  * @throws Exception
  */
 @Test
 public void checkDB_C3PRO_IT() throws Exception {
   String infoDB = AppConfig.getAuthCredentials(AppConfig.C3PRO_CONSUMER_DATASOURCE);
   String[] infoDBParse = infoDB.split(",");
   Class.forName("oracle.jdbc.driver.OracleDriver");
   Connection conn = DriverManager.getConnection(infoDBParse[0], infoDBParse[1], infoDBParse[2]);
   Statement stmt = conn.createStatement();
   ResultSet rs = stmt.executeQuery("Select count(*) from resource_table");
   if (!rs.next()) fail();
   rs.close();
   rs = stmt.executeQuery("Select count(*) from patient_map");
   if (!rs.next()) fail();
   rs.close();
   stmt.close();
   conn.close();
 }