NEL.MESH 1.0.0.8

dotnet add package NEL.MESH --version 1.0.0.8                
NuGet\Install-Package NEL.MESH -Version 1.0.0.8                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NEL.MESH" Version="1.0.0.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NEL.MESH --version 1.0.0.8                
#r "nuget: NEL.MESH, 1.0.0.8"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NEL.MESH as a Cake Addin
#addin nuget:?package=NEL.MESH&version=1.0.0.8

// Install NEL.MESH as a Cake Tool
#tool nuget:?package=NEL.MESH&version=1.0.0.8                

alternate text is missing from this package README image Build The Standard - COMPLIANT Nuget Nuget

Introduction

Nel.Mesh is a Standard-Compliant .NET library built on top of (MESH) to enable software engineers to develop Mesh compliant solutions in .NET

MESH - the Message Exchange for Social Care and Health providing the ability to share data directly between health and care organisations and is the nationally recognised mechanism for this method of data sharing.

Link to NHS Digital

Standard-Compliance

This library was built according to The Standard. The library follows engineering principles, patterns and tooling as recommended by The Standard.

This library was also built to be a community lead effort in order to eventually have all mesh end points covered.

Diagram of components

alternate text is missing from this package README image

NOTE: Please find below the methods exposed on the Mesh Client.

Install library?

You can get Nel.Mesh Nuget package by typing:

Install-Package NEL.MESH

Prerequisites

You'll need some things at different stages of your development to integrate with the MESH API. For each environment you use, you'll need a:

  • MESH mailbox ID and password
  • Transport Layer Security (TLS) certificate
  • Shared secret to include in the MESH authorization header

To get started you will need to sign in or create a developer account.

In My applications and Teams Create a new application for the environments needed and from here after a max of 10 days you will be given the appropriate Active Api Keys.

- Request a MESH mailbox

Once NHS Digital have approved your request to use the MESH API, you'll need to request a MESH Mailbox to use in a 'Path to Live integration environment'. This is how you'll interact with the MESH API. A MESH Mailbox is secure and only your organisation can access it.

To request a MESH Mailbox, you'll need to fill in an online form. It takes 5 to 10 minutes to complete.

You'll need to know:

  • Your ODS code.
  • The workflow groups or IDs for the files you plan to send or receive.
  • The contact details of the person who will be managing the mailbox in your organisation.

Apply Here For Mailbox

NOTE: This could also take a few days to come pack with the details.

- Prerequisites For Live ONLY

This is also called digital on-boarding. You'll need to submit information that demonstrates:

  • You have a valid use case
  • You can manage risks
  • Your software conforms technically with the requirements for this API
  • This API can only be used where there is a legal basis to do so and you will be asked you to demonstrate this as part of the digital onboarding process before your software goes live.

Current Mesh Functionality

Method Description Links to NHS Digital Mesh Documentation
ValidateMailboxAccess Use this endpoint to check that MESH can be reached and that the authentication you are using is correct. This endpoint only needs to be called once every 24 hours. This endpoint updates the details of the connection history held for your mailbox and is similar to a keep-alive or ping message, in that it allows monitoring on the Spine to be aware of the active use of a mailbox despite a lack of traffic. Validate
SendMessage Use this endpoint to send a message via MESH. Use the POST command to your virtual outbox. Specify the message recipient in the request headers, with the message contained in the request body Note: If the file is too large the service will chunck this into smaller files. Send Message (String)
SendFile Use this endpoint to send a message via MESH. Use the POST command to your virtual outbox. Specify the message recipient in the request headers, with the message contained in the request body. Note: If the file is too large the service will chunck this into smaller files Send File (Byte)
RetrieveTrackingStatusById Use this endpoint to inquire about the status of messages sent from your outbox. When determining the frequency of the calling of this endpoint consider that MESH is asynchronous, and it might be some hours until the recipient downloads your message. You must not poll this endpoint frequently. Track By Id
RetrieveMessageIdsFromInbox Use this endpoint to retrieve a message based on the message identifier obtained from the 'Check Inbox' endpoint. Note: Headers should be treated case insensitively, most http clients will do this for you automatically, but please do not rely on explicit case. /messageexchange/{mailbox_id}/, if the file has been chunked the service will stitch back on retrieve. Get Messages
RetrieveMessageById Use this endpoint to retrieve a message based on the message identifier obtained from the 'Check Inbox' endpoint. Note: Headers should be treated case insensitively, most http clients will do this for you automatically, but please do not rely on explicit case. /messageexchange/{mailbox_id}/inbox/{message_id},if the file has been chunked the service will stitch back on retrieve. Get Message By Id
AcknowledgeMessageById Use this endpoint to acknowledge the successful download of a message.This operation: <ul><li>Closes the message transaction on Spine.</li><li>Removes the message from your mailbox inbox, which means that the message_id does not appear in subsequent calls to the 'Check inbox' endpoint and cannot be downloaded again Note: If you fail to acknowledge a message after five days in the inbox this sends a non-delivery report to the sender's inbox.</li></ul> Acknowledge

Local App Settings

To run this package you will need to setup a local app settings file with the following configuration items. Certificates will need to be base64 encoded and the Intermediate can have multiples.

NOTE: The key value will have to be requested from NHS Digital as the version on their website was out of date at time of documenting

{
  "MeshConfiguration": 
  {
    "MailboxId": "",
    "Password": "",
    "Key": "",
    "Url": "",
    "MexClientVersion": "ApiDocs==0.0.1",
    "MexOSName": "Windows",
    "MexOSVersion": "#11",
    "RootCertificate": "",
    "IntermediateCertificates": [""],
    "ClientCertificate": "",
    "ClientCertificatePassword": "",
    "MaxChunkSizeInMegabytes": ""
  }
}

How to Contribute

If you want to contribute to this project please before hand review the following documents to gain an understanding of the patterns and practices used in building this package:

If you have a question make sure you open an issue.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0.8 11,365 12/5/2023
1.0.0.5 179 11/21/2023
1.0.0.4 126 11/21/2023
1.0.0.2 127 11/21/2023
1.0.0 1,522 6/15/2023
0.4.0.2 293 5/22/2023
0.4.0 158 5/18/2023
0.3.0 275 4/28/2023
0.2.0 307 4/17/2023
0.1.0 222 4/11/2023

This release contains bug fixes for chunked messages