LinuxForHealth / FHIR

The LinuxForHealth FHIR® Server and related projects
https://linuxforhealth.github.io/FHIR
Apache License 2.0
330 stars 157 forks source link

$everything params start/end have inconsistent results depending on ResourceType #3261

Open maschlicht opened 2 years ago

maschlicht commented 2 years ago

Describe the bug When the $everything operation was originally implemented there was discussion on how to best implement the start/end params here: https://github.com/IBM/FHIR/issues/1044#issuecomment-769788097

From the comment: If the resource type doesn't have a searchable date field, then either: A. do not include them in the response (and document that specifying start and end parameters will only yield resources with clinical dates); or B. include ALL such resources in the result (and document that specifying start and end will not reduce the number of resources that are retrieved for resource types with no clinical date)

Environment FHIR 4.10.2

To Reproduce Steps to reproduce the behavior: Ex. query: $everything with the Condition resource, using a date that would yield no results in the repsponse based on the data loaded: /$everything?_type=Condition&start=2030

This returned the same data as /$everything?_type=Condition (i.e. the start parameter does nothing for this query.)

Expected behavior This issue is to address the work of implementing/verifying the start/end parameters function in a consistent manner.

lmsurpre commented 2 years ago

The Condition resource has 3 different date search parameters (onset, abatement, and recorded)...which one do we use? Do we use a combination?

The spec says:

The date range relates to care dates, not record currency dates

We need clarification on the definition of "care date".

@maschlicht do you want to follow up with the HL7 FHIR community at chat.fhir.org ?

lmsurpre commented 2 years ago

we should also get clarification on what the behavior should be if there is no clinical dates present in the target data