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

Retrieving the Resultant XML Document

The makeNAK() method retrieves the Resultant XML document generated from the Schematron validation. The XML document is embedded in the AcknowledgementDetail section of HL7V3 Acknowledgement XML.

makeNAK() method


if (schematronValidationError) {
log( LOG_LEVEL_INFO, "Schematron validationOutputList.size=" 
+ validationOutputList.size()
);
or (int i = 0; i < validationOutputList.size(); i++) {
// otd_MCCI_IN000004UV01_1.getAcknowledgement(0).
addAcknowledgementDetail();
com.stc.connector.hl7.schematron.ValidationOutput output =
(com.stc.connector.hl7.schematron.ValidationOutput) 
validationOutputList.get( i );
String outputStr = output.getOutputAsString();
otd_MCCI_IN000004UV01_1.getAcknowledgement( 0 ).
getAcknowledgementDetail( i ).getTypeCode().setCode( "E" );
otd_MCCI_IN000004UV01_1.getAcknowledgement( 0 ).
getAcknowledgementDetail( i ).getCode().setCode
( "Validation Failure: Schematron Validation Failed" );
otd_MCCI_IN000004UV01_1.getAcknowledgement( 0 ).
getAcknowledgementDetail( i ).getText().setMediaType( "text/xml" );
otd_MCCI_IN000004UV01_1.getAcknowledgement( 0 ).
getAcknowledgementDetail( i ).getText().setX__PCDATA__MX( outputStr );
log( LOG_LEVEL_INFO, "Schematron Validation Output = " 
+ outputStr );
}
}
Properties of makeNAK