Contents
As before, we’ll begin by creating and configuring the channel that will show how easy it is to get a document out of an XDS.b server.
Implementing our solution
- Download these files:
- From the Dashboard, click Add Channel. The Add Channel dialog appears.
- Select the following components:
- Source = From Translator
- Destination = LLP Client
- Click the Configure Channel button. The Configure New Channel window appears.
- Click the Channel tab and enter the following information:
- Channel Name = XDS.b ITI-43 RDS
- Description = XDS.b ITI-43 transaction sample channel demonstrating Retrieve document set IHE profile
- We are going to leave the other channel component settings as their defaults, so simply click the Add Channel button. The channel is created and several warnings appear. Don’t worry! This is just Iguana reminding us that before we can run the channel, we’ll need to commit at least one milestone. We’ll perform this step shortly.
- In the Destination tab, click the Edit Script hyperlink to launch the Translator.
- In the dialog that appears, select Import project from zip file and enable Import sample data.
- Click the Choose File button and browse to select the project file you’ve just downloaded (XDS_b_ITI_43_RDS_From_Translator.zip).
- Click Import. Iguana loads the project (including code and modules that you’ve also downloaded).
- Commit your first milestone.
Done!
How it Works
Let’s walk through the code to see how it works.
- Starting with the main function we can see that there are only four steps beginning at line 8 where we create the header and body of the SOAP request that is sent to the XDS.b server. In the sample code below we’ve hard-coded the document retrieve parameters (repositoryId and documentId). In a real world scenario these parameters would be passed in from a system retrieving a document.
local HTTPHeaders, PackagedBody = xds_b.ret.simpleapi.make{ repositoryId='1.3.6.1.4.1.21367.2011.2.3.7', documentId='1.42.20130705031122.190'}
- Next, we post the request to the XDS.b server (NIST’s test server for this example) saving the server’s response and status.
FillAttachments(PNR) FillSubmissionSet(PNR) FillDocumentEntries(PNR)
- The third step is to parse the response into format that we can pass later into the into the queue :
local HTTPHeaders, Body = xds_b.pnr.simpleapi.make(PNR)
- Final step is to verify that the response was successful and if so we pass it into the message queue.
local Response, Status = net.http.post{ url=PNR.url, headers=HTTPHeaders, body=Body, live=true}
You’re done! You’ve just completed an XDS.b ITI-43 Retrieve Document Set transaction in four simple steps.
Back to: Introduction