Ok maybe not 15 mins but if your familiar with maven (and tomcat) it will be less than 10mins.
Instructions can be found here:
http://jamesagnew.github.io/hapi-fhir/doc_jpa.html
That gets the server running on Tomcat using an Apache Derby database. Reconfiguring to use another database is also pretty simple. A version I created can be found here:
https://github.com/KevinMayfield/AyeUp/tree/master/hapi-fhir-jpaserver
This assumes you’ve created a database in MySQL called hapifhir with user fhirjpa and password fhirjpa
But it’s pretty easy to change this to whatever you want by altering FhirServerConfig.java
public DataSource dataSource() {
BasicDataSource retVal = new BasicDataSource();
try {
retVal.setDriver(new com.mysql.jdbc.Driver());
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
retVal.setUrl("jdbc:mysql://localhost:3306/hapifhir");
retVal.setUsername("fhirjpa");
retVal.setPassword("fhirjpa");
return retVal;
}
Also add the MySQL drivers to the project by adding a dependency in the pom.xml file.
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
If all is in order you should be able to browse to your API server via http://localhost:8080/hapi-fhir-jpaserver/
The API should cover most requirements for apps and is the same API being adopted by Code4Health Demonstrator (Ripple OSI and Endeavour Health) and NHS England.
It doesn’t have any data but you can use examples from the FHIR website (Index - FHIR v4.3.0) or others. I’d recommend using Postman for working with the API (both XML and JSON is supported)
Ideally I’d want to put all this into a docker image and then it would be less than 15 mins to get it running.
Ideal for a hack days as it let developers get working with apps rather than messing with api’s and databases?
We have this running in our trust at the moment for evaluation taking live data feeds from our PAS, Document (EDMS) and ED systems. It’s been pretty easy so far to build sample apps (AngularJS and mumps!). We’ve not fully populated the database and stress tested but it’s holding up so far.