Stream: terminology
Topic: Implicit vs explicit ValueSet expansion
John Grimes (Feb 20 2018 at 06:33):
What is the expected behaviour if you:
- have a CodeSystem and a ValueSet with the same value in their
CodeSystem.valueSet
andValueSet.url
elements - call the
ValueSet$expand
operation, passing in this value in theurl
parameter?
Grahame Grieve (Feb 20 2018 at 07:18):
if you have a CodeSystem and a ValueSet with the same value in their CodeSystem.valueSet and ValueSet.url elements, then it is expect that the compose of the value set simply includes the entire code system
Grahame Grieve (Feb 20 2018 at 07:18):
and $expand will return the expansion which is the whole code system
Grahame Grieve (Feb 20 2018 at 07:18):
according to the compose
Peter Jordan (Feb 20 2018 at 07:21):
...but what if the ValueSet contains concepts from more than one Code System - or there are additional constraining parameters, e.g. a text filter?
John Grimes (Feb 20 2018 at 07:23):
I guess what I am asking is would you expect the server to give preference to the CodeSystem or the ValueSet - in terms of selecting a definition on which to base the calculation of the expansion?
Peter Jordan (Feb 20 2018 at 07:27):
Well, one could argue that implicit value sets are really just runtime artefacts, therefore the ValueSet definition is going to be contained in the related CodeSystem resource (plus, possibly in R4, a TerminologyCapabilities resource).
Grahame Grieve (Feb 20 2018 at 07:46):
it's an error if the value set contains anything other than 'all the code system' - that's why the code system claims that it's the value set that contains all (and only) the code system
Grahame Grieve (Feb 20 2018 at 07:47):
the server ignores the codesystem - the fact that CodeSystem.valueSet has a value or not is only useful in the case that someone has the code system, and wonders what the value set that is 'all the code system' is. Otherwise it's meaningless
Peter Jordan (Feb 20 2018 at 07:53):
Presumably you're talking about the implicit ValueSet 'definition' here, rather than the expansion of an implicit value set? In practical terms, my server creates implicit Value Set and Code System resources for major Code Systems, such as SNOMED CT, from a single class.
Grahame Grieve (Feb 20 2018 at 07:54):
it doens't matter whether the value set is implicit or explicit
Peter Jordan (Feb 20 2018 at 08:00):
In my implementation, I store the definitions of extensional and intensional value sets (e.g. the test artefacts used by Touchstone) in separate classes, so from that perspective I handle implicit and explicit value sets differently. The data extraction layer is the same for intensional and implicit value sets - i.e. those based on a query rather than a pre-determined enumerated list.
Grahame Grieve (Feb 20 2018 at 08:10):
I feel as though you confused the definition of implicit vs explicit and intensional vs extensional there.
Grahame Grieve (Feb 20 2018 at 08:11):
but it doesn't really matter here - a valueset nominated in CodeSystem.valueSet will (once made explicit, if necessary) have neither concept list or filter - just a statement to include the whole code system
Peter Jordan (Feb 20 2018 at 08:23):
Possibly :) My definitions are rather more practical than theoretical and I'll never expand Value Sets based on large code systems, e.g. SNOMED CT, without any additional filters (for the 'fun' exception see the VS expansion value set comparison tool at http://ontoserver.csiro.au/vstool/ - Health Intersections gives quite an 'upright' response.)
John Grimes (Feb 20 2018 at 09:51):
Thanks @Grahame Grieve
I've spent a bit of time searching for where it says this in the spec (STU3), the part about it being an error if the explicit ValueSet does not contain all the codes. Would you be able to point me in the right direction?
The behaviour in Ontoserver is to ignore the explicit ValueSet and favour the expansion of the implicit ValueSet within the CodeSystem.
Grahame Grieve (Feb 20 2018 at 09:55):
it's from the definition: Canonical URL of value set that contains the entire code system.
Comments: The definition of the value set SHALL include all codes from this code system, and it SHALL be immutable.
Grahame Grieve (Feb 20 2018 at 09:56):
not sure what explicit or implicit value sets have to do with this
Rob Hausam (Feb 20 2018 at 12:24):
Should we change it to say something like: "The definition of the value set SHALL include all codes from this code system and only codes from this code system, and it SHALL be immutable."?
Grahame Grieve (Feb 20 2018 at 12:25):
sure. want to create a task for that?
Rob Hausam (Feb 20 2018 at 13:34):
Last updated: Apr 12 2022 at 19:14 UTC