Skip to content

Introduction

Sunil Bhaskarla edited this page Nov 24, 2023 · 3 revisions

Introduction

NIST FHIR Toolkit is an open source testing tool for HL7 FHIR. It is available for download from GitHub where we public frequent binary versions. Our focus is on building tests for IHE profiles based on FHIR. Our first profile, MHD, is currently under development. This tool has two parts - a testing infrastructure and collections of tests for a target profile.

This toolkit runs on Linux, Mac, and Windows platforms and requires Java 8 to develop but supports Java 8+ runtime. We develop and test on all three platforms. The server portion is written in Java and the client portion is written for the browser using Javascript and the Vue framework. NIST FHIR Toolkit download is a single zip file containing a complete Tomcat installation. All elements of the toolkit are pre-installed in this Tomcat.

Testing Capabilities

NIST FHIR Toolkit supports three aspects of conformance testing: server testing, client testing, and interoperability. These three modes operate concurrently. In server testing, toolkit acts as a client and initiates messages to a server under test. In client testing, toolkit acts as a server accepting and logging messages. A user can validate the messages received through the user interface. In interoperability testing, the messages between a client and a server pass through the toolkit, are logged, and can be accessed and evaluated afterwards.

Toolkit Structure

At the heart of NIST FHIR Toolkit is a recording proxy acting as a point of exchange between other systems. A second key component is a test engine implementing the standard FHIR TestScript test language. In client and server testing modes this test engine sits opposite the system under test with the proxy in the middle. In server testing mode the test engine sends messages through the proxy to the system under test while the proxy records the interaction. In client testing mode the client sends to the proxy while the test engine evaluates the logs after the event. The output of the proxy goes to a system simulator which responds to the client.

Toolkit comes with two types of simulators pre-installed. For MHD testing the simulators come from NIST XDS Toolkit. MHD Comprehensive corresponds to the XDS Repository/Registry simulator. MHD Minimal corresponds to XDR Recipient simulator in Limited Metadata mode. The proxy is capable of translating between MHD and the appropriate XDS/XDR format.

The second type of simulator uses the open source HAPI FHIR server. This server acts as a target for client messages after passing through the proxy and as a support FHIR server when necessary.

Key Facilities

Channel

The key facility in FHIR Toolkit is the Channel. A channel is a path through the proxy. As such it has the following features:

  • A well-defined endpoint where it enters the proxy. This is sent to by clients.
  • A target endpoint as part of its configuration. This is where messages forward to.
  • A type: FHIR (type) forwards the exact message. MHD (type) translates from MHD to XDS.
  • An environment. This is a concept taken from XDS Toolkit that defines the valid codes. This is used only for MHD channels.

Inspector

The Inspector is a graphical tool for inspecting the contents of tests and servers.

FHIR TestScript

Tests in NIST FHIR Toolkit use standard FHIR TestScript resource to encode the test. The test result/report uses the TestReport resource. The test engine is the interpreter of TestScript and the generator of TestReport. It offers extensions to TestScript which fall into three categories: flow control, error control, and modularization. The coding of these extensions relies on FHIR Resource extension and contains facilities.

Clone this wiki locally