Overview
Reference set files provide
a standard format for maintaining and distributing a set of references to SNOMED CT components.
A reference set can be used to represent a subset of components (concepts, descriptions or relationships).Notes
Requirements and Options
A concept or description is a member of a reference set if that reference set contains an active row with a referencedComponentId matching the id of that concept or description.
Two services are specified in this section. One of these returns the list of members of a specified reference set. The other tests whether a candidate concept or description is a member of a specified reference set.
The union, intersection or complement of two or more reference sets can be determined using the SNOMED CT Expression Constraint Language (ECL). Terminology service requirements for accessing expression constraints are described in 4.7 Validate and Apply Expression Constraints.
The services listed in Table 4.6-1 can be used to determine whether a concept or description is a member of any identified reference set. These services are primarily applicable to simple reference sets that represent subsets of concepts or descriptions (5.2.1.1 Simple Reference Set). Members of other types of reference set contain additional data and services that provide access to this additional data are described in 4.10 Get Data from a Reference Set .
Service Name and Status | Input | Output |
---|---|---|
Get all members of a specified reference set REQUIRED |
|
|
Test if a concept or description is a member of specified reference set REQUIRED |
|
|
Interdependencies
Required By
- Other Services
- Use Cases
Depends On
Service Examples
The Snowstorm and FHIR examples are presented in plain text and URL encoded versions. Always use the "Encoded URL" when testing the example service requests. The plain text version is included to aid readability but using this version in a service request may result in errors. These errors result from characters that have to be encoded as they are not permitted in a URL (see IETF RFC1738).
Service Name | API Call3 | Result |
Get all members of a specified reference set |
GET [snowstorm]/[branch]/members?active=true&referenceSet=[refsetId] for example GET [snowstorm]/MAIN/2020-01-31/members?active=true&referenceSet=723264001 Encoded URL GET [snowstorm]/MAIN%2F2020-01-31/members?active=true&referenceSet=723264001 | Returns a JSON representation of data about all the active members of the reference set. It also returns the total number of members in the reference set. As some reference sets contain a large numbers of members, this service is paged. Requests parameters include:
This example returns all active members of the 723264001 | Lateralizable body structure reference set| . This is large reference set with nearly 20,000 active members so although this call returns the count of members it only returns data on a limited number of members 4 . |
Test if a concept or description is a member of specified reference set |
GET [snowstorm]/[branch]/members?active=true&referencedComponentId=[candidateId]&referenceSet=[refsetId] for example this call returns true GET [snowstorm]/MAIN/2020-01-31/members?active=true&referencedComponentId=53120007&referenceSet=723264001 Encoded URL GET [snowstorm]/MAIN%2F2020-01-31/members?active=true&referencedComponentId=53120007&referenceSet=723264001 while the next call returns false
GET [snowstorm]/MAIN/2020-01-31/members?active=true&referencedComponentId=80891009&referenceSet=723264001 Encoded URL GET [snowstorm]/MAIN%2F2020-01-31/members?active=true&referencedComponentId=80891009&referenceSet=723264001 | Returns a JSON representation of data including a count of matching member rows followed by data from the matching member rows. The result of the test can be determined by checking the total property of the returned object. Non-zero implies the candidate concept or description is a member of the reference set, zero implies it is not. The two example calls both test membership of the 723264001 | Lateralizable body structure reference set| . The first one returns with a total value of 1 confirming that 53120007 | Upper limb structure| is a member of this reference set. The second example returns with a total value of 0 as 80891009 | Heart structure| is not a member of this reference set. |
Service Name | API Call5 | Result |
Get all members of a specified reference set |
GET [fhir]/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=refset/[refsetId]&count=10 for example GET [fhir]/ValueSet/$expand?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Drefset%2F721144007&count=10 GET [fhir]/ValueSet/$expand?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Decl%2F%5E%5BrefsetId%5D&count=10 GET [fhir]/ValueSet/$expand?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Decl%2F%5E721144007&count=10 | Returns a JSON representation of data about each of the reference set member. The data returned for each concept includes:
Also returns the total number of reference set members As some reference sets have very large numbers of children, this service is paged. Requests parameters include:
|
Test if a concept is a member of specified reference set | FHIR does not provide a specific operation for this service, but the SNOMED CT Expression Constraint Language supports testing for reference set membership, and can thus be used to enable this service through the ValueSet/$expand operation. GET [fhir]/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/^[refsetId] AND [predicateConceptId] GET [fhir]/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/^721144007 AND 734009000 Encoded URL GET [fhir]/ValueSet/$expand?url=http%3A%2F%2Fsnomed.info%2Fsct%3Ffhir_vs%3Decl%2F%5E721144007+AND+734009000 Note that the ECL memberOf function needs to be url encoded. The URL encoding for ^ is %5E If multiple predicate concepts should be tested in the same requests this can be done using the following expression constraint: ^[refsetId] AND ([predicateConceptId_1] OR [predicateConceptId_2].... OR [predicateConceptId_n]) | Returns a JSON representation of data about each of the predicate concepts that are members of the reference set. The data returned for each concept includes:
Also returns the total number of concepts satisfying the expression constraint. Note: If none of the predicate concepts are which are tested for membership are included in the reference set, the service will return 0 results. |
Service Name | SQL Query 6 | Result |
Get all members of a specified reference set | SELECT referencedComponentId FROM snap_refset_simple WHERE active=1 AND refsetId=[refsetId]; for example SELECT referencedComponentId FROM snap_refset_simple WHERE active=1 AND refsetId=723264001; | Returns the ids of all the concepts or descriptions that are the members of the reference set. |
Test if a concept or description is a member of specified reference set | SELECT count(referencedComponentId) FROM snap_refset_simple WHERE active=1 AND refsetId=[refsetId] AND referencedComponentId=[candidateComponentId]; for example SELECT count(referencedComponentId) FROM snap_refset_simple WHERE active=1 AND refsetId=723264001 AND referencedComponentId=53120007; | Returns:
|
Footnotes
Feedback