Difference between revisions of "HAPI FHIR Software for IHE Connectathons"

From IHE Wiki
Jump to navigation Jump to search
(Created page with "=FHIR Read-Write Server (HAPI FHIR Server)= * Clone a copy of the HAPI-FHIR server :<code>git clone https://github.com/jamesagnew/hapi-fhir.git</code> * Checkout the appropr...")
 
Line 1: Line 1:
=FHIR Read-Write Server (HAPI FHIR Server)=
+
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
 
* Clone a copy of the HAPI-FHIR server
Line 10: Line 13:
 
* Modify source code
 
* 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.
 
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 [[HAPI FHIR Software for IHE Connectathons]]
+
Please see the section below.
  
 
* Build the war file
 
* Build the war file
Line 16: Line 19:
 
:<code>mvn -DskipTests install</code>
 
:<code>mvn -DskipTests install</code>
  
 +
* Copy the war file to the tomcat server
 +
:<code>cp hapi-fhir-jpaserver-uhnfhirtest/target/hapi-fhir-jpaserver.war $TOMCAT/webapps/fhir.war</code>
  
 +
* Create an empty HAPI-FHIR database.
 +
The application assumes an empty Postgresql database.
  
==Structure Sets and Other Test Data==
+
* Start the Tomcat server
 +
:<code>cd $TOMCAT</code>
 +
:<code>chmod +x bin/*sh</code>
 +
:<code>./bin/startup.sh</code>
 +
 
 +
 
 +
 
 +
==Source Code Modifications==

Revision as of 10:40, 16 February 2020

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