Validate a CDA2 document
validate_cdaValidate HL7 CDA R2 FSE 2.0 documents locally and return XSD or schematron issues with locations, helping diagnose rejection causes before submission.
Instructions
Checks an HL7 CDA R2 document for the FSE 2.0 gateway locally, without sending it anywhere, and returns XSD issues with their line and, when the XSD passes, schematron issues with their rule id and location. Documents with a DOCTYPE, entity declarations or XInclude are refused. Needs the optional @massimiliano-dev/fse-validator package and an it-fse-catalogs checkout; schematron also needs the optional saxon-js package (proprietary Saxonica licence) and a compiled schematron for the document type. The checks field says which levels ran. Use only synthetic or anonymised documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The CDA2 document as an XML string, at most 2097152 bytes (UTF-8). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | null when no validation level ran: validity is unknown. | |
| checks | Yes | Which levels ran. A level that did not run reports no issues, which says nothing about it. | |
| detail | No | ||
| issues | Yes | ||
| notice | Yes | ||
| status | Yes | ||
| validator | Yes | ||
| schematron | No | ||
| rootElement | No | ||
| documentType | No |