IHTSDO / snomed-query-service

An implementation of the SNOMED CT Expression Constraint Language.
Other
26 stars 9 forks source link

ReferenceSets have no members #6

Closed nicholasudell closed 6 years ago

nicholasudell commented 6 years ago

Using rf2 release: SnomedCT_InternationalRF2_PRODUCTION_20180131T120000Z

When querying for members of a ReferenceSet, zero results are returned.

Query: http://localhost:8080/concepts?ecQuery=^734138000

Result:

{
  "items" : [ ],
  "offset" : 0,
  "total" : 0,
  "limit" : 1000
}

Query: http://localhost:8080/concepts?ecQuery=734138000

Result:

{
  "items" : [ {
    "id" : "734138000",
    "effectiveTime" : "20170731",
    "active" : true,
    "moduleId" : "900000000000012004",
    "definitionStatusId" : "900000000000074008",
    "fsn" : "Anatomy structure and entire association reference set (foundation metadata concept)",
    "refsetMemberships" : [ ]
  } ],
  "offset" : 0,
  "total" : 1,
  "limit" : 1000
}

However the reference set can be found by going to: https://termbrowser.nhs.uk/?perspective=full&conceptId1=734138000&edition=uk-edition&release=v20180401&server=https://termbrowser.dataproducts.nhs.uk/sct-browser-api/snomed&langRefset=999001261000000100,999000691000001104

And it should contain about 14,000 members.

http://localhost:8080/refsets also shows it as having no members:

{
    "id" : "734138000",
    "effectiveTime" : "20170731",
    "active" : true,
    "moduleId" : "900000000000012004",
    "definitionStatusId" : "900000000000074008",
    "fsn" : "Anatomy structure and entire association reference set (foundation metadata concept)",
    "refsetMemberships" : [ ]
  }
kaicode commented 6 years ago

Hello @Udellgames, thanks for your question.

The reference sets loaded into the query service are controlled by the LoadingProfile which can be found here. These are currently limited to the default reference sets for the light loading profile which are the US and GB language reference sets. In order to load and query against the "Anatomy structure and entire association reference set" you could update the loading profile within the Application class like this: private LoadingProfile loadingProfile = LoadingProfile.light.withFullRelationshipObjects().withRefset("734138000");

You should then rebuild the project and remove the "index" directory before starting the query service again to load in the Snomed data. Once this is complete the ECL query ^734138000 will start working. The refsetMemberships array is intended to show reference sets which the current concept is a member of so this may not be of much use to you.

Kind regards, Kai

nicholasudell commented 6 years ago

Thank you, changing the LoadingProfile fixed that.