FHIR ITK Library 2018-11-02T17:22:04+00:00

Library : NHS ITK

Library Overview

This library is intended for use with the NHS ITK v3 standard provided by NHS Digital. The ITK message wrappers use a number of profiled FHIR resources to represent the message wrappers, all of which are held within a FHIR Bundle resource. A number of different extensions are used within the ITK standard.

The library makes it possible to create the message wrappers without any knowledge of the profiles, extensions of other FHIR identifiers within the standard.

The FHIR ITK standard is published at https://developer.nhs.uk/interoperability-tool-kit-itk-specification-versions/

Installing The NuGet Library

The library is published as a NuGet package. This can be installed directly via Visual Studio or via the instructions on the NuGet website at https://www.nuget.org/packages/ClaroTech.NHSITK/ 


Available as a NuGet package today

This package is available as a NuGet package for direct integration into your build processes today.

Creating the ITK Wrapper

The “ITKMessage” class can be created with a specified identifier. If the identifier is missing then one will be allocated.

Copy to Clipboard

Setting the messaging event

The ITK standard has a set of permissible events. In the library, these are exposed an enumeration. Select the appropriate one.

Copy to Clipboard

Setting the Sender / Receiver

The sender and receiver of the message can be either

Examples of each are shown here.

Copy to Clipboard

Setting the Source Endpoint

Setting the source endpoint is a single method

Copy to Clipboard

Setting Handling Specifications

The standard allows for a number of “handling specifications”.  These are implemented via the means of a complex extension within the MessageHeader resource. The ITK Library will create the extension on your behalf.

Copy to Clipboard

Setting Message Focus (payload)

Within the ITK design, the payload of the message wrapper is always carried as a bundle of resources. The example here shows where the bundle would be inserted into the wrapper.

Copy to Clipboard

Generating the ITK Bundle

The bundle is generated using the ‘GenerateBundle’ method. The code shows how using the standard FHIR serialiser this can be converted to XML

Copy to Clipboard

Rounding it all up

Putting the code examples above together the resulting XML message generated is shown.

Copy to Clipboard