FHIR Chat · Period datatypes · implementers

Stream: implementers

Topic: Period datatypes


view this post on Zulip Danielle Friend (Apr 25 2019 at 21:50):

Quick question for the group - Would the following period be considered valid? (start < end)
start = 20190425T164700Z
end = 20190425

view this post on Zulip Grahame Grieve (Apr 25 2019 at 21:58):

I think it is valid according the spec. I wouldn't be surprised if the validator doesn't - I don't think I tests this case

view this post on Zulip Drew Torres (Apr 25 2019 at 21:59):

The spec has this note: + Rule: If present, start SHALL have a lower value than end

view this post on Zulip Drew Torres (Apr 25 2019 at 22:00):

http://hl7.org/fhir/R4/datatypes.html#period

view this post on Zulip Drew Torres (Apr 25 2019 at 22:00):

I guess it depends on how the system treats the the partial date.

view this post on Zulip Grahame Grieve (Apr 25 2019 at 22:01):

right. that's why it's a question, because this sentence clarifies the intent:

The end value includes any matching date/time. For example, the period 2011-05-23 to 2011-05-27 includes all the times from the start of the 23rd May through to the end of the 27th of May.

view this post on Zulip Grahame Grieve (Apr 25 2019 at 22:03):

the tricky bit is that the interpretation of the boundaries depends on whether you are start or end. Note that this is different to CDA (for discussion of the tricky issues there, see http://www.healthintersections.com.au/?p=707). This question demonstrates that we managed to move the deck chairs around, but it's still a problem...

view this post on Zulip Drew Torres (Apr 25 2019 at 22:04):

I guess I was trying to think of an edge case where the date conversion flips the partial date to something that is before the start.

view this post on Zulip Drew Torres (Apr 25 2019 at 22:04):

Yep I concur that is the interesting part.

view this post on Zulip Grahame Grieve (Apr 25 2019 at 22:23):

yup, the validator fails that one.

view this post on Zulip Danielle Friend (Apr 25 2019 at 22:47):

Hmm.. So would it be right to say if its the period.end you assume the upper end of the date (2019-04-25 = 2019-04-25 @ 11:59:00 pm) and if it is the period.start you assume the lower end of the date (2019-04-25 = 2019-04-25 @ 12:00:00 am)

view this post on Zulip Grahame Grieve (Apr 25 2019 at 23:06):

yes

view this post on Zulip Michele Mottini (Apr 26 2019 at 02:58):

That's what we do when importing FHIR data into our system (for an encounter for example)


Last updated: Apr 12 2022 at 19:14 UTC