Stream: cql
Topic: Troubleshoot valueset
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
Bryn Rhodes (Oct 30 2018 at 01:42):
You can issue an $expand against that valueset on the server.
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'
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
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.
Bryn Rhodes (Oct 30 2018 at 01:56):
Is that value set loaded on the same server that has the patient data?
Aslan Brooke (Oct 30 2018 at 01:57):
Yes.
Aslan Brooke (Oct 30 2018 at 01:57):
I copied the valueset over from the ontoserver tool: http://clinfhir.com/valuesetCreator.html
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
Bryn Rhodes (Oct 30 2018 at 02:10):
Yeah, that all looks right.
Bryn Rhodes (Oct 30 2018 at 02:11):
Can you share the patient Resource and I'll see if I can reproduce it?
Bryn Rhodes (Oct 30 2018 at 02:12):
Oh, nevermind, I see it.
Aslan Brooke (Oct 30 2018 at 02:12):
http://hapi.fhir.org/baseDstu3/Patient?_id=367771
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