How To Find Patient Who's Period End Before Today Careplan


I want to find any patient who is in ACTIVE enrollment status and who has period end date before TODAY, anyone has any suggestion? Thanks!

I tried below url, but not working


I am using FHIR Release 3

The _include and the date parameters look fine. There’s no standard search parameter on Patient called “enrollmentStatus” (and in fact, there’s no standard element on Patient for that concept either). If you’ve defined an extension and a custom search parameter with that name and if the server supports it and the server supports chaining from CarePlan through subject to that parameter, then the search you specified looks like it ought to work. (So if those caveats are met, you’ll need to follow up with the maintainer of the server you’re using.)

Hi Lloyd,

Thank you for your reply! Sorry about the confusion, please ignore that patient enrollmentStatus. My question is how do I find all patients who careplan end date is in the past from a particular date?

For example, below is a query from a test server, I add date parameter and want to find any careplan end date before 2010-05-10:

From response, I can see some records like this, end date is not correct.

“period”: {
“start”: “2008-01-22”,
“end”: “2011-04-08”

Thank you!


eb (ends before) will match all those where the CarePlan period has an end date that is prior to the specified date.

Hi Lloyd,

Thank you for your reply! I add date=eb but get below error on both test server and our server (based on, date=eb seems not working. Do you have any suggestions?

For example: test server

“resourceType”: “OperationOutcome”,
“issue”: [
“severity”: “error”,
“code”: “processing”,
“diagnostics”: “Unknown comparator: ENDS_BEFORE”

Thank you!

It’s possible your server doesn’t support eb - at least for that parameter. (The good news is that they at least seem to recognize what ‘eb’ means.) You’ll need to follow up with whoever created the server.

Hi Lloyd,

Thank you very much!