IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
208 stars 83 forks source link

Editions don't show up in SCT Browser Frontend #144

Closed bcorcoran closed 4 years ago

bcorcoran commented 4 years ago

I've imported the latest US Edition available via UMLS, but the SCT Browser Frontend only sees a single import with the "MAIN" branch. On the public browser, I notice that "MAIN" is treated as the international edition and the US edition is loaded as a sub branch, i.e. MAIN/SNOMEDCT-US. As far as I can tell, I do not have a MAIN/SNOMEDCT-US branch. I tried adding the SNOMEDCT-US via the codesystem endpoint, but it is not recognized as an additional codesystem by the sct browser frontend.

I am not quite sure how to get the US edition properly loaded (maybe it already is?) and labeled. I understand how to add the "name" property for the codesystem, but I guess I'm just unclear as to how to verify that I'm actually using the US Edition vs the International Edition content.

Is there anything additional I must do besides doing the import of the US Edition?

I used the following console command to import it:

java -Xms2g -Xmx4g -jar /opt/snowstorm/snowstorm.jar --delete-indices --import-full=/opt/releases/SnomedCT_USEditionRF2_PRODUCTION_20200301T120000Z.zip

rorydavidson commented 4 years ago

@bcorcoran sorry for the delay in getting back to you... if you look at the code systems end point what do you see?

bcorcoran commented 4 years ago

If I simply GET /codesystems, I receive the following:

I'm OK with the browser not seeing certain things correctly as long as the API is returning the correct data. Ultimately I'm not letting users have access to the browser anyway.

{
  "items": [
    {
      "name": "International Edition",
      "shortName": "SNOMEDCT",
      "branchPath": "MAIN",
      "dailyBuildAvailable": false,
      "latestVersion": {
        "shortName": "SNOMEDCT",
        "importDate": "2020-07-28T04:59:41.936Z",
        "parentBranchPath": "MAIN",
        "effectiveDate": 20200301,
        "version": "2020-03-01",
        "description": "SNOMEDCT 20200301 import.",
        "branchPath": "MAIN/2020-03-01"
      },
      "languages": {
        "en": "English"
      },
      "modules": [
        {
          "conceptId": "900000000000012004",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "900000000000012004",
          "effectiveTime": "20020131",
          "fsn": {
            "term": "SNOMED CT model component module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT model component",
            "lang": "en"
          },
          "id": "900000000000012004"
        },
        {
          "conceptId": "731000124108",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "731000124108",
          "effectiveTime": "20110301",
          "fsn": {
            "term": "US National Library of Medicine maintained module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "US National Library of Medicine maintained module",
            "lang": "en"
          },
          "id": "731000124108"
        },
        {
          "conceptId": "449080006",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "900000000000012004",
          "effectiveTime": "20110731",
          "fsn": {
            "term": "SNOMED CT to ICD-10 rule-based mapping module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT to ICD-10 rule-based mapping module",
            "lang": "en"
          },
          "id": "449080006"
        },
        {
          "conceptId": "900000000000207008",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "900000000000012004",
          "effectiveTime": "20020131",
          "fsn": {
            "term": "SNOMED CT core module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT core",
            "lang": "en"
          },
          "id": "900000000000207008"
        },
        {
          "conceptId": "5991000124107",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "731000124108",
          "effectiveTime": "20120301",
          "fsn": {
            "term": "SNOMED CT to ICD-10-CM rule-based mapping module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT to ICD-10-CM rule-based mapping module",
            "lang": "en"
          },
          "id": "5991000124107"
        }
      ]
    },
    {
      "name": "United States Edition",
      "shortName": "SNOMEDCT-US",
      "branchPath": "MAIN/SNOMEDCT-US",
      "dependantVersionEffectiveTime": 20200131,
      "dailyBuildAvailable": false,
      "countryCode": "us",
      "languages": {
        "en": "English"
      },
      "modules": [
        {
          "conceptId": "900000000000012004",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "900000000000012004",
          "effectiveTime": "20020131",
          "fsn": {
            "term": "SNOMED CT model component module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT model component",
            "lang": "en"
          },
          "id": "900000000000012004"
        },
        {
          "conceptId": "731000124108",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "731000124108",
          "effectiveTime": "20110301",
          "fsn": {
            "term": "US National Library of Medicine maintained module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "US National Library of Medicine maintained module",
            "lang": "en"
          },
          "id": "731000124108"
        },
        {
          "conceptId": "449080006",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "900000000000012004",
          "effectiveTime": "20110731",
          "fsn": {
            "term": "SNOMED CT to ICD-10 rule-based mapping module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT to ICD-10 rule-based mapping module",
            "lang": "en"
          },
          "id": "449080006"
        },
        {
          "conceptId": "900000000000207008",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "900000000000012004",
          "effectiveTime": "20020131",
          "fsn": {
            "term": "SNOMED CT core module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT core",
            "lang": "en"
          },
          "id": "900000000000207008"
        },
        {
          "conceptId": "5991000124107",
          "active": true,
          "definitionStatus": "PRIMITIVE",
          "moduleId": "731000124108",
          "effectiveTime": "20120301",
          "fsn": {
            "term": "SNOMED CT to ICD-10-CM rule-based mapping module (core metadata concept)",
            "lang": "en"
          },
          "pt": {
            "term": "SNOMED CT to ICD-10-CM rule-based mapping module",
            "lang": "en"
          },
          "id": "5991000124107"
        }
      ]
    }
  ],
  "total": 2,
  "limit": 2,
  "offset": 0
}
kaicode commented 4 years ago

Hi @bcorcoran. The SCT Browser project expects the International Edition code system to on MAIN and then other extensions and editions to live on other branches.

The US Edition is one of the few releases which is a true "Edition" and includes the content of the International Edition and the US extension in a single package using one set of RF2 files.

Although you have created a SNOMEDCT-US code system on MAIN/SNOMEDCT-US because the content was not imported on that branch no code system versions will have been created, see API /codesystems/SNOMEDCT-US/versions.

You have imported the US Edition onto MAIN which is fine if you don't need access to the International Edition on it's own. You would however need to rename the codesystem which is using the MAIN branch to US Edition and modify the frontend javascript to make it expect the US Edition on MAIN. You could just skip the landing page if you have only one release of SNOMED CT loaded the landing page may be redundant.

Alternatively if you would like to host the US Edition and the International Edition (or other non-US extension) in your browser deployment you will need to delete your Snowstorm indices and first import the International Edition on MAIN. Then import the US Edition on MAIN/SNOMEDCT-US by following the procedure for loading extensions here. This way the SCT Browser frontend will work in the same way as the International browser.

I hope that helps.

Kind regards, Kai Kewley

bcorcoran commented 4 years ago

Ahhhhh, ok. That explains everything! I was not aware that the "US Edition" was actually an Editon on its own (though I suppose it makes sense given the modifications).

Looks like what I'll have to do (since I need them separately) is start over and import International, then the US edition.

Thanks!

kaicode commented 4 years ago

Cheers @bcorcoran 👍