Fix a typo in the quantity tests#243
Conversation
|
I want to add that different FHIRPath engines implement this differently: This is surprising to me since the spec states very clearly: |
brynrhodes
left a comment
There was a problem hiding this comment.
Note sure on this one, since the equivalent for decimals says precision is ignored, but if you perform the conversion as specified in Quantity, the conversion to mg would be performed first, resulting in a comparison of 4000 to 4040, so shouldn't this be not equivalent?
|
Bryn and I discussed this one and we think the spec is not clear. In the quantity equivalence section, there's this sentence: So that is to indicate the quantities in question should be converted to Then, how is equivalence actually determined? There is no mention in the spec, it should say that the the numeric parts of the quantities should be equivalent following the decimal equivalence definition - which includes this sentence: Now there is a question whether the precision is preserved after converting 4g to 4000mg. So although the value here is 4000mg, since the precision is only the first significant digit (actually i don't know if this is valid since it's not expressed in scientific notation, but let's assume this is expressed in scientific notation.) comparing it with But if this is true, this sentence: Moreover, Bryn raised his concern that this is actually stepping on the toes of UCUM. |
|
Is there a jira task for the committee to clarify this? |
|
Yes there are several open issues for it. |
My guess is that intention of the first 4 test cases for quantity is to test
=,~,!=, and!~operators in order. So I correctedtestQuantity4to test!~instead of using~.