FHIR R4 decimal implied precision

27 views
Skip to first unread message

Erik Brakke

unread,
Sep 30, 2025, 10:16:15 AMSep 30
to GCP Healthcare Discuss
Hello!


The precision of the decimal value has significance:
  • e.g. 0.010 is regarded as different to 0.01, and the original precision should be preserved
  • Implementations SHALL handle decimal values in ways that preserve and respect the precision of the value as represented for presentation purposes
And

Quantity.value

Element Id

Quantity.value

Definition

The value of the measured amount. The value includes an implicit precision in the presentation of the value.

When creating an Observation resource where the valueQuantity has trailing zeroes, I expected the FHIR store would persist and return the trailing zeroes, but I'm having trouble getting that result.  In this example I create 9.2000 and get 9.2 in return.

decimal_precision.png

The FHIR viewer presents the same result

decimal_precision_viewer.png
Are my expectations misplaced?

Thanks!
-Erik

Erik Brakke

unread,
Sep 30, 2025, 11:52:46 AMSep 30
to GCP Healthcare Discuss
Ah, I didn't think to check the reference implementation, but I see now it aligns with my interpretation of the specs.  Can CHAPI team review please?  Thanks! -Erik

hapi.png


Chaoqun Li

unread,
Sep 30, 2025, 1:04:42 PMSep 30
to Erik Brakke, GCP Healthcare Discuss
Hi Erik,

I did a quick test, the precision keeps well, see attached image.

I think the precision occurs during the display process. If you use the curl command or read from code, that precision is kept.
If you use the postman, you may investigate how to do the settings or contact them for the display.
For our GCP FHIR Viewer, I'll contact with our FE team about it.

Best

Chaoqun
Screenshot From 2025-09-30 12-04-59.png

Brakke, Erik M.

unread,
Sep 30, 2025, 1:04:46 PMSep 30
to Chaoqun Li, GCP Healthcare Discuss
Ah thanks Chaoqun, you're right.  I thought my client wasn't parsing JSON, and I should have double checked.  Thanks for taking the viewer feedback!

I checked PubSub notifications, and they correctly include the implied precision zeroes.

The BigQuery projections do not, and I see the SQL on FHIR spec already calls this out.  It will be interesting to see if the SQL on FHIR v2 implementation will let us map to a STRING if we really care about maintaining the precision.

Thanks again -- 
Erik


From: Chaoqun Li <chao...@google.com>
Sent: Tuesday, September 30, 2025 11:08 AM
To: Brakke, Erik M. <Brakk...@mayo.edu>
Cc: GCP Healthcare Discuss <gcp-healthc...@googlegroups.com>
Subject: [EXTERNAL] Re: FHIR R4 decimal implied precision
 

Joost Pielage

unread,
Sep 30, 2025, 1:24:09 PMSep 30
to Brakke, Erik M., Chaoqun Li, GCP Healthcare Discuss
Not to be rude or anything, but we have found that the GCP fhir viewer is lacking a lot of things. We went as far of building our own viewer that better represents the actual API. Just so you know never trust the viewer, use the API 


Kind regards,

Joost Pielage
0645351694

--
You received this message because you are subscribed to the Google Groups "GCP Healthcare Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gcp-healthcare-di...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gcp-healthcare-discuss/CY1PR01MB9224FA52847BED7FC53B48CA951AA%40CY1PR01MB9224.prod.exchangelabs.com.

Vaughan Hilts

unread,
Sep 30, 2025, 1:26:11 PMSep 30
to Joost Pielage, Brakke, Erik M., Chaoqun Li, GCP Healthcare Discuss
Hi Joost,

Thanks for your feedback. We plan to roll out a number of improvements to the FHIR Viewer this year.

Did you have any core functionality you feel would help a lot?

Vaughan Hilts | Software Developer | vhi...@google.com

Vaughan Hilts

unread,
Sep 30, 2025, 1:48:36 PMSep 30
to Brakke, Erik M., Chaoqun Li, GCP Healthcare Discuss
Hey Brakke! 

I think as you noticed, this is one of the few small changes between the JSON document variant of a FHIR resource and the actual resource that is passed down (when parsed). We're showing the JSON parsed variant on the web UI (and many other tools do the same). I'll investigate whether we can maybe have an option to show both.

Let us know if you have feature requests and/or questions about this. 

--
You received this message because you are subscribed to the Google Groups "GCP Healthcare Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gcp-healthcare-di...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gcp-healthcare-discuss/CY1PR01MB9224FA52847BED7FC53B48CA951AA%40CY1PR01MB9224.prod.exchangelabs.com.


--

Joost Pielage

unread,
Sep 30, 2025, 2:12:00 PMSep 30
to Vaughan Hilts, Brakke, Erik M., Chaoqun Li, GCP Healthcare Discuss
I will ask my team over the years owe have encountered a number of things that don't work. 

Two things for. The top my head:

The telecom search param on patient resources doesn't work. 

I believe _revinclude doesn't work not 100% sure on that one. 

There are some others more complicated search params that dont work. I would need to dig around 

We are on FHIT R4. Happy to have a call if it helps you. 

In our fhir viewer we have also enabled post and put operations. It can be helpful especially in testing context when you submit complicated bundles. Obviously it is a product decision if you want to go that way as it is quite risky on. A production environment. 


Kind regards,

Joost Pielage
0645351694

Brakke, Erik M.

unread,
Sep 30, 2025, 2:31:30 PMSep 30
to Joost Pielage, Vaughan Hilts, Chaoqun Li, GCP Healthcare Discuss
The CHAPI front end team have been very responsive to our feedback.  They implemented a fix for the resource compare tool to flip the differential highlighting within a week or two.

Thanks to the Google team for being open to feedback, and hosting this venue to discuss!

Best --
Erik


From: Joost Pielage <joostp...@gmail.com>
Sent: Tuesday, September 30, 2025 1:10 PM
To: Vaughan Hilts <vhi...@google.com>
Cc: Brakke, Erik M. <Brakk...@mayo.edu>; Chaoqun Li <chao...@google.com>; GCP Healthcare Discuss <gcp-healthc...@googlegroups.com>
Subject: [EXTERNAL] Re: Re: FHIR R4 decimal implied precision
 

Vaughan Hilts

unread,
Sep 30, 2025, 7:15:46 PMSep 30
to Joost Pielage, Brakke, Erik M., Chaoqun Li, GCP Healthcare Discuss
Thanks for the feedback, Joost!

I did try Patient?telecom=xxx-xxx-xxxx (some phone number specifically) and it does work on the "Search" tab for me. I also included Patient?telecom=xxx-xxx-xxxx&_revinclude=Claim:patient and this does return a set of Patient's and Claim's as well. Maybe your team has stumbled upon a configuration that does not work? If so, we would like to know the steps.

You can report feedback right in the Cloud Console (top right corner) or via our support channels. Of course, you can reach us here too. If you run into these cases, please let us know. Our team wants everyone to have a great out of the box FHIR experience.

For FHIR creation, I can't promise anything right now but we're looking into that while still preserving operational safety.

& Erik, thanks for the kind words. A similar offer is extended, please get in touch if something is not working as it should. 

Brakke, Erik M.

unread,
Oct 14, 2025, 2:14:53 PM (7 days ago) Oct 14
to Vaughan Hilts, Joost Pielage, Chaoqun Li, GCP Healthcare Discuss
Thanks for the update! -Erik

From: Vaughan Hilts <vhi...@google.com>
Sent: Tuesday, October 14, 2025 1:10 PM
To: Joost Pielage <joostp...@gmail.com>
Cc: Brakke, Erik M. <Brakk...@mayo.edu>; Chaoqun Li <chao...@google.com>; GCP Healthcare Discuss <gcp-healthc...@googlegroups.com>
Subject: [EXTERNAL] Re: Re: FHIR R4 decimal implied precision
 
We rolled out a number of improvements to the FHIR Viewer, which includes inline resource creation. Thanks for your feedback. 

We're exploring things we can do on the precision front as well, but it's a bit more tricky since it could be a breaking change for some users. 

Vaughan Hilts

unread,
Oct 14, 2025, 2:15:01 PM (7 days ago) Oct 14
to Joost Pielage, Brakke, Erik M., Chaoqun Li, GCP Healthcare Discuss
We rolled out a number of improvements to the FHIR Viewer, which includes inline resource creation. Thanks for your feedback. 

We're exploring things we can do on the precision front as well, but it's a bit more tricky since it could be a breaking change for some users. 

On Tue, Sep 30, 2025 at 7:04 PM Vaughan Hilts <vhi...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages