Closed ahenket closed 5 years ago
Duplicate of #447.
Summary: rng-2 is incorrect - it assumes that the <
and >
operators also work on Quantity - this is however not defined for FhirPath. This will get fixed in R4 in combination with the normative edition of FhirPath - which does support ordering of Quantities.
Note: this is actually pretty hard, because you'd expect 500 grams < 1 kg to work.
The only thing we can do for now in DSTU2/3 is remove the rng-2 rule from the Range datatype. Or hack the FhirPath evaluator to always return true on these comparisons.
Maybe a slightly more sophisticated hack is conceivable:
My assumption based on what I've seen so far in practice is that 10 g - 1 kg will occur significantly less than 10 g - 1000 g. This hack means that the majority of cases could be validated, which is useful.
I could do that I think - but you could not expect that to work on all validators (but how many are there right now?)
I mostly use Touchstone, which is based on an Aegis tweaked validator from Grahame. And then there's Simplifier. I don't know that Grahames validator has the same implementation issue that the .Net validator currently has. But leaving the issue in because other validators have the issue too, is not what you were hinting at? :-)
Nah ;-)
We're doing this the right way - I have added Quantity to the FhirPath evaluator - will be integrated in the 1.3 (Sprint 2019.2)
An update on this situation: since the update of the FhirPath engine is taking more time (read: was reprioritized), we need a quick fix for this. So, for STU2+3 we will just remove this (incorrect) invariant and add it back to STU3 when the FhirPath evaluator is updated.
Closing this, but see #1024.
If you load this xml file in Simplifier validation you'll get two issues related to rng-2, where I would not expect any issue:
This concerns the following fragment which in the Schematron validation for rng-2 validates just fine:
mp9-zib-AdministrationAgreement-MBH-413-13-TA-2.txt