Stream: shorthand
Topic: compose.include.version is ignored
Rob Hausam (Jun 03 2021 at 19:10):
When I started converting the IPS (International Patient Summary) IG to FSH, I ran into trying to figure out how to set ValueSet.compose.include.version
to a specific code system version. I didn't see any examples or other documentation on how to do that. Mark Kramer suggested that using * ^compose.include.version = “v123”
is the way to do that and has been supported for some time - and that makes perfect sense, except that so far it doesn't seem to be working. This is the FSH syntax that I am using (except for most of the content - > 26000 rows):
ValueSet: SnomedIntlGps
Id: snomed-intl-gps
Title: "SNOMED International Global Patient Set (GPS)"
Description: """SNOMED International Global Patient Set (GPS) value set. The value set includes all of the codes from the SNOMED International Global Patient Set (GPS) subset of SNOMED CT. The current version of the value set contains all concepts (26,158) from the September 2020 release of the GPS (based on the July 2020 SNOMED CT International Edition release).
This value set is provided in this IG as a FHIR ValueSet resource instance for the convenience of implementers. """
* ^meta.profile = "http://hl7.org/fhir/StructureDefinition/shareablevalueset"
* ^text.status = #additional
* ^text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<div id=\"cld\"><p>This value set has a large enumerated (extensional) definition. See "Definition" in the table above for the definition description. The full definition is available in the resource instance (see links in "Source Resource" in the table above).</p></div>\n\t\t</div>"
* ^version = "1.0.0"
* ^status = #active
* ^experimental = false
* ^date = "2021-06-01T09:59:23-05:00"
* ^publisher = "Health Level Seven International - Patient Care Work Group"
* ^contact.telecom.system = #url
* ^contact.telecom.value = "http://www.hl7.org/Special/committees/patientcare"
* ^jurisdiction = $m49.htm#001
* ^immutable = false
* ^copyright = "The GPS is produced by SNOMED International under the terms of the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/)\n\nAdditional information about this license specific to SNOMED International’s release of the GPS:\n* SNOMED CT is © and ® SNOMED International. The right to maintain the GPS remains vested exclusively in SNOMED International.\n* The Licensee can redistribute the GPS.\n* The Licensee can create derivatives or implementation-related products and services based on the GPS.\n* The Licensee cannot claim that SNOMED International or any of its Members endorses the Licensee’s derivative because it uses content from the GPS.\n* Neither SNOMED International nor any of the contributors accept any liability for the Licensee’s use or redistribution of the GPS.\n* SNOMED CT® was originally created by the College of American Pathologists.\n\nWithout obtaining prior written permission from SNOMED International, you are expressly prohibited from using, distributing or reproducing the SNOMED International, SNOMED CT or SNOMED GPS logo, service mark or trademark. Please review all terms and conditions of use [here](http://www.snomed.org/terms-and-conditions)."
* ^compose.include.version = "http://snomed.info/sct/900000000000207008/version/20200731"
* SNOMED_CT#109006 "Anxiety disorder of childhood OR adolescence (disorder)"
.......
And this is the resulting StructureDefinition in fsh-generated/resources:
{
"resourceType": "ValueSet",
"status": "active",
"name": "SnomedIntlGps",
"id": "snomed-intl-gps",
"title": "SNOMED International Global Patient Set (GPS)",
"description": "SNOMED International Global Patient Set (GPS) value set. The value set includes all of the codes from the SNOMED International Global Patient Set (GPS) subset of SNOMED CT. The current version of the value set contains all concepts (26,158) from the September 2020 release of the GPS (based on the July 2020 SNOMED CT International Edition release). \n\n This value set is provided in this IG as a FHIR ValueSet resource instance for the convenience of implementers. ",
"version": "1.0.0",
"url": "http://hl7.org/fhir/uv/ips/ValueSet/snomed-intl-gps",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/shareablevalueset"
]
},
"text": {
"status": "additional",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div id=\"cld\"><p>This value set has a large enumerated (extensional) definition. See "Definition" in the table above for the definition description. The full definition is available in the resource instance (see links in "Source Resource" in the table above).</p></div></div>"
},
"experimental": false,
"date": "2021-06-01T09:59:23-05:00",
"publisher": "Health Level Seven International - Patient Care Work Group",
"contact": [
{
"telecom": [
{
"system": "url",
"value": "http://www.hl7.org/Special/committees/patientcare"
}
]
}
],
"jurisdiction": [
{
"coding": [
{
"code": "001",
"system": "http://unstats.un.org/unsd/methods/m49/m49.htm"
}
]
}
],
"immutable": false,
"copyright": "The GPS is produced by SNOMED International under the terms of the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/)\n\nAdditional information about this license specific to SNOMED International’s release of the GPS:\n* SNOMED CT is © and ® SNOMED International. The right to maintain the GPS remains vested exclusively in SNOMED International.\n* The Licensee can redistribute the GPS.\n* The Licensee can create derivatives or implementation-related products and services based on the GPS.\n* The Licensee cannot claim that SNOMED International or any of its Members endorses the Licensee’s derivative because it uses content from the GPS.\n* Neither SNOMED International nor any of the contributors accept any liability for the Licensee’s use or redistribution of the GPS.\n* SNOMED CT® was originally created by the College of American Pathologists.\n\nWithout obtaining prior written permission from SNOMED International, you are expressly prohibited from using, distributing or reproducing the SNOMED International, SNOMED CT or SNOMED GPS logo, service mark or trademark. Please review all terms and conditions of use [here](http://www.snomed.org/terms-and-conditions).",
"compose": {
"include": [
{
"system": "http://snomed.info/sct",
"concept": [
{
"code": "109006",
"display": "Anxiety disorder of childhood OR adolescence (disorder)"
},
.....
You can see that compose.include.version
isn't flowing through to the ValueSet resource instance that Sushi generates. Do I need to do something different in the FSH syntax. Or is this a Sushi bug?
Rob Hausam (Jun 03 2021 at 19:15):
This is with Sushi v1.3.2.
Chris Moesel (Jun 03 2021 at 19:41):
Because the CodeSystem syntax manages the components for you (grouping codes into components based on common systems, etc), we disabled ^
syntax on elements of component
because it would be difficult for authors to identify the right component by index in complex code systems. That said, SUSHI should produce an error when you attempt to do that (rather than just ignoring it).
Chris Moesel (Jun 03 2021 at 19:44):
Luckily, there are actually several ways to do what you're looking to do. For example purposes, I've added one more code so you can see how it goes for multiple codes. Here are some of your options:
// Approach A
// Use {system}|{version}#{code} syntax for each code
ValueSet: VersionedSystemApproachA
* SNOMED_CT|http://snomed.info/sct/900000000000207008/version/20200731#109006 "Anxiety disorder of childhood OR adolescence (disorder)"
* SNOMED_CT|http://snomed.info/sct/900000000000207008/version/20200731#999999 "Fake code for example purposes"
// Approach B
// Set an alias to the full canonical URL of the system: {systemURL}|{version}
// then use the alias when defining each code
Alias: SCTv20200731 = http://snomed.info/sct|http://snomed.info/sct/900000000000207008/version/20200731
ValueSet: VersionedSystemApproachB
* SCTv20200731#109006 "Anxiety disorder of childhood OR adolescence (disorder)"
* SCTv20200731#999999 "Fake code for example purposes"
// Approach C
// Use syntax that lists codes and then ends with "from system {system}|{version}"
ValueSet: VersionedSystemApproachC
* #109006 "Anxiety disorder of childhood OR adolescence (disorder)" and
#999999 "Fake code for example purposes"
from system SNOMED_CT|http://snomed.info/sct/900000000000207008/version/20200731
You can see and try this in FSH Online here: https://fshschool.org/FSHOnline/#/share/3vOBsO5
Mark Kramer (Jun 03 2021 at 20:30):
@Rob Hausam I converted your entire IG to FSH (including the version indicators). How do you want it? (Can you receive a zip file via email? Or do you want me to do a PR?)
Rob Hausam (Jun 03 2021 at 21:14):
I've already done that, @Mark Kramer (but thanks for doing it).
Rob Hausam (Jun 03 2021 at 21:40):
The converted IG using FSH is in the connectathon branch. I'm just working on this value set issue (right now that's only local and I haven't committed it to the branch yet).
Rob Hausam (Jun 03 2021 at 21:48):
@Chris Moesel Thanks for these ideas - it looks like any of them should work. I'm sure I'm missing something, but it looks like the FSH Online example is only showing the conversion to JSON of "VersionedSystemApproachA".
Chris Moesel (Jun 03 2021 at 21:49):
Hi @Rob Hausam -- you should see a pane on the right-hand side of the screen that allows you to select from the output files.
Rob Hausam (Jun 03 2021 at 21:51):
Thanks. I was looking for that - but hadn't seen that the far right panel was actually doing that.
Rob Hausam (Jun 03 2021 at 21:58):
I will pick one of these approaches and get all of the "GPS" value sets defined with the correct version in FSH. I'm also planning to convert the "GPS subset" value sets (like 'allergy-intolerance-substance-condition-gps-uv-ips') to be defined intensionally, using 2 instances of ValueSet.compose.include.filter
inside a single ValueSet.compose.include
(which should return the intersection of the two filters). Can you point me to a way to do that in FSH?
Chris Moesel (Jun 03 2021 at 22:07):
The syntax for multiple filters is shown in the 4th row of the first table in the spec section on defining value sets. The basic syntax is:
* include codes from system {CodeSystem name|id|url} where {filter} and {filter} and ...
For example:
* include codes from system SNOMED_CT where concept is-a #1234 "Foo" and concept is-a #6789 "Bar"
That example probably doesn't make actual sense, but it shows the basic approach. Note that you can wrap the filters onto different lines if you want to make it more readable:
* include codes from system SNOMED_CT where
concept is-a #1234 "Foo" and
concept is-a #6789 "Bar"
FSH Online: https://fshschool.org/FSHOnline/#/share/3z2KSI3
Chris Moesel (Jun 03 2021 at 22:11):
Also, I just want to note that we have a new beta of SUSHI coming out soon (probably Monday) that has an improved CodeSystem
syntax. I don't know if you are defining code systems in FSH, but if so, you might want to check out the new stuff that allows for hierarchical codes and setting the individual concept elements (like designation and property). See Defining Code Systems and Caret Paths in the current build (STU2) FSH spec.
Rob Hausam (Jun 03 2021 at 22:13):
Thanks, @Chris Moesel If in doubt, read the documentation! :) When I looked at that before I was mainly trying to figure out the code system version issue in the include (which I missed), and I didn't really recall what was there for the filters. So I think I should have what I need - appreciate it!
Rob Hausam (Jun 03 2021 at 22:14):
And that also sounds like a great addition for CodeSystem!
Last updated: Apr 12 2022 at 19:14 UTC