What's New in the Sun TCP/IP HL7 Adapter

Schematron Overview

The Schematron uses the concept of finding tree patterns in the parsed document rather than the grammar. This approach allows representation of numerous structures that are inconvenient and difficult in grammar-based schema languages.

Example:

<?xml version="1.0" encoding="UTF-8"?><Person><Name>Eddie</Name><Gender>Male</Gender><Person>

The above example is an XML document. This xml document can be validated against the below schematron:

<?xml version="1.0" encoding="UTF-8"?><sch:schema xmlns:sch="http://www.ascc.net/xml/schematron"><sch:pattern name="Check structure"><sch:rule context="Person"><sch:assert test="@Title">The element Person must have a Title attribute<sch:assert><sch:assert test="count(*) = 2 and count(Name) = 1 and count(Gender) = 1">he element Person should have the child elements Name and Gender.<sch:assert><sch:assert test="*[1] = Name">The element Name must appear before elementGender.</sch:assert></sch:rule></sch:pattern></sch:schema>

In HL7 adapter, this schematron is useful for validating a HL7 V3 document against predefined schematron schemas. Users can write these schematron schemas. These can be obtained from organizations like NHS, HL7 org. For example, NHS provides few schematrons for CDA documents.