Traditionally, Spine integration meant dealing with both synchronous and asynchronous invocation patterns, with asynchronous necessitating the development of a message handling system (MHS) and having the adding complexity of using ebXML. To learn the implementation requirements, developers had to access the External Interface Specification (EIS) and then the Message Implementation Manual (MiM). This presents a considerable learning curve, when in many cases the use cases only necessitated accessing a subset of NHS demographics data e.g. the NHS number.
ITK Spine Mini Services use synchronous Simple Object Access Protocol (SOAP) Interoperability Toolkit (ITK) web service calls, constrained to 5 specific operations:
Step 1 – functional requirements
The ITK Spine Mini Service functional specifications are available in the requirements pack and the first three that should be read are:
The ‘PDS – Spine Mini Services Provider Requirements-v1.0.pdf‘ document contains the details of the information model shown above. It also explains the provider requirements, the request message descriptions, plus behaviours of wildcards and data type format. Note: NHS Digital have implemented the Spine Mini Service as a central solution.
The ‘PDS – Spine Mini Services Client Requirements-v1.0.pdf‘, a document which the Client developer will need to read to ensure the application meets the requirements within.
The ‘SMSP Response Code – v1.0.xls’ spreadsheet, which as the name suggests contains the general service message response codes and PDS specific ones. An example being a successful query would contain an SMSP-0000 Success code< value codeSystem=”2.16.840.1.1138126.96.36.199.188.8.131.525″ code=”SMSP-0000″/>
The ‘PDS Mini Services Domain Message specification’ is also in the requirements pack.
The message specification contains all the details of the SOAP message requests and responses. It also includes the wsdl file (PDSMiniServices-v1-0.wsdl under \schema\wsdl), and some specific message examples under the ‘Payload’ column. It should be noted that the wsdl file has not been created for importing into frameworks capable of automatically building proxy classes.
ITK SOAP Messages contain a number of layers, as shown in the diagram below.
The ‘Payload’ detailed within the message specification refers to the Payload shown within the diagram above, which is a child element within the distribution envelope.
So what does the diagram actually look like in XML? The extract below (click to zoom) shows the SOAP Envelope, the SOAP Head, SOAP Body, and within the body (under the itk namespace) the ITK Distribution Envelope. The distribution envelope is used within all ITK SOAP Web Service calls, containing a header with the audit identity (the accredited system identifier provided during the endpoint registration process, linked to the calling organisations’ ODS code).
Firstly we convert the NHS Digital provided PKCS#12 file (for a specific environment) into a PEM, for use with curl: openssl pkcs12 -in pkcs_filename.p12 -out pem_filename.pem -nodes -clcerts
Using this file getNHSNumber.xml which contains a test patient example from the opentest environment, execute the following curl command, substituting the certificate name and message endpoint (Opentest url shown in example). Note: the patient search details may need to be altered depending on the environment being accessed.
The ITK Spine Mini Service uses TLS MA (mutual authentication) to secure the connection between the client and central provider. When an endpoint is registered to the Path To Live Integration environment you will be provided with a PKCS#12 file containing the endpoint certificate, sub CA, and CA certs. This certificate is used to create the mutually authenticate connection with the service endpoint.
The NHS Digital Spine Mini Service Provider (SMSP) lets health and social care providers access important information held on Spine. It aims to reduce the complexities around integration with the Spine.