Implementing XDS.b profiles

Document Consumer (ITI-43 & ITI-18)

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

  1. Download these files:
  2. From the Dashboard, click Add Channel. The Add Channel dialog appears.
  3. Select the following components:
    • Source = From Translator
    • Destination = LLP Client
  4. Click the Configure Channel button. The Configure New Channel window appears.
  5. 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
  6. 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.
  7. In the Destination tab, click the Edit Script hyperlink to launch the Translator.
  8. In the dialog that appears, select Import project from zip file and enable Import sample data.
  9. Click the Choose File button and browse to select the project file you’ve just downloaded (XDS_b_ITI_43_RDS_From_Translator.zip).
  10. Click Import. Iguana loads the project (including code and modules that you’ve also downloaded).
  11. Commit your first milestone.

Done!

How it Works

Let’s walk through the code to see how it works.

  1. 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'}
  2. 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)
  3. 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)
  4. 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.