Christian Ohr - 2015-05-21

As a workaround, you can subclass ca.uhn.hl7v2.conf.check.DefaultValidator and overwrite the checkDataType(String, Type, List<HL7Exception>) method to do something like:

String typeName = type.getName();
if (!(type instanceof Varies || typeName.equals(dataType))) {
    exList.add(new ProfileNotHL7CompliantException("HL7 datatype " + typeName
            + " doesn't match profile datatype " + dataType));
}

Finally, an instance of your implementation must be returned by HapiContext#getConformanceValidator()