Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

The CDA Validator uses third party utilities (xsltproc and xmllint) to validate the CCDA document. These are included in the library for Windows but may require manual installation if running Iguana on MacOS or Linux.

You can import this library to validate your CCDA files. To get started, import this CDAVALIDATOR library into your component:

require "CDAVALIDATOR.CDAVALIDATORinit"

After that, initialize the validation object outside the main function:

local CV = CDAVALIDATORinit{
   CCDAversion = "R2_1",
   reload = false -- optionally set to true to refresh the CDA resources
}   

This loads the specified CCDA version's resources into a CCDA folder that is automatically created in the working directory. These resources will be used by the library to validate the CCDA. Currently the library supports validating versions R1.1, R2, and R2.1. If a different version is desired, the reload parameter should be set to true to initiate the resource reload process.

Once the CDAVALIDATOR object has been created, the target CCDA can be validated by calling these functions:

  1. validateCCDA - validates the CCDA at a given filepath and writes the results to two files in the CCDA directory: cda_err.svrl and xsd_err

  2. parseValidationResults - parses the generated validation files and returns true if the file passed validation

  • No labels