HAPI FHIR Software for IHE Connectathons

From IHE Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

These instructions direct you to build the HAPI FHIR software from original source code. There is a Dockerized version that would likely get you to the same place. Our original attempts with that version failed, but that might have been pilot error. We will document the steps that worked for us (NA 2020).

  • Clone a copy of the HAPI-FHIR server
git clone https://github.com/jamesagnew/hapi-fhir.git
  • Checkout the appropriate branch or version. For NA 2020, we used v4.1.0. Your event may use a more recent version.
cd hapi-fhir
git checkout v4.1.0
  • Modify source code

There are small changes necessary to configure the software. These are completed directly in the source code and not in a configuration file. Please see the section below.

  • Build the war file

Use the mvn command to build the war file. You want to use the flag -DskipTests unless you want to wait a long time for the unit tests to complete.

mvn -DskipTests install
  • Copy the war file to the tomcat server
cp hapi-fhir-jpaserver-uhnfhirtest/target/hapi-fhir-jpaserver.war $TOMCAT/webapps/fhir.war
  • Create an empty HAPI-FHIR database.

The application assumes an empty Postgresql database.

  • Start the Tomcat server
cd $TOMCAT
chmod +x bin/*sh
./bin/startup.sh


Source Code Modifications