FHIR Chat · CQF-Exercise 6 Encounter class · cql

Stream: cql

Topic: CQF-Exercise 6 Encounter class


view this post on Zulip Alex Goel (Jan 14 2022 at 17:36):

Hi, we're trying to figure out how to write a query for Encounter classHistory, status, and statusHistory. We looked at the example for Exercise 6 in the CQF-Exercises https://github.com/cqframework/cqf-exercises/blob/59dd08fee775da6c329c107e5cd590410bec7f2f/input/cql/Exercises06Key.cql and it showed:

define "Inpatient Encounters":
  [Encounter: class ~ "Inpatient Encounter"]

So we thought the same would work for

define "Inpatient Encounter History":
  [Encounter: classHistory ~ "Inpatient Encounter"]

But with the Inpatient Encounter history the CQL Language Server returns "Could not resolve membership operator for terminology target of the retrieve."
For Encounter status and statusHistory we get the same error on both of those queries as for classHistory Screen-Shot-2022-01-14-at-12.35.40.png

Any ideas why we're getting these issues? @Josh Liben

view this post on Zulip Alex Goel (Jan 14 2022 at 18:07):

@Josh Liben got the classHistory to work by doing this, but the status is still unexpected. Do we need to set it as a variable? get_attachment_url.png

view this post on Zulip Alex Goel (Jan 14 2022 at 18:31):

Got the where to work for status too! Realized it's because status is a "code" while class is a "coding"


Last updated: Apr 12 2022 at 19:14 UTC