Details
-
Change Request
-
Resolution: Not Persuasive
-
Medium
-
FHIR Core (FHIR)
-
R4B
-
Patient Administration
-
Patient
-
Search Parameter Registry
-
8.1.13
-
-
Brian Postlethwaite / Rick Lisseveld : 7-0-0
Description
The description and fhirpath expression for the searchparameter Patient.deceased are:
This patient has been marked as deceased, or has a death date entered | Patient.deceased.exists() and Patient.deceased != false |
This fhirpath expression always return a value, whether or not the 'deceased' element exists.
When querying for "Patient?deceased:missing=true", the query by definition targets the searchparameter named 'deceased' and not the element 'deceased.
Since this searchparameter will always have a value, it is never missing. Even though the element may very well be missing.
It would be more correct if the expression just returned a boolean element if there actually is one in the resource.
Suggestion:
Patient.deceased.where($this.convertsToBoolean()) | Patient.deceased.where($this.convertsToDate()).convertsToDate()
This expression selects:
- the boolean element for a deceasedBoolean if actually has a value (and not just an extension)
- 'true' for a deceasedDateTime if it actually has a date / datetime value (and not just an extension)
When changed this way, users can search separately on:
- deceased: false (by ?deceased=false)
- no deceased element, or having just an extension an no value (by ?deceased:missing=true)
- deceased element with value present (regardless of the value), by ?deceased:missing=false
- for a deceased