Solved

HL7 Special protocols

Posted on 2004-10-20
12
747 Views
Last Modified: 2008-02-01
Hi
I am implementing an HL7 v2.x compliant messaging server.
I would like to know the order for applying fragmentation protocol (where it apllies) and the sequence number protocol. I mean, which one of them get's applied first.
Thank you
valipotor
0
Comment
Question by:valipotor
  • 7
  • 5
12 Comments
 
LVL 8

Expert Comment

by:sigmacon
ID: 12366476
If I understand your question correctly, you are asking about how the protocol REQUIREMENTS of HL7 are applied. If that is your question, than the answer is that under the most common circumstances, these fragmantation control and sequence number requirements are already addressed by the underlying data transport layer, which is usually TCP/IP. The HL7 requirements state that in case of message fragmantation, the transport layer SHOULD assure the proper ordering of data packets. The sequence number requirement states that replay attacks SHOULD not be possible. These are all concerns addressed by a particular TCP/IP implementation. So, in that case, you don't have to worry about that at all and can focus on the actual message parsing or message creation. Please also be aware of the fact that HL7 is now at version 3, which is XML based and not X12 anymore - although most HL7 messaging is currently done using 2.4

If this is not an answer to your question, please provide more detailed information about what you would like to know.
0
 
LVL 6

Author Comment

by:valipotor
ID: 12367771

>>The HL7 requirements state that in case of message fragmantation, the transport layer SHOULD assure the proper ordering of >>data packets
Message fragmenentation is independent of the transport layer as i understood. I mean that the message must be fratgmented in smaller pieces in order to be processed sucessfuly by the receiving application.

>>Please also be aware of the fact that HL7 is now at version 3, which is XML based and not X12 anymore - although most HL7 >>messaging is currently done using 2.4

I know that ... but i also know that v3 is not standardized completly right now. Also, what is X12?
I only know that there is a xml based implementation for v2.x HL7 messages.



0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12370756
Fragmentation refers to two interconnected things: A message being hacked to pieces into packets used by the underlying protocol and those packets getting to the receiver in different order. TCP/IP will reassamble the message properly, but because of fragmentation, the entire message might not be available at a given point in time. How you deal with this depends entirely the way you implements this. Your responsibility is to make sure that you have and entire message before you start parsing and processing it. This is the only part where I see the fragmentation protocol requirement touching something you will be responsible for.

> message must be fratgmented in smaller pieces in order to be processed sucessfuly by the receiving application.

Are you referring to the PARSING of the message with this statement? I really hope we're on the same page here and not talking about two completely different things ;-)
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12370767
BTW: X12 is an industry messaging standard on which HL7 is based.
0
 
LVL 6

Author Comment

by:valipotor
ID: 12370849
yes, i am reffering to parsing the message
as i understood, fragmentation occurs when the message is to big to be sent in one piece
the fragments must be rejoined on the destination and then the message must be parsed
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12371075
Yes, that would be correct. I have not come accross a single instance where the sender would sent an incomplete message, but if you want to account for the fact, the sequence number mechanism will help re-assamble the message parts. In that scenario, defragmantation and sequence number ordering need to be happen simultaneously, since you can't defragment without ordering properly.

What size of message are you talking about? Even a batch transaction with lots of embedded messages that's several MB large will usually be send in one piece, even if it is as a file and not directly as a network endpoint-to-endpoint communication.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 6

Author Comment

by:valipotor
ID: 12379018
i am talking about site imposed limits on the message length
since i am trying to create a all versions compatible hl7 server, i have to take this into account

>>In that scenario, defragmantation and sequence number ordering need to be happen simultaneously, since you can't >>defragment without ordering properly.

What do you mean by that?
Here is a possible scenario:
Server A is sending a message to server B but it fragments the message, and sends all the fragments to Server B.

The question is:
Is the sequence number protocol applied on the message only or to the fragments too?
So, are all the fragments going to have the same sequence number, or each fragment will have a different sequence number?
The reason i am asking this is because i know for a fact that each fragment has a continuation pointer that allows it to be linked to the following one in the order that was intended. This would make the sequence protocol redundant for fragments.

thanks a lot
valipotor
0
 
LVL 8

Accepted Solution

by:
sigmacon earned 500 total points
ID: 12470398
Sorry for the long delay on this question. I think I got confused with what SEQUENCE number you where referring to, because HL7 deals with two different concepts of a sequence number. There is the Sequence within a segment, which determines the position of a data field within a segment - since this is standardized, you should usually not have to worry about that. Also, this sequence number is implicit - it is not part of the transaction itself, but is used to clearly identify a data field in its definition.

The sequence number protocol is instead - as you correctly identified - a part of the high-level transport protocol. The standard specifies that within a given transaction stream between one client and one server all message fragments have to be numbered sequentially. This is mostly used to maintain transactional consistency - even for messages not linked with each other as part of a continuation. Both client and server use the sequence number protocol to assure that all messages are processed in a given order. There are detailed rules how client and server should react given certain sequence number conditions.

The fragmantation protocol - or better continuation protocol - is not used to put messages in order, but to put segments that span multiple messages back together. So both protocols serve different purposes. You apply the continuation protocol as part of the parsing process to put segment fragments back together. You apply the sequence number protocol as part of the processing of message to validate proper order. Both protocols exist independently of each other. It is reasonable to assume that if the sequence number protocol is used (MSH-13-sequence number is not 0) - then continuation fragments will be numbered in the same order in which they need to be aded.
0
 
LVL 6

Author Comment

by:valipotor
ID: 12471011
   Thank you for your answer.
    So, you are sugessting that the continuation protocol and the sequence number protocol apply simultanious.
    One more question. It seems natural to me that the sequence number protocol will be applied for each client connecting to a server. So the server must concurently process multiple streams of messages with different sequence numbers that can at some point overlap (two different client send different messages with the same sequence number).
    But if one server (let's call it server A) is routing the request of multiple clients to another hl7 server( server B ) ... how should this be implemented? Should i consider the comunication from server A to server B as a single message stream or as multiple message streams?

valipotor
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12476379
First question: Yes and No. If both are used, then one could say simultanious. But they are in fact independent.
Second statement: The sequence number protocol is optional. Other fields in the message header make a particular message stream unique - even if the same sequence numbers as in other message streams are used. It is the 'servers' responsibility to assure proper handling of multiple message streams.
Third question: What do you mean with route? A silent and/or caching proxy will not modify the message at all - although the HL7 specifications don't directly address this. In that case, only one message stream needs to be considered. A proxy, though, is not really a communication end point. So for your particular case, it is probably not of relevance. Any other message handling that involves some form of parsing, processing or coordination should be treated as separate message streams.

What exactly are you trying to accomplish? What answers are you in fact looking for? So far, we discussed very high-level considerations that don't really address any manifestation of a particular implementation.
0
 
LVL 6

Author Comment

by:valipotor
ID: 12482372
 I am trying to implement an HL7 Server that is able to comunicate with all other HL7 implementations. So it has to be very general .... and must support entirely the HL7 specification.
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12482739
Many parts of an actual HL7 transaction can be defined variably by the involved messaging parties - so supporting ALL OTHER HL7 implementations out of the box is going to be very challenging. To get a handle on some of the things discussed here, you may want to prototype something and ask (as new) questions with concrete problems. Good luck.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now