Clarification on date parameter for Encounter
# support
k
Hi, I was wondering if I could get some clarification on the date parameter for Encounter. Dates are saved as periods. If i were to do date:ge:"1/1/2026 12:00:00AM", does this check with period.start or period.end? Or is it dynamic, where date:ge checks for period.start and date:le checks for period.end. Thank you!
r
The Encounter date search parameter maps to Encounter.period. When Medplum indexes this into the database, it stores only period.start (falling back to period.end if start is absent): This means all comparators (ge, le, gt, lt) operate against the single stored value, which is period.start. So: date=ge2026-01-01 checks if period.start >= 2026-01-01 date=le2026-01-01 checks if period.start <= 2026-01-01 It is not dynamic based on comparator direction. Both ge and le compare against period.start.
32 Views