Stream: cql
Topic: Returning count of found objects
Georg Fette (Aug 14 2018 at 12:59):
Hi, Is it allowed to use the count operator as the most outer operation in an CQL statement, so that "count([Patient])" return the number of all patients in my repository ? Or do the staments have to return actual resources ?
Lloyd McKenzie (Aug 14 2018 at 14:08):
@Bryn Rhodes ?
Bryn Rhodes (Aug 14 2018 at 14:36):
CQL expressions can return any type, Count([Patient])
is a legal CQL expression. Note that the context will affect the outcome there, when run in Patient
context, the result will be at most 1. To get the full Patient count, the expression would need to be in Population context.
Georg Fette (Aug 14 2018 at 15:55):
okay, thanks
Last updated: Apr 12 2022 at 19:14 UTC