FHIR Chat · Search Parameter for data type time · implementers

Stream: implementers

Topic: Search Parameter for data type time


view this post on Zulip Michael Calderero (Aug 16 2019 at 05:52):

Hello All,
This might be a dumb question but:
1. Can a custom search parameter on a property of data type time be created?
2. If yes, what's the search parameter type to use (e.g. date, number, quantity)?
e.g. I have a bunch of HealthcareService records with HealthcareService.availableTime.availableStartTime populated. Now I want to search for healthcare services that are available starting from 9am

view this post on Zulip Michael Calderero (Aug 16 2019 at 06:02):

My first thought how to tackle this is: since the spec says that the data type time can be converted to a Duration since midnight (i.e. http://hl7.org/fhir/R4/datatypes.html#time), we use a quantity-based search param and then do something like this:

[baseurl]/HealthcareService?availableStartTime=ge9||h

but when I want to search for services that start from 8:30am, I can't do something like 8h30min. I would have to convert all that to minutes and then do this search:

`[baseurl]/HealthcareService?availableStartTime=ge510||min

?

view this post on Zulip Grahame Grieve (Aug 16 2019 at 07:48):

I don't think we've tackled searching by length

view this post on Zulip Michael Calderero (Aug 19 2019 at 05:44):

Is this something we handle right now thought there is scant documentation? Or is this something that is being planned for a future release of FHIR?

view this post on Zulip Grahame Grieve (Aug 19 2019 at 09:43):

It's not in R4, so it would be something we would take up in R5 if there's consensus that it would be useful. In the meantime, you can make up your own thing...

view this post on Zulip Grahame Grieve (Aug 19 2019 at 09:44):

I guess it would be something like

period:length=ge:5hr


Last updated: Apr 12 2022 at 19:14 UTC