Stream: FQL
Topic: Interesting FQL queries
Ward Weistra (Mar 09 2022 at 13:18):
This is a nice example query, demonstrating how to use FQL for quality control:
from
StructureDefinition
group by
publisher
select
publisher,
count: group.count()
order by
count desc
The example queries here for the core STU3 and core R4 specifications, for example, show that there's a substantial number of resources that still have the template Health Level Seven, Inc. - [WG Name] WG
as their publisher.
Ward Weistra (Mar 17 2022 at 16:51):
Here's how to get a count for all StructureDefinitions by type from the core package: https://simplifier.net/fql/share?session=5Gy-Lz__0ieE92obxkGgT4wwfn4EjX8jme9HIPawBpnh9iuIGxdw63nrUuhmOob_RT7RUhEyaHVqg5JPAUGsHw1K3lEmdQod7e5n2JgnKz0uFE7M3IXs5X3TQiTT3TjYH7IY4o6QTZ-FhwO3RgkTMNtVQCvoruEAQE5-yxHWkyf96PkYn6IQRPqSjw20Mkehh5fZYEnrVUFHNWp5b5_JxYmm8Ff26lrUHCMwdUsyuVc
Ward Weistra (Mar 21 2022 at 10:40):
A query to check how common different base URLs are for CodeSystems in the core spec:
from
CodeSystem
select
baseurl: url.split('/').skip(1).first()
group by
baseurl
select
baseurl,
count: group.count()
order by
count desc
Note that FQL has a pipeline structure, so you can use multiple selects after each other.
Last updated: Apr 12 2022 at 19:14 UTC