Closed sudheer-unify-care closed 1 year ago
It sounds like the International Edition has been loaded into the MAIN branch so this will be the default code system that is used in the FHIR API. The default edition will be used when only http://snomed.org/sct is provided.
The SNOMED CT URI standard can be used to select a specific SNOMED CT edition when expanding an implicit value set.
The URI for the latest available version of the 13941000189108 |India NRC maintained drug module|
is http://snomed.info/sct/13941000189108
.
So expanding using this module would be:
[GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct/13941000189108?fhir_vs=ecl/<<13941000189108&count=10
It is also possible to expand against a specific version of of an edition by including the effective time of the release. For example the URI of the 2021/02/15 release of the 13941000189108 |India NRC maintained drug module|
is http://snomed.info/sct/13941000189108/version/20210215
.
Example:
[GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct/13941000189108/version/20210215?fhir_vs=ecl/<<13941000189108&count=10
Snowstorm 8.1.0 onwards will always quote the edition and version that has actually been used for expansion within the version parameter in the response body.
There is an alternative way to select a specific edition or version when expanding a value set using the system-version
request parameter. This uses a canonical format: http://snomed.info/sct|http://snomed.info/sct/13941000189108
For example:
[GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<13941000189108&count=10&system-version=http://snomed.info/sct|http://snomed.info/sct/13941000189108
I've tried all 3 ways:
[GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct/13941000189108?fhir_vs=ecl/<<13941000189108&count=10
[GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct/13941000189108/version/20230113?fhir_vs=ecl/<<13941000189108&count=10
[GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<13941000189108&count=10&system-version=http://snomed.info/sct|http://snomed.info/sct/13941000189108
Getting same error for all 3 requests
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Failed to call access method: org.snomed.snowstorm.fhir.services.FHIROperationException: No code system known with default module of http://snomed.info/sct/13941000189108."
}
]
}
when I query CodeSystem I'm getting below response, I observe null in the version key of extension
[GET] {{baseUrl}}/CodeSystem
{
"resourceType": "Bundle",
"id": "a5c49d33-e867-45ba-b1b0-430d77618b73",
"meta": {
"lastUpdated": "2023-03-23T20:12:00.197+05:30"
},
"type": "searchset",
"total": 2,
"link": [
{
"relation": "self",
"url": "http://localhost:8080/fhir/CodeSystem"
}
],
"entry": [
{
"fullUrl": "http://localhost:8080/fhir/CodeSystem/sct_null_20230113",
"resource": {
"resourceType": "CodeSystem",
"id": "sct_null_20230113",
"url": "http://snomed.info/sct",
"version": "http://snomed.info/sct/null/version/20230113",
"title": "null SNOMED CT release 2023-01-13",
"status": "active",
"date": "2023-01-13T00:00:00+05:30",
"publisher": "Unknown",
"hierarchyMeaning": "is-a",
"compositional": true,
"content": "complete"
}
},
{
"fullUrl": "http://localhost:8080/fhir/CodeSystem/sct_900000000000207008_20230228",
"resource": {
"resourceType": "CodeSystem",
"id": "sct_900000000000207008_20230228",
"url": "http://snomed.info/sct",
"version": "http://snomed.info/sct/900000000000207008/version/20230228",
"title": "null SNOMED CT release 2023-02-28",
"status": "active",
"date": "2023-02-28T00:00:00+05:30",
"publisher": "Unknown",
"hierarchyMeaning": "is-a",
"compositional": true,
"content": "complete"
}
}
]
}
am I doing anything wrong while creating CodeSystem? Refer to the first comment, the request object I'm using for CodeSystem creation
Thank you for looking around and spotting the root cause of the issue here. You are right that the module id for the code system is missing. There is configuration here to set the URI module for various code systems. It looks like the code system you are using is not configured yet. Please add that locally to check that fixes the issue. Once the config is added Snowstorm will need restarting. The module id should then appear in the FHIR CodeSystem listing version field.
Feel free to raise a PR to get your code system added to the default config for the product so that it works out of the box for other people.
@kaicode I've verified in my local system by updating the configuration, it worked
java -Xms2g -Xmx4g -jar snowstorm-8.0.0.jar "--codesystem.config.SNOMEDCTDRUG-IN=India Drug Extension|13941000189108|in|Nrces"
I've to verify 4 to 5 other extensions, will raise a PR after that.
With the different extensions available across all countries, list will become huge. is there a way, that I can insert this details during codesystem creation?
I'm glad that worked for you.
I think it would be good to have a huge list of code system configurations so that everyone has good defaults. I don't think this is a problem, we could always break it out into a separate config file if it gets unmanageable. Getting that technique to work relies on everyone using the same code system short names like SNOMEDCTDRUG-IN
so that is the drawback.
In Snowstorm 8.1.0 there is no way to set the URI during the creation of the code system. In SnowstormX I have been developing a way to do it during code system creation but it's not ready yet. I realise restarting the terminology server for a new code system is not convenient. The URL will be set automatically when we have the syndication feature implemented, that should happen this year.
@kaicode Thanks for giving the context.
Snowstorm version 8.1.0
Created Code System for the Extension [POST] {{opsUrl}}/codesystems
{ "shortName": "SNOMEDCTDRUG-IN", "branchPath": "MAIN/SNOMEDCT-DRUGEXTENSIONNEW-IN", "dependantVersion": 20230228, "countryCode": "IN" }
All codes are uploaded without errors, able to look up the code using Code System [GET] {{baseUrl}}/CodeSystem/$lookup?system=http://snomed.info/sct&code=1373221000189102
{ "resourceType": "Parameters", "parameter": [ { "name": "version", "valueString": "http://snomed.info/sct" }, { "name": "display", "valueString": "Azitras 250 mg oral tablet" }, { "name": "active", "valueBoolean": true }, { "name": "property", "part": [ { "name": "code", "valueString": "effectiveTime" }, { "name": "valueString", "valueString": "20220830" } ] }, { "name": "property", "part": [ { "name": "code", "valueString": "moduleId" }, { "name": "value", "valueCode": "13941000189108" } ] }, { "extension": [ { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000509007" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000548007", "display": "PREFERRED" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } } ] }, { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000508004" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000548007", "display": "PREFERRED" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } } ] } ], "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "use", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } }, { "name": "value", "valueString": "Azitras 250 mg oral tablet" } ] }, { "extension": [ { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000509007" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000549004", "display": "ACCEPTABLE" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } } ] }, { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000508004" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000549004", "display": "ACCEPTABLE" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } } ] } ], "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "use", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } }, { "name": "value", "valueString": "Azitras (azithromycin) 250 mg oral tablet Biostrass Health Sciences Private Limited" } ] }, { "extension": [ { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000509007" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000548007", "display": "PREFERRED" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000003001", "display": "Fully specified name" } } ] }, { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000508004" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000548007", "display": "PREFERRED" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000003001", "display": "Fully specified name" } } ] } ], "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "use", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000003001", "display": "Fully specified name" } }, { "name": "value", "valueString": "Azitras (azithromycin) 250 mg oral tablet Biostrass Health Sciences Private Limited (real clinical drug)" } ] }, { "extension": [ { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000509007" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000549004", "display": "ACCEPTABLE" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } } ] }, { "url": "http://snomed.info/fhir/StructureDefinition/designation-use-context", "extension": [ { "url": "context", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000508004" } }, { "url": "role", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000549004", "display": "ACCEPTABLE" } }, { "url": "type", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } } ] } ], "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "use", "valueCoding": { "system": "http://snomed.info/sct", "code": "900000000000013009", "display": "Synonym" } }, { "name": "value", "valueString": "Azitras (azithromycin) 250 mg oral tablet" } ] }, { "name": "property", "part": [ { "name": "code", "valueString": "parent" }, { "name": "value", "valueCode": "1426751000189102" } ] }, { "name": "property", "part": [ { "name": "code", "valueString": "parent" }, { "name": "value", "valueCode": "1145423002" } ] } ] }
Tried below queries, it's always giving empty data(Used Root concept Id 13941000189108 of Drug extension): [GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<13941000189108&count=10 [GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/<<13941000189108&filter=azi&count=10 [GET] {{baseUrl}}/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=isa/13941000189108&filter=azi&count=10