Lab 03 – Adding a FHIR Controller

Activity

In this assignment, you will set up the FHIR Controller using GitHub.

What is the FHIR Controller?

The FHIR Controller is a tool that allows users to reset their FHIR server by purging all existing resources and loading seed data via FHIR bundles. Usually, these FHIR bundles will contain default server data, but users also have the ability to load custom FHIR bundles for specific preferences or testing purposes.

FHIR Controller Overview

The FHIR Controller(GitHub) provides an easy-to-use interface for managing your local FHIR server. It offers the following key features:

  • Display Instructions: A web UI that presents Markdown-formatted instructions.
  • Load FHIR Bundles: Automate the loading of a preset sequence of FHIR bundles into the server, ensuring data is loaded in the correct sequence.
  • Guided Resource Links: Provides a structured sequence of resource links to help users navigate and interact with the FHIR server efficiently.
  • Purge Server Data: Supports bulk deletion of all resources on the server, if supported by the FHIR server’s driver.

A FHIR Controller is client-only web application that runs completely within the browser, with all commands performed via FHIR API calls. FHIR Controllers do not have their own backend service.

Prerequisites

You’ll need a GitHub account, have a git client installed, and know how to clone (or fork) a repository. If you are unfamiliar with these steps, refer to this below documentation before proceeding. We will also assume you are using your preferred IDE. If you still need one we recommend using the free, cross-platform Visual Studio (VS) Code app.

Installing

  1. Navigate to https://github.com/lee-informatics/FHIR-Controller
  2. Clone the repository

Building and Running Your Own Custom FHIR Controller Configuration

The following docker command can be used to start your build.

Note: Make sure you are in the repository directory or specify the path.

# For yourself
docker build -t yourname/fhir-controller:latest .

# Or for Multi-arch builds

docker buildx build --platform linux/amd64,linux/arm64 -t yourname/fhir-controller:latest

Than you will want to run your image by using the following command. This will assign it to the port 4200.

docker run -d -p 4200:80 yourname/fhir-controller:latest

Your now have your own FHIR Controller running on port 4200 (http://localhost:4200)

As long as you have your FHIR server running you can interact with it using the FHIR Controller you’ve just created. You will see something similar to the UI below:

In most cases your FHIR server is running on port 8080. If it is not than you can adjust this in the stack.json file. As well as several other features. https://github.com/lee-informatics/FHIR-Controller/blob/main/public/stack.json