You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on a Browserify version of schematron-runner (to run validation 100% in a browser). It seems to be running with a few minor issues (line numbers and xml didn't show up). I fixed the xml output to show, but I haven't tried getting the line numbers working. Made some modifications to allow for using a file object in the browser instead of relying on fs.
I'm running into some issues with CCDA validation. I know this project wasn't designed for it, but I'm hoping there may be some easy code changes to add support for it. Here are the problems I'm currently running into (when ran from the command line, NodeJS on OSX):
Everything is showing as "passed", even though there are missing or renamed elements in the XML. If I modify the XML to try and create an error for something schematron showed as "passed", it will just remove it from the "passed" object and it won't be added to errors, warnings, etc. It just dissapears from the output.
Example: The following test checks to see if an element contains a templateId and a root of "2.16.840.1.113883.10.20.22.4.24". CCDA.sch
<sch:rule id="r-urn-oid-2.16.840.1.113883.10.20.22.4.24-errors" context="cda:participantRole[cda:templateId[@root='2.16.840.1.113883.10.20.22.4.24']]">
<sch:extends rule="r-urn-oid-2.16.840.1.113883.10.20.22.4.24-errors-abstract" />
<sch:assert id="a-81-7495" test="count(cda:templateId[@root='2.16.840.1.113883.10.20.22.4.24'])=1">SHALL contain exactly one [1..1] templateId (CONF:81-7495) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.24" (CONF:81-10493).</sch:assert>
</sch:rule>
When schematron-runner is executed on the following xml, it shows in the "passed" object. xdrtest1.xml
Also, there is a test in the SCR that looks like this:
<sch:assert id="a-1198-15974" test="not(cda:subject/cda:relatedSubject/cda:subject) or cda:subject/cda:relatedSubject/cda:subject[count(cda:administrativeGenderCode)=1]">The subject, if present, SHALL contain exactly one [1..1] administrativeGenderCode (CONF:1198-15974).</sch:assert>
When renaming all of the "administrativeGenderCode" elements in the XML to "administrativeGenderCodeBAD", schematron-runner doesn't show them as errors.
I've attached both the SCR and the XML we are testing with. Maybe I am doing something wrong?
Hey Tim,
I've been working on a Browserify version of schematron-runner (to run validation 100% in a browser). It seems to be running with a few minor issues (line numbers and xml didn't show up). I fixed the xml output to show, but I haven't tried getting the line numbers working. Made some modifications to allow for using a file object in the browser instead of relying on fs.
I'm running into some issues with CCDA validation. I know this project wasn't designed for it, but I'm hoping there may be some easy code changes to add support for it. Here are the problems I'm currently running into (when ran from the command line, NodeJS on OSX):
Example: The following test checks to see if an element contains a templateId and a root of "2.16.840.1.113883.10.20.22.4.24".
CCDA.sch
When schematron-runner is executed on the following xml, it shows in the "passed" object.
xdrtest1.xml
Changing it to the following removes it from the "passed" object, but it does not add it to the "errors" object.
Also, there is a test in the SCR that looks like this:
When renaming all of the "administrativeGenderCode" elements in the XML to "administrativeGenderCodeBAD", schematron-runner doesn't show them as errors.
I've attached both the SCR and the XML we are testing with. Maybe I am doing something wrong?
ccda-test.zip
Thanks,
Will
The text was updated successfully, but these errors were encountered: