简体   繁体   中英

How to validate HL7 message using Python-HL7 tool?

I am using Python-HL7 tool.

After receiving message from server, I want to validate the message and send back acknowledge message if message received is valid or not.

hl7.ishl7() method only does a cursory check and does not fully validate the message. How can I actually validate the message?

Parsing and Validating are two different things. You mentioned hl7.ishl7() which just parse the HL7 message.

Following is from documentation :

 hl7.ishl7(line) 

Determines whether a line looks like an HL7 message. This method only does a cursory check and does not fully validate the message.

Many HL7 tool kits (in other languages I know) provide feature for validating the message; but apparently, this specific toolkit does not.

Validating the HL7 message may be personal choice as well in addition to specifications. Generally, you should first parse the message (using hl7.ishl7(line) ) and then should implement validation code on your own. This way, you may include the validations specific to your application/need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM