Obs Tree endpoint should return value datetime and obs datetime in standard ISO format

Description

Currently, the Obs Tree endpoint, when returning obs of type datetime, it returns the a date without a time zone component, which means that the client needs to intepret/guess what time zone the datetime is in.

Although thereā€™s precedent in the past for the server returning a datetime without a time zone to mean just use the client time zone, this likely is not scalable.

We should change the Obs Tree resource so that it returns the timezone component. Concretely, for consistency, the Obs Tree resource should return a value datetime in the exact same format as the Obs component.

Reference to discuss here:

The two lines that translate the obs value datetime and obs datetime to a string in the Obs Tree resource:

What the Obs resource uses:

Thoughts ?

(FYI, not something that PIH actively needs or is planning on working on in the near term, but seems worth doing based on the feedback in PR above)

Activity

Show:

Mark Goodrich March 25, 2025 at 8:05 PM

Ping ^^

Mark Goodrich March 21, 2025 at 4:37 PM

this has been mergedā€¦ do I need to release and/or update the version of the REST Web Services module that the the Ref App uses before can test?

Mark Goodrich March 19, 2025 at 5:50 PM
Edited

Finally implemented here:

This PR contains the fix for both this ticket and

Note that I handled them separately, i did not adapt the ObsTree resource to use the ObsResource to format the obs value because there are other differences between the two (the ObsTree just returns a localized display value for coded answers, etc) and I didnā€™t want to go down that rabbit hole right now.

Ready for review fyi

Mark Goodrich March 11, 2025 at 2:01 PM

Sounds good I will work on thisā€¦ as Iā€™m digging into it this this will likely take a little more refactoring that I thought so that we can properly share formatting across Obs and ObsTree, but I have this scheduled now for our next sprint.

Mike Seaton March 11, 2025 at 1:12 PM

Iā€™m good with this - it makes a lot of sense to me.

Details

Assignee

Reporter

Fix versions

Priority

Created March 5, 2025 at 2:59 PM
Updated March 25, 2025 at 8:05 PM