crs4 / hl7apy

Python library to parse, create and handle HL7 v2 messages.
http://crs4.github.io/hl7apy/
MIT License
224 stars 88 forks source link

Enhanced .validate() #121

Closed massimiliano-della-rovere closed 2 months ago

massimiliano-della-rovere commented 3 months ago

While using hl7api, we had 2 different needs:

  1. the report_file parameter of .validate() need to support also file-like object (io.StringIO/io.BytesIO in our case) that are not necessarily filesystem files.
  2. Cases where we needed a full report of warnings and errors returned by the function, instead of raising just the 1st error.

So we modified .validate() adding the above mentioned backward-compatible error-handling and -reporting enhancements.

Co-authored-by: Massimiliano della Rovere massimiliano.dellarovere@dedalus.com Co-authored-by: Jorge García Roca jgarciaroca@dedalus.com