Try   HackMD

Tutorial Build FHIR Server On Windows

tags: fhir-project fhirserver

This tutorial is designed for FHIR developer wishing to build a FHIR Server in a Windows OS. In this tutorial, we will try to build the server in a localhost mode instead of public server.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Table of Contents

Prerequisite

Basic Knowledge:

  • Java language

Software Installation:

Type Usage Software Name Version used in this tutorial
Database Store FHIR Resouces data Postgresql 12.10
FHIR starter source code Deploy a FHIR server using HAPI FHIR JPA hapi-fhir-jpaserver-starter helm-v0.8.0 (always strive for the latest-updated version)
Java Development Kit (JDK) HAPI FHIR works on Java environment, so it'll requires a JDK in order to run Oracle Java (JDK) 15.0.2
Web Server Provide Java web server environment for the FHIR Server Apache Tomcat 9.0
JAVA IDE For developing Spring-based enterprise applications Spring tool suit 4(STS 4) 4.14.1

Build HAPI FHIR Server Step

We executed this tutorial on a Windows 10 x64-bit laptop

A. Install Postgresql and Create Database

Time: 5-10 mins

  1. Install

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. Create a new Role
    2.1 Open PgAdmin 4

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    2.2 Right click on the [Login/Group Roles] -> Click [Create] -> Click [Login/Group Role]
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    2.3 Input role name

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    2.4 Input password

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    2.5 Enable [Can Login?] setting -> Click [Save]

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. Create a new Database
    3.1 Right click on the [Databases] -> Click [Create] -> Click [Database]

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    3.2 Input database name -> Select the role created in step 2 -> Click [Save]
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

B. Download Java Development Kit (JDK)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

C. Install Apache Tomcat

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

D. Download HAPI-FHIR Starter source code

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

E. Install Spring tool suit 4 (STS 4)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

F. Debug hapi-fhir-starter-project in STS 4

  1. Setting JDK
  2. Setting Apache Tomcat
  3. Import HAPI FHIR starter
    3.1 Edit PostgreSQL
    3.2 Edit server address
  4. Debug

G. Deploy a WAR File to Tomcat web service