Monthly Archives: January 2015

Standalone SMS (Spine Mini Services) client written in Cache

Developing NHS SPINE applications without any sand pit access is pretty much impossible.
I recently experienced this when I was asked to find out how the ITK works in Intersystems Ensemble.
However, after some head scratching and googling, I came across something called the TKW.
HSCIC use the Toolkit Workbench (TKW) to accredit suppliers, but more importantly, from a developers point of view, it simulates SPINE.
The code that I’ve attached to this blog is an example Spine Mini Services client written in Cache.
Before runnng the code, you’ll need to make sure that two instances of the TKW are running.
One of the instances needs to simulate the SMS middle ware, the other needs to simulate SPINE.
A copy of the TKW can be downloaded from http://developer.nhs.uk/testcentre/itk-testbench/.

1. Install Java-7 (the TKW is not compatible with Java-8).
2. You’ll need to install a version of the TKW that simulates SPINE, and a version that simulates the Spine Mini Services.
3. Restore the attached code using Cache Studio.
4. Run the following commands at a cmd prompt (the paths need to mirror your TKW installation directories).
java -jar C:\TKW-SMSP\TKW\tkw.jar -simulator C:\TKW-SMSP\TKW\config\SMSP_provider_MODULE\tk11111w_for_MTH.properties
java -jar C:\SpineTKW\TKW\tkw.jar -simulator C:\SpineTKW\TKW\config\SPINE_MTH_20111121\tkw.properties
5. *Launch tcptrace, listen on port 4847, destination port needs to be 4000.
6. In a terminal window D ##class(SMS.Client).Test()

You should then see this menu :-

1 – getPatientDetails_success
2 – verifyNHSNumber_success
3 – getNHSNumber_success
4 – getPatientDetailsBySearch_Simple_Trace_success
5 – getPatientDetailsBySearch_Advanced_Trace_success
6 – getPatientDetailsByNHSNumber_success
7 – verifyNHSNumber_MCCI
8 – verifyNHSNumber_SoapFault

“Exit” to quit

Enter (1-6):

After selecting a PDS interaction, the software will call the TKW and display the response.
Each option populates a PDS request that contains the test pack information that’s shipped with the TKW.

The message specifications for each client request can be downloaded from the TRUD (https://isd.hscic.gov.uk/trud3/user/guest/group/0/home).

*A copy of tcptrace can be downloaded from http://www.pocketsoap.com/tcptrace/.
If you don’t have Intersystems Cache installed, then you can download a copy of TryCache from http://www.intersystems.com/library/software-downloads/.

If you have any questions, please don’t hesitate to get in touch!

Click here to download the code.

Enjoy!

MUMPS/Cache HL7 To XML converter

In my quest to learn HL7 v2, I decided to write an HL7 to XML converter.
This seemed to be a good idea as I know XML.

The code is based on a C# code project article I found on the internet.

The C# code can be found here:
http://www.codeproject.com/Articles/29670/Converting-HL7-to-XML
I’ve attached two versions of the code, a Cache Object Script version, and a MUMPS version.
The MUMPS version was coded in MSM (Micronetics Standard MUMPS).
In order to make the MSM code run in say GTM or MV1, all you’ll need to do is change the way the code reads and writes the documents to the OS.

To run the MUMPS code:

D ^HL7TOXML.

To run the COS code:

D ##class(J2.HL7ToXml.HL7ToXML).Go(“C:\TEMP\Test1.hl7”)

The code I’ve written is not perfect, it was primarily written to provide me with a better understanding of HL7 v2.

Click here to download the code and example HL7 files.

Enjoy!