There are many applications for working with HL7 V2 messages, but the tools for working with XML in IRIS Management Portal and Cache Studio are limited. While plenty of external utilities and IDEs work with XML messages and even C-CDA documents, there is a compelling case for being able to test directly against the IRIS C-CDA framework.
Testing within the IRIS environment provides the necessary context:
- XML parser configuration
- XML namespace context
- Facility and OID setup
- IHE header handling
- The HS.IHE.Util, HS.Util.XSLTTransformer, and %XML.XSLT.Transformer packages
- Leveraging the XSL codebase in /csp/xslt
The CCD DevTools package provides an API that exposes basic XSL and XPath capabilities from within IRIS. A simple UI facilitates common C-CDA developer tasks such as XPath evaluation and modification of the source document for iterative testing cycles. Execution occurs within IRIS in order to leverage the environment, while the UI allows visibility, repeatability, and the ability to isolate modifications and modules for testing.
Getting Started:
- The CCD DevTools solution is available on the Open Exchange: CCD DevTools
- Once installed, the UI runs in a Docker container. Follow the instructions in the README to build and start docker.
- Open the UI at: http://localhost:4000
- Sample CCDs are included in the testing folder: iris-ccd-devtools/testing/sample_data
Home Page:
XPath Evaluator
- A set of pre-configured XPaths provides the expected format for CCD XPaths in IRIS.
- Additional XPath values can be pasted and edited
- A source document can be loaded from a local file or pasted into the window
- Manual modifications can be made to the source document for re-testing.
The “Viewer” button toggles between a pretty-print, collapsible view of the document and the raw text view. The text view is editable.
CCDA to SDA Transforms
This window allows the user to select one of the standard IRIS base XSL transforms and apply it to the input document. The output contains the SDA output.
Modifications can be made to the input document and re-submitted to evaluate how changes affect the output.
The Viewer button can be used on Input and Output for better visibility.
XSL Template Tester
Building C-CDA to SDA transform typically involves writing modular XSL templates that act on a specific XPath or section of the source document. The purpose of the XSL Template tester is to allow the developer to type or paste the contents of a template into the test window and apply it to a source document.
The template is evaluated along with the identity template so that only the targeted location will be modified.
With improved visibility into the input and output documents and the ability to make small modifications and retest, the CCD DevTools UI aims to speed up the build/unit test cycle for CCD transformations as well as lower the learning curve for developers to pick up domain knowledge and familiarity with working with C-CDA and SDA formats in IRIS.
Have you worked with CCDs? What tools have you used? What future modifications or additions might make this tool more effective for your use cases?
We’d love to hear any feedback!
Great app! Why not to add IPM package deployment?
Thanks Evgeny --
We tried to go down that route. We couldn't deploy the front-end as a CSP application. Worthwhile to just package the REST API for deployment? I suppose so -- because just the APIs are useful for testing via Postman or other tool
It is possible to deploy frontend/fullstack apps via IPM. Take a look e.g. this or this one.
There is also a helper package for js-based frontend by @Timothy Leavitt, which suggests yet another approach.
isc.ipm.js supports Angular and React currently; we'd welcome a PR or issue for Next.js. Probably not too much work needed to support it, it's just a matter of determining the build and static files layout.
Actually I just went ahead and filed the issue so this doesn't get lost:
https://github.com/intersystems/isc-ipm-js/issues/18
Thank you, @Timothy Leavitt
Hi Chi Nguyen-Rettig,
Your video is already on InterSystems Developers YouTube:
⏯️IRIS CCD DevTools Application
https://www.youtube.com/embed/IsUzECekrnU?si=nGQeOrKx32el51n5
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]