Archives
- ► 2013 (8)
- ► 2012 (35)
- ► 2011 (157)
- ► 2010 (174)
- ► 2009 (12)
Which topics would you like us to cover more?
Latest comments
-
Save attachments from Oulook t...
Great information
By Dennis -
Social engineering from India
Hm. I am in the U.S but never heard of scams origi...
By Indian -
Social engineering from India
Hi! Ok, so some nuance is in order, I guess. The g...
By Bas -
Social engineering from India
Hi, Interesting.. I am from India and in IT domain...
By Indian -
How to reset you Kindle 3, eve...
Hi Mai, Did you try to connect the kindle to a PC?...
By Bas -
How to reset you Kindle 3, eve...
Hey, guys. I know this topic is a bit old already ...
By Mai -
How to reset you Kindle 3, eve...
Hi Desiree, The back cover comes off. There are mu...
By Bas -
How to reset you Kindle 3, eve...
How to I take the back off? I really need my kindl...
By desiree
| HL7 version 2.3 problem with too many Patient ID's |
| Written by Division by Zero |
| Friday, 23 April 2010 10:00 |
|
Last week we had to implement HL7 version 2.3 for a client. While testing the implementation we got a strange error: NHapi.Base.HL7Exception: Can't get repetition 2 from field After looking at the original HL7 message we found that the message contained three different alternate patient id's. According to nHapi the HL7 version 2.3 standard only allows a maximum of two id's. Our client wasn't complaint to the standard or the interpretation of nHapi is wrong. The latter was the case according to our client, but I think that the first case is true. Anyhow, this problem needed to be solved. Because the error was given by the PipeParser of nHapi we had just two options. Parse the message ourselves en correct the amount of id's or alter the behavior of nHapi. The first one is hard to do and probably will give a lot of maintenance issues in the future. Although this is hard to predict, custom code will have bugs and parsing text messages isn't easy to do if there is such a comprehensive standard for the messages. The second one proved to be a lot easier, but the downside of this solution is that we need to keep track of the changes we make in standard technology. If a new version of nHapi is available, we will need to make these changes again (and hope that the changes are as easy as the first time). The change that we made on nHapi was in the Hl7Models solution, which can be downloaded here. By opening the NHapi.Model.V23 project and locating the PID class in the Segment directory we had the right segment to change. From there the change was easy. In the constructor the whole message definition is given in arrays. We just needed to change the third line (field 4 in the PID segment of the HL7 message). Originally this was: This line means the type of the segment, if it's required, amount of maximum repetitions, maximum field length, etc. By changing the maximum amount of repetitions to 2 the problem was solved. According to our client it is possible that more than three alternate id's are send in a message. To be sure we increased the number to 10. Problem solved. Tags:
|
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams













Comments
RSS feed for comments to this post