FHIR Chat · Search for "New" ServiceRequests · implementers

Stream: implementers

Topic: Search for "New" ServiceRequests


view this post on Zulip Tim Berezny (Mar 07 2018 at 16:43):

I'm looking at building a method to "poll" a server for newly arrive ServiceRequests. (e.g., requests that arrived at the server in the last hour)

I see a mechanism to search for _lastUpdated through the common parameters, but this isn't quite right if i specifically want NEW referrals, and not old referrals that have been recently updated.

I also see ServiceRequest.authoredon is searchable, but in the description it says "when the request was signed", rather than created. I presume that broadly this means that the creation date could be different than the signed date?

I think i could use AuthoredOn if i say that the authoredOn date can't be BEFORE the date/time that it was submitted to the eReferral server. Is this ok as an approach? Am i missing another approach for finding new resources?

view this post on Zulip Eric Haas (Mar 07 2018 at 17:37):

We explored this in Scheduling. Your options are polling, using _history or fhir sub/pub.

view this post on Zulip Lloyd McKenzie (Mar 07 2018 at 18:17):

Note that service requests aren't presumed to be actionable just because the exist - they need a tag or to be the focus of a Task before you know that someone's being asked to action them. (Things can be posted as a FYI, not just because they want you to do them.) If you use Task, then you can filter on the status of the Task. If you just use a tag, then authoredOn is your best bet. It's really about when the Request was transitioned to Active - presumably you don't care about draft requests that aren't yet complete/authorized.

view this post on Zulip Tim Berezny (Mar 07 2018 at 18:37):

@Lloyd McKenzie Ah, so using the task to indicate what I'm polling against, I didn't think of that. That could indeed do the trick.

@Eric Haas Nor did I think of _history, do you mean look for the FIRST instance in a history of a resource?

view this post on Zulip Eric Haas (Mar 07 2018 at 20:00):

See the documentation here: http://build.fhir.org/http.html#history


Last updated: Apr 12 2022 at 19:14 UTC