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!