Stream: terminology
Topic: CodeSystem filter with > 1 parameter
Michael Lawley (Feb 14 2018 at 23:35):
We have a CodeSystem filter that we want to support but it takes 2 parameters (actually, the second is optional). They are both of the same type (URI), but both CodeSystem and ValueSet only allow a single parameter value for a filter. Any suggestions on how to handle this?
Grahame Grieve (Feb 14 2018 at 23:41):
can you provide a concrete example?
Michael Lawley (Feb 14 2018 at 23:57):
The actual filter is complex to describe, so as an example, let's consider a filter called difference(ValueSetA, ValueSetB)
(in this case the 2nd parameter is not optional, but order is important).
The I want to be able to define a ValueSet with difference("http://example.com/myvaluesetA", "http://example.com/myvaluesetB")
:
{ // ... "compose": { "include": [{ "system": "http://snomed.info/sct", "filter": [{ "property": "difference", "op": "=", "value": "http://example.com/myvaluesetA", // HELP! }] }] } // ... }
As an aside, I've just noticed that the type of filter.value
is code
which seems "wrong" given that it is documented as being a code, a string, or a boolean, and should really be at least that set of valid things for a CodeSystem property (code | Coding | string | integer | boolean | dateTime and soon decimal).
Grahame Grieve (Feb 15 2018 at 01:02):
should be simply string, I think. In this particular case
Grahame Grieve (Feb 15 2018 at 01:03):
is this snomed specific thing? not done using snomed expression language?
Michael Lawley (Feb 15 2018 at 06:14):
It's not snomed specific, no. The problem is I need to provide two input values
Grahame Grieve (Feb 15 2018 at 06:31):
I think you'll need an extension
Michael Lawley (Feb 15 2018 at 06:35):
I was thinking more of adopting a convention where I have one property name called "foo" and the other (optional one) called "foo.bar". It will be an error to provide "foo.bar" without also providing "foo"
Grahame Grieve (Feb 15 2018 at 06:36):
I'm not sure what you mean
Rob Hausam (Feb 15 2018 at 19:22):
I think I get what Michael means. You create two separate filters, but internally there is a dependency between them which will result in an error unless you satisfy it (i.e. you can't have 'foo.bar' unless you also have 'foo'). In the 'include' in the value set definition you would specify both filters, and both properties and values would be used together in determining the expansion. But in looking at Michael's example, I believe you could obtain the same result for "difference" by using an 'include' for myvaluesetA and an 'exclude' for myvaluesetB?
Rob Hausam (Feb 15 2018 at 19:35):
GF#15557 for changing the data type to string
Michael Lawley (Feb 17 2018 at 07:19):
That's exactly right @Rob Hausam . I was only using "difference" as an example because the the actual filter we have is as-yet un-named (we have an interim name for it, but it is not accurate)
Last updated: Apr 12 2022 at 19:14 UTC