Comments (3)
As far as I can see, the behaviour that Brian mention is not a bug, but by design. 140.0 IS more precise than 140 so. A search for 140.0 should exclude a value of 140.5. While a search for 140 should include a value of 140.5. This behaviour is documented and conforms to our unit tests. See https://github.com/furore-fhir/Fhir.Metrics/blob/master/Fhir.Metrics.Tests/TestSearchableQuantity.cs.
The measurement 140 means that the value lies between 139.5 and 140.5. So it is very well possible that the value lies outside of the range of 140.0.
Another way of explaining it: with 140 you will find 140.0. Where as with 140.0 you will not find 140.
Or am I missing your point here Brian?
from spark.
I searched for exactly what was in the value and it didn't get returned. 140.0 was in the db.
from spark.
So, appereantly this could be a bug, but is a bug in the Hl7.FhirLibrary that Spark uses:
The behaviour is like that: Spark uses Hl7.Fhir.Serialization.FhirSerializer that in turn uses Newtonsoft.Json serialization. By default Newtonsoft.Json serializes both decimal value 6 and 6.0 as 6.0.
That means that we lose a part of the precision specified above from Martijn.
The search functionality does not use the value serialized in the above form. This is why the search still behaves correctly :) (although that is not obvious). If you insert a resource with a value of 140, and afterwards you read it back it will have the value 140.0. But the search will still know that the actual value was 140, so it won't be returned if you search for 140.0.
So, this is not a search issue, but a "create"/"storage" issue and is not really a Spark issue, but a Hl7.Fhir issue. I will close this issue and add one in Hl7.Fhir.
from spark.
Related Issues (20)
- FILE UPLOAD ISSUE HOT 8
- Provenance searches return 0 results when using FHIR R4 'patient' parameter HOT 2
- Searching HOT 1
- Snapshot is not working HOT 2
- How to implement extensions HOT 3
- Query the token type through the not modifier. HOT 1
- Invalid implementation of GT,GTE,LT,LTE search parameters HOT 2
- Regarding the storage of query parameter Code<T>. HOT 2
- Prefix codes eq, ne, gt, lt, ge, le are not working in chained search.
- Searching Patient by Identifier using only System returns InternalServerError HOT 1
- Bundle response links are broken if ILocalhost.DefaultBase ends with / HOT 1
- Present decimal values as integer for Json output HOT 2
- Performance degradation in FHIR server for high patient registration volume HOT 1
- Bad Request error on PATCH operation for replace operation
- MongoIdGenerator is unsafe when mixed with upsert
- https://spark.incendi.no/ is down HOT 1
- Search via POST using multiple comparison operators fails
- VersionId parsing from headers in Spark.Web does not support the Weak ETags specified in FHIR API HOT 2
- Transaction entries using ifMatches constraint are ignored resulting in potential data loss
- Unable to find example Database on windows HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark.