Getting Encounter resource out of date range

211 views
Skip to first unread message
Assigned to Fenil....@cerner.com by me

Amit Joshi

unread,
Aug 13, 2021, 12:48:31 AM8/13/21
to Cerner FHIR Developers
Hi Cerner team,

I am trying to get a specific(unique) encounter by hitting the below endpoint


but the date param seems to be not functioning properly as it is returning all the encounter records of date greater than this.
Please help us with this issue.

What we need is a unique encounter by giving certain parameters(currentDate and status) so that we will be able to get Organization id from that record.


Regards,
Amit Joshi

Fenil Desani (Cerner)

unread,
Aug 13, 2021, 11:17:18 AM8/13/21
to Cerner FHIR Developers
Hello,

It seems to be working correctly. Most of these Encounters returned does not have an Encounter.period.start and Encounter.period.end date. Meaning those values are null. So if you provide date=lt2021.., it would be greater than null and bring back all the Encounters which does not have those fields.

Thanks,
Fenil

Amit Joshi

unread,
Aug 15, 2021, 4:28:23 AM8/15/21
to Cerner FHIR Developers
ok, That made it clear. Thanks for the response. So inthis case what can I use to get the latest encounter for a patient?

Thanks and regards,
Amit Joshi

Amit Joshi

unread,
Aug 16, 2021, 12:37:07 AM8/16/21
to Cerner FHIR Developers
Hi Fenil,

I checked the Encounter that are getting returned and all them have period start date but does not have end date.
"period": {
                            "start": "2021-05-10T15:09:46.000Z"
 },
then I made a query with date='gt2021-05-12T00:00:00.000Z' still it didn't work.
For the date param to work should both start and end date be there?
If that is the case. How should be go about retreiving the current encounter because it most probably will always be in progress and won't have end date.
Please help.

Thanks and regards,
Amit Joshi

Amit Joshi

unread,
Aug 16, 2021, 3:26:44 AM8/16/21
to Cerner FHIR Developers
To provide you some context I want to add that we are creating a smartapp which will be launched from cerner sandbox. The app should know current encounter's service provider. The encounter, which ís currently in progress/in review by a practitioner.

Thanks and regards,
Amit joshi

Fenil Desani (Cerner)

unread,
Aug 16, 2021, 10:03:28 AM8/16/21
to Cerner FHIR Developers
When searching Encounters by providing date param, 
if your provide ge/gt, it looks for all Encounters with end date greater then/equal to the provided date,
If you provide le/lt, it looks for all Encounters with start date less then/equal to the provided date.


Amit Joshi

unread,
Aug 16, 2021, 11:36:39 PM8/16/21
to Cerner FHIR Developers

Yes. I got that. Thanks for the response Fenil.

But in the case of in-progress status of an encounter. There is no Encounter.period object getting returned in result. How should we get the current encounter in that case?

Can we use anything else other than date to get the current encounter? Using date param won't work for in-progress encounters as they don't have period object in them.
Please suggest if possible?

Thanks and regards,
Amit Joshi

Fenil Desani (Cerner)

unread,
Aug 23, 2021, 9:39:05 AM8/23/21
to Cerner FHIR Developers
If you have a provider Application, the encounter would be passed in the context.
If you have Patient App/System App, you can look up encounters for a patient .
Reply all
Reply to author
Forward
0 new messages