Constraint checking for HL7

By Rick Jelliffe
April 7, 2010

I like Malaika and Pichler's 2009 Enforce basic document structure with XML constraint checking: Evaluate two approaches based on the healthcare environment.

Listings 7 and 8 show sample constraint failures produced from the hardware appliance.

Listing 7. XML schema validation failure

<?xml version="1.0" encoding="UTF-8"?>
  http://dp:2/: cvc-wildcard 2: unrecognized element 

Listing 8. Schematron validation failure

<?xml version="1.0" encoding="UTF-8"?>
  Hemoglobin is not within the reference range, which could 
  imply illness of the patient, that needs to be clarified.

Which kind of message would you prefer?

They also have a neat reference to the Hanna et al paper Customized Document Validation to Support a Flexible XML-based Knowledge Management Framework which adds a rewriting stage to allow non-bizarre messages from XSD validation. It is a good technique, and the separation of concerns is quite nice, but if the only way to make something already as large as XSD actually useful, when humans are involved, is to add even more, why isn't that an indictment of XSD? On the other hand, a more straightforward language like RELAX NG would be an appropriate size for this kind of thing, without collapsing under its own obesity the way that XSD does.

You might also be interested in:

News Topics

Recommended for You

Got a Question?