FHIR Chat · observationLinkPeriod - round values? · questionnaire

Stream: questionnaire

Topic: observationLinkPeriod - round values?


view this post on Zulip Paul Lynch (Mar 12 2019 at 22:41):

Observations pulled into a Questionnaire via the observationLinkPeriod extension sometimes have lots of decimal places, like "45.61659612711745 kg" for a weight. Would it be appropriate for a form renderer to round that value to a more reasonable precision (e.g. 45.6) or should the form renderer just present to the user what it found from the FHIR server?

view this post on Zulip Grahame Grieve (Mar 14 2019 at 09:36):

why did it find that? sounds like an error to me

view this post on Zulip Georg Zweyer (Mar 14 2019 at 09:59):

I think this weight observation was generated by one of the example data generators. At least that is were i saw such values. Even though this weight might not be a real world example, other values might have such a precision.

view this post on Zulip Grahame Grieve (Mar 14 2019 at 10:45):

well, they should not. But if they do, in the real world, why would it be safe to cut them off?

view this post on Zulip Paul Lynch (Mar 14 2019 at 14:11):

That particular value came from http://launch.smarthealthit.org/v/r3/fhir/Observation?code=http%3A%2F%2Floinc.org%7C29463-7&_sort=-date&_count=1&_lastUpdated=gt2018-03-14T08%3A06%3A06.704Z&patient=eb3271e1-ae1b-4644-9332-41e32c829486 . But, all of the height and weight values I have seen from that server look like that-- way too many decimal places. I think @Georg Zweyer is right that this is probably generated data, so perhaps this is not a real world problem and I don't need to worry about rounding. (I doesn't look so nice in a demo, though, which is its own kind of real world problem.)

view this post on Zulip Brian Postlethwaite (Jul 17 2021 at 03:53):

Don't we have an extension for precision somewhere - that could "inform" that mapping/UI.

view this post on Zulip Lloyd McKenzie (Jul 17 2021 at 14:26):

Precision is supposed to be represented in the value itself. If you started with 100.5 lb, then you should end up with 45.62 kg, maintaining the significant digits of the original measurement

view this post on Zulip Paul Lynch (Jul 26 2021 at 17:15):

Lloyd McKenzie said:

Precision is supposed to be represented in the value itself. If you started with 100.5 lb, then you should end up with 45.62 kg, maintaining the significant digits of the original measurement

Although I agree with the sentiment that the final value should have the same number of significant digits, unless you can get your users to enter their values in scientific notation (e.g. 1.00 * 10^2), you don't always know what precision is is meant (for example, if they enter "100").

view this post on Zulip Lloyd McKenzie (Jul 26 2021 at 17:21):

If you have a system that captures precision and wants to retain that precision information on transmition, then it needs to transmit "1.00E2".


Last updated: Apr 12 2022 at 19:14 UTC