SNOMED Documentation Search


 Other Documents

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The general method for creating a snapshot 'view' for a specified SnapshotTime is as follows:

Anchor
_321d92b9-b4d6-49c7-87b4-cb350eb9746d__d
_321d92b9-b4d6-49c7-87b4-cb350eb9746d__d

  1. Exclude all
    Gloss
    tComponent
    versions with an effectiveTime greater than the SnapshotTime.

Note: In theory the most recent

Gloss
tsnapshot view
step could be omitted. However, a release will often be distributed before its effectiveTime . Therefore, this approach is not recommended as a general approach in a live system.

  1. From each set of
    Gloss
    tComponent
    versions with the same id select the
    Gloss
    tComponent
    version with the highest (most recent) effectiveTime .

...

In this sample code `snapshotTime()` is a function that returns the time to be applied to this snapshot. For the most recent

Gloss
tsnapshot view
this can be omitted as shown below:

...

Similar views can be created for each of the

Gloss
tComponent
tables by simply replacing the table name in both the outer and nested queries.

Note: The SQL queries in this and the following section assume applicability of a common versioning view for all

Gloss
tmodules
. In some case, where a
Gloss
tmodule
that is being used depends on an earlier version of another
Gloss
tmodule
, more complex queries and optimizations may be needed. For further information about how dependencies between
Gloss
tmodule
are represented see details of the Module dependency reference set .