This topic contains 4 replies, has 2 voices, and was last updated by  karim.samir 2 years, 3 months ago.

Querying patient data and return the results

  • I recently needed to be able to query for a patient details and return the results back to the sending application.
    The data should be returned in XML format, the sending application is a java file that has a socket connection to the iguana channel. The java file send the id value to the channel, then the channel query the database and create an XML object with patient details.

    My question is, how to return the results back to the sending application – java file?
    Is there any helpful resources for this scenario?

    Best Regards
    Karim

    What protocol is used for the socket connection? Is it proprietary, or based on a standard like HTTP? Has the developer/vendor of the Java application provided any specifications for the method of communication?

    Your tag list seems to indicate the possibility of LLP as the enveloping mechanism, which suggests a message format of HL7 for the query. If HL7 is the message format, which HL7 version are you working with (i.e. 2.x vs. 3.x)?

    There are many articles in the iNTERFACEWARE wiki surrounding the parsing, creation and population of XML documents. Here is a good place to start.

    Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊ http://www.hicgrp.com

    We use a simple protocol between the java application and the socket.

    The request will be like this
    <request>
    <pid>5555</pid>
    </request>

    And the response like:
    <patient_data>
    <firstName> FN </firstName>
    <lastName> LN </lastName>
    <DOB> date_of_birth </DOB>
    <Address> Address </Address>
    </patient_data>

    This is for testing only, on future we will use HL7 v2.8 protocol.

    Regards,

    What you’ve described would adapt to a RESTful web service very easily, but the Java application would need to generate a properly formed HTTP request to a “From HTTP” channel. In the “From HTTP” translator, you would parse the request with net.http.parseRequest{}, perform any actions based on the payload, and use net.http.respond{} to return the XML data to the Java application.

    If the expectation is that Iguana will function as the server/listener for a connection from the Java application using a non-HTTP mechanism, you will effectively need to use a “From LLP” endpoint with the Java application wrapping the request with the LLP envelope characters (those characters are configurable in Iguana). An ACK translator (one of the ACK types selectable in the channel configuration) can then be used to build the response, and that translator would then return the acknowledgement to the source application with ack.send().

    Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊ http://www.hicgrp.com

    Thank you

    I will use the second option “From LLP” i think it meets my needs. also i found this tutorial in the documentation Query Response Example

    Thanks

    Best Regards
    Karim

You must be logged in to reply to this topic.