Replies: 3 comments
-
I use the following, for now :
|
Beta Was this translation helpful? Give feedback.
-
Hi @adellieux If you tried to deserialize a string representation of the Message that used an invalid HL7 version number, an You can also call Beyond this, ClearHl7 doesn't offer any HL7 validators outside of some basic checks that are done during deserialization. Message validation is a whole other beast to tackle. Maybe in a future version? |
Beta Was this translation helpful? Give feedback.
-
Hi, yes, i get an ArgumentException. thank you so much, @davebronson |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have to implement an ACK message in which errors should be described.
In the case of HL7 errors, i have to fill an ERR / ErrorLocation instance, as well as the Hl7ErrorCode field (CodedWithException instance).
This ACK message is created after receiving another message from an external source.
I tried to generate an error in a sample HL7 message, for instance using a totally inexistent HL7 version.
When i deserialize the sample message, i get an exception, but no ErrorLocation.
After having this exception, how do you detect HL7 errors / collect HL7 error informations, like segment id, sequence, and other ErrorLocation properties ?
Do you have a validator, or something else i could use ?
About the CodedWithException instance (Hl7ErrorCode field in ERR segment), i have to fill the error code (using EnumToCode(CodeMessageErrorConditionCodes) ), and the text of the error.
Do you have the text of the errors using a function ?
For now, i will use a Dictionary or something equivalent with the error code enum and the different texts (taken from the CodeMessageErrorConditionCodes enum comments.
exemple :
ERR||MSH^1^12|203^Unsupported version^messageErrorCondition|E
Thanks for this library, and for your time ;-)
Beta Was this translation helpful? Give feedback.
All reactions