Skip to content

Commit

Permalink
Configure the new UnitAllowsOneValidator and update CONF:1198-8559
Browse files Browse the repository at this point in the history
-In certain scenarios, specified by the configuration file, configuring
UnitAllowsOneValidator will allow unit to be equal to 1. A relevant
scenario is when there is no other option and the value set is UCUM.
-See Jira Ticket SITE-2975
ETT GG "Reference C-CDA Validation Error for Result": unit=1 leads to
invalid vocab error
-See ETT thread:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/edge-test-tool/SUEm6-EfWQE/NkDPOWTECAAJ
-CONF:1198-8559 was updated to:
--display its rule in the config:
---SHOULD contain zero or one [0..1] value (CONF:1198-8559). a. If
Observation/value is a physical quantity (xsi:type="PQ"), the unit of
measure SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive
(2.16.840.1.113883.1.11.12839) DYNAMIC (CONF:1198-8555)
---Enforce the "If Observation/value is a physical quantity
(xsi:type="PQ"), the unit of measure SHALL be selected from ValueSet
UnitsOfMeasureCaseSensitive (2.16.840.1.113883.1.11.12839) DYNAMIC
(CONF:1198-8555)." portion of the rule which was not enforced prior to
this update
  • Loading branch information
drbgfc committed Mar 11, 2019
1 parent 64c11c9 commit 5427aa0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
31 changes: 22 additions & 9 deletions configuration/ccdaReferenceValidatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@
<!--a. The doseQuantity, if present, SHOULD contain zero or one [0..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1198-8842).-->
<expression xpathExpression="//v3:substanceAdministration/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.52' and @extension='2015-08-01']/ancestor::v3:substanceAdministration[1]/v3:doseQuantity[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand Down Expand Up @@ -1023,7 +1023,7 @@
<!--a. This doseQuantity SHOULD contain zero or one [0..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-7526).-->
<expression xpathExpression="//v3:substanceAdministration/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.16' and @extension='2014-06-09']/ancestor::v3:substanceAdministration[1]/v3:doseQuantity[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand All @@ -1034,7 +1034,7 @@
<!--a. The rateQuantity, if present, SHALL contain exactly one [1..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-7525).-->
<expression xpathExpression="//v3:substanceAdministration/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.16' and @extension='2014-06-09']/ancestor::v3:substanceAdministration[1]/v3:rateQuantity[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand Down Expand Up @@ -1219,7 +1219,7 @@
<!--a. The doseQuantity, if present, SHOULD contain zero or one [0..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-32130).-->
<expression xpathExpression="//v3:substanceAdministration/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.120']/ancestor::v3:substanceAdministration[1]/v3:doseQuantity[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand Down Expand Up @@ -1266,7 +1266,7 @@
<!--a. The doseQuantity, if present, SHOULD contain zero or one [0..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-32133).-->
<expression xpathExpression="//v3:substanceAdministration/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.42']/ancestor::v3:substanceAdministration[1]/v3:doseQuantity[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand All @@ -1277,7 +1277,7 @@
<!--a. The rateQuantity, if present, SHOULD contain zero or one [0..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-32134).-->
<expression xpathExpression="//v3:substanceAdministration/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.42']/ancestor::v3:substanceAdministration[1]/v3:rateQuantity[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand Down Expand Up @@ -1622,7 +1622,7 @@
<!--a. If Observation/value is a physical quantity (xsi:type="PQ"), the unit of measure SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive 2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1198-31484).-->
<expression xpathExpression="//v3:observation/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.2' and @extension='2015-08-01']/ancestor::v3:observation[1]/v3:value[@xsi:type='PQ' and @unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand Down Expand Up @@ -1721,15 +1721,28 @@
<!-- SEVERITY OBSERVATION END -->

<!-- SOCIAL HISTORY OBSERVATION (V3) START -->
<!--8. SHOULD contain zero or one [0..1] value (CONF:1198-8559). a. If Observation/value is a physical quantity (xsi:type="PQ"), the unit of measure SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive (2.16.840.1.113883.1.11.12839) DYNAMIC (CONF:1198-8555).-->
<expression xpathExpression="//v3:observation/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.38']/ancestor::v3:observation[1]/v3:value[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
<allowedValuesetOids>2.16.840.1.113883.1.11.12839</allowedValuesetOids>
</validator>
</expression>
<expression xpathExpression="//v3:observation/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.38' and @extension='2015-08-01']/ancestor::v3:observation[1]/v3:value[@xsi:type='PQ' and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>RequiredNodeValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
<!-- Provide an @attributeName or elementName e.g. enter '@unit' for an attribute or 'v3:observation' for an element -->
<requiredNodeName>@unit</requiredNodeName>
<!-- Provide a unique validation message for the situation. A simple version is generated from the requiredNodeName and the two are merged -->
<validationMessage>If Observation/value is a physical quantity (xsi:type="PQ"), the unit of measure SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive (2.16.840.1.113883.1.11.12839) DYNAMIC (CONF:1198-8555).</validationMessage>
</validator>
</expression>
<!-- SOCIAL HISTORY OBSERVATION (V3) END -->

<!-- SUBSTANCE OR DEVICE ALLERGY - INTOLERANCE OBSERVATION START -->
Expand Down Expand Up @@ -1808,7 +1821,7 @@
<!--a. This value SHALL contain exactly one [1..1] @unit, which SHALL be selected from ValueSet UnitsOfMeasureCaseSensitive urn:oid:2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:1098-31579).-->
<expression xpathExpression="//v3:observation/v3:templateId[@root='2.16.840.1.113883.10.20.22.4.27' and @extension='2014-06-09']/ancestor::v3:observation[1]/v3:value[@unit and not(@nullFlavor) and ancestor::v3:section[not(@nullFlavor)]]">
<validator>
<name>UnitValidator</name>
<name>UnitAllowsOneValidator</name>
<validationResultSeverityLevels>
<codeSeverityLevel>SHALL</codeSeverityLevel>
</validationResultSeverityLevels>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<java.version>1.7</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<code.validator.version>1.0.19</code.validator.version>
<code.validator.version>1.0.20-SNAPSHOT</code.validator.version>
<content.validator.version>1.0.19</content.validator.version>
<!-- MDHT properties -->
<mdht.models.version>3.0.8.20180531</mdht.models.version>
Expand Down

0 comments on commit 5427aa0

Please sign in to comment.