FHIR Chat · Example of Group for Patients with Condition · shorthand

Stream: shorthand

Topic: Example of Group for Patients with Condition


view this post on Zulip Geoff Low (May 26 2021 at 15:08):

Does anyone have an example of a Group where the inclusion is based on a patient condition - I found an example where CQL was used to gather Patients with the Condition, but I can't quite get the syntax right for adding that sort of statement into FSH

view this post on Zulip Chris Moesel (May 26 2021 at 15:53):

@Geoff Low -- if you can point us to the example you found, we might be able to help you formulate how to do it in FSH.

view this post on Zulip Geoff Low (Jun 01 2021 at 10:21):

This is what I was looking at:
https://chat.fhir.org/#narrow/stream/179166-implementers/topic/CQL.20or.20fhirPath.20for.20Group.20characteristics/near/192620041

view this post on Zulip Chris Moesel (Jun 01 2021 at 13:15):

Thanks, @Geoff Low. I put that example on the right-hand-side of FSH Online and converted it to FSH and ended up with this:

Instance: example-group
InstanceOf: Group
Usage: #example
* type = #person
* actual = false
* characteristic.extension.url = "http://hl7.org/fhir/StructureDefinition/cqf-expression"
* characteristic.extension.valueExpression.language = #text/cql
* characteristic.extension.valueExpression.expression = "exists [Condition: Diabetes]"
* characteristic.exclude = false

You can also create extensions using a slightly different syntax like this:

Alias: CQFEXPRESSION = http://hl7.org/fhir/StructureDefinition/cqf-expression

Instance: example-group
InstanceOf: Group
Usage: #example
* type = #person
* actual = false
* characteristic.extension[CQFEXPRESSION].valueExpression.language = #text/cql
* characteristic.extension[CQFEXPRESSION].valueExpression.expression = "exists [Condition: Diabetes]"
* characteristic.exclude = false

Last updated: Apr 12 2022 at 19:14 UTC