You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue/error that I'm getting is the following:
Expected ExpandValueSet(ValueSet), Found ExpandValueSet(java.util.ArrayList)
What I'm trying to do is check an Observation.code against the ValueSet via a function call. The function calls/uses fluent functions to do the check but the function arguments are taking a List<System.Code>
`library IssueExpandValueSet
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include IssueExpandValueSet_Concepts called Concepts
context Patient
define "Valueset": Concepts."Garb"
define "Garb Test Fails": "Has Garb Test Fails"([Observation])
define "Garb Test Works": "Has Garb Test Workaround"([Observation])
define function "Has Garb Test Fails" (obs List):
obs."With any code"(Concepts."Garb")
define function "Has Garb Test Workaround" (obs List):
obs."With any code"(Concepts."Garb" as System.ValueSet)
define fluent function "With any code"(observations List<FHIR.Observation>, codes List<System.Code>):
if observations is null or codes is null then null
else
(observations) observation
where observation.code."Has"(codes)
define fluent function "Has"(codeableConcept FHIR.CodeableConcept, codes List<System.Code>):
if codeableConcept is null or codes is null then null
else
exists(
(codeableConcept.coding) coding
where coding in codes
)`
I discovered a workaround, that isn't ideal, but is demonstrated in the define called "Has Garb Test Workaround"
I'm not sure what is happening and why the error is occurring.
I also attached a zip file containing the cql libraries, valueset, and test case to reproduce the error and also demonstrate the workaround.
The issue/error that I'm getting is the following:
Expected ExpandValueSet(ValueSet), Found ExpandValueSet(java.util.ArrayList)
What I'm trying to do is check an Observation.code against the ValueSet via a function call. The function calls/uses fluent functions to do the check but the function arguments are taking a List<System.Code>
`library IssueExpandValueSet
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include IssueExpandValueSet_Concepts called Concepts
context Patient
define "Valueset": Concepts."Garb"
define "Garb Test Fails": "Has Garb Test Fails"([Observation])
define "Garb Test Works": "Has Garb Test Workaround"([Observation])
define function "Has Garb Test Fails" (obs List):
obs."With any code"(Concepts."Garb")
define function "Has Garb Test Workaround" (obs List):
obs."With any code"(Concepts."Garb" as System.ValueSet)
define fluent function "With any code"(observations List<FHIR.Observation>, codes List<System.Code>):
if observations is null or codes is null then null
else
(observations) observation
where observation.code."Has"(codes)
define fluent function "Has"(codeableConcept FHIR.CodeableConcept, codes List<System.Code>):
if codeableConcept is null or codes is null then null
else
exists(
(codeableConcept.coding) coding
where coding in codes
)`
I discovered a workaround, that isn't ideal, but is demonstrated in the define called "Has Garb Test Workaround"
I'm not sure what is happening and why the error is occurring.
I also attached a zip file containing the cql libraries, valueset, and test case to reproduce the error and also demonstrate the workaround.
IssueExpandValueSet.zip
The text was updated successfully, but these errors were encountered: