FHIR Chat · Returning count of found objects · cql

Stream: cql

Topic: Returning count of found objects


view this post on Zulip 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 ?

view this post on Zulip Lloyd McKenzie (Aug 14 2018 at 14:08):

@Bryn Rhodes ?

view this post on Zulip 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.

view this post on Zulip Georg Fette (Aug 14 2018 at 15:55):

okay, thanks


Last updated: Apr 12 2022 at 19:14 UTC