Git Product home page Git Product logo

Comments (3)

kaicode avatar kaicode commented on August 10, 2024

Hi Pedro,

Snowstorm uses a version control system with a timeline. When a release is imported into a CodeSystem working branch like MAIN or MAIN/SNOMEDCT-BE then all the content is written into that branch and a version-branch is created like MAIN/2023-04-30. The version branches are actually empty. They are just pointers to the commit in the CodeSystem working branch that contains that release content. Deleting a version branch has no effect other than you loose the ability to reference that release if new content is imported into the working branch.

When a SNAPSHOT type import is used only one release will be imported. Older releases will not be available. Snowstorm automatically creates a version branch for each release that is available to be queried. It is possible to import many releases at once using the FULL import type but this only works when starting with a completely blank Snowstorm instance and only works on the MAIN branch. The FULL type import takes many hours.

Releases can only be loaded in chronological order. If the 2023-04-30 International release has been imported then it's not possible to import an older release. Importing an older release on top of the 2023-04-30 release will probably have no effect because Snowstorm will ignore components in the imported file that already exist on the branch with a greater effective time.

I suggest clearing your Snowstorm data and starting again by importing the oldest release that you need first. For example if you need the 2022-09-30 International release import this onto MAIN first. That will create a version branch that you can always use to access that content. Then import any other International releases you need access to onto MAIN. Each one will create a version branch where the content will stay the same forever because it points to a specific commit on the MAIN branch timeline.

Be careful before importing versions of your national release (BE) that the SNOMEDCT-BE CodeSystem is dependent on the correct version of the International Release. You can check which version you need using the SNOMED International Browser and looking at the date on the root SNOMED CT concept.
For example, if we look back at the Belgian version "2022-03-15" and look at the root concept we can see that this Belgian release is dependant on the "2022-01-31" release of the International Edition.
Screenshot 2023-09-06 at 11 30 10

Before you start your import you can use GET codesystems/SNOMEDCT-BE to check that the dependantVersionEffectiveTime is 20220131. If not use POST /codesystems/{shortName}/upgrade in Swagger to set the correct dependant version.
You must repeat this process for each subsequent national extension version that you import.

Sorry that this is all so manual at the moment. We have an item on the roadmap to integrate with a content syndication service to make imports and dependency management automatic. That will benefit many people by making Snowstorm setup much simpler.

I hope that helps. If anything I have said is not clear please write back.

Kind regards,
Kai

from snowstorm.

pedro-earlytracks avatar pedro-earlytracks commented on August 10, 2024

Hi Kai,

I really appreciate your taking the time to write such a thorough answer. It's a lot clearer to me now.
What it is not yet is how to proceed to clearing our Snowstorm data. The only DELETE route that I see on our API is the one I mentioned for branches.

Kind regards,

Pedro

from snowstorm.

kaicode avatar kaicode commented on August 10, 2024

The simplest way to clear the data is to start Snowstorm with a --delete-indices flag, like this:

java -jar snowstorm.jar --delete-indices

This will delete and recreate all the Elasticsearch indices during startup.
Then Snowstorm should be stopped and started again in the normal way without the flag.

from snowstorm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.