FHIR Chat · Troubleshoot valueset · cql

Stream: cql

Topic: Troubleshoot valueset


view this post on Zulip Aslan Brooke (Oct 30 2018 at 01:40):

I'm trying to get a valueset to work in CQL. How can I troubleshoot, is there someway to see what valueset codes are available through a CQL statement? @Bryn Rhodes

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 01:42):

You can issue an $expand against that valueset on the server.

view this post on Zulip Aslan Brooke (Oct 30 2018 at 01:54):

@Bryn Rhodes So $expand works fine: http://hapi.fhir.org/baseDstu3/ValueSet/368154/$expand
Here is the valueset: http://hapi.fhir.org/baseDstu3/ValueSet/368154
But when I try to use in CQL, I can't make sense of the write valueset statement:

valueset "Heart Failure" : 'https://ontoserver.csiro.au/stu3-latest/ValueSet/HeartFailure'
valueset "Heart Failure" : 'http://hapi.fhir.org/baseDstu3/ValueSet/368154'
valueset "Heart Failure" : 'http://hapi.fhir.org/baseDstu3/ValueSet/368154'
valueset "Heart Failure" : 'HeartFailure'

view this post on Zulip Aslan Brooke (Oct 30 2018 at 01:55):

None of them seem to allow me filter the patient id=367771 by condition.
Using:

define "test" : [Condition : "Heart Failure"] C

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 01:56):

So the first declaration is the right one because it's using the canonical URL for the value set.

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 01:56):

Is that value set loaded on the same server that has the patient data?

view this post on Zulip Aslan Brooke (Oct 30 2018 at 01:57):

Yes.

view this post on Zulip Aslan Brooke (Oct 30 2018 at 01:57):

I copied the valueset over from the ontoserver tool: http://clinfhir.com/valuesetCreator.html

view this post on Zulip Aslan Brooke (Oct 30 2018 at 02:00):

The Patient/367771 on the hapi.fhir.org/baseDstu3 has a condition with:

  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "code": "I50221",
        "display": "Systolic heart failure, chronic"
      }
    ]
  }

This code is in the valueset as seen in the expansion: http://hapi.fhir.org/baseDstu3/ValueSet/368154/$expand

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 02:10):

Yeah, that all looks right.

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 02:11):

Can you share the patient Resource and I'll see if I can reproduce it?

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 02:12):

Oh, nevermind, I see it.

view this post on Zulip Aslan Brooke (Oct 30 2018 at 02:12):

http://hapi.fhir.org/baseDstu3/Patient?_id=367771

view this post on Zulip Bryn Rhodes (Oct 30 2018 at 02:18):

Yeah, reproduced, definitely seems like that should be coming back, I'll dig in and see what's going on.


Last updated: Apr 12 2022 at 19:14 UTC